[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <550537C2.3080107@mellanox.com>
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