Hi, Le dimanche 01 février 2015 à 13:28 +0200, Shachar Raindel a écrit : > From: Guy Shapiro <[email protected]> > > Add network namespace parameters for the address related ib_core > functions. The parameter is passed to lower level function, instead of > &init_net, so things are done in the correct namespace. > > For now pass &init_net on every caller. > Callers that will pass &init_net permanently are marked with an > appropriate comment. > > Signed-off-by: Haggai Eran <[email protected]> > Signed-off-by: Yotam Kenneth <[email protected]> > Signed-off-by: Shachar Raindel <[email protected]> > Signed-off-by: Guy Shapiro <[email protected]> > > --- > drivers/infiniband/core/agent.c | 4 +++- > drivers/infiniband/core/cm.c | 9 +++++++-- > drivers/infiniband/core/mad_rmpp.c | 10 ++++++++-- > drivers/infiniband/core/user_mad.c | 4 +++- > drivers/infiniband/core/verbs.c | 10 ++++++---- > drivers/infiniband/ulp/srpt/ib_srpt.c | 3 ++- > include/rdma/ib_verbs.h | 15 +++++++++++++-- > 7 files changed, 42 insertions(+), 13 deletions(-)
> diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h > index 0d74f1de99aa..dd4c80cea8d3 100644 > --- a/include/rdma/ib_verbs.h > +++ b/include/rdma/ib_verbs.h > @@ -48,6 +48,7 @@ > #include <linux/rwsem.h> > #include <linux/scatterlist.h> > #include <linux/workqueue.h> > +#include <net/net_namespace.h> > #include <uapi/linux/if_ether.h> > > #include <linux/atomic.h> > @@ -1801,9 +1802,14 @@ struct ib_ah *ib_create_ah(struct ib_pd *pd, struct > ib_ah_attr *ah_attr); > * ignored unless the work completion indicates that the GRH is valid. > * @ah_attr: Returned attributes that can be used when creating an address > * handle for replying to the message. > + * @net: The network namespace to use for address resolution. > + * > + * It is the caller's responsibility to make sure the network namespace is > + * alive until the function returns. Why ? > */ > int ib_init_ah_from_wc(struct ib_device *device, u8 port_num, struct ib_wc > *wc, > - struct ib_grh *grh, struct ib_ah_attr *ah_attr); > + struct ib_grh *grh, struct ib_ah_attr *ah_attr, > + struct net *net); > > /** > * ib_create_ah_from_wc - Creates an address handle associated with the > @@ -1813,12 +1819,17 @@ int ib_init_ah_from_wc(struct ib_device *device, u8 > port_num, struct ib_wc *wc, > * @grh: References the received global route header. This parameter is > * ignored unless the work completion indicates that the GRH is valid. > * @port_num: The outbound port number to associate with the address. > + * @net: The network namespace to use for address resolution. > * > * The address handle is used to reference a local or global destination > * in all UD QP post sends. > + * > + * It is the caller's responsibility to make sure the network namespace is > + * alive until the function returns. Why ? Regards. -- Yann Droneaud OPTEYA -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
