From webadmin@ticketswitch.com  Wed Apr 15 16:33:50 2009
Return-Path: <webadmin@ticketswitch.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C4E25106566C
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 15 Apr 2009 16:33:50 +0000 (UTC)
	(envelope-from webadmin@ticketswitch.com)
Received: from turpentine.ticketswitch.com (turpentine.ticketswitch.com [82.108.236.252])
	by mx1.freebsd.org (Postfix) with ESMTP id 8AF558FC1A
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 15 Apr 2009 16:33:50 +0000 (UTC)
	(envelope-from webadmin@ticketswitch.com)
Received: from florentine.rattatosk ([10.48.19.0])
	by turpentine.ticketswitch.com with esmtp (Exim 4.69 (FreeBSD))
	(envelope-from <webadmin@ticketswitch.com>)
	id 1Lu7hW-000H37-O8
	for FreeBSD-gnats-submit@freebsd.org; Wed, 15 Apr 2009 16:11:02 +0000
Received: from webadmin by florentine.rattatosk with local (Exim 4.69 (FreeBSD))
	(envelope-from <webadmin@ticketswitch.com>)
	id 1Lu7hB-0000Td-Rp
	for FreeBSD-gnats-submit@freebsd.org; Wed, 15 Apr 2009 16:10:41 +0000
Message-Id: <E1Lu7hB-0000Td-Rp@florentine.rattatosk>
Date: Wed, 15 Apr 2009 16:10:41 +0000
From: Pete French <petefrench@ticketswitch.com>
Reply-To: Pete French <petefrench@ticketswitch.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: bce commit r190582 breaks lagg in 7.2-PRERELASE 
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         133756
>Category:       kern
>Synopsis:       [bce] bce commit r190582 breaks lagg in 7.2-PRERELASE
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    delphij
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Apr 15 16:40:02 UTC 2009
>Closed-Date:    Thu Jun 04 21:21:28 UTC 2009
>Last-Modified:  Thu Jun 04 21:21:28 UTC 2009
>Originator:     Pete French
>Release:        FreeBSD 7.2-PRERELEASE amd64
>Organization:
Ticketswitch Ltd
>Environment:
System: FreeBSD florentine.rattatosk 7.2-PRERELEASE FreeBSD 7.2-PRERELEASE #0: Wed Apr 15 14:54:23 GMT 2009 webadmin@florentine.rattatosk:/usr/obj/usr/src/sys/GENERIC amd64


>Description:

	I have two bce interfaces which are aggregated using lagg and LACP
	to a CISCO switch. The above commit stops this working - the
	machine appears to come up fine, and the interfaces are in the
	usual state of ACTIVE,COLLECTING,DISTRIBUTING, but no network
	communication with the machine is possible.

>How-To-Repeat:

	A csup of the code with date=2009.03.30.23.59.59 works, a csup
	with date=2009.03.31.23.59.59 does not, and the only difference
	is the bce commit. I am using the following lines in rc.conf

	cloned_interfaces="lagg0"
	network_interfaces="lo0 bce0 bce1 lagg0"
	ifconfig_bce0="up"
	ifconfig_bce1="up"
	ifconfig_lagg0="laggproto lacp laggport bce0 laggport bce1"
	
>Fix:

	I have not found a way to make this work.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->delphij 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Thu Apr 16 00:38:22 UTC 2009 
Responsible-Changed-Why:  
Over to committer of the MFC. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=133756 

From: Nikolay Denev <ndenev@gmail.com>
To: bug-followup@FreeBSD.org,
 petefrench@ticketswitch.com
