lkml.org 
[lkml]   [2011]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRE: [PATCH] ipheth.c: Enable IP header alignment
Maybe I can help on this part.

Git ?

I'm using ubuntu natty ... The part I'm not sure of is , do I patch ubuntu's kernel or I start from scratch?


-----Original Message-----
From: L. Alberto Giménez [mailto:agimenez@sysvalve.es]
Sent: 3 mai 2011 12:58
To: Ben Hutchings
Cc: linux-kernel@vger.kernel.org; dgiagio@gmail.com; dborca@yahoo.com; davem@davemloft.net; pmcenery@gmail.com; David Hill; open list:USB SUBSYSTEM; open list:NETWORKING DRIVERS
Subject: Re: [PATCH] ipheth.c: Enable IP header alignment

On Mon, May 02, 2011 at 10:04:34PM +0100, Ben Hutchings wrote:
> So this was using NET_IP_ALIGN as an offset into the URB. Which was
> totally bogus, as its value has long been architecture-dependent. The
> code is also claiming to put len bytes but only copying len - delta.
>
> The correct code would be something like:
>
> if (urb->actual_length <= IPHETH_IP_ALIGN) {
> dev->net->stats.rx_length_errors++;
> return;
> }
> len = urb->actual_length - IPHETH_IP_ALIGN;
> buf = urb->transfer_buffer + IPHETH_IP_ALIGN;
>
> dev_alloc_skb(len);
> ...
> memcpy(skb_put(skb, len), buf, len);

Thanks for the response Ben.

I can try to change the code, but I don't own the device anymore. Changing the
code without being able to test it would be walking blindfolded :-/

If upstrem (everyone involved is in CC) can't do it, I can submit the changes
advised by Ben, but I can't warantee anything beyond successful compilation. I
don't think that it would be acceptable here.

Regards,
--
L. Alberto Giménez
JabberID agimenez@jabber.sysvalve.es
GnuPG key ID 0x3BAABDE1
--
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: 2011-05-03 19:27    [W:0.068 / U:0.856 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site