[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1457598253.1347.52.camel@linux.intel.com>
Date: Thu, 10 Mar 2016 10:24:13 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Kejian Yan <yankejian@...wei.com>, davem@...emloft.net
Cc: yisen.zhuang@...wei.com, salil.mehta@...wei.com,
liguozhu@...wei.com, huangdaode@...ilicon.com, arnd@...db.de,
andrew@...n.ch, chenny.xu@...wei.com, ivecera@...hat.com,
lisheng011@...wei.com, fengguang.wu@...el.com,
haifeng.wei@...wei.com, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linuxarm@...wei.com
Subject: Re: [patch net 2/2] net: hns: fixes a bug of RSS
On Thu, 2016-03-10 at 10:16 +0800, Kejian Yan wrote:
> If trying to get receive flow hash indirection table by ethtool, it
> needs
> to call .get_rxnfc to get ring number first. So this patch implements
> the
> .get_rxnfc of ethtool. And the data type of rss_indir_table is u32,
> it has
> to be multiply by the width of data type when using memcpy.
+static int hns_get_rxnfc(struct net_device *netdev,
> + struct ethtool_rxnfc *cmd,
> + u32 *rule_locs)
> +{
> + struct hns_nic_priv *priv = netdev_priv(netdev);
> + int ret = 0;
> +
> + switch (cmd->cmd) {
> + case ETHTOOL_GRXRINGS:
> + cmd->data = priv->ae_handle->q_num;
> + break;
> + default:
> + ret = -EOPNOTSUPP;
> + break;
> + }
> +
> + return ret;
Redundant ret variable.
switch (value) {
case X:
break;
default:
return -ERRNO;
}
return 0;
> +}
--
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Intel Finland Oy
Powered by blists - more mailing lists