All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* cassini driver skb->truesize bug
@ 2007-12-04 14:19 Laszlo Attila Toth
  2007-12-05 10:23 ` Balazs Scheidler
  0 siblings, 1 reply; 4+ messages in thread
From: Laszlo Attila Toth @ 2007-12-04 14:19 UTC (permalink / raw
  To: netdev

Hello,

we got the following message:
SKB BUG: Invalid truesize (376) len=514, sizeof(sk_buff)=248

It only occurs on larger traffic (at speed 100 Mbps: always), but  not 
when downloading a small web page.

In cas_rx_process_pkt() the the skb's truesize is only set via skb_put()
but it is not used if there are fragments, also skb->len is increased by
the fragment's size, but the truesize member is unchanged. I compared it 
to the implementation in e1000 where  all of the len, datalen and 
trusize members are increased.

If I modify the code to add the fragment's size to the truesize member, 
the driver allocates all available memory after a while.

Regards,
Attila

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

* Re: cassini driver skb->truesize bug
  2007-12-04 14:19 cassini driver skb->truesize bug Laszlo Attila Toth
@ 2007-12-05 10:23 ` Balazs Scheidler
  2007-12-05 10:41   ` David Miller
  2007-12-05 17:30   ` KOVACS Krisztian
  0 siblings, 2 replies; 4+ messages in thread
From: Balazs Scheidler @ 2007-12-05 10:23 UTC (permalink / raw
  To: panther; +Cc: netdev

Some more investigation revealed that the cassini driver leaks the data
portion of all RXed packets, this makes the driver completely unusable.

We've tested the following combinations:
 * 2.6.17 (patched, but no cassini related patches)
 * 2.6.22 Ubuntu Gutsy.

It still worked in 2.6.12 where we originally backported the driver from
2.6.14.

The sk_buff count in slabinfo stays normal, so the skbs are properly
freed. I'm suspicious about all this cas_page_t wrappers.

Is there a maintainer for this driver? All our previous questions went
unanswered.


On Tue, 2007-12-04 at 15:19 +0100, Laszlo Attila Toth wrote:
> Hello,
> 
> we got the following message:
> SKB BUG: Invalid truesize (376) len=514, sizeof(sk_buff)=248
> 
> It only occurs on larger traffic (at speed 100 Mbps: always), but  not 
> when downloading a small web page.
> 
> In cas_rx_process_pkt() the the skb's truesize is only set via skb_put()
> but it is not used if there are fragments, also skb->len is increased by
> the fragment's size, but the truesize member is unchanged. I compared it 
> to the implementation in e1000 where  all of the len, datalen and 
> trusize members are increased.
> 
> If I modify the code to add the fragment's size to the truesize member, 
> the driver allocates all available memory after a while.
> 
> Regards,
> Attila
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
-- 
Bazsi


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

* Re: cassini driver skb->truesize bug
  2007-12-05 10:23 ` Balazs Scheidler
@ 2007-12-05 10:41   ` David Miller
  2007-12-05 17:30   ` KOVACS Krisztian
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2007-12-05 10:41 UTC (permalink / raw
  To: bazsi; +Cc: panther, netdev

From: Balazs Scheidler <bazsi@balabit.hu>
Date: Wed, 05 Dec 2007 11:23:46 +0100

> Is there a maintainer for this driver? All our previous questions went
> unanswered.

There is a rewrite pending and I have some cards arriving soon in the
mail.

Meanwhile, either find a way to diagnose and fix this problem yourself
or use a different network card.

Thanks.

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

* Re: cassini driver skb->truesize bug
  2007-12-05 10:23 ` Balazs Scheidler
  2007-12-05 10:41   ` David Miller
@ 2007-12-05 17:30   ` KOVACS Krisztian
  1 sibling, 0 replies; 4+ messages in thread
From: KOVACS Krisztian @ 2007-12-05 17:30 UTC (permalink / raw
  To: Balazs Scheidler; +Cc: panther, netdev

Hi,

On Wed, Dec 05, 2007 at 11:23:46AM +0100, Balazs Scheidler wrote:
> Some more investigation revealed that the cassini driver leaks the data
> portion of all RXed packets, this makes the driver completely unusable.
> 
> We've tested the following combinations:
>  * 2.6.17 (patched, but no cassini related patches)
>  * 2.6.22 Ubuntu Gutsy.
> 
> It still worked in 2.6.12 where we originally backported the driver from
> 2.6.14.
> 
> The sk_buff count in slabinfo stays normal, so the skbs are properly
> freed. I'm suspicious about all this cas_page_t wrappers.

Commit fa4f0774d7c6cccb4d1fda76b91dd8eddcb2dd6a?

I don't really see how the buffer count for a page used as a fragment gets
decreased when the skb is freed.

-- 
KOVACS Krisztian

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

end of thread, other threads:[~2007-12-05 18:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-04 14:19 cassini driver skb->truesize bug Laszlo Attila Toth
2007-12-05 10:23 ` Balazs Scheidler
2007-12-05 10:41   ` David Miller
2007-12-05 17:30   ` KOVACS Krisztian

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.