* ixgbe truesize underestimation fix missing?
@ 2012-02-13 8:45 Christian Brunner
2012-02-13 9:03 ` Eric Dumazet
0 siblings, 1 reply; 4+ messages in thread
From: Christian Brunner @ 2012-02-13 8:45 UTC (permalink / raw)
To: linux-kernel; +Cc: eric.dumazet
Back in Oktober, there was a patch by Eric Dumazet for the ixgbe
driver to fix the skb truesize underestimation (commit
98130646770db42cd14c44ba0d7f2d0eb8078820). It changed only one line in
ixgbe_main.c:
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -1326,7 +1326,7 @@ static bool ixgbe_clean_rx_irq(struct
ixgbe_q_vector *q_vector,
skb->len += upper_len;
skb->data_len += upper_len;
- skb->truesize += upper_len;
+ skb->truesize += PAGE_SIZE / 2;
} i++;
But when I look at the current code (3.2.5 or 3.3rc), skb->truesize is
still increased by the same value as skb->data_len.
1228 skb->data_len += frag_list_size;
1229 skb->truesize += frag_list_size;
Is it posible that there was a merge conflict, or am I missing something here?
Thanks,
Christian
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: ixgbe truesize underestimation fix missing?
2012-02-13 8:45 ixgbe truesize underestimation fix missing? Christian Brunner
@ 2012-02-13 9:03 ` Eric Dumazet
2012-02-13 9:57 ` Christian Brunner
0 siblings, 1 reply; 4+ messages in thread
From: Eric Dumazet @ 2012-02-13 9:03 UTC (permalink / raw)
To: Christian Brunner; +Cc: linux-kernel
Le lundi 13 février 2012 à 09:45 +0100, Christian Brunner a écrit :
> Back in Oktober, there was a patch by Eric Dumazet for the ixgbe
> driver to fix the skb truesize underestimation (commit
> 98130646770db42cd14c44ba0d7f2d0eb8078820). It changed only one line in
> ixgbe_main.c:
>
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> @@ -1326,7 +1326,7 @@ static bool ixgbe_clean_rx_irq(struct
> ixgbe_q_vector *q_vector,
> skb->len += upper_len;
> skb->data_len += upper_len;
> - skb->truesize += upper_len;
> + skb->truesize += PAGE_SIZE / 2;
> } i++;
>
>
> But when I look at the current code (3.2.5 or 3.3rc), skb->truesize is
> still increased by the same value as skb->data_len.
>
> 1228 skb->data_len += frag_list_size;
> 1229 skb->truesize += frag_list_size;
>
> Is it posible that there was a merge conflict, or am I missing something here?
Maybe a problem in your local tree ?
I can see proper fix in current tree.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ixgbe truesize underestimation fix missing?
2012-02-13 9:03 ` Eric Dumazet
@ 2012-02-13 9:57 ` Christian Brunner
2012-02-13 10:46 ` Eric Dumazet
0 siblings, 1 reply; 4+ messages in thread
From: Christian Brunner @ 2012-02-13 9:57 UTC (permalink / raw)
To: Eric Dumazet; +Cc: linux-kernel
2012/2/13 Eric Dumazet <eric.dumazet@gmail.com>:
> Le lundi 13 février 2012 à 09:45 +0100, Christian Brunner a écrit :
>> Back in Oktober, there was a patch by Eric Dumazet for the ixgbe
>> driver to fix the skb truesize underestimation (commit
>> 98130646770db42cd14c44ba0d7f2d0eb8078820). It changed only one line in
>> ixgbe_main.c:
>>
>> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
>> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
>> @@ -1326,7 +1326,7 @@ static bool ixgbe_clean_rx_irq(struct
>> ixgbe_q_vector *q_vector,
>> skb->len += upper_len;
>> skb->data_len += upper_len;
>> - skb->truesize += upper_len;
>> + skb->truesize += PAGE_SIZE / 2;
>> } i++;
>>
>>
>> But when I look at the current code (3.2.5 or 3.3rc), skb->truesize is
>> still increased by the same value as skb->data_len.
>>
>> 1228 skb->data_len += frag_list_size;
>> 1229 skb->truesize += frag_list_size;
>>
>> Is it posible that there was a merge conflict, or am I missing something here?
>
> Maybe a problem in your local tree ?
>
> I can see proper fix in current tree.
Ahh... Sorry. I Was looking at the wrong place -
ixgbe_transform_rsc_queue() has code that is quite similar.
This however makes me wonder, why we are using "skb->len" for
increasing the frag_list_size, as skb->len might be smaller than
skb->truesize.
Shouldn't we add a frag_list_truesize counter in ixgbe_transform_rsc_queue() ?
Thanks,
Christian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: ixgbe truesize underestimation fix missing?
2012-02-13 9:57 ` Christian Brunner
@ 2012-02-13 10:46 ` Eric Dumazet
0 siblings, 0 replies; 4+ messages in thread
From: Eric Dumazet @ 2012-02-13 10:46 UTC (permalink / raw)
To: Christian Brunner; +Cc: linux-kernel
Le lundi 13 février 2012 à 10:57 +0100, Christian Brunner a écrit :
> 2012/2/13 Eric Dumazet <eric.dumazet@gmail.com>:
> > Le lundi 13 février 2012 à 09:45 +0100, Christian Brunner a écrit :
> >> Back in Oktober, there was a patch by Eric Dumazet for the ixgbe
> >> driver to fix the skb truesize underestimation (commit
> >> 98130646770db42cd14c44ba0d7f2d0eb8078820). It changed only one line in
> >> ixgbe_main.c:
> >>
> >> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> >> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> >> @@ -1326,7 +1326,7 @@ static bool ixgbe_clean_rx_irq(struct
> >> ixgbe_q_vector *q_vector,
> >> skb->len += upper_len;
> >> skb->data_len += upper_len;
> >> - skb->truesize += upper_len;
> >> + skb->truesize += PAGE_SIZE / 2;
> >> } i++;
> >>
> >>
> >> But when I look at the current code (3.2.5 or 3.3rc), skb->truesize is
> >> still increased by the same value as skb->data_len.
> >>
> >> 1228 skb->data_len += frag_list_size;
> >> 1229 skb->truesize += frag_list_size;
> >>
> >> Is it posible that there was a merge conflict, or am I missing something here?
> >
> > Maybe a problem in your local tree ?
> >
> > I can see proper fix in current tree.
>
> Ahh... Sorry. I Was looking at the wrong place -
> ixgbe_transform_rsc_queue() has code that is quite similar.
>
> This however makes me wonder, why we are using "skb->len" for
> increasing the frag_list_size, as skb->len might be smaller than
> skb->truesize.
>
> Shouldn't we add a frag_list_truesize counter in ixgbe_transform_rsc_queue() ?
Probably, but you should raise this discussion on netdev, not lkml, and
based on net-next tree, as ixgbe_transform_rsc_queue() doesnt exist
anymore ;)
Note that in this case (RSC) truesize underestimation is small since
typical segment size is very close to PAGE_SIZE/2
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-02-13 10:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-13 8:45 ixgbe truesize underestimation fix missing? Christian Brunner
2012-02-13 9:03 ` Eric Dumazet
2012-02-13 9:57 ` Christian Brunner
2012-02-13 10:46 ` Eric Dumazet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).