netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 2.6.11] bonding: avoid tx balance for IGMP (alb/tlb mode)
@ 2005-03-15 21:51 John W. Linville
  2005-03-16  0:52 ` Rick Jones
  0 siblings, 1 reply; 5+ messages in thread
From: John W. Linville @ 2005-03-15 21:51 UTC (permalink / raw)
  To: linux-kernel; +Cc: ctindel, fubar, bonding-devel, netdev, jgarzik

Add special case to bond_alb_xmit() to avoid tx balance for IGMP.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
Some switches (e.g. the Cisco Catalyst 3750) use IGMP snooping to
determine which hosts belong to which multicast groups.  Typically
such switches use a timeout to determine when hosts have quietly left
a group.

In ALB or TLB mode, only one interface is configured to receive
packets at a time.  (Receive load balancing doesn't seem to be
effective for IGMP traffic.)  If both Ethernet interfaces are up,
the load balancing capability can move the sending of IGMP packets
to the non-receiving interface.  If the switch ends up timing out the
interface configured to receive packets, the multicast packets are then
only sent to the non-receiving interface and are subsequently dropped.
This behaviour is undesirable.

The fix is to add a new special case (alongside some existing special
cases) in bond_alb_xmit() in order to ensure that IGMP traffic is
always sent out the port which is configured to receive frames.

Of course, this patch has the downside of not load balancing IGMP
traffic from the host.  But, I'm inclined to believe that is "no big
deal"... :-)  Also, I'm sure other solutions might exist.  But, they
are likely no where near as simple as this one.  And, this is probably
the most in keeping with the ALB/TLB philosophy of not requiring any
special switch support.

 drivers/net/bonding/bond_alb.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

--- linux-2.6.11/drivers/net/bonding/bond_alb.c.orig	2005-03-15 16:25:09.648034108 -0500
+++ linux-2.6.11/drivers/net/bonding/bond_alb.c	2005-03-15 16:25:09.649033971 -0500
@@ -54,6 +54,7 @@
 #include <linux/if_ether.h>
 #include <linux/if_bonding.h>
 #include <linux/if_vlan.h>
+#include <linux/in.h>
 #include <net/ipx.h>
 #include <net/arp.h>
 #include <asm/byteorder.h>
@@ -1300,7 +1301,8 @@ int bond_alb_xmit(struct sk_buff *skb, s
 	switch (ntohs(skb->protocol)) {
 	case ETH_P_IP:
 		if ((memcmp(eth_data->h_dest, mac_bcast, ETH_ALEN) == 0) ||
-		    (skb->nh.iph->daddr == ip_bcast)) {
+		    (skb->nh.iph->daddr == ip_bcast) ||
+		    (skb->nh.iph->protocol == IPPROTO_IGMP)) {
 			do_tx_balance = 0;
 			break;
 		}
-- 
John W. Linville
linville@tuxdriver.com

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

* Re: [patch 2.6.11] bonding: avoid tx balance for IGMP (alb/tlb mode)
  2005-03-15 21:51 [patch 2.6.11] bonding: avoid tx balance for IGMP (alb/tlb mode) John W. Linville
@ 2005-03-16  0:52 ` Rick Jones
  2005-03-16  1:03   ` Jay Vosburgh
  2005-03-16 14:37   ` John W. Linville
  0 siblings, 2 replies; 5+ messages in thread
From: Rick Jones @ 2005-03-16  0:52 UTC (permalink / raw)
  To: John W. Linville
  Cc: linux-kernel, ctindel, fubar, bonding-devel, netdev, jgarzik

Is that switch behaviour "normal" or "correct?"  I know next to nothing about 
what stuff like LACP should do, but asked some internal folks and they had this 
to say:

<excerpt>


<blank> treats IGMP packets the same as all other non-broadcast traffic (i.e. it
will attempt to load balance). This switch behavior seems rather odd in an
aggregated case, given the fact that most traffic (except broadcast packets)
will be load balanced by the partner device. In addition, the switch (in
theory) is suppose to treat the aggregated switch ports as 1 logical port
and therefore it should allow IGMP packets to be received back on any port
in the logical aggregation.

