From: Willem de Bruijn <[email protected]>
Date: Thu, 28 May 2020 13:05:32 -0400
> Temporarily pull ETH_HLEN to make control flow the same for frags and
> not frags. Then push the header just before calling napi_gro_frags.
...
> case IFF_TAP:
> - if (!frags)
> - skb->protocol = eth_type_trans(skb, tun->dev);
> + if (frags && !pskb_may_pull(skb, ETH_HLEN)) {
> + err = -ENOMEM;
> + goto drop;
> + }
> + skb->protocol = eth_type_trans(skb, tun->dev);
...
> /* Exercise flow dissector code path. */
> - u32 headlen = eth_get_headlen(tun->dev, skb->data,
> - skb_headlen(skb));
> + skb_push(skb, ETH_HLEN);
> + headlen = eth_get_headlen(tun->dev, skb->data,
> + skb_headlen(skb));
I hate to be a stickler on wording in the commit message, but the
change is not really "pulling" the ethernet header from the SKB.
Instead it is invoking pskb_may_pull() which just makes sure the
header is there in the linear SKB data area.
Can you please refine this description and resubmit?
Thank you.