All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-queue] i40e: Fix incorrect skb reserved size on rx
@ 2018-06-13  8:08 ` Toshiaki Makita
  0 siblings, 0 replies; 10+ messages in thread
From: Toshiaki Makita @ 2018-06-13  8:08 UTC (permalink / raw)
  To: Jeff Kirsher
  Cc: Toshiaki Makita, Daniel Borkmann, John Fastabend,
	intel-wired-lan, netdev

i40e_build_skb() reserves I40E_SKB_PAD + (xdp->data -
xdp->data_hard_start) but obviously I40E_SKB_PAD is unnecessary here
and mac_header/data feilds in skb becomes incorrect, and breaks normal
skb receive path as well as XDP receive path.

Fixes: cc5b114dcf98 ("bpf, i40e: add meta data support")
Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
---
 drivers/net/ethernet/intel/i40e/i40e_txrx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
index 8ffb7454e67c..6d59f51f1730 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -2124,7 +2124,7 @@ static struct sk_buff *i40e_build_skb(struct i40e_ring *rx_ring,
 		return NULL;
 
 	/* update pointers within the skb to store the data */
-	skb_reserve(skb, I40E_SKB_PAD + (xdp->data - xdp->data_hard_start));
+	skb_reserve(skb, xdp->data - xdp->data_hard_start);
 	__skb_put(skb, xdp->data_end - xdp->data);
 	if (metasize)
 		skb_metadata_set(skb, metasize);
-- 
2.14.2

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Intel-wired-lan] [PATCH net-queue] i40e: Fix incorrect skb reserved size on rx
@ 2018-06-13  8:08 ` Toshiaki Makita
  0 siblings, 0 replies; 10+ messages in thread
From: Toshiaki Makita @ 2018-06-13  8:08 UTC (permalink / raw)
  To: intel-wired-lan

i40e_build_skb() reserves I40E_SKB_PAD + (xdp->data -
xdp->data_hard_start) but obviously I40E_SKB_PAD is unnecessary here
and mac_header/data feilds in skb becomes incorrect, and breaks normal
skb receive path as well as XDP receive path.

Fixes: cc5b114dcf98 ("bpf, i40e: add meta data support")
Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
---
 drivers/net/ethernet/intel/i40e/i40e_txrx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
index 8ffb7454e67c..6d59f51f1730 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -2124,7 +2124,7 @@ static struct sk_buff *i40e_build_skb(struct i40e_ring *rx_ring,
 		return NULL;
 
 	/* update pointers within the skb to store the data */
-	skb_reserve(skb, I40E_SKB_PAD + (xdp->data - xdp->data_hard_start));
+	skb_reserve(skb, xdp->data - xdp->data_hard_start);
 	__skb_put(skb, xdp->data_end - xdp->data);
 	if (metasize)
 		skb_metadata_set(skb, metasize);
-- 
2.14.2



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH net-queue] i40e: Fix incorrect skb reserved size on rx
  2018-06-13  8:08 ` [Intel-wired-lan] " Toshiaki Makita
@ 2018-06-13  9:06   ` Daniel Borkmann
  -1 siblings, 0 replies; 10+ messages in thread
From: Daniel Borkmann @ 2018-06-13  9:06 UTC (permalink / raw)
  To: Toshiaki Makita, Jeff Kirsher; +Cc: John Fastabend, intel-wired-lan, netdev

On 06/13/2018 10:08 AM, Toshiaki Makita wrote:
> i40e_build_skb() reserves I40E_SKB_PAD + (xdp->data -
> xdp->data_hard_start) but obviously I40E_SKB_PAD is unnecessary here
> and mac_header/data feilds in skb becomes incorrect, and breaks normal
> skb receive path as well as XDP receive path.
> 
> Fixes: cc5b114dcf98 ("bpf, i40e: add meta data support")
> Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>

Thanks Toshiaki, I sent a complete fix yesterday here:

https://lkml.org/lkml/2018/6/12/843

