From: Stephen Hemminger <[email protected]>
Date: Thu, 23 May 2019 10:54:29 -0700
> @@ -4858,6 +4841,17 @@ static int __netif_receive_skb_core(struct sk_buff
> *skb, bool pfmemalloc,
>
> __this_cpu_inc(softnet_data.processed);
>
> + if (static_branch_unlikely(&generic_xdp_needed_key)) {
> + int ret2;
> +
> + preempt_disable();
> + ret2 = do_xdp_generic(rcu_dereference(skb->dev->xdp_prog), skb);
> + preempt_enable();
> +
> + if (ret2 != XDP_PASS)
> + return NET_RX_DROP;
> + }
This function just did a skb_reset_mac_len().
do_xdp_generic() can modify skb->mac_header.
This means we have to redo the skb_reset_mac_len() to handle the
potentially changed value.