netdev
[Top] [All Lists]

Re: Tigon3 5701 PCI-X recv performance problem

To: johnip@xxxxxxx
Subject: Re: Tigon3 5701 PCI-X recv performance problem
From: Steve Modica <modica@xxxxxxx>
Date: Wed, 08 Oct 2003 14:11:47 -0500
Cc: "David S. Miller" <davem@xxxxxxxxxx>, netdev@xxxxxxxxxxx, jgarzik@xxxxxxxxx, jes@xxxxxxx
In-reply-to: <3F845F61.9080002@sgi.com>
Organization: SGI
References: <3F844578.40306@sgi.com> <20031008101046.376abc3b.davem@redhat.com> <3F844EF9.9090901@sgi.com> <20031008112657.2adddeb6.davem@redhat.com> <3F845F61.9080002@sgi.com>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4b) Gecko/20030425
I think it'd be better to create some macro like this:

#ifdef FORCE_SKB_ALIGNMENT
# define SKB_COPY_CHECK(len) len > RX_COPY_THRESHOLD && tp->rx_offset == 2
#else
# define SKB_COPY_CHECK(len) len > RX_COPY_THRESHOLD
#endif

Then replace the code in the if with the new macro. We can define FORCE_SKB_ALIGNMENT in our build environment as can others if necessary. otherwise, everyone does what they did before.

Steve



John Partridge wrote:
OK, fair enough, you mean like :-

#if defined(__ia64__)
    if (len > RX_COPY_THRESHOLD && tp->rx_offset == 2) {
#else
    if (len > RX_COPY_THRESHOLD) {
#endif



David S. Miller wrote:

On Wed, 08 Oct 2003 12:52:57 -0500
John Partridge <johnip@xxxxxxx> wrote:


Not too much different



The problem is that your change is arch-dependant yet you make it run on all platforms.

On x86 we don't want to do what your change is doing, the unaligned
accesses are cheap enough.

We need to abstract this, probably in the same way it is done in
the Tulip and other drivers which have similar issues.




--
Steve Modica
work: 651-683-3224
MTS-Technical Lead
"Give a man a fish, and he will eat for a day, hit him with a fish and
he leaves you alone" - me


<Prev in Thread] Current Thread [Next in Thread>