Re: OVS VXLAN decap rule has full match on TTL for the outer headers?

2015-11-29 Thread Haggai Eran
On 14/11/2015 08:45, Joe Stringer wrote: > On 13 November 2015 at 06:46, Or Gerlitz wrote: >> > On Fri, Nov 13, 2015 at 10:14 AM, Joe Stringer >> > wrote: >> > >>> >> I don't follow the logic. You observed one flow which matched on >>> >> TTL=64,

Re: [PATCH v1 08/12] IB/cma: Add net_dev and private data checks to RDMA CM

2015-07-15 Thread Haggai Eran
On 13/07/2015 21:14, Jason Gunthorpe wrote: On Mon, Jun 22, 2015 at 03:42:37PM +0300, Haggai Eran wrote: +switch (ib_event-event) { +case IB_CM_REQ_RECEIVED: +req-device = req_param-listen_id-device; +req-port = req_param-port; +req

Re: [PATCH v1 11/12] IB/cma: Share ib_cm_ids between rdma_cm_ids

2015-07-14 Thread Haggai Eran
On 13/07/2015 21:06, Jason Gunthorpe wrote: On Mon, Jun 22, 2015 at 03:42:40PM +0300, Haggai Eran wrote: Use ib_cm_id_create_and_listen to create listening IB CM IDs or share ^^^ Is that the wrong name? ib_cm_insert_listen perhaps? Yes, I missed that. Thanks

Re: [PATCH v1 05/12] IB/cm: Share listening CM IDs

2015-07-14 Thread Haggai Eran
On 13/07/2015 20:48, Jason Gunthorpe wrote: On Mon, Jun 22, 2015 at 03:42:34PM +0300, Haggai Eran wrote: spin_lock_irq(cm.lock); +if (--cm_id_priv-listen_sharecount 0) { +/* The id is still shared. */ +atomic_dec(cm_id_priv

Re: [PATCH v1 01/12] IB/core: pass client data to remove() callbacks

2015-07-14 Thread Haggai Eran
On 09/07/2015 00:34, Jason Gunthorpe wrote: On Wed, Jul 08, 2015 at 02:29:10PM -0600, Jason Gunthorpe wrote: On Mon, Jun 22, 2015 at 03:42:30PM +0300, Haggai Eran wrote: An ib_client callback that is called with the lists_rwsem locked only for read is protected from changes to the IB client

Re: [PATCH v1 03/12] IB/ipoib: Return IPoIB devices matching connection parameters

2015-07-09 Thread Haggai Eran
On 09/07/2015 02:41, Jason Gunthorpe wrote: On Mon, Jun 22, 2015 at 03:42:32PM +0300, Haggai Eran wrote: +if (net_dev) { +ipoib_warn(priv, matching net_dev found: %s\n, + net_dev-name); Is that a debug print? Yes, I'm afraid

Re: [PATCH v1 02/12] IB/core: Find the network device matching connection parameters

2015-07-09 Thread Haggai Eran
On 08/07/2015 23:33, Jason Gunthorpe wrote: On Mon, Jun 22, 2015 at 03:42:31PM +0300, Haggai Eran wrote: +/** + * ib_get_net_dev_by_params() - Return the appropriate net_dev + * for a received CM request + * @dev:An RDMA device on which the request has been received. + * @port: Port

[PATCH v1 00/12] Demux IB CM requests in the rdma_cm module

2015-06-22 Thread Haggai Eran
://www.spinics.net/lists/linux-rdma/msg25931.html Guy Shapiro (1): IB/ipoib: Return IPoIB devices matching connection parameters Haggai Eran (10): IB/core: pass client data to remove() callbacks IB/cm: Expose service ID in request events IB/cm: Share listening CM IDs IB/cma: Refactor RDMA IP CM

[PATCH v1 04/12] IB/cm: Expose service ID in request events

2015-06-22 Thread Haggai Eran
Expose the service ID on an incoming CM or SIDR request to the event handler. This will allow the RDMA CM module to de-multiplex connection requests based on the information encoded in the service ID. Acked-by: Sean Hefty sean.he...@intel.com Signed-off-by: Haggai Eran hagg...@mellanox.com

[PATCH v1 01/12] IB/core: pass client data to remove() callbacks

2015-06-22 Thread Haggai Eran
in ib_unregister_device(). Since remove() also needs access to the client data, change the remove callback to accept it as a parameter. Signed-off-by: Haggai Eran hagg...@mellanox.com --- drivers/infiniband/core/cache.c | 2 +- drivers/infiniband/core/cm.c | 7 +++ drivers

[PATCH v1 07/12] IB/cma: Helper functions to access port space IDRs

2015-06-22 Thread Haggai Eran
Add helper functions to access the IDRs by port-space and port number. Pass around the port-space enum in cma.c instead of using pointers to port-space IDRs. Signed-off-by: Haggai Eran hagg...@mellanox.com Signed-off-by: Yotam Kenneth yota...@mellanox.com Signed-off-by: Shachar Raindel rain

[PATCH v1 06/12] IB/cma: Refactor RDMA IP CM private-data parsing code

2015-06-22 Thread Haggai Eran
Shapiro gu...@mellanox.com Signed-off-by: Haggai Eran hagg...@mellanox.com Signed-off-by: Yotam Kenneth yota...@mellanox.com Signed-off-by: Shachar Raindel rain...@mellanox.com --- drivers/infiniband/core/cma.c | 150 ++ 1 file changed, 92 insertions(+), 58

[PATCH v1 03/12] IB/ipoib: Return IPoIB devices matching connection parameters

2015-06-22 Thread Haggai Eran
devices when searching for a matching IP, in order to support bonding. Signed-off-by: Guy Shapiro gu...@mellanox.com Signed-off-by: Haggai Eran hagg...@mellanox.com Signed-off-by: Yotam Kenneth yota...@mellanox.com Signed-off-by: Shachar Raindel rain...@mellanox.com --- drivers/infiniband/ulp

[PATCH v1 11/12] IB/cma: Share ib_cm_ids between rdma_cm_ids

2015-06-22 Thread Haggai Eran
capabilities. Signed-off-by: Haggai Eran hagg...@mellanox.com --- drivers/infiniband/core/cma.c | 60 --- 1 file changed, 5 insertions(+), 55 deletions(-) diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index 729511d3ec64..322858842bae

[PATCH v1 12/12] IB/cm: Remove compare_data checks

2015-06-22 Thread Haggai Eran
Now that there are no ib_cm clients using the compare_data feature for matching IB CM requests' private data, remove the compare_data parameter of ib_cm_listen and remove the code implementing the feature. Signed-off-by: Haggai Eran hagg...@mellanox.com --- drivers/infiniband/core/cm.c

[PATCH v1 10/12] IB/cma: use found net_dev for passive connections

2015-06-22 Thread Haggai Eran
When receiving a new connection in cma_req_handler, we actually already know the net_dev that is used for the connection's creation. Instead of calling cma_translate_addr to resolve the new connection id's source address, just use the net_dev that was found. Signed-off-by: Haggai Eran hagg

[PATCH v1 08/12] IB/cma: Add net_dev and private data checks to RDMA CM

2015-06-22 Thread Haggai Eran
in RDMA CM by making these checks namespace aware later on. Signed-off-by: Haggai Eran hagg...@mellanox.com --- drivers/infiniband/core/cma.c | 170 +- 1 file changed, 168 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/core/cma.c b/drivers

[PATCH v1 09/12] IB/cma: validate routing of incoming requests

2015-06-22 Thread Haggai Eran
Pass incoming request parameters through the relevant IPv4/IPv6 routing tables and make sure the network stack is configured to handle such requests. Signed-off-by: Haggai Eran hagg...@mellanox.com --- drivers/infiniband/core/cma.c | 95 +-- 1 file changed

[PATCH v1 05/12] IB/cm: Share listening CM IDs

2015-06-22 Thread Haggai Eran
]. [1] Re: [PATCH v3 for-next 05/13] IB/cm: Reference count ib_cm_ids http://www.spinics.net/lists/netdev/msg328860.html Cc: Jason Gunthorpe jguntho...@obsidianresearch.com Signed-off-by: Haggai Eran hagg...@mellanox.com --- drivers/infiniband/core/cm.c | 124

[PATCH v1 02/12] IB/core: Find the network device matching connection parameters

2015-06-22 Thread Haggai Eran
ipvlan-like configurations for RDMA CM with IPoIB. To resolve the device in these cases the code will also take the IP address as an additional input. Signed-off-by: Haggai Eran hagg...@mellanox.com Signed-off-by: Yotam Kenneth yota...@mellanox.com Signed-off-by: Shachar Raindel rain...@mellanox.com

Re: [PATCH 07/11] IB/cma: Helper functions to access port space IDRs

2015-06-21 Thread Haggai Eran
On 16/06/2015 01:36, Hefty, Sean wrote: Add helper functions to access the IDRs by port-space and port number. Pass around the port-space enum in cma.c instead of using pointers to port-space IDRs. What is the motivation for this change? In the next patch (IB/cma: Add net_dev and private

Re: [PATCH 08/11] IB/cma: Add net_dev and private data checks to RDMA CM

2015-06-18 Thread Haggai Eran
On 17/06/2015 20:18, Jason Gunthorpe wrote: On Tue, Jun 16, 2015 at 08:26:26AM +0300, Haggai Eran wrote: On 15/06/2015 20:08, Jason Gunthorpe wrote: On Mon, Jun 15, 2015 at 11:47:13AM +0300, Haggai Eran wrote: Instead of relying on a the ib_cm module to check an incoming CM request's private

Re: [PATCH 04/11] IB/cm: Expose DGID in SIDR request events

2015-06-18 Thread Haggai Eran
On 17/06/2015 20:06, Jason Gunthorpe wrote: On Tue, Jun 16, 2015 at 02:25:07PM +0300, Haggai Eran wrote: Regarding APM, currently the ib_cm code always sends the GMP to the primary path anyway, right? And in any case, one would expect the primary path's GID to have a valid net_device

Re: [PATCH 04/11] IB/cm: Expose DGID in SIDR request events

2015-06-17 Thread Haggai Eran
On Tuesday, June 16, 2015 7:47 PM, Hefty, Sean sean.he...@intel.com wrote: To: Haggai Eran; Doug Ledford Cc: linux-r...@vger.kernel.org; netdev@vger.kernel.org; Liran Liss; Guy Shapiro; Shachar Raindel; Yotam Kenneth; Jason Gunthorpe Subject: RE: [PATCH 04/11] IB/cm: Expose DGID in SIDR

Re: [PATCH 06/11] IB/cma: Refactor RDMA IP CM private-data parsing code

2015-06-16 Thread Haggai Eran
On 16/06/2015 01:33, Hefty, Sean wrote: -static int cma_save_net_info(struct rdma_cm_id *id, struct rdma_cm_id *listen_id, - struct ib_cm_event *ib_event) +static u16 cma_port_from_service_id(__be64 service_id) { -struct cma_hdr *hdr; +return

Re: [PATCH 05/11] IB/cm: Share listening CM IDs

2015-06-16 Thread Haggai Eran
On 16/06/2015 01:13, Hefty, Sean wrote: @@ -722,6 +725,7 @@ struct ib_cm_id *ib_create_cm_id(struct ib_device *device, INIT_LIST_HEAD(cm_id_priv-work_list); atomic_set(cm_id_priv-work_count, -1); atomic_set(cm_id_priv-refcount, 1); +cm_id_priv-listen_sharecount = 1;

Re: [PATCH 04/11] IB/cm: Expose DGID in SIDR request events

2015-06-16 Thread Haggai Eran
On 16/06/2015 00:32, Hefty, Sean wrote: drivers/infiniband/core/cm.c | 7 +++ include/rdma/ib_cm.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c index c5f5f89e274a..46f99ec4080a 100644 ---

Re: [PATCH 02/11] IB/ipoib: Return IPoIB devices matching connection parameters

2015-06-16 Thread Haggai Eran
On 15/06/2015 20:22, Jason Gunthorpe wrote: On Mon, Jun 15, 2015 at 11:47:07AM +0300, Haggai Eran wrote: +/* Called with an RCU read lock taken */ Add _rcu to the name? That is the standard convention. Sure, I'll change that. +/* returns an IPoIB netdev on top a given ipoib device

Re: [PATCH 04/11] IB/cm: Expose DGID in SIDR request events

2015-06-16 Thread Haggai Eran
On 16/06/2015 01:08, Jason Gunthorpe wrote: On Mon, Jun 15, 2015 at 09:32:53PM +, Hefty, Sean wrote: drivers/infiniband/core/cm.c | 7 +++ include/rdma/ib_cm.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c

[PATCH 03/11] IB/cm: Expose service ID in request events

2015-06-15 Thread Haggai Eran
Expose the service ID on an incoming CM or SIDR request to the event handler. This will allow the RDMA CM module to de-multiplex connection requests based on the information encoded in the service ID. Signed-off-by: Haggai Eran hagg...@mellanox.com --- drivers/infiniband/core/cm.c | 3

[PATCH 06/11] IB/cma: Refactor RDMA IP CM private-data parsing code

2015-06-15 Thread Haggai Eran
Shapiro gu...@mellanox.com Signed-off-by: Haggai Eran hagg...@mellanox.com Signed-off-by: Yotam Kenneth yota...@mellanox.com Signed-off-by: Shachar Raindel rain...@mellanox.com --- drivers/infiniband/core/cma.c | 150 ++ 1 file changed, 92 insertions(+), 58

[PATCH 05/11] IB/cm: Share listening CM IDs

2015-06-15 Thread Haggai Eran
]. [1] Re: [PATCH v3 for-next 05/13] IB/cm: Reference count ib_cm_ids http://www.spinics.net/lists/netdev/msg328860.html Cc: Jason Gunthorpe jguntho...@obsidianresearch.com Signed-off-by: Haggai Eran hagg...@mellanox.com --- drivers/infiniband/core/cm.c | 127

[PATCH 00/11] Demux IB CM requests in the rdma_cm module

2015-06-15 Thread Haggai Eran
connection parameters Haggai Eran (9): IB/cm: Expose service ID in request events IB/cm: Expose DGID in SIDR request events IB/cm: Share listening CM IDs IB/cma: Refactor RDMA IP CM private-data parsing code IB/cma: Helper functions to access port space IDRs IB/cma: Add net_dev

[PATCH 02/11] IB/ipoib: Return IPoIB devices matching connection parameters

2015-06-15 Thread Haggai Eran
devices when searching for a matching IP, in order to support bonding. Signed-off-by: Guy Shapiro gu...@mellanox.com Signed-off-by: Haggai Eran hagg...@mellanox.com Signed-off-by: Yotam Kenneth yota...@mellanox.com Signed-off-by: Shachar Raindel rain...@mellanox.com --- drivers/infiniband/ulp

[PATCH 11/11] IB/cm: Remove compare_data checks

2015-06-15 Thread Haggai Eran
Now that there are no ib_cm clients using the compare_data feature for matching IB CM requests' private data, remove the compare_data parameter of ib_cm_listen and remove the code implementing the feature. Signed-off-by: Haggai Eran hagg...@mellanox.com --- drivers/infiniband/core/cm.c

[PATCH 08/11] IB/cma: Add net_dev and private data checks to RDMA CM

2015-06-15 Thread Haggai Eran
in RDMA CM by making these checks namespace aware later on. Signed-off-by: Haggai Eran hagg...@mellanox.com --- drivers/infiniband/core/cma.c | 170 +- 1 file changed, 168 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/core/cma.c b/drivers

[PATCH 09/11] IB/cma: validate routing of incoming requests

2015-06-15 Thread Haggai Eran
Pass incoming request parameters through the relevant IPv4/IPv6 routing tables and make sure the network stack is configured to handle such requests. Signed-off-by: Haggai Eran hagg...@mellanox.com --- drivers/infiniband/core/cma.c | 100 -- 1 file changed

[PATCH 10/11] IB/cma: Share ib_cm_ids between rdma_cm_ids

2015-06-15 Thread Haggai Eran
capabilities. Signed-off-by: Haggai Eran hagg...@mellanox.com --- drivers/infiniband/core/cma.c | 60 --- 1 file changed, 5 insertions(+), 55 deletions(-) diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index 74e562ec5b93..c6d5fa7ab64a

[PATCH 07/11] IB/cma: Helper functions to access port space IDRs

2015-06-15 Thread Haggai Eran
Add helper functions to access the IDRs by port-space and port number. Pass around the port-space enum in cma.c instead of using pointers to port-space IDRs. Signed-off-by: Haggai Eran hagg...@mellanox.com Signed-off-by: Yotam Kenneth yota...@mellanox.com Signed-off-by: Shachar Raindel rain

[PATCH 04/11] IB/cm: Expose DGID in SIDR request events

2015-06-15 Thread Haggai Eran
The destination GID can be used to uniquely resolve the request. Expose the GID in SIDR request events when it is available, so that the rdma_cm module can use that information. Signed-off-by: Haggai Eran hagg...@mellanox.com --- drivers/infiniband/core/cm.c | 7 +++ include/rdma/ib_cm.h

[PATCH 01/11] IB/core: Find the network device matching connection parameters

2015-06-15 Thread Haggai Eran
ipvlan-like configurations for RDMA CM with IPoIB. To resolve the device in these cases the code will also take the IP address as an additional input. Signed-off-by: Haggai Eran hagg...@mellanox.com Signed-off-by: Yotam Kenneth yota...@mellanox.com Signed-off-by: Shachar Raindel rain...@mellanox.com

Re: [PATCH 08/11] IB/cma: Add net_dev and private data checks to RDMA CM

2015-06-15 Thread Haggai Eran
On 15/06/2015 20:08, Jason Gunthorpe wrote: On Mon, Jun 15, 2015 at 11:47:13AM +0300, Haggai Eran wrote: Instead of relying on a the ib_cm module to check an incoming CM request's private data header, add these checks to the RDMA CM module. This allows a following patch to to clean up

Re: [PATCH v4 for-next 00/12] Add network namespace support in the RDMA-CM

2015-06-08 Thread Haggai Eran
On 04/06/2015 19:40, Jason Gunthorpe wrote: Discussion idea: Can we actually use the netstack to process the RDMA-CM packets? It looks like the netstack wants a skb to do this mid-layer work, so rdma-cm would have to synthesize a skb for the CM packets and pass it through netdev to apply all

Re: [PATCH v4 for-next 00/12] Add network namespace support in the RDMA-CM

2015-06-04 Thread Haggai Eran
On 04/06/2015 02:48, Jason Gunthorpe wrote: On Wed, Jun 03, 2015 at 11:07:37PM +0300, Or Gerlitz wrote: I'm mostly fine with it as an optional capability, similar to macvlan, I just don't see how to cleanly integrate it with RDMA CM and namespaces. And I don't see what RDMA CM is supposed to

Re: [PATCH v4 for-next 00/12] Add network namespace support in the RDMA-CM

2015-06-03 Thread Haggai Eran
On 28/05/2015 18:46, Jason Gunthorpe wrote: On Thu, May 28, 2015 at 04:22:36PM +0300, Haggai Eran wrote: wouldn't care if they share the QP number namespace, etc. RDMA CM ports are different because they are chosen by the applications, but they map directly to the network namespace, so

Re: [PATCH v4 for-next 00/12] Add network namespace support in the RDMA-CM

2015-06-03 Thread Haggai Eran
On 29/05/2015 00:55, Doug Ledford wrote: On Thu, 2015-05-28 at 22:05 +0300, Or Gerlitz wrote: So what's your concrete saying here? where should we go from here? This excerpt is from the commit log of patch 3/12: The IB device and port, together with the P_Key and the IP address should be

Re: [PATCH v4 for-next 04/12] IB/ipoib: Return IPoIB devices matching connection parameters

2015-05-28 Thread Haggai Eran
On 21/05/2015 20:43, Jason Gunthorpe wrote: On Thu, May 21, 2015 at 08:33:53AM +0300, Haggai Eran wrote: To create a new child interface on the default P_Key, its possible to use iproute: # ip link add link ib0 name ib0.1 type ipoib Uh.. A key invariant of the IP stack

Re: [PATCH v4 for-next 00/12] Add network namespace support in the RDMA-CM

2015-05-28 Thread Haggai Eran
On 26/05/2015 16:34, Doug Ledford wrote: On Sun, 2015-05-17 at 08:50 +0300, Haggai Eran wrote: Thanks again everyone for the review comments. I've updated the patch set accordingly. The main changes are in the first patch to use a read-write semaphore instead of an SRCU, and with the reference

Re: [PATCH v4 for-next 00/12] Add network namespace support in the RDMA-CM

2015-05-28 Thread Haggai Eran
On 26/05/2015 19:59, Jason Gunthorpe wrote: The big open question for ethernet is how to work without relying on VLAN to create delgated netdevs - typically one would use a bridge and veth's, which do not seem very RDMA compatible. But that doesn't need to be answered right now. I think in

Re: [PATCH] staging: r8712u: Fix kernel warning for improper call of del_timer_sync()

2015-05-24 Thread Haggai Eran
On 24 May 2015 at 00:16, Larry Finger larry.fin...@lwfinger.net wrote: The driver is reporting a warning at kernel/time/timer.c:1096 due to calling del_timer_sync() while in interrupt mode. Such warnings are fixed by calling del_timer() instead. Signed-off-by: Larry Finger

Re: [PATCH v4 for-next 05/12] IB/cm: Share listening CM IDs

2015-05-21 Thread Haggai Eran
On 20/05/2015 01:35, Jason Gunthorpe wrote: On Tue, May 19, 2015 at 12:35:45PM -0600, Jason Gunthorpe wrote: On Sun, May 17, 2015 at 08:51:01AM +0300, Haggai Eran wrote: @@ -212,6 +212,8 @@ struct cm_id_private { spinlock_t lock;/* Do not acquire inside cm.lock */ struct

Re: [PATCH v3 for-next 05/13] IB/cm: Reference count ib_cm_ids

2015-05-21 Thread Haggai Eran
On 20/05/2015 03:49, Hefty, Sean wrote: I wonder if the existing ib_cm interface is even what we want. Currently, the rdma_cm pushes the private data (i.e. IP address) comparison into the ib_cm. This is only used by the rdma_cm. Should that instead be moved out of the ib_cm and handled in the

Re: [PATCH v4 for-next 05/12] IB/cm: Share listening CM IDs

2015-05-21 Thread Haggai Eran
On 19/05/2015 21:35, Jason Gunthorpe wrote: ... The share count should be 'listen_sharecount' because it *only* works for listen. The above test in cm_destroy_id should only be in the listen branch of the if. Okay. + * Create a new listening ib_cm_id and listen on the given service ID.

Re: [PATCH v4 for-next 04/12] IB/ipoib: Return IPoIB devices matching connection parameters

2015-05-21 Thread Haggai Eran
On 21/05/2015 08:48, Or Gerlitz wrote: On Thu, May 21, 2015 at 8:33 AM, Haggai Eran hagg...@mellanox.com wrote: On 20/05/2015 02:55, Jason Gunthorpe wrote: On Sun, May 17, 2015 at 08:51:00AM +0300, Haggai Eran wrote: From: Guy Shapiro gu...@mellanox.com Implement

Re: [PATCH v4 for-next 04/12] IB/ipoib: Return IPoIB devices matching connection parameters

2015-05-20 Thread Haggai Eran
On 20/05/2015 02:55, Jason Gunthorpe wrote: On Sun, May 17, 2015 at 08:51:00AM +0300, Haggai Eran wrote: From: Guy Shapiro gu...@mellanox.com Implement the get_net_device_by_port_pkey_ip callback that returns network device to ib_core according to connection parameters. Check the ipoib

Re: [PATCH v4 for-next 04/12] IB/ipoib: Return IPoIB devices matching connection parameters

2015-05-20 Thread Haggai Eran
On 20/05/2015 02:55, Jason Gunthorpe wrote: On Sun, May 17, 2015 at 08:51:00AM +0300, Haggai Eran wrote: For each ipoib device we iterate through all upper devices when searching for a matching IP, in order to support bonding. Checking an IP address in a packet against a device without

Re: [PATCH v4 for-next 04/12] IB/ipoib: Return IPoIB devices matching connection parameters

2015-05-20 Thread Haggai Eran
On 19/05/2015 21:28, Jason Gunthorpe wrote: On Sun, May 17, 2015 at 08:51:00AM +0300, Haggai Eran wrote: +#if IS_ENABLED(CONFIG_IPV6) +struct sockaddr_in6 *addr_in6 = (struct sockaddr_in6 *)addr; +#endif +__be32 ret_addr; + +switch (addr-sa_family) { +case AF_INET

[PATCH v3 for-next 01/13] IB/core: Use SRCU when reading client_list or device_list

2015-05-10 Thread Haggai Eran
Gunthorpe jguntho...@obsidianresearch.com Signed-off-by: Haggai Eran hagg...@mellanox.com --- drivers/infiniband/core/device.c | 75 ++-- 1 file changed, 56 insertions(+), 19 deletions(-) diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core

[PATCH v3 for-next 09/13] IB/cma: Add compare_data checks to the RDMA CM module

2015-05-10 Thread Haggai Eran
CM ID. Such an ID cannot be associated with a specific compare data, because that could create conflicts with other namespaces. The patch adds checks to verify that incoming requests match their RDMA CM ID destination inside the RDMA CM module itself. Signed-off-by: Haggai Eran hagg

[PATCH v3 for-next 06/13] IB/cm: API to retrieve existing listening CM IDs

2015-05-10 Thread Haggai Eran
an existing listening ib_cm_id, based on its device and service ID, or create a new one if one does not already exist. Signed-off-by: Haggai Eran hagg...@mellanox.com --- drivers/infiniband/core/cm.c | 104 --- include/rdma/ib_cm.h | 4 ++ 2 files

[PATCH v3 for-next 03/13] IB/core: Find the network namespace matching connection parameters

2015-05-10 Thread Haggai Eran
corresponding to a work completion. This is needed so that responses to CM requests can be sent from the same network namespace as the request. Signed-off-by: Haggai Eran hagg...@mellanox.com Signed-off-by: Yotam Kenneth yota...@mellanox.com Signed-off-by: Shachar Raindel rain...@mellanox.com Signed-off

Re: [PATCH v2 01/11] RDMA/CMA: Mark IPv4 addresses correctly when the listener is IPv6

2015-04-22 Thread Haggai Eran
On Tuesday, April 21, 2015 1:15 PM, Haggai Eran hagg...@mellanox.com wrote: On 20/04/2015 23:01, Jason Gunthorpe wrote: This should take care of it, testing, and figuring the fixes tag is left as an exercise to the reader.. Fixes: e51060f08a61 (IB: IP address based RDMA connection manager

Re: [PATCH v2 00/11] Add network namespace support in the RDMA-CM

2015-04-21 Thread Haggai Eran
On 20/04/2015 17:53, Steve Wise wrote: Hey Haggai, Did you check for changes needed in drivers/infiniband/core/iwcm.c? We focused on namespace support for InfiniBand alone in this series. We didn't handle iWARP, nor did we implement support for RoCE or other transports. I notice that it

Re: [PATCH v2 01/11] RDMA/CMA: Mark IPv4 addresses correctly when the listener is IPv6

2015-04-21 Thread Haggai Eran
On 20/04/2015 23:01, Jason Gunthorpe wrote: On Mon, Apr 20, 2015 at 09:38:02PM +0300, Or Gerlitz wrote: On Mon, Apr 20, 2015 at 7:41 PM, Jason Gunthorpe jguntho...@obsidianresearch.com wrote: On Mon, Apr 20, 2015 at 12:03:32PM +0300, Haggai Eran wrote: From: Yotam Kenneth yota...@mellanox.com

Re: [PATCH v2 00/11] Add network namespace support in the RDMA-CM

2015-04-21 Thread Haggai Eran
On 21/04/2015 17:11, Steve Wise wrote: On 4/21/2015 1:36 AM, Haggai Eran wrote: On 20/04/2015 17:53, Steve Wise wrote: Hey Haggai, Did you check for changes needed in drivers/infiniband/core/iwcm.c? We focused on namespace support for InfiniBand alone in this series. We didn't handle iWARP

Re: [PATCH v2 07/11] IB/cm: Add network namespace support

2015-04-21 Thread Haggai Eran
On 20/04/2015 20:06, Jason Gunthorpe wrote: On Mon, Apr 20, 2015 at 12:03:38PM +0300, Haggai Eran wrote: From: Guy Shapiro gu...@mellanox.com Add namespace support to the IB-CM layer. - Each CM-ID now has a network namespace it is associated with, assigned at creation. This namespace

Re: [PATCH v2 02/11] IB/addr: Pass network namespace as a parameter

2015-04-21 Thread Haggai Eran
On 21/04/2015 01:05, Doug Ledford wrote: On Mon, 2015-04-20 at 12:03 +0300, Haggai Eran wrote: From: Guy Shapiro gu...@mellanox.com Add network namespace support to the ib_addr module. For that, all the address resolution and matching should be done using the appropriate namespace instead

Re: [PATCH v2 02/11] IB/addr: Pass network namespace as a parameter

2015-04-21 Thread Haggai Eran
On 20/04/2015 20:09, Jason Gunthorpe wrote: On Mon, Apr 20, 2015 at 12:03:33PM +0300, Haggai Eran wrote: +/** rdma_addr_find_smac_by_sgid() - Find the src MAC and VLAN ID for a src GID + * @sgid: Source GID to find the MAC and VLAN for. + * @smac: A buffer to contain the resulting MAC

Re: [PATCH V1 net-next] IB/ipoib: Fix ndo_get_iflink

2015-04-20 Thread Haggai Eran
On 17/04/2015 22:21, David Miller wrote: From: Erez Shitrit ere...@mellanox.com Date: Thu, 16 Apr 2015 16:34:34 +0300 Currently, iflink of the parent interface was always accessed, even when interface didn't have a parent and hence we crashed there. Handle the interface types properly:

[PATCH v2 02/11] IB/addr: Pass network namespace as a parameter

2015-04-20 Thread Haggai Eran
is added on more levels. Signed-off-by: Haggai Eran hagg...@mellanox.com Signed-off-by: Yotam Kenneth yota...@mellanox.com Signed-off-by: Shachar Raindel rain...@mellanox.com Signed-off-by: Guy Shapiro gu...@mellanox.com --- drivers/infiniband/core/addr.c | 31

[PATCH v2 03/11] IB/core: Pass network namespace as a parameter to relevant functions

2015-04-20 Thread Haggai Eran
init_net permanently are marked with an appropriate comment. Signed-off-by: Haggai Eran hagg...@mellanox.com Signed-off-by: Yotam Kenneth yota...@mellanox.com Signed-off-by: Shachar Raindel rain...@mellanox.com Signed-off-by: Guy Shapiro gu...@mellanox.com --- drivers/infiniband/core/agent.c | 4

[PATCH v2 00/11] Add network namespace support in the RDMA-CM

2015-04-20 Thread Haggai Eran
On 4/15/2015 3:39 PM, Doug Ledford wrote: For instance, the namespace patches aren't included, and that's at least partially because they didn't apply cleanly any more. Here's an updated series on top of your tree. I've also included the fix for IPv4 connections to IPv6 listeners. Regards,

[PATCH v2 01/11] RDMA/CMA: Mark IPv4 addresses correctly when the listener is IPv6

2015-04-20 Thread Haggai Eran
From: Yotam Kenneth yota...@mellanox.com When accepting a new connection with the listener being IPv6, the family of the new connection is set as IPv6. This causes cma_zero_addr function to return true on an non-zero address. As a result, the wrong code path is taken. This causes the connection

[PATCH v2 10/11] IB/ucma: Take the network namespace from the process

2015-04-20 Thread Haggai Eran
From: Guy Shapiro gu...@mellanox.com Add support for network namespaces from user space. This is done by passing the network namespace of the process instead of init_net. Signed-off-by: Haggai Eran hagg...@mellanox.com Signed-off-by: Yotam Kenneth yota...@mellanox.com Signed-off-by: Shachar

[PATCH v2 05/11] IB/ipoib: Return IPoIB devices as possible matches to get_net_device_by_port_pkey_ip

2015-04-20 Thread Haggai Eran
for a matching IP, in order to support bonding. Signed-off-by: Guy Shapiro gu...@mellanox.com Signed-off-by: Haggai Eran hagg...@mellanox.com Signed-off-by: Yotam Kenneth yota...@mellanox.com Signed-off-by: Shachar Raindel rain...@mellanox.com --- drivers/infiniband/ulp/ipoib/ipoib_main.c | 122

[PATCH v2 08/11] IB/cma: Separate port allocation to network namespaces

2015-04-20 Thread Haggai Eran
a big, static mutex lock for the entire module. Signed-off-by: Haggai Eran hagg...@mellanox.com Signed-off-by: Yotam Kenneth yota...@mellanox.com Signed-off-by: Shachar Raindel rain...@mellanox.com Signed-off-by: Guy Shapiro gu...@mellanox.com --- drivers/infiniband/core/cma.c | 122

[PATCH v2 06/11] IB/cm, cma: Move RDMA IP CM private-data parsing code from ib_cma to ib_cm

2015-04-20 Thread Haggai Eran
...@mellanox.com Signed-off-by: Haggai Eran hagg...@mellanox.com Signed-off-by: Yotam Kenneth yota...@mellanox.com Signed-off-by: Shachar Raindel rain...@mellanox.com --- drivers/infiniband/core/cm.c | 156 +++ drivers/infiniband/core/cma.c | 166

[PATCH v2 07/11] IB/cm: Add network namespace support

2015-04-20 Thread Haggai Eran
created by accepting a connection for a listening CM-ID will also take a reference to the namespace. When the ID is destroyed, the namespace reference is released. Signed-off-by: Guy Shapiro gu...@mellanox.com Signed-off-by: Haggai Eran hagg...@mellanox.com Signed-off-by: Yotam Kenneth yota

[PATCH v2 09/11] IB/cma: Add support for network namespaces

2015-04-20 Thread Haggai Eran
from other modules. Signed-off-by: Guy Shapiro gu...@mellanox.com Signed-off-by: Haggai Eran hagg...@mellanox.com Signed-off-by: Yotam Kenneth yota...@mellanox.com Signed-off-by: Shachar Raindel rain...@mellanox.com --- drivers/infiniband/core/cma.c | 52

[PATCH v2 11/11] IB/ucm: Add partial support for network namespaces

2015-04-20 Thread Haggai Eran
data formatting. Signed-off-by: Haggai Eran hagg...@mellanox.com Signed-off-by: Yotam Kenneth yota...@mellanox.com Signed-off-by: Shachar Raindel rain...@mellanox.com Signed-off-by: Guy Shapiro gu...@mellanox.com --- drivers/infiniband/core/ucm.c | 3 ++- 1 file changed, 2 insertions(+), 1

[PATCH v2 04/11] IB/core: Find the network namespace matching connection parameters

2015-04-20 Thread Haggai Eran
corresponding to a work completion. This is needed so that responses to CM requests can be sent from the same network namespace as the request. Signed-off-by: Haggai Eran hagg...@mellanox.com Signed-off-by: Yotam Kenneth yota...@mellanox.com Signed-off-by: Shachar Raindel rain...@mellanox.com Signed-off