Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Dec 2014 18:19:22 -0700
From:      Alan Somers <asomers@freebsd.org>
To:        "David P. Discher" <dpd@dpdtech.com>
Cc:        FreeBSD Net <freebsd-net@freebsd.org>, Adam McDougall <mcdouga9@egr.msu.edu>
Subject:   Re: FreeBSD 10-stable (r274577) LACP / IEEE 802.3ad with TP-Link TL-SG2008 - not working
Message-ID:  <CAOtMX2gfcRDWPmSAiNDuxpJC7bbKru90fyOqZe9WShpHL5LW0Q@mail.gmail.com>
In-Reply-To: <2BCFC9D3-3B7D-421F-9FDA-0C4E1018F8F5@dpdtech.com>
References:  <1A44709E-7D0C-4932-8A28-383EAC3F340B@dpdtech.com> <CAOtMX2gEGxTyXjitBu=pjkteocp1pSGxnb%2BWDb_jL3f0YNOjrg@mail.gmail.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> <CAOtMX2h3U-C9stM5qdix1HCqG=6rZD2GzKQw0t6Raoh6ToL3Og@mail.gmail.com> <2BCFC9D3-3B7D-421F-9FDA-0C4E1018F8F5@dpdtech.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Dec 17, 2014 at 6:09 PM, David P. Discher <dpd@dpdtech.com> wrote:
>
> On Dec 15, 2014, at 11:33 AM, Alan Somers <asomers@freebsd.org> wrote:
>
>> On Sun, Dec 14, 2014 at 6:23 PM, David P. Discher <dpd@dpdtech.com> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2gfcRDWPmSAiNDuxpJC7bbKru90fyOqZe9WShpHL5LW0Q>