Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Sep 2025 10:23:53 +0200
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>
Cc:        "src-committers@freebsd.org" <src-committers@FreeBSD.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@FreeBSD.org>, "dev-commits-src-main@freebsd.org" <dev-commits-src-main@FreeBSD.org>
Subject:   Re: git: 1c23d8f9f398 - main - vtnet: improve checksum offloading
Message-ID:  <8A4EFC13-ABA3-471B-9726-5940E2B88DED@FreeBSD.org>
In-Reply-To: <23rq9r12-75nn-sqs8-06o7-p785s2q915o3@yvfgf.mnoonqbm.arg>
References:  <202509041126.584BQBBt067763@gitrepo.freebsd.org> <23rq9r12-75nn-sqs8-06o7-p785s2q915o3@yvfgf.mnoonqbm.arg>

next in thread | previous in thread | raw e-mail | index | archive | help
> On 5. Sep 2025, at 23:09, Bjoern A. Zeeb =
<bzeeb-lists@lists.zabbadoz.net> wrote:
>=20
> On Thu, 4 Sep 2025, Michael Tuexen wrote:
>=20
>> The branch main has been updated by tuexen:
>>=20
>> URL: =
https://cgit.FreeBSD.org/src/commit/?id=3D1c23d8f9f39870951c1d0dfbb112fc4e=
53237737
>>=20
>> commit 1c23d8f9f39870951c1d0dfbb112fc4e53237737
>> Author:     Michael Tuexen <tuexen@FreeBSD.org>
>> AuthorDate: 2025-09-04 11:16:46 +0000
>> Commit:     Michael Tuexen <tuexen@FreeBSD.org>
>> CommitDate: 2025-09-04 11:16:46 +0000
>>=20
>>   vtnet: improve checksum offloading
>>=20
>>   When transmitting a packet over the vtnet interface, map the
>>   csum flags CSUM_DATA_VALID | CSUM_PSEUDO_HDR to the virtio
>>   flag VIRTIO_NET_HDR_F_DATA_VALID.
>>   When receiving a packet over the virtio network channel, translate
>>   the virtio flag VIRTIO_NET_HDR_F_NEEDS_CSUM not to CSUM_DATA_VALID =
|
>>   CSUM_PSEUDO_HDR, but to CSUM_TCP, CSUM_TCP_IPV6, CSUM_UDP, or
>>   CSUM_UDP_IPV6.
>>   The second change fixes a series of issue related to checksum
>>   offloading for if_vtnet.
>>   While there, improve the stats counters to allow a detailed view
>>   on what is going on in relation to checksum offloading.
>>=20
>>   PR:                     165059
>>   Reviewed by:            tuexen, manpages
>>   MFC after:              1 week
>>   Differential Revision:  https://reviews.freebsd.org/D51686
>=20
>=20
> This fails to build a LINT-NOIP now.  Makes me wonder what good vtnet =
is
> in first place w/o INET and w/o INET6?
>=20
> 33       | ^~~~~~~~~~~
> 34 1 warning generated.
> 35 =
/tank/users/bz/git/FreeBSD/freebsd-src/sys/dev/virtio/network/if_vtnet.c:1=
825:9: error: call to undeclared function 'in_cksum_skip'; ISO C99 and =
later do not support implicit function declarations =
[-Werror,-Wimplicit-function-declaration]
> 36  1825 |         csum =3D in_cksum_skip(m, m->m_pkthdr.len, =
hdr->csum_start);
> 37       |                ^
> 38 =
/tank/users/bz/git/FreeBSD/freebsd-src/sys/dev/virtio/network/if_vtnet.c:1=
849:6: error: variable 'hoff' set but not used =
[-Werror,-Wunused-but-set-variable]
> 39  1849 |         int hoff, protocol;
> 40       |             ^
> 41 2 errors generated.
> 42 --- if_vtnet.o ---
> 43 *** [if_vtnet.o] Error code 1
OK, that is fixed in
=
https://cgit.FreeBSD.org/src/commit/?id=3D7c448f5aab8be6977d0860e608e7d497=
b495d28c =
<https://cgit.freebsd.org/src/commit/?id=3D7c448f5aab8be6977d0860e608e7d49=
7b495d28c>

Thanks again for reporting and I am sorry for breaking the NOIP (again).
BTW: Is there a reason we don't have the NOINET, NOINET6, and NOIP =
kernel
configs for arm64?

Best regards
Michael
>=20
>=20
>> ---
>> share/man/man4/vtnet.4               |  28 +++--
>> sys/dev/virtio/network/if_vtnet.c    | 220 =
++++++++++++++++++-----------------
>> sys/dev/virtio/network/if_vtnetvar.h |   2 +-
>> 3 files changed, 132 insertions(+), 118 deletions(-)
>>=20
>> diff --git a/share/man/man4/vtnet.4 b/share/man/man4/vtnet.4




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8A4EFC13-ABA3-471B-9726-5940E2B88DED>