OSDN Git Service

IB/addr: Pass network namespace as a parameter
authorGuy Shapiro <guysh@mellanox.com>
Thu, 22 Oct 2015 12:20:08 +0000 (15:20 +0300)
committerDoug Ledford <dledford@redhat.com>
Wed, 28 Oct 2015 16:32:47 +0000 (12:32 -0400)
commit565edd1d555513ab5d67a847d50d7c14c82ef6c3
tree7bd9732cb608a895524f7e1d36a3794f4759e286
parent630c3183cec33b502e80846e728c3ff165d1c84d
IB/addr: Pass network namespace as a parameter

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 of init_net.

This is achieved by:

1. Adding an explicit network namespace argument to exported function that
   require a namespace.
2. Saving the namespace in the rdma_addr_client structure.
3. Using it when calling networking functions.

In order to preserve the behavior of calling modules, &init_net is
passed as the parameter in calls from other modules. This is modified as
namespace support is added on more levels.

Signed-off-by: Haggai Eran <haggaie@mellanox.com>
Signed-off-by: Yotam Kenneth <yotamke@mellanox.com>
Signed-off-by: Shachar Raindel <raindel@mellanox.com>
Signed-off-by: Guy Shapiro <guysh@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/addr.c
drivers/infiniband/core/cma.c
include/rdma/ib_addr.h