netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* IPoIB: Fix multicast packet drops before join is complete
@ 2009-06-02 14:49 Christoph Lameter
  2009-06-04  5:41 ` David Miller
  0 siblings, 1 reply; 29+ messages in thread
From: Christoph Lameter @ 2009-06-02 14:49 UTC (permalink / raw)
  To: Roland Dreier; +Cc: netdev, Yossi Etigin

Subject: IPoIB: Fix multicast packet drops before join is complete

The IPoIB layer drops multicast packets after queueing 3 as long as a
multicast group is not ready. The multicast group not being ready may
occur on first use or after a period of silence on a MC group.

What should happen is that packet are queued up until the maximum queue
size is reached (set by sk_sndbuf). Then the socket layer would put
the sending process to sleep until space in the queue becomes available
(after the multicast group becomes ready and after the initial messages
have been sent).

With the IPoIB layer dropping packets this does not occur. The process
can continue sending multicast packets and they are all dropped until
the multicast group becomes ready. The receiver will see the initial 3
multicast packets that have been significantly delayed, then a large
gap of missing packet before getting packets that have not been delayed.

After this patch the socket queue will build up and the sender will be
throttled until the MC group becomes ready.

If old behavior is desired then the application can configure
the send queue size to only allow 3 packet and specify MSG_DONTWAIT
for send operations.

Signed-off-by: Christoph Lameter <cl@linux-foundation.org>

---
 drivers/infiniband/ulp/ipoib/ipoib.h           |    1 -
 drivers/infiniband/ulp/ipoib/ipoib_multicast.c |    7 +------
 2 files changed, 1 insertion(+), 7 deletions(-)

Index: linux-2.6/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
===================================================================
--- linux-2.6.orig/drivers/infiniband/ulp/ipoib/ipoib_multicast.c	2009-05-28 15:50:56.000000000 -0500
+++ linux-2.6/drivers/infiniband/ulp/ipoib/ipoib_multicast.c	2009-06-02 09:27:40.000000000 -0500
@@ -685,12 +685,7 @@ void ipoib_mcast_send(struct net_device
 	}

 	if (!mcast->ah) {
-		if (skb_queue_len(&mcast->pkt_queue) < IPOIB_MAX_MCAST_QUEUE)
-			skb_queue_tail(&mcast->pkt_queue, skb);
-		else {
-			++dev->stats.tx_dropped;
-			dev_kfree_skb_any(skb);
-		}
+		skb_queue_tail(&mcast->pkt_queue, skb);

 		if (test_bit(IPOIB_MCAST_FLAG_BUSY, &mcast->flags))
 			ipoib_dbg_mcast(priv, "no address vector, "
Index: linux-2.6/drivers/infiniband/ulp/ipoib/ipoib.h
===================================================================
--- linux-2.6.orig/drivers/infiniband/ulp/ipoib/ipoib.h	2009-05-28 15:50:56.000000000 -0500
+++ linux-2.6/drivers/infiniband/ulp/ipoib/ipoib.h	2009-06-02 09:27:40.000000000 -0500
@@ -79,7 +79,6 @@ enum {
 	IPOIB_NUM_WC		  = 4,

 	IPOIB_MAX_PATH_REC_QUEUE  = 3,
-	IPOIB_MAX_MCAST_QUEUE	  = 3,

 	IPOIB_FLAG_OPER_UP	  = 0,
 	IPOIB_FLAG_INITIALIZED	  = 1,

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

end of thread, other threads:[~2009-06-12 14:17 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-02 14:49 IPoIB: Fix multicast packet drops before join is complete Christoph Lameter
2009-06-04  5:41 ` David Miller
2009-06-04 14:28   ` Or Gerlitz
2009-06-04 15:52   ` Christoph Lameter
2009-06-04 22:30     ` David Miller
2009-06-05 14:18       ` Christoph Lameter
2009-06-05 16:56         ` Roland Dreier
2009-06-05 19:17           ` Christoph Lameter
2009-06-05 21:12             ` Roland Dreier
2009-06-06  1:17               ` David Miller
2009-06-05 21:13             ` Roland Dreier
2009-06-08 15:16               ` Christoph Lameter
2009-06-06  1:16         ` David Miller
2009-06-08 15:20           ` Christoph Lameter
2009-06-08 21:29             ` David Miller
2009-06-09 20:52               ` Roland Dreier
2009-06-10  0:45                 ` David Miller
2009-06-10  3:55                   ` Roland Dreier
2009-06-10  4:57                     ` David Miller
2009-06-10  5:04                       ` Roland Dreier
2009-06-10  5:12                         ` David Miller
2009-06-10 10:18                           ` Or Gerlitz
2009-06-10 12:01                             ` David Miller
2009-06-11 11:45                               ` Or Gerlitz
2009-06-11 11:57                                 ` David Miller
2009-06-11 15:07                       ` Christoph Lameter
2009-06-11 23:58                         ` David Miller
2009-06-12 14:17                           ` Christoph Lameter
2009-06-05 16:54       ` Roland Dreier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).