From: Jason Gunthorpe <jgg@nvidia.com>
To: Christoph Lameter <cl@gentwo.de>
Cc: linux-rdma@vger.kernel.org, Leon Romanovsky <leon@kernel.org>
Subject: Re: [PATCH][FIX] ROCE Multicast: Do not send IGMP leaves for sendonly Multicast groups
Date: Tue, 14 Sep 2021 15:57:43 -0300 [thread overview]
Message-ID: <20210914185743.GA140712@nvidia.com> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2109081340540.668072@gentwo.de>
On Wed, Sep 08, 2021 at 01:43:28PM +0200, Christoph Lameter wrote:
> ROCE uses IGMP for Multicast instead of the native Infiniband system where
> joins are required in order to post messages on the Multicast group.
> On Ethernet one can send Multicast messages to arbitrary addresses
> without the need to subscribe to a group.
>
> So ROCE correctly does not send IGMP joins during rdma_join_multicast().
>
> F.e. in cma_iboe_join_multicast() we see:
>
> if (addr->sa_family == AF_INET) {
> if (gid_type == IB_GID_TYPE_ROCE_UDP_ENCAP) {
> ib.rec.hop_limit = IPV6_DEFAULT_HOPLIMIT;
> if (!send_only) {
> err = cma_igmp_send(ndev, &ib.rec.mgid,
> true);
> }
> }
> } else {
>
> So the IGMP join is suppressed as it is unnecessary.
>
> However no such check is done in destroy_mc(). And therefore leaving a
> sendonly multicast group will send an IGMP leave.
>
> This means that the following scenario can lead to a multicast receiver
> unexpectedly being unsubscribed from a MC group:
>
>
> 1. Sender thread does a sendonly join on MC group X. No IGMP join
> is sent.
>
> 2. Receiver thread does a regular join on the same MC Group x.
> IGMP join is sent and the receiver begins to get messages.
>
> 3. Sender thread terminates and destroys MC group X.
> IGMP leave is sent and the receiver no longer receives data.
>
> This patch adds the same logic for sendonly joins to destroy_mc()
> that is also used in cma_iboe_join_multicast().
>
> Signed-off-by: Christoph Lameter <cl@linux.com>
I added the missing fixes line:
Fixes: ab15c95a17b3 ("IB/core: Support for CMA multicast join flags")
Applied to for-rc, thanks
Jason
prev parent reply other threads:[~2021-09-14 18:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-08 11:43 [PATCH][FIX] ROCE Multicast: Do not send IGMP leaves for sendonly Multicast groups Christoph Lameter
2021-09-13 10:38 ` Leon Romanovsky
2021-09-14 18:38 ` Jason Gunthorpe
2021-09-15 19:44 ` Christoph Lameter
2021-09-14 18:57 ` Jason Gunthorpe [this message]
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=20210914185743.GA140712@nvidia.com \
--to=jgg@nvidia.com \
--cc=cl@gentwo.de \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.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.