All of lore.kernel.org
 help / color / mirror / Atom feed
From: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Christoph Lameter <cl-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org>
Cc: Or Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Roland Dreier <roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org>,
	Or Gerlitz <or.gerlitz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Sean Hefty <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH] IB/mlx4: Allow to always block UD multicast loopback
Date: Tue, 6 May 2014 16:47:04 -0400 (EDT)	[thread overview]
Message-ID: <43629.5026600876$1399409244@news.gmane.org> (raw)
In-Reply-To: <alpine.DEB.2.10.1405061503550.5175-gkYfJU5Cukgdnm+yROfE0A@public.gmane.org>

----- Original Message -----
> On Tue, 6 May 2014, Doug Ledford wrote:
> 
> > That table only tells the NIC to listen to specific multicast
> > addresses on the wire.  This is roughly equivalent to telling
> > the SM to subscribe the port to the multicast groups it needs
> > subscribed too.  In both cases, this merely gets the packets
> > to the card.  From there, the card (or the OS as is usually the
> > case on NICs and Ethernet multicast) must redistribute the
> > packet to all queue pairs that have subscribed to the group
> > that the packet was received from.  If you were to block it at
> > the group level, then it universally effect all applications
> > that subscribed to that group, and there might well be a number
> > of applications that did not request this behavior and would
> > be rightfully confused at the card/OS not sending them their
> > multicast packets.  So, I would suggest that the blocking of
> > loopback multicast packets needs to be "opt in" for all
> > applications.  The big hammer of blocking all loopback on an
> > entire card or an entire group, while possible, should be
> > highly discouraged.  It might work with limited applications
> > that know it is being done, but it can also lead to hard to
> > diagnose problems if you add a new application into the mix
> > and it is unaware of this hammer being used and unable to
> > handle the situation.
> 
> Right the multicast blocking occurs at the socket level for regular
> networking (see IP_MULTICAST_LOOP socket options). Socket are owned
> by the application.
> 
> 
> A QP is roughly the equivalent thing at the RDMA level. So it seems
> to me
> that blocking needs to occur at the QP level and not at the multicast
> group level as suggested by Sean.

Nobody that I know of suggested that this should occur at the multicast
group level.  I suggested, and Sean agreed with, the idea that this
should  happen at multicast join time.  That means it would be on a
per queue pair, per multicast join basis.

Setting the IP_MULTICAST_LOOP on the socket effects all joins on that
socket, so this would be a slightly different API.

Right now, the IP stack is somewhat limited in that you would have
to create two different sockets and set IP_MULTICAST_LOOP differently
on the two sockets in order to have some joins reflect your data back
and some not.  You could sort of create what I'm talking about by
using the source address block, but that would block all applications
from your IP address, not just your own sent data, and so wouldn't
really work.

My original preference would have been to allow one queue pair to
have joins in either blocked or unblocked state, that way you would
only need one queue pair for both your reflected and non-reflected
joins.  But it would be easier to have a program capable of both
sockets and RDMA connections if we make the queue pairs follow the
sockets semantics here, so I'll withdraw my concerns over the current
patch (but also wouldn't object to it being done on a per queue
pair basis either, since we don't exactly follow socket semantics
either way given that the socket semantics separate the join and
the ioctl to control this behavior, so separating qp creation
and the setting of this behavior in the RDMA API seems reasonable
too).

> The 2008 patch does exactly that and allow setting the multicast
> loopback
> blocking from user space. Moreover the support is already there for
> in
> kernel users. Could we just get that 2008 patch updated and merged?
> 
> 

-- 
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
              GPG KeyID: 0E572FDD
	      http://people.redhat.com/dledford

--
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:[~2014-05-06 20:47 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-21 18:09 [PATCH] IB/mlx4: Allow to always block UD multicast loopback Christoph Lameter
     [not found] ` <alpine.DEB.2.10.1404211308140.29240-gkYfJU5Cukgdnm+yROfE0A@public.gmane.org>
2014-04-21 20:44   ` Or Gerlitz
     [not found]     ` <CAJZOPZJfdaZ7QzgffzY9Ps-1aUCU+q_dSrj4XfekyfxNa-k+hg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-21 21:06       ` Christoph Lameter
     [not found]         ` <alpine.DEB.2.10.1404211605390.29907-gkYfJU5Cukgdnm+yROfE0A@public.gmane.org>
2014-04-21 21:10           ` Or Gerlitz
     [not found]             ` <CAJZOPZ+FwPc3OSVyvk0i4=gX-x0zf_+M8zL1_t9HWmEKi5397Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-22  0:26               ` Christoph Lameter
     [not found]                 ` <alpine.DEB.2.10.1404211926050.31858-gkYfJU5Cukgdnm+yROfE0A@public.gmane.org>
2014-04-22 13:48                   ` Christoph Lameter
     [not found]                     ` <alpine.DEB.2.10.1404220844430.4876-gkYfJU5Cukgdnm+yROfE0A@public.gmane.org>
2014-04-22 16:01                       ` Or Gerlitz
     [not found]                         ` <53569261.9010805-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2014-04-29 17:32                           ` Christoph Lameter
     [not found]                             ` <alpine.DEB.2.10.1404291231250.26056-gkYfJU5Cukgdnm+yROfE0A@public.gmane.org>
2014-04-30 19:41                               ` Or Gerlitz
     [not found]                                 ` <CAJZOPZJUksc6f6FMhenWJe5uvEVQ898ZQoLD0ss6vSrMC42ZPQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-30 23:18                                   ` Christoph Lameter
2014-04-30 23:28   ` Doug Ledford
     [not found] ` <53619638.48ae0e0a.2e40.ffffec09SMTPIN_ADDED_BROKEN@mx.google.com>
     [not found]   ` <53619638.48ae0e0a.2e40.ffffec09SMTPIN_ADDED_BROKEN-ATjtLOhZ0NVl57MIdRCFDg@public.gmane.org>
2014-05-01  6:12     ` Or Gerlitz
     [not found]       ` <5361E5C7.5030805-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2014-05-01 15:34         ` Doug Ledford
     [not found]       ` <1980561.1785.1398958457283.JavaMail."DougALedford"@Phenom>
2014-05-05 17:53         ` Hefty, Sean
     [not found]           ` <1828884A29C6694DAF28B7E6B8A82373992F869F-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-05-05 22:54             ` Christoph Lameter
     [not found]               ` <alpine.DEB.2.10.1405051754260.5069-gkYfJU5Cukgdnm+yROfE0A@public.gmane.org>
2014-05-05 22:57                 ` Hefty, Sean
     [not found]                   ` <1828884A29C6694DAF28B7E6B8A82373992F899C-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-05-06  0:26                     ` Christoph Lameter
2014-05-06 19:16                     ` Christoph Lameter
     [not found]                       ` <alpine.DEB.2.10.1405061414460.4548-gkYfJU5Cukgdnm+yROfE0A@public.gmane.org>
2014-05-06 19:25                         ` Doug Ledford
     [not found]                       ` <53693749.64db420a.500a.ffffe917SMTPIN_ADDED_BROKEN@mx.google.com>
     [not found]                         ` <53693749.64db420a.500a.ffffe917SMTPIN_ADDED_BROKEN-ATjtLOhZ0NVl57MIdRCFDg@public.gmane.org>
2014-05-06 20:08                           ` Christoph Lameter
     [not found]                             ` <alpine.DEB.2.10.1405061503550.5175-gkYfJU5Cukgdnm+yROfE0A@public.gmane.org>
2014-05-06 20:20                               ` Hefty, Sean
2014-05-06 20:47                               ` Doug Ledford [this message]
     [not found] ` <5361871e.c793420a.67de.2282SMTPIN_ADDED_BROKEN@mx.google.com>
     [not found]   ` <5361871e.c793420a.67de.2282SMTPIN_ADDED_BROKEN-ATjtLOhZ0NVl57MIdRCFDg@public.gmane.org>
2014-05-01 14:09     ` Christoph Lameter
     [not found]       ` <alpine.DEB.2.10.1405010907570.10334-gkYfJU5Cukgdnm+yROfE0A@public.gmane.org>
2014-05-01 15:32         ` Doug Ledford
     [not found]       ` <53626915.25fc420a.01b7.7ebbSMTPIN_ADDED_BROKEN@mx.google.com>
     [not found]         ` <53626915.25fc420a.01b7.7ebbSMTPIN_ADDED_BROKEN-ATjtLOhZ0NVl57MIdRCFDg@public.gmane.org>
2014-05-01 15:59           ` Christoph Lameter
     [not found]             ` <alpine.DEB.2.10.1405011059240.11342-gkYfJU5Cukgdnm+yROfE0A@public.gmane.org>
2014-05-05 17:31               ` Christoph Lameter

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='43629.5026600876$1399409244@news.gmane.org' \
    --to=dledford-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=cl-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=or.gerlitz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org \
    --cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@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.