lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 30 Nov 2007 14:35:43 -0500
From:	Andrew Gallatin <gallatin@...i.com>
To:	Roland Dreier <rdreier@...co.com>
CC:	Herbert Xu <herbert@...dor.apana.org.au>, davem@...emloft.net,
	ossthema@...ibm.com, netdev@...r.kernel.org
Subject: Re: [PATCH]: fix lro_gen_skb() alignment

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 macro
>  > > for that I suppose.
>  > 
>  > It is certainly simple enough to say 2.  Thank you for pointing
>  > this out.  I have attached a patch to do that..
>  > 
>  > Signed off by: Andrew Gallatin <gallatin@...i.com>
> 
> 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 independent of the specific L2 being used.
> 
> (And I plan on using the LRO module for IP-over-InfiniBand so this is
> not completely theoretical)

Good point.  I tend to think all the world is ethernet.
Perhaps the better way would be to simply add an alignment pad
field to lro_mgr?  When the driver initializes it, it specifies
any padding needed.  Ethernet drivers would specify 2.

Is this acceptable?

Drew
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