diff options
| author | Guy Shapiro <guysh@mellanox.com> | 2015-10-22 15:20:08 +0300 |
|---|---|---|
| committer | Doug Ledford <dledford@redhat.com> | 2015-10-28 12:32:47 -0400 |
| commit | 565edd1d555513ab5d67a847d50d7c14c82ef6c3 (patch) | |
| tree | 7bd9732cb608a895524f7e1d36a3794f4759e286 /drivers/infiniband/core/cma.c | |
| parent | 630c3183cec33b502e80846e728c3ff165d1c84d (diff) | |
| download | linux-565edd1d555513ab5d67a847d50d7c14c82ef6c3.tar.gz linux-565edd1d555513ab5d67a847d50d7c14c82ef6c3.tar.bz2 linux-565edd1d555513ab5d67a847d50d7c14c82ef6c3.zip | |
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>
Diffstat (limited to 'drivers/infiniband/core/cma.c')
| -rw-r--r-- | drivers/infiniband/core/cma.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index be41784a62e4..80a8b469a9a8 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c @@ -610,6 +610,7 @@ struct rdma_cm_id *rdma_create_id(rdma_cm_event_handler event_handler, INIT_LIST_HEAD(&id_priv->listen_list); INIT_LIST_HEAD(&id_priv->mc_list); get_random_bytes(&id_priv->seq_num, sizeof id_priv->seq_num); + id_priv->id.route.addr.dev_addr.net = &init_net; return &id_priv->id; } |
