Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Dec 2023 13:27:06 +0100
From:      tuexen@freebsd.org
To:        "Scheffenegger, Richard" <rscheff@freebsd.org>
Cc:        FreeBSD Net <freebsd-net@freebsd.org>
Subject:   Re: TSO + ECN
Message-ID:  <9A07A31E-F5FF-4769-8A3A-3987F67AEBA5@freebsd.org>
In-Reply-To: <1ad59f9a-1f8b-4e4b-8a78-5293d9e77776@freebsd.org>
References:  <1ad59f9a-1f8b-4e4b-8a78-5293d9e77776@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
> On Dec 20, 2023, at 12:15, Scheffenegger, Richard =
<rscheff@freebsd.org> wrote:
>=20
> Hi,
>=20
> I am curious if anyone here has expirience with the handling of ECN in =
TSO-enabled drivers/hardware...
Some data pointer if I read the specification correctly.
Have a look at the specification of the 10GBit/sec card ix:
https://cdrdv2-public.intel.com/331520/82599-datasheet-v3-4.pdf

According to section 7.2.4 and 8.2.3.9.3 and 8.2.3.9.4 the
* first segment gets all flags except PSH and FIN.
* middle segments get all flags except PSH and FIN.
* last segment gets all flags except the CWR.

I think you should be able to change the masks.

Best regards
Michael
>=20
> The other day I found that the virtio driver would bail out with =
ENOTSUP when encountering the TCP CWR header bit on a TSO-enabled flow, =
when the host does not also claim ECN-support for TSO.
>=20
> But this made me wonder, how the expected behavior is.
>=20
> Presumably, this means that the hardware (or driver) would clear the =
CWR bit after the first packet is sent, correct?
>=20
> However, in light of the upcoming AccECN signalling protocol, that is =
not what TSO should be doing (with AccECN, all segments should retain =
the exact same header flags, maybe expect PSH).
>=20
> Probably "non-ECN" capable TSO offload would actually work better with =
AccECN - and if the above behavior is what ECN-aware TSO is doing, =
AccECN sessions would need to somehow work around that (e.g. =
spoon-feeding any segment with CWR set individually - e.g. bypassing the =
TSO capabilities in tcp_output)?
>=20
>=20
> Would appreciate any feedback around this...
>=20
> Best regards,
> Richard
> <OpenPGP_0x17BE5899E0B1439B.asc>




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9A07A31E-F5FF-4769-8A3A-3987F67AEBA5>