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:	Sun, 15 Mar 2015 09:41:54 +0200
From:	Or Gerlitz <ogerlitz@...lanox.com>
To:	David Miller <davem@...emloft.net>
CC:	<john.r.fastabend@...el.com>, <netdev@...r.kernel.org>,
	<amirv@...lanox.com>, <idos@...lanox.com>, <matanb@...lanox.com>
Subject: Re: [PATCH net-next V1 1/3] net: Add max rate tx queue attribute

On 3/15/2015 7:07 AM, David Miller wrote:
> From: Or Gerlitz <ogerlitz@...lanox.com>
> Date: Thu, 12 Mar 2015 10:53:23 +0200
>
>> +	if (dev->netdev_ops->ndo_set_tx_maxrate) {
>> +		err = dev->netdev_ops->ndo_set_tx_maxrate(dev, index, rate);
>> +	} else {
>> +		rtnl_unlock();
>> +		return -EOPNOTSUPP;
>> +	}
>> +
>> +	rtnl_unlock();
>> +	if (!err) {
>> +		queue->tx_maxrate = rate;
>> +		return len;
>> +	}
> This is more succinctly expressed as:
>
> 	err = -EOPNOTSUPP;
> 	if (dev->netdev_ops->ndo_set_tx_maxrate) {
> 		err = dev->netdev_ops->ndo_set_tx_maxrate(dev, index, rate);
> 	if (!err) {
> 		queue->tx_maxrate = rate;
> 		return len;
> 	}
> 	return err;
>

sure, I'll fix that.
--
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