All of lore.kernel.org
 help / color / mirror / Atom feed
From: "ira.weiny" <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: Erez Shitrit <erezsh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
	cl-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org,
	bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH V4 for-next 4/4] IB/ipoib: Support SendOnlyFullMember MCG for SendOnly join
Date: Tue, 17 May 2016 16:10:25 -0400	[thread overview]
Message-ID: <20160517201023.GC17141@phlsvsds.ph.intel.com> (raw)
In-Reply-To: <1463401694-19247-5-git-send-email-erezsh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

On Mon, May 16, 2016 at 03:28:14PM +0300, Erez Shitrit wrote:
> 
> Check (via an SA query) if the SM supports the new option for SendOnly
> multicast joins.
> If the SM supports that option it will use the new join state to create
> such multicast group.
> If SendOnlyFullMember is supported, we wouldn't use faked FullMember state
> join for SendOnly MCG, use the correct state if supported.
> 
> This check is performed at every invocation of mcast_restart task, to be
> sure that the driver stays in sync with the current state of the SM.
> 
> Signed-off-by: Erez Shitrit <erezsh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Reviewed-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> ---
>  drivers/infiniband/ulp/ipoib/ipoib.h           |  2 +
>  drivers/infiniband/ulp/ipoib/ipoib_main.c      | 72 ++++++++++++++++++++++++++
>  drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 38 +++++++++-----
>  3 files changed, 99 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/infiniband/ulp/ipoib/ipoib.h b/drivers/infiniband/ulp/ipoib/ipoib.h
> index caec8e9..c51f618 100644
> --- a/drivers/infiniband/ulp/ipoib/ipoib.h
> +++ b/drivers/infiniband/ulp/ipoib/ipoib.h
> @@ -392,6 +392,7 @@ struct ipoib_dev_priv {
>  	struct ipoib_ethtool_st ethtool;
>  	struct timer_list poll_timer;
>  	unsigned max_send_sge;
> +	bool sm_fullmember_sendonly_support;
>  };
>  
>  struct ipoib_ah {
> @@ -476,6 +477,7 @@ void ipoib_reap_ah(struct work_struct *work);
>  
>  void ipoib_mark_paths_invalid(struct net_device *dev);
>  void ipoib_flush_paths(struct net_device *dev);
> +int ipoib_check_sm_sendonly_fullmember_support(struct ipoib_dev_priv *priv);
>  struct ipoib_dev_priv *ipoib_intf_alloc(const char *format);
>  
>  int ipoib_ib_dev_init(struct net_device *dev, struct ib_device *ca, int port);
> diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
> index 3b630e5..72be933 100644
> --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
> +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
> @@ -117,6 +117,8 @@ int ipoib_open(struct net_device *dev)
>  
>  	set_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags);
>  
> +	priv->sm_fullmember_sendonly_support = false;
> +
>  	if (ipoib_ib_dev_open(dev)) {
>  		if (!test_bit(IPOIB_PKEY_ASSIGNED, &priv->flags))
>  			return 0;
> @@ -629,6 +631,76 @@ void ipoib_mark_paths_invalid(struct net_device *dev)
>  	spin_unlock_irq(&priv->lock);
>  }
>  
> +struct classport_info_context {
> +	struct ipoib_dev_priv	*priv;
> +	struct completion	done;
> +	struct ib_sa_query	*sa_query;
> +};
> +
> +static void classport_info_query_cb(int status, struct ib_class_port_info *rec,
> +				    void *context)
> +{
> +	struct classport_info_context *cb_ctx = context;
> +	struct ipoib_dev_priv *priv;
> +
> +	WARN_ON(!context);
> +
> +	priv = cb_ctx->priv;
> +
> +	if (status) {
> +		pr_debug("device: %s failed query classport_info status: %d\n",
> +			 priv->dev->name, status);
> +		/* keeps the default, will try next mcast_restart */
> +		priv->sm_fullmember_sendonly_support = false;
> +		goto out;
> +	}
> +	if (ib_get_cpi_capmask2(rec) &

rec may be NULL here from the SA code.

Ira

--
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

  parent reply	other threads:[~2016-05-17 20:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-16 12:28 [PATCH V4 for-next 0/4] Support SendOnlyFullMember join Erez Shitrit
     [not found] ` <1463401694-19247-1-git-send-email-erezsh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-05-16 12:28   ` [PATCH V4 for-next 1/4] IB/core: Introduce capabilitymask2 field in ClassPortInfo mad Erez Shitrit
     [not found]     ` <1463401694-19247-2-git-send-email-erezsh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-05-16 13:00       ` Hal Rosenstock
     [not found]         ` <508890fe-b1c2-14c4-21a3-2d9afcb00916-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2016-05-16 13:04           ` Erez Shitrit
     [not found]             ` <CAAk-MO-q7z=TsJgLhbbj6LeDzEQ8c6q_yFnNTft8hkB_sd4gpw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-05-16 14:59               ` Erez Shitrit
2016-05-17 19:45       ` ira.weiny
2016-05-16 12:28   ` [PATCH V4 for-next 2/4] IB/SA Agent: Add support for SA agent get ClassPortInfo Erez Shitrit
2016-05-16 12:28   ` [PATCH V4 for-next 3/4] IB/core: Support new type of join-state for multicast Erez Shitrit
     [not found]     ` <1463401694-19247-4-git-send-email-erezsh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-05-17 19:50       ` ira.weiny
2016-05-16 12:28   ` [PATCH V4 for-next 4/4] IB/ipoib: Support SendOnlyFullMember MCG for SendOnly join Erez Shitrit
     [not found]     ` <1463401694-19247-5-git-send-email-erezsh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-05-17 20:10       ` ira.weiny [this message]
     [not found]         ` <20160517201023.GC17141-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2016-05-18 12:28           ` Erez Shitrit
2016-05-16 15:45   ` [PATCH V4 for-next 0/4] Support SendOnlyFullMember join Doug Ledford
     [not found]     ` <8e7686fa-de3e-1a92-1168-528909eb4019-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-05-16 18:10       ` Erez Shitrit
     [not found]         ` <CAAk-MO_CXmP+-WKbXpnFV=JaOu6Cspo3bGL0qwMJeoe3NoyTmQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-05-16 19:31           ` Erez Shitrit

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=20160517201023.GC17141@phlsvsds.ph.intel.com \
    --to=ira.weiny-ral2jqcrhueavxtiumwx3w@public.gmane.org \
    --cc=bart.vanassche-XdAiOPVOjttBDgjK7y7TUQ@public.gmane.org \
    --cc=cl-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=erezsh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=ogerlitz-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.