From owner-freebsd-net@FreeBSD.ORG Thu Dec 18 01:19:24 2014 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D17E19A4 for ; Thu, 18 Dec 2014 01:19:24 +0000 (UTC) Received: from mail-wg0-x231.google.com (mail-wg0-x231.google.com [IPv6:2a00:1450:400c:c00::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5D6551CC5 for ; Thu, 18 Dec 2014 01:19:24 +0000 (UTC) Received: by mail-wg0-f49.google.com with SMTP id n12so274279wgh.22 for ; Wed, 17 Dec 2014 17:19:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=f6ZBX/wf58dsy4Bg13mtiOl7ZG7FG+5RQP/6gzNHaWU=; b=MLrPaYvDALhUkXvfeZalFToUYe3rEo7pJouRr636fUfS6pNrdv6rChngGHcDkBJAjo YFYB8EzhaLX5pzLWWEX3FJYxsKfdkrmdnt8DjprT/Hv2QnClmY+UO29bhqvWOJ+nbsP2 986m0MoX+iY8MKf1ld9Q/33TXSffBjS29FnVHcB9e0w9wv7z/uhrofyKJxsbtJvE95yo 1D58GqNLMnLaYVCY6jgVRVoUiorB2zA+JnkkK+yYhpY7awYjefQzc4AjVX4eVJriCBjc I9VYNcTo80/Qx3icGfYLtOl0OuyYfpI1StiJWr8M7N21zQLuLqpwpx/8YHQgfEFO1ue/ P7TA== MIME-Version: 1.0 X-Received: by 10.180.78.3 with SMTP id x3mr170677wiw.82.1418865562847; Wed, 17 Dec 2014 17:19:22 -0800 (PST) Sender: asomers@gmail.com Received: by 10.194.17.129 with HTTP; Wed, 17 Dec 2014 17:19:22 -0800 (PST) In-Reply-To: <2BCFC9D3-3B7D-421F-9FDA-0C4E1018F8F5@dpdtech.com> References: <1A44709E-7D0C-4932-8A28-383EAC3F340B@dpdtech.com> <9AE69175-92D9-49FA-A651-119C7046A1FA@dpdtech.com> <5480D8EF.9000804@egr.msu.edu> <3D993418-E632-44BA-8FE2-2F3F34188F20@dpdtech.com> <34276C9E-CAEF-4E3F-AA2A-568F2D3099EC@dpdtech.com> <2BCFC9D3-3B7D-421F-9FDA-0C4E1018F8F5@dpdtech.com> Date: Wed, 17 Dec 2014 18:19:22 -0700 X-Google-Sender-Auth: Cu9LLDDvN5AJ82gihcNT05-kzFE Message-ID: Subject: Re: FreeBSD 10-stable (r274577) LACP / IEEE 802.3ad with TP-Link TL-SG2008 - not working From: Alan Somers To: "David P. Discher" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD Net , Adam McDougall X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Dec 2014 01:19:24 -0000 On Wed, Dec 17, 2014 at 6:09 PM, David P. Discher wrote: > > On Dec 15, 2014, at 11:33 AM, Alan Somers wrote: > >> On Sun, Dec 14, 2014 at 6:23 PM, David P. Discher wrot= e: >>> >>> So, I think I=E2=80=99ve identified the issue. In sys/net/ieee8023ad_l= acp.c, lacp_pdu_input() has a sanity check : >>> >>> if (m->m_pkthdr.len !=3D sizeof(*du)) { >>> goto bad; >>> } >>> >>> I added some debugging information in if_lagg, and ran with it. The la= cpdu packet that being sent by the TP-Link switch is 4 bytes longer than th= e FreeBSD "struct lacpdu du=E2=80=9D. >>> >>> em1: lacp_pdu_input-sizeof(du) bad m_pkthdr.len=3D128 sizeof(du)= =3D124 >>> >>> My packet captures shows the packet size differing as well. >>> >>> I=E2=80=99m still poking around. I=E2=80=99ve been trying to look for t= he official LACPDU binary/wire format =E2=80=A6 if someone can point me to = the reference for that, that would be helpful (at least my own understandin= g). >> >> Try here: >> http://standards.ieee.org/findstds/standard/802.1AX-2008.html >> > > Thanks - I hadn=E2=80=99t seen the =E2=80=9Cfree=E2=80=9D version from IE= EE, and may looking into that later. However, I think my time with messing= around with this switch and lagg is just about over. > > I did get FreeBSD to work with LACP in this Switch. I hacked in the 4 ex= tra bytes in struct lacpdu in src/sys/net/ieee8023ad_lacp.h > > Index: ieee8023ad_lacp.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- ieee8023ad_lacp.h (revision 275779) > +++ ieee8023ad_lacp.h (working copy) > @@ -151,6 +151,7 @@ > struct lacp_collectorinfo ldu_collector; > struct tlvhdr ldu_tlv_term; > uint8_t ldu_resv[50]; > + uint8_t tplink[4]; > } __packed; > > /* > > > This work great and without any issue. All the defaults with 10-stable (= r275778) and recent version of -head with this one line made it work. Of c= ourse, this will likely break FreeBSD with all other switches LACP. I'm glad that you got your problem sorted out. Please do let us know if you find a more general solution. > > However, what I have also discovered this this switch is unlike FreeBSD w= hich lagghash includes L4, the switch only seems to hash over SRC+DST IP or= SRC+DST MAC. Which makes it pretty much just sends all the traffic down o= ne link from the switch. So for my particular use case with a small set of = hosts, this switch is not useful for me. Actually, that's a fairly common problem. I've even seen it on some expensive Cisco switches. > > I would not recommend the TP-Link TL-SG2008 8-Port Gigabit Smart Switch f= or use with FreeBSD =E2=80=A6 or for any use with LACP that is expecting in= creased throughput for a small set of hosts. > > > - > David P. Discher > http://davidpdischer.com/ > AIM: DavidDPD | Y!M: daviddpdz