Re: [Xen-devel] [PATCH net-next] xen-netfront: avoid packet loss when ethernet header crosses page boundary
From: David Vrabel
Date: Mon Aug 22 2016 - 12:56:15 EST
On 22/08/16 16:42, Vitaly Kuznetsov wrote:
>
> I see two ways to fix the issue:
> - Change the 'wire' protocol between netfront and netback to start keeping
> the original SKB structure. We'll have to add a flag indicating the fact
> that the particular request is a part of the original linear part and not
> a frag. We'll need to know the length of the linear part to pre-allocate
> memory.
I don't think there needs to be a protocol change. I think the check in
netback is bogus -- it's the total packet length that must be >
HLEN_ETH. The upper layers will pull any headers from the frags as
needed (or if necessary, netback could pull a minimum amount).
There's no need to preserve the skb layout (e.g., look how the to-guest
direction we do not do this).
David