Re: [PATCH net v5 1/7] net: account for ingress-resolved virtio net hdr state

From: Willem de Bruijn

Date: Thu Oct 22 2026 - 10:44:34 EST


Michael S. Tsirkin wrote:
> The following patch will add ingress resolution of uncommon virtio net
> hdr checksum metadata (software checksum completion at ingress) which
> adds performance overhead to the packet processing.
>
> We should make it visible, so a hypothetical workload relying on
> uncommon metadata can be distinguished from none at all. This way issues
> in the parsing will be reported and not quietly pay the host-CPU
> checksum overhead instead of offload.
>
> Flip every call to virtio_net_hdr_to_skb to test for negative errno
> only. The um vector raw transport even ignored the return value
> altogether: rejected packets went on into the stack with their
> metadata unvalidated, so check it there as well.
>
> Have tun count these events per device as rx_csum_sw, exposed via
> ethtool -S.
>
> Signed-off-by: Michael S. Tsirkin <mst@xxxxxxxxxx>

Reviewed-by: Willem de Bruijn <willemb@xxxxxxxxxx>