From nobody Thu Aug 03 21:41:23 2023 X-Original-To: freebsd-stable@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RH2Nc47v4z4V3Dk for ; Thu, 3 Aug 2023 21:41:36 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-vs1-f53.google.com (mail-vs1-f53.google.com [209.85.217.53]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RH2Nc1ZWnz3Vl3 for ; Thu, 3 Aug 2023 21:41:36 +0000 (UTC) (envelope-from asomers@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-vs1-f53.google.com with SMTP id ada2fe7eead31-447abb2f228so623297137.0 for ; Thu, 03 Aug 2023 14:41:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691098895; x=1691703695; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=x4on+5f4qoPdNiSV0b3eTmWZrQ5L3QlBdnDwBTfTiBI=; b=Sy4Sy37Okzv5fRAOFPUVK+063EbD3WKB2AvuLjurZMZWXKZustM5SnP9nEkv7xw2Ep 3dxWTbPGQauV751QTzuHL7IgSbE21tGi42QZTZCWtAdcHb+TtqHmGHFypx5F8LhDdvyx 2nP4nDBaJsLCD2hDt4T2gjGXDmH/Cz//2huk4O/9j/mT94T7Enf1z1mWWTnh5ymrNu0e awdpJivAGy5i+BqZo05uXWXbJ3aRcGMvP3DFxoZhVYXxrJhX4ACCMvnIfv4cvputsR6c PI7C3tO5kXvxdvobs+QKOW0tHG9xa0joeQ4wN6mrUCiMWRZ4lI/ZVy3PwfAsnV5Ms45K OZqg== X-Gm-Message-State: AOJu0YzLK+BK5gIyDR141CQWBXZeITQfFbqT2pm/CGnzeCMj0sQJj+kY moEL4Wc83O9Tp8qK6/NT6cpb2DIH81ItKDMFxSWZbt8t X-Google-Smtp-Source: AGHT+IHhjgYH6T/j6X0frPAm0h3n54M9XadE8744PdTVsYcfHM52KXBksaemA7dDu+WGtIOHexT3VjYmPMdvbrxtihY= X-Received: by 2002:a05:6102:3a73:b0:443:70ec:d28b with SMTP id bf19-20020a0561023a7300b0044370ecd28bmr41017vsb.19.1691098894908; Thu, 03 Aug 2023 14:41:34 -0700 (PDT) List-Id: Production branch of FreeBSD source code List-Archive: https://lists.freebsd.org/archives/freebsd-stable List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org MIME-Version: 1.0 References: <708494cd-9c88-974e-da5f-1e8c1f270950@grosbein.net> In-Reply-To: <708494cd-9c88-974e-da5f-1e8c1f270950@grosbein.net> From: Alan Somers Date: Thu, 3 Aug 2023 14:41:23 -0700 Message-ID: Subject: Re: Best practices for cxgbei and link aggregation? To: Eugene Grosbein Cc: FreeBSD Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4RH2Nc1ZWnz3Vl3 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] On Thu, Aug 3, 2023 at 2:14=E2=80=AFPM Eugene Grosbein = wrote: > > 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 p= er-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 pac= kets if single flow go out > using same port. Take a look at ifconfig.8 manual page for "lagghash". For iSCSI, any combination of those hash settings should result in a flow that is always tied to a single port. But for cxgbei to work, I need to ensure that the switch also hashes flows in the same way, to the _exact_same_port_. Even if I had access to the switch's LACP configuration, which I do not (but perhaps could acquire), is there any guarantee that it would hash things the same way as FreeBSD? Is the LACP hashing algorithm standardized?