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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 13 Dec 2013 10:36:01 -0000
From:	"David Laight" <David.Laight@...LAB.COM>
To:	<freddy@...x.com.tw>, <netdev@...r.kernel.org>,
	<davem@...emloft.net>, <linux-usb@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, <louis@...x.com.tw>,
	<allan@...x.com.tw>
Subject: RE: [PATCH 1/1] AX88179_178A: Add FLAG_HW_IPALIGN to determine whether reserving NET_IP_ALIGN bytes for an SKB.

> From: freddy@...x.com.tw
...
> -	skb = __netdev_alloc_skb_ip_align(dev->net, size, flags);
> +	if (dev->driver_info->flags & FLAG_HW_IPALIGN)
> +		skb = __netdev_alloc_skb(dev->net, size, flags);
> +	else
> +		skb = __netdev_alloc_skb_ip_align(dev->net, size, flags);

Given the definition:
static inline struct sk_buff *__netdev_alloc_skb_ip_align(struct net_device *dev,
                unsigned int length, gfp_t gfp)
{
        struct sk_buff *skb = __netdev_alloc_skb(dev, length + NET_IP_ALIGN, gfp);

        if (NET_IP_ALIGN && skb)
                skb_reserve(skb, NET_IP_ALIGN);
        return skb;
}

It really ought to be possible to code that without an extra conditional.

	David



--
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