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]
Message-ID: <516EE051.3030808@cogentembedded.com>
Date:	Wed, 17 Apr 2013 21:48:01 +0400
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	Shahed Shaikh <shahed.shaikh@...gic.com>
CC:	davem@...emloft.net, netdev@...r.kernel.org,
	Dept_NX_Linux_NIC_Driver@...gic.com,
	Manish Chopra <manish.chopra@...gic.com>
Subject: Re: [PATCH net-next v2 3/7] qlcnic: Enhanced channel configuration
 logs

Hello.

On 04/17/2013 09:05 PM, Shahed Shaikh wrote:

> From: Manish Chopra <manish.chopra@...gic.com>
>
> Signed-off-by: Manish Chopra <manish.chopra@...gic.com>
> Signed-off-by: Shahed Shaikh <shahed.shaikh@...gic.com>
[...]
> diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
> index edbc85f..f35c504 100644
> --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
> +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
> @@ -3240,20 +3240,41 @@ qlcnicvf_start_firmware(struct qlcnic_adapter *adapter)
>   	return err;
>   }
>   
> -int qlcnic_validate_max_rss(u8 max_hw, u8 val)
> +int qlcnic_validate_max_rss(struct qlcnic_adapter *adapter,
> +			    __u32 val)
>   {
[...]
> -	if ((val > max_allowed) || (val < 2) || !is_power_of_2(val)) {
> -		pr_info("rss_ring valid range [2 - %x] in powers of 2\n",
> -			max_allowed);
> +
> +	if ((val > max_allowed) || (val <  2) || !is_power_of_2(val)) {

    Too many spaces between < and 2. And () not needed around > and <.
This line overall looks like random unneeded change.

> +		if (val > num_online_cpus())
> +			netdev_err(netdev,
> +				   "RSS value should not be higher than[%u], the max number of CPUs in the system\n",
> +				   num_online_cpus());

    num_online_cpus() doesn't yield the max number of CPUs in the system,
it yields what it says, number of online CPUs.

WBR, Sergei


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