From: Yann Droneaud <ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>
To: Shachar Raindel <raindel-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Cc: roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
liranl-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
Guy Shapiro <guysh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
Haggai Eran <haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
Yotam Kenneth <yotamke-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: Re: [PATCH for-next 02/10] IB/core: Pass network namespace as a parameter to relevant functions
Date: Sun, 01 Feb 2015 13:26:50 +0100 [thread overview]
Message-ID: <1422793610.3030.39.camel@opteya.com> (raw)
In-Reply-To: <1422790133-28725-3-git-send-email-raindel-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Hi,
Le dimanche 01 février 2015 à 13:28 +0200, Shachar Raindel a écrit :
> From: Guy Shapiro <guysh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
>
> 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 <haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Signed-off-by: Yotam Kenneth <yotamke-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Signed-off-by: Shachar Raindel <raindel-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Signed-off-by: Guy Shapiro <guysh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
>
> ---
> 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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-02-01 12:26 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-01 11:28 [PATCH for-next 00/11] Add network namespace support in the RDMA-CM Shachar Raindel
2015-02-01 11:28 ` [PATCH for-next 01/10] IB/addr: Pass network namespace as a parameter Shachar Raindel
[not found] ` <1422790133-28725-2-git-send-email-raindel-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-02-01 12:22 ` Yann Droneaud
[not found] ` <1422793376.3030.37.camel-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>
2015-02-01 13:46 ` Shachar Raindel
[not found] ` <AM3PR05MB0935B7B53439298A7429158BDC3F0-LOZWmgKjnYgQouBfZGh8ttqRiQSDpxhJvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2015-02-01 14:38 ` Yann Droneaud
2015-02-01 11:28 ` [PATCH for-next 03/10] IB/core: Find the network namespace matching connection parameters Shachar Raindel
[not found] ` <1422790133-28725-1-git-send-email-raindel-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-02-01 11:28 ` [PATCH for-next 02/10] IB/core: Pass network namespace as a parameter to relevant functions Shachar Raindel
[not found] ` <1422790133-28725-3-git-send-email-raindel-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-02-01 12:26 ` Yann Droneaud [this message]
2015-02-01 14:10 ` Shachar Raindel
2015-02-01 11:28 ` [PATCH for-next 04/10] IB/ipoib: Return IPoIB devices as possible matches to get_net_device_by_port_pkey_ip Shachar Raindel
2015-02-01 11:28 ` [PATCH for-next 05/10] IB/cm,cma: Move RDMA IP CM private-data parsing code from ib_cma to ib_cm Shachar Raindel
2015-02-01 12:55 ` Yann Droneaud
[not found] ` <1422795359.3030.43.camel-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>
2015-02-01 14:29 ` Shachar Raindel
2015-02-01 11:28 ` [PATCH for-next 06/10] IB/cm: Add network namespace support Shachar Raindel
2015-02-01 11:28 ` [PATCH for-next 08/10] IB/cma: Add support for network namespaces Shachar Raindel
2015-02-01 13:44 ` Yann Droneaud
[not found] ` <1422798272.3030.48.camel-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>
2015-02-01 14:16 ` Shachar Raindel
2015-02-01 11:28 ` [PATCH for-next 07/10] IB/cma: Separate port allocation to " Shachar Raindel
2015-02-01 11:28 ` [PATCH for-next 09/10] IB/ucma: Take the network namespace from the process Shachar Raindel
2015-02-01 11:28 ` [PATCH for-next 10/10] IB/ucm: Add partial support for network namespaces Shachar Raindel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1422793610.3030.39.camel@opteya.com \
--to=ydroneaud-rly5vtjfyj3qt0dzr+alfa@public.gmane.org \
--cc=guysh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=liranl-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=raindel-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=yotamke-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox