Re: [PATCH net] net: xdp: pull ethernet header off packet after computing skb->protocol

2020-08-17 Thread David Miller
From: "Jason A. Donenfeld" Date: Mon, 17 Aug 2020 09:48:10 +0200 > On 8/17/20, Jesper Dangaard Brouer wrote: >> On Sun, 16 Aug 2020 15:29:37 -0700 (PDT) >> David Miller wrote: >> >>> From: "Jason A. Donenfeld" >>> Date: Sat, 15 Aug 2020 09:29:30 +0200 >>> >>> > When an XDP program changes the

Re: [PATCH net] net: xdp: pull ethernet header off packet after computing skb->protocol

2020-08-17 Thread Jason A. Donenfeld
On 8/17/20, Jesper Dangaard Brouer wrote: > On Sun, 16 Aug 2020 15:29:37 -0700 (PDT) > David Miller wrote: > >> From: "Jason A. Donenfeld" >> Date: Sat, 15 Aug 2020 09:29:30 +0200 >> >> > When an XDP program changes the ethernet header protocol field, >> > eth_type_trans is used to recalculate s

Re: [PATCH net] net: xdp: pull ethernet header off packet after computing skb->protocol

2020-08-16 Thread Jesper Dangaard Brouer
On Sun, 16 Aug 2020 15:29:37 -0700 (PDT) David Miller wrote: > From: "Jason A. Donenfeld" > Date: Sat, 15 Aug 2020 09:29:30 +0200 > > > When an XDP program changes the ethernet header protocol field, > > eth_type_trans is used to recalculate skb->protocol. In order for > > eth_type_trans to wor

Re: [PATCH net] net: xdp: pull ethernet header off packet after computing skb->protocol

2020-08-16 Thread David Miller
From: "Jason A. Donenfeld" Date: Sat, 15 Aug 2020 09:29:30 +0200 > When an XDP program changes the ethernet header protocol field, > eth_type_trans is used to recalculate skb->protocol. In order for > eth_type_trans to work correctly, the ethernet header must actually be > part of the skb data se

[PATCH net] net: xdp: pull ethernet header off packet after computing skb->protocol

2020-08-15 Thread Jason A. Donenfeld
When an XDP program changes the ethernet header protocol field, eth_type_trans is used to recalculate skb->protocol. In order for eth_type_trans to work correctly, the ethernet header must actually be part of the skb data segment, so the code first pushes that onto the head of the skb. However, it