Re: Best practices for cxgbei and link aggregation?

From: Eugene Grosbein <eugen_at_grosbein.net>
Date: Thu, 03 Aug 2023 21:14:07 UTC
04.08.2023 0:56, Alan Somers wrote:

> I'm trying to build a high-speed iSCSI server.  I have two Chelsio T6
> cards providing 4x 25GbE ports.  I have a requirement for
> high-availability networking, and I also need multiple ports' worth of
> bandwidth.  What's the best way to use them?
> 
> First I tried LACP, of course.  That works.  But it doesn't work in
> combination with cxgbei iSCSI offload.  The clients can't connect.
> This makes sense, because the offload engine probably requires all
> packets from a single iSCSI session to enter and leave through the
> same network port.  With LACP, that won't be the case.

This is a common misunderstanding. In fact, LACP has nothing to do with per-port
traffic distribution. Used kind of hashing function is not a part of LACP.
You just need to use link partners capable of good hashing.

For example, FreeBSD lagg(4) hashing function is capable of using L2 (MAC), L3 (IP) and L4 (TCP/UDP ports)
headers and any kind of combination of such headers to make sure that packets if single flow go out
using same port. Take a look at ifconfig.8 manual page for "lagghash".