From: Eric Dumazet <eric.duma...@gmail.com>
Date: Sat, 17 Nov 2018 17:19:34 -0800

> I might have been not very clear.
> 
> Issue is that with macvlan and GRO-friend traffic we can receive the 
> following packets :
> 
> P1-P2 with PACKET_OTHERHOST because eth_type_trans() detected the dst MAC is 
> not the eth0 device mac address.
> 
> P2 has been aggregated to P1, so the sk_buff has been put to napi->skb via 
> napi_reuse_skb()
> 
> Then we receive on same NAPI packet P3, for this host, reusing napi->skb that 
> was saved (old P2 sk_buff).
> skb->pkt_type is PACKET_OTHERHOST.
> 
> eth_type_trans() does not change skb->pkt_type because ethernet dst mac 
> address is our ethernet mac address.
> 
> -> We feed the upper stack with P3, with incorrect pkt_type.
> 
>  -> packet is dropped because pkt_type != PACKET_HOST, for example in 
> tcp_v4_rcv()

Oh I see, it is about defaults when using skb freshly from cache for another 
new packet.

Yes, I completely agree with your suggested patch.

Thanks for explaining.

Reply via email to