Cheers,
Daniel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Intel-wired-lan] [PATCH net-queue] i40e: Fix incorrect skb reserved size on rx
@ 2018-06-13  9:06   ` Daniel Borkmann
  0 siblings, 0 replies; 10+ messages in thread
From: Daniel Borkmann @ 2018-06-13  9:06 UTC (permalink / raw)
  To: intel-wired-lan

On 06/13/2018 10:08 AM, Toshiaki Makita wrote:
> i40e_build_skb() reserves I40E_SKB_PAD + (xdp->data -
> xdp->data_hard_start) but obviously I40E_SKB_PAD is unnecessary here
> and mac_header/data feilds in skb becomes incorrect, and breaks normal
> skb receive path as well as XDP receive path.
> 
> Fixes: cc5b114dcf98 ("bpf, i40e: add meta data support")
> Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>

Thanks Toshiaki, I sent a complete fix yesterday here:

https://lkml.org/lkml/2018/6/12/843

Cheers,
Daniel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH net-queue] i40e: Fix incorrect skb reserved size on rx
  2018-06-13  9:06   ` [Intel-wired-lan] " Daniel Borkmann
@ 2018-06-14  0:25     ` Toshiaki Makita
  -1 siblings, 0 replies; 10+ messages in thread
From: Toshiaki Makita @ 2018-06-14  0:25 UTC (permalink / raw)
  To: Daniel Borkmann, Jeff Kirsher; +Cc: John Fastabend, intel-wired-lan, netdev

On 2018/06/13 18:06, Daniel Borkmann wrote:
> On 06/13/2018 10:08 AM, Toshiaki Makita wrote:
>> i40e_build_skb() reserves I40E_SKB_PAD + (xdp->data -
>> xdp->data_hard_start) but obviously I40E_SKB_PAD is unnecessary here
>> and mac_header/data feilds in skb becomes incorrect, and breaks normal
>> skb receive path as well as XDP receive path.
>>
>> Fixes: cc5b114dcf98 ("bpf, i40e: add meta data support")
>> Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
> 
> Thanks Toshiaki, I sent a complete fix yesterday here:
> 
> https://lkml.org/lkml/2018/6/12/843

Oh I was not aware of it. Thanks, let's go with your patch.

-- 
Toshiaki Makita

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Intel-wired-lan] [PATCH net-queue] i40e: Fix incorrect skb reserved size on rx
@ 2018-06-14  0:25     ` Toshiaki Makita
  0 siblings, 0 replies; 10+ messages in thread
From: Toshiaki Makita @ 2018-06-14  0:25 UTC (permalink / raw)
  To: intel-wired-lan

On 2018/06/13 18:06, Daniel Borkmann wrote:
> On 06/13/2018 10:08 AM, Toshiaki Makita wrote:
>> i40e_build_skb() reserves I40E_SKB_PAD + (xdp->data -
>> xdp->data_hard_start) but obviously I40E_SKB_PAD is unnecessary here
>> and mac_header/data feilds in skb becomes incorrect, and breaks normal
>> skb receive path as well as XDP receive path.
>>
>> Fixes: cc5b114dcf98 ("bpf, i40e: add meta data support")
>> Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
> 
> Thanks Toshiaki, I sent a complete fix yesterday here:
> 
> https://lkml.org/lkml/2018/6/12/843

Oh I was not aware of it. Thanks, let's go with your patch.

-- 
Toshiaki Makita


^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [Intel-wired-lan] [PATCH net-queue] i40e: Fix incorrect skb reserved size on rx
  2018-06-14  0:25     ` [Intel-wired-lan] " Toshiaki Makita
@ 2018-06-14  9:14       ` Malek, Patryk
  -1 siblings, 0 replies; 10+ messages in thread
From: Malek, Patryk @ 2018-06-14  9:14 UTC (permalink / raw)
  To: Toshiaki Makita, Daniel Borkmann, Kirsher, Jeffrey T
  Cc: intel-wired-lan, netdev

> On 2018/06/13 18:06, Daniel Borkmann wrote:
> > On 06/13/2018 10:08 AM, Toshiaki Makita wrote:
> >> i40e_build_skb() reserves I40E_SKB_PAD + (xdp->data -
> >> xdp->data_hard_start) but obviously I40E_SKB_PAD is unnecessary
> here
> >> and mac_header/data feilds in skb becomes incorrect, and breaks

