All of lore.kernel.org
 help / color / mirror / Atom feed
* IPoIB: Broken IGMP processing
@ 2010-08-23 17:16 Christoph Lameter
       [not found] ` <alpine.DEB.2.00.1008231210010.9840-sBS69tsa9Uj/9pzu0YdTqQ@public.gmane.org>
  0 siblings, 1 reply; 33+ messages in thread
From: Christoph Lameter @ 2010-08-23 17:16 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Or Gerlitz, Yossi Etigin, Roland Dreier

We see that IGMP timers are not properly deferred when hosts send IGMP
membership information. It looks as if the IPoIB layer does not properly
mark the multicast/broadcast packets with PACKET_MULTICAST or
PACKET_BROADCAST. As a results icmp_recv() ignores the IGMP membership
information from others. That in turn results in the IGMP timers
frequently expiring, thus the network becomes quite chatty.

The following is an untested patch: I am not sure how exact to access the
ipob Mac header. The IB header contains a special marker for IPoIB
multicast. So it should be simple to identify the multicast packets in the
receive path.


Subject: [IB] Make igmp processing work with IPOIB

IGMP processing is broken because the IPOIB does not set the
skb->pkt_type the right way for Multicast traffic. All incoming
packets are set to PACKET_HOST which means that the igmp_recv()
function will ignore the IGMP broadcasts/multicasts.

This in turn means that the IGMP timers are firing and are sending
information about multicast subscriptions unnecessarily. In a large
private network this can cause traffic spikes.

Signed-off-by: Christoph Lameter <cl-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org>

---
 drivers/infiniband/ulp/ipoib/ipoib.h    |   13 +++++++++++++
 drivers/infiniband/ulp/ipoib/ipoib_ib.c |    6 ++++--
 2 files changed, 17 insertions(+), 2 deletions(-)

Index: linux-2.6/drivers/infiniband/ulp/ipoib/ipoib.h
===================================================================
--- linux-2.6.orig/drivers/infiniband/ulp/ipoib/ipoib.h	2010-08-20 19:44:13.000000000 -0500
+++ linux-2.6/drivers/infiniband/ulp/ipoib/ipoib.h	2010-08-20 19:58:21.000000000 -0500
@@ -114,6 +114,9 @@ enum {
 #define	IPOIB_OP_CM     (0)
 #endif

+#define IPOIB_MGID_IPV4_SIGNATURE 0x401B
+#define IPOIB_MGID_IPV6_SIGNATURE 0x601B
+
 /* structs */

 struct ipoib_header {
@@ -125,6 +128,16 @@ struct ipoib_pseudoheader {
 	u8  hwaddr[INFINIBAND_ALEN];
 };

+int ipoib_is_ipv4_multicast(u8 *p)
+{
+	return *((u16 *)(p + 2)) == htonl(IPOIB_MGID_IPV4_SIGNATURE);
+}
+
+int ipoib_is_ipv6_multicast(u8 *p)
+{
+	return *((u16 *)(p + 2)) == htonl(IPOIB_MGID_IPV6_SIGNATURE);
+}
+
 /* Used for all multicast joins (broadcast, IPv4 mcast and IPv6 mcast) */
 struct ipoib_mcast {
 	struct ib_sa_mcmember_rec mcmember;
Index: linux-2.6/drivers/infiniband/ulp/ipoib/ipoib_ib.c
===================================================================
--- linux-2.6.orig/drivers/infiniband/ulp/ipoib/ipoib_ib.c	2010-08-20 18:43:44.000000000 -0500
+++ linux-2.6/drivers/infiniband/ulp/ipoib/ipoib_ib.c	2010-08-20 19:58:34.000000000 -0500
@@ -281,8 +281,10 @@ static void ipoib_ib_handle_rx_wc(struct
 	dev->stats.rx_bytes += skb->len;

 	skb->dev = dev;
-	/* XXX get correct PACKET_ type here */
-	skb->pkt_type = PACKET_HOST;
+	if (ipoib_is_ipv4_multicast(skb_mac_header(skb)))
+		skb->pkt_type = PACKET_MULTICAST;
+	else
+		skb->pkt_type = PACKET_HOST;

 	if (test_bit(IPOIB_FLAG_CSUM, &priv->flags) && likely(wc->csum_ok))
 		skb->ip_summed = CHECKSUM_UNNECESSARY;
--
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

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2010-09-28 18:09 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-23 17:16 IPoIB: Broken IGMP processing Christoph Lameter
     [not found] ` <alpine.DEB.2.00.1008231210010.9840-sBS69tsa9Uj/9pzu0YdTqQ@public.gmane.org>
2010-08-23 17:41   ` Jason Gunthorpe
     [not found]     ` <20100823174110.GK26549-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2010-08-23 18:10       ` Christoph Lameter
     [not found]         ` <alpine.DEB.2.00.1008231254300.10719-sBS69tsa9Uj/9pzu0YdTqQ@public.gmane.org>
