All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: + myri10ge-build-fix.patch added to -mm tree
       [not found] <200606210433.k5L4XgmP008626@shell0.pdx.osdl.net>
@ 2006-06-21  4:41 ` Herbert Xu
  2006-06-21 12:09   ` Brice Goglin
  0 siblings, 1 reply; 3+ messages in thread
From: Herbert Xu @ 2006-06-21  4:41 UTC (permalink / raw)
  To: akpm; +Cc: mm-commits, bgoglin, davem, jeff, netdev

On Tue, Jun 20, 2006 at 09:33:42PM -0700, akpm@osdl.org wrote:
>
> diff -puN drivers/net/myri10ge/myri10ge.c~myri10ge-build-fix drivers/net/myri10ge/myri10ge.c
> --- a/drivers/net/myri10ge/myri10ge.c~myri10ge-build-fix
> +++ a/drivers/net/myri10ge/myri10ge.c
> @@ -2120,7 +2120,7 @@ abort_linearize:
>  		goto drop;
>  	}
>  
> -	if (skb_linearize(skb, GFP_ATOMIC))
> +	if (skb_linearize(skb))
>  		goto drop;

Actually I think this driver (in conjunction with TSO) is buggy.
It has a maximum segment count of 12.  However TSO can send 13 pages
or more of data on i386.  If this happens it looks like this driver
will go into an infinite loop forever trying to linearize the skb.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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

* Re: + myri10ge-build-fix.patch added to -mm tree
  2006-06-21  4:41 ` + myri10ge-build-fix.patch added to -mm tree Herbert Xu
@ 2006-06-21 12:09   ` Brice Goglin
  2006-06-21 12:28     ` Herbert Xu
  0 siblings, 1 reply; 3+ messages in thread
From: Brice Goglin @ 2006-06-21 12:09 UTC (permalink / raw)
  To: Herbert Xu; +Cc: akpm, mm-commits, davem, jeff, netdev

Herbert Xu wrote:
> On Tue, Jun 20, 2006 at 09:33:42PM -0700, akpm@osdl.org wrote:
>> diff -puN drivers/net/myri10ge/myri10ge.c~myri10ge-build-fix
>> drivers/net/myri10ge/myri10ge.c
>> --- a/drivers/net/myri10ge/myri10ge.c~myri10ge-build-fix
>> +++ a/drivers/net/myri10ge/myri10ge.c
>> @@ -2120,7 +2120,7 @@ abort_linearize:
>> goto drop;
>> }
>>
>> - if (skb_linearize(skb, GFP_ATOMIC))
>> + if (skb_linearize(skb))
>> goto drop;
>
> Actually I think this driver (in conjunction with TSO) is buggy.
> It has a maximum segment count of 12. However TSO can send 13 pages
> or more of data on i386. If this happens it looks like this driver
> will go into an infinite loop forever trying to linearize the skb.
>
> Cheers,

Actually, we use 64 segments when TSO in enabled
(MYRI10GE_MAX_SEND_DESC_TSO):

#define MYRI10GE_MAX_SEND_DESC_TSO ((65536 / 2048) * 2)

<.....>

    max_segments = MXGEFW_MAX_SEND_DESC;

#ifdef NETIF_F_TSO
if (skb->len > (dev->mtu + ETH_HLEN)) {
    mss = skb_shinfo(skb)->tso_size;
    if (mss != 0)
        max_segments = MYRI10GE_MAX_SEND_DESC_TSO;
}
#endif /*NETIF_F_TSO */


And we never try to linearize a TSO frame:

if (skb_shinfo(skb)->tso_size) {
    printk(KERN_ERR "myri10ge: %s: TSO but wanted to linearize?!?!?\n",
        mgp->dev->name);
    goto drop;
}

Brice


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

* Re: + myri10ge-build-fix.patch added to -mm tree
  2006-06-21 12:09   ` Brice Goglin
@ 2006-06-21 12:28     ` Herbert Xu
  0 siblings, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2006-06-21 12:28 UTC (permalink / raw)
  To: Brice Goglin; +Cc: akpm, mm-commits, davem, jeff, netdev

On Wed, Jun 21, 2006 at 12:09:51PM +0000, Brice Goglin wrote:
> 
> Actually, we use 64 segments when TSO in enabled
> (MYRI10GE_MAX_SEND_DESC_TSO):
> 
> #define MYRI10GE_MAX_SEND_DESC_TSO ((65536 / 2048) * 2)

You're right, I missed that bit.  Sorry about the noise.
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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

end of thread, other threads:[~2006-06-21 12:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <200606210433.k5L4XgmP008626@shell0.pdx.osdl.net>
2006-06-21  4:41 ` + myri10ge-build-fix.patch added to -mm tree Herbert Xu
2006-06-21 12:09   ` Brice Goglin
2006-06-21 12:28     ` Herbert Xu

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.