Re: [PATCH]: fix lro_gen_skb() alignment

2007-12-03 Thread Herbert Xu
On Sun, Dec 02, 2007 at 07:07:26PM -0500, Andrew Gallatin wrote: > > That was my first thought as well, but it turns out that > when lro_gen_skb() is called via the out1 label, mac_hdr_len > may not be known. It seemed simplest and cleanest to just > make it a field in lro_mgr. Fair enough. Che

Re: [PATCH]: fix lro_gen_skb() alignment

2007-12-02 Thread Andrew Gallatin
Herbert Xu wrote: On Fri, Nov 30, 2007 at 02:35:43PM -0500, Andrew Gallatin wrote: Isn't the value of 2 ethernet-specific (to round the 14-byte header up to 16)? Given that the rest of the lro code is fairly careful to calculate mac_hdr_len etc it seems as if it would be cleaner to make this in

Re: [PATCH]: fix lro_gen_skb() alignment

2007-11-30 Thread Herbert Xu
On Fri, Nov 30, 2007 at 02:35:43PM -0500, Andrew Gallatin wrote: > > >Isn't the value of 2 ethernet-specific (to round the 14-byte header up > >to 16)? Given that the rest of the lro code is fairly careful to > >calculate mac_hdr_len etc it seems as if it would be cleaner to make > >this independe

Re: [PATCH]: fix lro_gen_skb() alignment

2007-11-30 Thread Andrew Gallatin
Roland Dreier wrote: > >> - skb = netdev_alloc_skb(lro_mgr->dev, hlen); > >> + skb = netdev_alloc_skb(lro_mgr->dev, hlen + NET_IP_ALIGN); > > NET_IP_ALIGN should only be used if you're DMAing into the skb head. > > Otherwise you should say 2. It would be nice to have another macr

Re: [PATCH]: fix lro_gen_skb() alignment

2007-11-30 Thread Roland Dreier
> >> - skb = netdev_alloc_skb(lro_mgr->dev, hlen); > >> + skb = netdev_alloc_skb(lro_mgr->dev, hlen + NET_IP_ALIGN); > > NET_IP_ALIGN should only be used if you're DMAing into the skb head. > > Otherwise you should say 2. It would be nice to have another macro > > for that I suppo

Re: [PATCH]: fix lro_gen_skb() alignment

2007-11-30 Thread Andrew Gallatin
Herbert Xu wrote: Andrew Gallatin <[EMAIL PROTECTED]> wrote: diff --git a/net/ipv4/inet_lro.c b/net/ipv4/inet_lro.c index ac3b1d3..91e9371 100644 --- a/net/ipv4/inet_lro.c +++ b/net/ipv4/inet_lro.c @@ -401,10 +401,11 @@ static struct sk_buff *lro_gen_skb(struc int data_len = len; i

Re: [PATCH]: fix lro_gen_skb() alignment

2007-11-30 Thread Herbert Xu
Andrew Gallatin <[EMAIL PROTECTED]> wrote: > > diff --git a/net/ipv4/inet_lro.c b/net/ipv4/inet_lro.c > index ac3b1d3..91e9371 100644 > --- a/net/ipv4/inet_lro.c > +++ b/net/ipv4/inet_lro.c > @@ -401,10 +401,11 @@ static struct sk_buff *lro_gen_skb(struc >int data_len = len; >int hd

[PATCH]: fix lro_gen_skb() alignment

2007-11-27 Thread Andrew Gallatin
The inet_lro.c:lro_gen_skb() function fails to include NET_IP_ALIGN padding at the front of the sk_buffs it creates, leading to alignment warnings on architectures which require strict alignment (seen on sparc64). The attached patch adds NET_IP_ALIGN padding. Signed off by: Andrew Gallatin <[EMA