From owner-freebsd-net@FreeBSD.ORG Thu Dec 18 01:09:31 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 E16E35C0 for ; Thu, 18 Dec 2014 01:09:31 +0000 (UTC) Received: from mail-pd0-x230.google.com (mail-pd0-x230.google.com [IPv6:2607:f8b0:400e:c02::230]) (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 A02C01B7C for ; Thu, 18 Dec 2014 01:09:31 +0000 (UTC) Received: by mail-pd0-f176.google.com with SMTP id r10so243135pdi.35 for ; Wed, 17 Dec 2014 17:09:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dpdtech.com; s=google; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=P/lP91mKwcmSTsbwN14NV82UbX9nZJUI5eGQ1T1uug4=; b=UieIA8+rsuxwPhB8lUCxjoAglTbFmBGelnjbh6zM+uIOyC0FihC8Rdr8vIHhxlhTc5 RWxjeIOdv+WLFHyFXVjbscWU/gpFsTWecavOParj1W3DntqTxkPohHGh7pCc8YycGpkE qkgRWcZ5U2jsRtf8RgLB7EsTESg2+yQ8QJ7fo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=P/lP91mKwcmSTsbwN14NV82UbX9nZJUI5eGQ1T1uug4=; b=WxXHLZsgbhyjTyOfHcYfgA6/CPU093UrZIMvY+DpjwWl0LPpFqCpOuFkeEqPoRtRHv fWipgI44bIf2Ohh7kqWmDAALqwz4lqj2vSNNG1lSUcHdz6aMG/juhV2et7nb9e+AJMj7 D3UCSdqYgkWiwwh2NpgZwAqa79WnDQe8G1+IbFb+3ojnqBgwJ1ZprkDLkdjBcRxb3aDR FIMiB+duMu57Zb5Sgz46/90Mg5jzHvnsVW7fOZ6SlHXHp05pgDrj84zp0IasB+lGMgju pENPkpRH82C00+R/AaDyWuHLjEKyYzckRgloa7GTOzO5v+l6Kl2aSAJc7/McwzXaJ4kq EekQ== X-Gm-Message-State: ALoCoQm1Mg8z8AgpeAMve7TM+Q2+9YToFrEZZCMhXXECMatEMQ5yUXfrYvZc7LGuvaXzbQ28YOds X-Received: by 10.68.217.97 with SMTP id ox1mr68455721pbc.53.1418864970926; Wed, 17 Dec 2014 17:09:30 -0800 (PST) Received: from 173-13-188-41-sfba.hfc.comcastbusiness.net (173-13-188-41-sfba.hfc.comcastbusiness.net. [173.13.188.41]) by mx.google.com with ESMTPSA id tm3sm5107019pac.12.2014.12.17.17.09.29 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 17 Dec 2014 17:09:30 -0800 (PST) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: FreeBSD 10-stable (r274577) LACP / IEEE 802.3ad with TP-Link TL-SG2008 - not working From: "David P. Discher" In-Reply-To: Date: Wed, 17 Dec 2014 17:09:36 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <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> To: Alan Somers X-Mailer: Apple Mail (2.1878.6) 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:09:32 -0000 On Dec 15, 2014, at 11:33 AM, Alan Somers wrote: > On Sun, Dec 14, 2014 at 6:23 PM, David P. Discher = wrote: >>=20 >> So, I think I=92ve identified the issue. In = sys/net/ieee8023ad_lacp.c, lacp_pdu_input() has a sanity check : >>=20 >> if (m->m_pkthdr.len !=3D sizeof(*du)) { >> goto bad; >> } >>=20 >> I added some debugging information in if_lagg, and ran with it. The = lacpdu packet that being sent by the TP-Link switch is 4 bytes longer = than the FreeBSD "struct lacpdu du=94. >>=20 >> em1: lacp_pdu_input-sizeof(du) bad m_pkthdr.len=3D128 = sizeof(du)=3D124 >>=20 >> My packet captures shows the packet size differing as well. >>=20 >> I=92m still poking around. I=92ve been trying to look for the = official LACPDU binary/wire format =85 if someone can point me to the = reference for that, that would be helpful (at least my own = understanding). >=20 > Try here: > http://standards.ieee.org/findstds/standard/802.1AX-2008.html >=20 Thanks - I hadn=92t seen the =93free=94 version from IEEE, and may = looking into that later. However, I think my time with messing around = with this switch and lagg is just about over.=20 I did get FreeBSD to work with LACP in this Switch. I hacked in the 4 = extra 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 course, this will likely break FreeBSD with all other switches LACP. However, what I have also discovered this this switch is unlike FreeBSD = which 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 one link from the switch. So for my particular use case = with a small set of hosts, this switch is not useful for me. I would not recommend the TP-Link TL-SG2008 8-Port Gigabit Smart Switch = for use with FreeBSD =85 or for any use with LACP that is expecting = increased throughput for a small set of hosts.=20 - David P. Discher http://davidpdischer.com/ AIM: DavidDPD | Y!M: daviddpdz=20