Thread (22 messages) 22 messages, 8 authors, 2012-10-11

Re: alignment faults in 3.6

flat view

From: Eric Dumazet <hidden>
Date: 2012-10-11 11:54:16
Also in: linux-arm-kernel

Possibly related (same subject, not in this thread)

On Thu, 2012-10-11 at 13:47 +0200, Maxime Bizon wrote:
On Thu, 2012-10-11 at 13:28 +0200, Eric Dumazet wrote:
quoted
You probably are aware that a driver can use : 

- a fragment to hold the frame given by the hardware, with whatever
alignment is needed by the hardware.

Then allocate an skb with enough room (128 bytes) to pull the headers as
needed later.

skb = netdev_alloc_skb_ip_align(dev, 128);
What happen at tx time, supposing that same hardware cannot do SG ?

Aren't we going to memcpy the data into the head ?
Of course, if you use a forwarding setup, and the tx driver is not SG
capable, performance will be bad (You have to copy the data into a
single skb (linearize the skb)) 

But in 2012, having to use hardware without SG for a router sounds a bad
joke (if cpu speed is _also_ too low)

Adding get_unaligned() everywhere in linux network stacks is not an
option.

We actually want to be able to read the code and fix the bugs, not only
run it on a cheap low end router.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help