2010-08-23 18:28           ` Jason Gunthorpe
     [not found]             ` <20100823182859.GL26549-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2010-08-23 19:27               ` Christoph Lameter
     [not found]                 ` <alpine.DEB.2.00.1008231427130.12815-sBS69tsa9Uj/9pzu0YdTqQ@public.gmane.org>
2010-08-23 19:34                   ` Yossi Etigin
     [not found]                     ` <7E95F01E94AB484F83061FCFA35B39F8013249-QfUkFaTmzUSUvQqKE/ONIwC/G2K4zDHf@public.gmane.org>
2010-08-23 19:45                       ` Jason Gunthorpe
     [not found]                         ` <20100823194555.GN26549-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2010-08-23 19:50                           ` Yossi Etigin
     [not found]                             ` <7E95F01E94AB484F83061FCFA35B39F801324A-QfUkFaTmzUSUvQqKE/ONIwC/G2K4zDHf@public.gmane.org>
2010-08-25 14:43                               ` Christoph Lameter
2010-08-23 19:59                           ` Christoph Lameter
     [not found]                             ` <alpine.DEB.2.00.1008231454230.12815-sBS69tsa9Uj/9pzu0YdTqQ@public.gmane.org>
2010-08-24 18:49                               ` Jason Gunthorpe
2010-08-23 18:19       ` Christoph Lameter
     [not found]         ` <alpine.DEB.2.00.1008231317150.10719-sBS69tsa9Uj/9pzu0YdTqQ@public.gmane.org>
2010-08-23 18:30           ` Jason Gunthorpe
     [not found]             ` <20100823183044.GM26549-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2010-08-26 19:55               ` [IPoIB] Identify Multicast packets and fix IGMP breakage Christoph Lameter
     [not found]                 ` <alpine.DEB.2.00.1008261453510.21466-sBS69tsa9Uj/9pzu0YdTqQ@public.gmane.org>
2010-08-26 20:49                   ` Roland Dreier
     [not found]                     ` <adapqx5rtez.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2010-08-26 21:17                       ` Christoph Lameter
     [not found]                         ` <alpine.DEB.2.00.1008261613160.24174-sBS69tsa9Uj/9pzu0YdTqQ@public.gmane.org>
2010-08-26 21:29                           ` Jason Gunthorpe
2010-08-26 21:31                           ` [IPoIB] Identify multicast packets and fix IGMP breakage V2 Christoph Lameter
     [not found]                             ` <alpine.DEB.2.00.1008261629440.24174-sBS69tsa9Uj/9pzu0YdTqQ@public.gmane.org>
2010-08-26 22:15                               ` David Miller
     [not found]                                 ` <20100826.151553.242147157.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2010-08-26 22:21                                   ` Jason Gunthorpe
     [not found]                                     ` <20100826222146.GA23025-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2010-08-26 23:26                                       ` [IPoIB] Identify multicast packets and fix IGMP breakage V3 Christoph Lameter
     [not found]                                         ` <alpine.DEB.2.00.1008261825490.26351-sBS69tsa9Uj/9pzu0YdTqQ@public.gmane.org>
2010-08-26 23:43                                           ` Jason Gunthorpe
2010-08-26 23:57                                             ` Christoph Lameter
     [not found]                                               ` <alpine.DEB.2.00.1008261856090.29657-sBS69tsa9Uj/9pzu0YdTqQ@public.gmane.org>
2010-08-27  0:07                                                 ` David Miller
2010-08-27  2:24                                                   ` Christoph Lameter
     [not found]                                             ` <20100826234342.GA24333-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2010-08-27  0:02                                               ` Yossi Etigin
2010-08-27  0:02                                                 ` Yossi Etigin
     [not found]                                                 ` <7E95F01E94AB484F83061FCFA35B39F89BE276-QfUkFaTmzUSUvQqKE/ONIwC/G2K4zDHf@public.gmane.org>
2010-08-27  0:17                                                   ` Jason Gunthorpe
2010-08-27 13:29                                               ` Christoph Lameter
2010-09-14  7:27                                                 ` Or Gerlitz
     [not found]                                                   ` <4C8F23DB.2040105-smomgflXvOZWk0Htik3J/w@public.gmane.org>
2010-09-14 14:02                                                     ` Christoph Lameter
     [not found]                                                 ` <alpine.DEB.2.00.1008270827280.11792-sBS69tsa9Uj/9pzu0YdTqQ@public.gmane.org>
2010-09-28 18:09                                                   ` Roland Dreier
2010-08-26 21:32                           ` [IPoIB] Identify Multicast packets and fix IGMP breakage Roland Dreier

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.