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:	Tue, 17 Jan 2012 12:18:41 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	yevgenyp@...lanox.co.il
Cc:	netdev@...r.kernel.org, amirv@...lanox.co.il
Subject: Re: [PATCH net] mlx4_en: set number of rx rings used by RSS using
 ethtool

From: Yevgeny Petrilin <yevgenyp@...lanox.co.il>
Date: Tue, 17 Jan 2012 18:50:24 +0200

> +	/* RSS table size must be an order of 2 */
> +	if (rss_rings != (1 << order_base_2(rss_rings)))
> +		return -EINVAL;

This is an obscure way to make this kind of test.

The canonical way is:

	if (is_power_of_2(rss_rings))

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