Re: [Intel-wired-lan] [PATCH net/jkirsher] bpf, xdp, i40e: fix i40e_build_skb skb reserve and truesize

2018-06-13 Thread Alexander Duyck
On Wed, Jun 13, 2018 at 9:26 AM, John Fastabend wrote: > On 06/13/2018 02:04 AM, Daniel Borkmann wrote: >> Using skb_reserve(skb, I40E_SKB_PAD + (xdp->data - xdp->data_hard_start)) >> is clearly wrong since I40E_SKB_PAD already points to the offset where >> the original xdp->data was sitting since

Re: [PATCH net/jkirsher] bpf, xdp, i40e: fix i40e_build_skb skb reserve and truesize

2018-06-13 Thread John Fastabend
On 06/13/2018 02:04 AM, Daniel Borkmann wrote: > Using skb_reserve(skb, I40E_SKB_PAD + (xdp->data - xdp->data_hard_start)) > is clearly wrong since I40E_SKB_PAD already points to the offset where > the original xdp->data was sitting since xdp->data_hard_start is defined > as xdp->data - i40e_rx_off

Re: [PATCH net/jkirsher] bpf, xdp, i40e: fix i40e_build_skb skb reserve and truesize

2018-06-13 Thread Keith Busch
On Wed, Jun 13, 2018 at 11:04:36AM +0200, Daniel Borkmann wrote: > Using skb_reserve(skb, I40E_SKB_PAD + (xdp->data - xdp->data_hard_start)) > is clearly wrong since I40E_SKB_PAD already points to the offset where > the original xdp->data was sitting since xdp->data_hard_start is defined > as xdp->

[PATCH net/jkirsher] bpf, xdp, i40e: fix i40e_build_skb skb reserve and truesize

2018-06-13 Thread Daniel Borkmann
Using skb_reserve(skb, I40E_SKB_PAD + (xdp->data - xdp->data_hard_start)) is clearly wrong since I40E_SKB_PAD already points to the offset where the original xdp->data was sitting since xdp->data_hard_start is defined as xdp->data - i40e_rx_offset(rx_ring) where latter offsets to I40E_SKB_PAD when