Re: [PATCH net v4 2/7] um: vector: trim skbs before verifying the header
From: Willem de Bruijn
Date: Wed Oct 21 2026 - 12:16:24 EST
Michael S. Tsirkin wrote:
> The vector receive path over-allocates the skb and only trims it
> to the received length after the transport header is verified.
>
> A follow up patch will complete the packet checksum in software within
> virtio_net_hdr_to_skb so we need the packet trimmed (otherwise the
> checksum would be computed incorrectly over the unreceived tail of the
> buffer).
>
> Trim first, so the import sees the packet as it was received.
>
> Signed-off-by: Michael S. Tsirkin <mst@xxxxxxxxxx>
Reviewed-by: Willem de Bruijn <willemb@xxxxxxxxxx>