Cc:  
Subject: Re: kern/133756: [bce] bce commit r190582 breaks lagg in 7.2-PRERELASE
Date: Thu, 30 Apr 2009 17:49:39 +0300

 --Apple-Mail-509-802774179
 Content-Type: text/plain;
 	charset=US-ASCII;
 	format=flowed
 Content-Transfer-Encoding: 7bit
 
 This should fix this it:
 
 --- sys/dev/bce/if_bce.c.orig	2009-04-30 14:06:54.000000000 +0200
 +++ sys/dev/bce/if_bce.c	2009-04-30 14:11:32.000000000 +0200
 @@ -5926,6 +5926,11 @@
 			goto bce_rx_int_next_rx;
 		}
 
 +#ifndef ZERO_COPY_SOCKETS
 +		/* Adjust the packet length to match the received data. */
 +		m0->m_pkthdr.len = m0->m_len = pkt_len;
 +#endif
 +
 		/* Send the packet to the appropriate interface. */
 		m0->m_pkthdr.rcvif = ifp;
 
 
 --Apple-Mail-509-802774179
 Content-Type: text/html;
 	charset=US-ASCII
 Content-Transfer-Encoding: quoted-printable
 
 <html><body style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; =
 -webkit-line-break: after-white-space; ">This should fix this =
 it:<div><br></div><div><span class=3D"Apple-style-span" =
 style=3D"font-family: -webkit-monospace; ">--- =
 sys/dev/bce/if_bce.c.orig<span class=3D"Apple-tab-span" =
 style=3D"white-space: pre; ">	</span>2009-04-30 14:06:54.000000000 =
 +0200<br>+++ sys/dev/bce/if_bce.c<span class=3D"Apple-tab-span" =
 style=3D"white-space: pre; ">	</span>2009-04-30 14:11:32.000000000 =
 +0200<br>@@ -5926,6 +5926,11 @@<br><span class=3D"Apple-tab-span" =
 style=3D"white-space: pre; ">	</span><span class=3D"Apple-tab-span" =
 style=3D"white-space: pre; ">	</span><span class=3D"Apple-tab-span" =
 style=3D"white-space: pre; ">	</span>goto bce_rx_int_next_rx;<br><span =
 class=3D"Apple-tab-span" style=3D"white-space: pre; ">	</span><span =
 class=3D"Apple-tab-span" style=3D"white-space: pre; ">	=
 </span>}<br><br>+#ifndef ZERO_COPY_SOCKETS<br>+<span =
 class=3D"Apple-tab-span" style=3D"white-space: pre; ">	</span><span =
 class=3D"Apple-tab-span" style=3D"white-space: pre; ">	</span>/* Adjust =
 the packet length to match the received data. */<br>+<span =
 class=3D"Apple-tab-span" style=3D"white-space: pre; ">	</span><span =
 class=3D"Apple-tab-span" style=3D"white-space: pre; ">	=
 </span>m0-&gt;m_pkthdr.len =3D m0-&gt;m_len =3D =
 pkt_len;<br>+#endif<br>+<br><span class=3D"Apple-tab-span" =
 style=3D"white-space: pre; ">	</span><span class=3D"Apple-tab-span" =
 style=3D"white-space: pre; ">	</span>/* Send the packet to the =
 appropriate interface. */<br><span class=3D"Apple-tab-span" =
 style=3D"white-space: pre; ">	</span><span class=3D"Apple-tab-span" =
 style=3D"white-space: pre; ">	</span>m0-&gt;m_pkthdr.rcvif =3D =
 ifp;<br></span></div><div><font class=3D"Apple-style-span" =
 face=3D"-webkit-monospace"><br></font></div></body></html>=
 
 --Apple-Mail-509-802774179--

From: Pete French <petefrench@ticketswitch.com>
To: bug-followup@FreeBSD.org, ndenev@gmail.com
Cc:  
Subject: Re: kern/133756: [bce] bce commit r190582 breaks lagg in 7.2-PRERELASE
Date: Thu, 30 Apr 2009 17:30:09 +0100

 I just tested, and this patch does not fix the problem ;-( I see
 the same symptoms with it installed.

From: Pete French <petefrench@ticketswitch.com>
To: bug-followup@freebsd.org
Cc: ambrisko@ambrisko.com, freebsd-stable@freebsd.org
Subject: Re: kern/133756: [bce] bce commit r190582 breaks lagg in 7.2-PRERELASE
Date: Fri, 01 May 2009 14:20:09 +0100

 This is just a quick update about some further investigations on
 this. I tested out the patch that Niki Denev kindly sent me which
 apparently fixes a length issue when zero copy sockets are not
 in use. This did not, however, solve the problem, but as part of
 this I ran tcpdump on the bce0 and bce1 interfaces for the
 working and non working kernels. On the kernel which does not
 work I never see any packets being received, though LACP packets
 are being transmitted.
 
 The switch to which the devices are connected is (I believe) configured
 in a mode where it will only send LACP packets back when it has received
 some. So the lack of incomming pa ckets in tcpdump does not necessarily
 mean that the recive side is failing, as it may be that the transmitted
 packets are not making it out of the interface. On identical hardware
 with no LACP in place the bce interfaces work fine. What I have yet
 to try is runnign a simple lagg bundle on this machine, to see if the
 problem is specific to LACP.
 
 I also rolled the system back to 7.1 and tested a patch from Doug Ambrisko
 which adds the support for the 5709 but contains none of the other
 changes. This did work, so that has excluded those changes from the cause
 of the problems.
 
 -pete.

From: Pete French <petefrench@ticketswitch.com>
To: bug-followup@freebsd.org
Cc: freebsd-stable@freebsd.org
Subject: Re: kern/133756: [bce] bce commit r190582 breaks lagg in 7.2-PRERELASE
Date: Fri, 01 May 2009 22:07:34 +0100

 One more test I just managed to do - using bce and lagg in 'failover' mode
 works fine, so it would appear that the problem lies with LACP.
 
 -pete.

From: Pete French <petefrench@ticketswitch.com>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: kern/133756: [bce] bce commit r190582 breaks lagg in 7.2-PRERELASE
Date: Wed, 20 May 2009 08:58:55 +0100

 I have just verified that the new if_bcefw.h works fine with the old
 if_bce.c and if_bcereg.h, so the problem is not with the firmware
 update. I am now running on todays 7.2-STABLE with just those two files
 from the old driver copied into my kernel tree.
State-Changed-From-To: open->closed 
State-Changed-By: delphij 
State-Changed-When: Thu Jun 4 21:20:36 UTC 2009 
State-Changed-Why:  
It seems that the latest -STABLE snapshot fixed this issue. 
Please let me know if this is not the case and I will reopen this 
ticket, thanks for your patience and testing! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=133756 
>Unformatted:
