Re: [PATCH] IB/mlx4: Allow to always block UD multicast loopback

Christoph Lameter
2014-05-06T20:08:21Z

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.

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?