lkml.org 
[lkml]   [2003]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: NS83820 2.6.0-test5 driver seems unstable on IA64
From
Date
David Mosberger <davidm@napali.hpl.hp.com> writes:

> Why would that be? Slower, yes, but very slow?

It depends on your architecture I guess. On K8/x86-64 it isn't that big
a deal (one cycle penalty for unaligned accesses), but if you take an
exception for each unaligned read it will be incredible slow.

Of course the copy in the driver has the same problem, so it's not
much better.

My point was basically that the header access are peanuts compared to
the unaligned copy. It would be much better to optimize the copy than
the header access. The proposal of just copying the header does not
address this. And copying the packet in the driver has the same problem,
so IMHO it's useless.

The solution proposed by Ivan sounds much better. The basic problem
is that the Ethernet header is not a multiple of 4 and that misaligns
everything after it. Use one receive descriptor for the MAC header and
another for the rest (IP/TCP/payload) In the rest everything is aligned and
there are no problems with misaligned data types (ignoring exceptional cases
like broken timestamp options which can be handled slowly). Fixing the
stack to handle separate MAC headers should not be that much work, the
code is fairly limited. Drawback is that it requires bigger changes to the
network drivers and maybe some special case code for non standard MAC
headers.

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:48    [W:0.044 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site