Shouldn't this be fields instead of feilds?

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Intel-wired-lan] [PATCH net-queue] i40e: Fix incorrect skb reserved size on rx
@ 2018-06-14  9:14       ` Malek, Patryk
  0 siblings, 0 replies; 10+ messages in thread
From: Malek, Patryk @ 2018-06-14  9:14 UTC (permalink / raw)
  To: intel-wired-lan

> On 2018/06/13 18:06, Daniel Borkmann wrote:
> > On 06/13/2018 10:08 AM, Toshiaki Makita wrote:
> >> i40e_build_skb() reserves I40E_SKB_PAD + (xdp->data -
> >> xdp->data_hard_start) but obviously I40E_SKB_PAD is unnecessary
> here
> >> and mac_header/data feilds in skb becomes incorrect, and breaks

Shouldn't this be fields instead of feilds?

--
Patryk Ma?ek
--------------------------------------------------------------------

Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN.

Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek
przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by
others is strictly prohibited.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Intel-wired-lan] [PATCH net-queue] i40e: Fix incorrect skb reserved size on rx
  2018-06-14  9:14       ` Malek, Patryk
@ 2018-06-14  9:21         ` Toshiaki Makita
  -1 siblings, 0 replies; 10+ messages in thread
From: Toshiaki Makita @ 2018-06-14  9:21 UTC (permalink / raw)
  To: Malek, Patryk
  Cc: Daniel Borkmann, Kirsher, Jeffrey T, intel-wired-lan, netdev

On 2018/06/14 18:14, Malek, Patryk wrote:
>> On 2018/06/13 18:06, Daniel Borkmann wrote:
>>> On 06/13/2018 10:08 AM, Toshiaki Makita wrote:
>>>> i40e_build_skb() reserves I40E_SKB_PAD + (xdp->data -
>>>> xdp->data_hard_start) but obviously I40E_SKB_PAD is unnecessary
>> here
>>>> and mac_header/data feilds in skb becomes incorrect, and breaks
> 
> Shouldn't this be fields instead of feilds?

Thanks, but this is now superseded by Daniel's patch so dropped I think.
http://patchwork.ozlabs.org/patch/928778/

-- 
Toshiaki Makita

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Intel-wired-lan] [PATCH net-queue] i40e: Fix incorrect skb reserved size on rx
@ 2018-06-14  9:21         ` Toshiaki Makita
  0 siblings, 0 replies; 10+ messages in thread
From: Toshiaki Makita @ 2018-06-14  9:21 UTC (permalink / raw)
  To: intel-wired-lan

On 2018/06/14 18:14, Malek, Patryk wrote:
>> On 2018/06/13 18:06, Daniel Borkmann wrote:
>>> On 06/13/2018 10:08 AM, Toshiaki Makita wrote:
>>>> i40e_build_skb() reserves I40E_SKB_PAD + (xdp->data -
>>>> xdp->data_hard_start) but obviously I40E_SKB_PAD is unnecessary
>> here
>>>> and mac_header/data feilds in skb becomes incorrect, and breaks
> 
> Shouldn't this be fields instead of feilds?

Thanks, but this is now superseded by Daniel's patch so dropped I think.
http://patchwork.ozlabs.org/patch/928778/

-- 
Toshiaki Makita


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-06-14  9:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-13  8:08 [PATCH net-queue] i40e: Fix incorrect skb reserved size on rx Toshiaki Makita
2018-06-13  8:08 ` [Intel-wired-lan] " Toshiaki Makita
2018-06-13  9:06 ` Daniel Borkmann
2018-06-13  9:06   ` [Intel-wired-lan] " Daniel Borkmann
2018-06-14  0:25   ` Toshiaki Makita
2018-06-14  0:25     ` [Intel-wired-lan] " Toshiaki Makita
2018-06-14  9:14     ` Malek, Patryk
2018-06-14  9:14       ` Malek, Patryk
2018-06-14  9:21       ` Toshiaki Makita
2018-06-14  9:21         ` Toshiaki Makita

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.