Subject: Re: Tigon3 5701 PCI-X recv performance problem

From: John Partridge <[email-masked]>
Date: Mon, 13 Oct 2003 14:53:54 -0500

Could we create a module argument like "do_5701_align" and just give it a -1
default which does NOT do the copy but if we give the arg 1, 0, whatever it
DOES to the copy to align the buffs ?

Then inside the driver we define a macro to handle that ?

That way all you need is to include "tg3 do_5701_align=1" in modules.conf

That way all the default comiles work and no CONFIG option for people
who compile all defaults and don't want to re compile the kernel for
this issue.

Is that acceptable ?

John

David S. Miller wrote:
> On Sat, 11 Oct 2003 15:19:21 +0200
> Andi Kleen <[email-masked]> wrote:
> 
> 
>>Then just don't set the argument to zero in modules.conf on the 5704cards. 
>>That could be even handled somewhere in user space.  Switching over sounds 
>>best of course, because the performance with the copying won't be great
> 
> 
> There is no "argument" we don't have a variable in the tg3 driver
> that determines the "copybreak", it's a hard-coded macro define.
> 
> For them it's really easy to know when the 5701 hw bug case is present,
> so they can do something like:
> 
> 	if (len > RX_COPY_THRESHOLD
> #ifdef CONFIG_UNALIGNED_EXPENSIVE
> 	    || tp->rx_offset == 2
> #endif
> 	    ) {
>         ...
> 
> And then only their platform and only when the buggy chips are present,
> will get the desired change in behavior.

-- 
John Partridge

Silicon Graphics Inc
Tel:  651-683-3428
Vnet: 233-3428
E-Mail: [email-masked]