IMO, the switch behavior in this case seems questionable.

</excerpt>

FWIW,

rick jones

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

* Re: [patch 2.6.11] bonding: avoid tx balance for IGMP (alb/tlb mode)
  2005-03-16  0:52 ` Rick Jones
@ 2005-03-16  1:03   ` Jay Vosburgh
  2005-03-16  9:59     ` David Stevens
  2005-03-16 14:37   ` John W. Linville
  1 sibling, 1 reply; 5+ messages in thread
From: Jay Vosburgh @ 2005-03-16  1:03 UTC (permalink / raw)
  To: Rick Jones
  Cc: John W. Linville, linux-kernel, ctindel, bonding-devel, netdev,
	jgarzik

Rick Jones <rick.jones2@hp.com> wrote:

><blank> treats IGMP packets the same as all other non-broadcast traffic (i.e. it
>will attempt to load balance). This switch behavior seems rather odd in an
>aggregated case, given the fact that most traffic (except broadcast packets)
>will be load balanced by the partner device. In addition, the switch (in
>theory) is suppose to treat the aggregated switch ports as 1 logical port
>and therefore it should allow IGMP packets to be received back on any port
>in the logical aggregation.
>
>IMO, the switch behavior in this case seems questionable.

	This patch only applies to the bonding balance-alb/tlb modes,
which do not require the switch to be configured for aggregation.  Since
the switch has no explicit knowledge that the links are being
aggregated, it seems reasonable for it to be confused by what it gets in
the described case.

	I haven't tested the patch, but conceptually the problem John
described in his original mail sounds plausible, as does the fix for it.

	-J

---
	-Jay Vosburgh, IBM Linux Technology Center, fubar@us.ibm.com

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

* Re: [patch 2.6.11] bonding: avoid tx balance for IGMP (alb/tlb mode)
  2005-03-16  1:03   ` Jay Vosburgh
@ 2005-03-16  9:59     ` David Stevens
  0 siblings, 0 replies; 5+ messages in thread
From: David Stevens @ 2005-03-16  9:59 UTC (permalink / raw)
  To: fubar
  Cc: bonding-devel, ctindel, jgarzik, linux-kernel, John W. Linville,
	netdev, netdev-bounce, Rick Jones

I didn't look to see if there's a case in that switch for IPv6, but MLD 
will have
the same issue with switches, and probably needs a similar exception.

                                        +-DLS

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

* Re: [patch 2.6.11] bonding: avoid tx balance for IGMP (alb/tlb mode)
  2005-03-16  0:52 ` Rick Jones
  2005-03-16  1:03   ` Jay Vosburgh
@ 2005-03-16 14:37   ` John W. Linville
  1 sibling, 0 replies; 5+ messages in thread
From: John W. Linville @ 2005-03-16 14:37 UTC (permalink / raw)
  To: Rick Jones; +Cc: linux-kernel, ctindel, fubar, bonding-devel, netdev, jgarzik

On Tue, Mar 15, 2005 at 04:52:14PM -0800, Rick Jones wrote:
> Is that switch behaviour "normal" or "correct?"  I know next to nothing 

As Jay Vosburgh points-out, this patch only effects ALB and TLB modes.
These are modes where the link partner is unaware of the bonded
configuration.  In effect, we are tricking the switch into behaving
the way we desire.

Since the switch is unaware of our bonded behaviour, I think it makes
sense to accomodate this quirk related to IGMP snooping.

John
-- 
John W. Linville
linville@tuxdriver.com

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

end of thread, other threads:[~2005-03-16 14:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-15 21:51 [patch 2.6.11] bonding: avoid tx balance for IGMP (alb/tlb mode) John W. Linville
2005-03-16  0:52 ` Rick Jones
2005-03-16  1:03   ` Jay Vosburgh
2005-03-16  9:59     ` David Stevens
2005-03-16 14:37   ` John W. Linville

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).