From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Kejian Yan <yankejian@huawei.com>, davem@davemloft.net
Cc: yisen.zhuang@huawei.com, salil.mehta@huawei.com,
liguozhu@huawei.com, huangdaode@hisilicon.com, arnd@arndb.de,
andrew@lunn.ch, chenny.xu@huawei.com, ivecera@redhat.com,
lisheng011@huawei.com, fengguang.wu@intel.com,
haifeng.wei@huawei.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linuxarm@huawei.com
Subject: Re: [patch net 2/2] net: hns: fixes a bug of RSS
Date: Thu, 10 Mar 2016 10:24:13 +0200 [thread overview]
Message-ID: <1457598253.1347.52.camel@linux.intel.com> (raw)
In-Reply-To: <1457576189-22924-3-git-send-email-yankejian@huawei.com>
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@linux.intel.com>
Intel Finland Oy
next prev parent reply other threads:[~2016-03-10 8:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-10 2:16 [patch net 0/2] net: hns: get and set RSS indirection table by using ethtool Kejian Yan
2016-03-10 2:16 ` [patch net 1/2] net: hns: fix return value of the function about rss Kejian Yan
2016-03-10 8:11 ` Andy Shevchenko
2016-03-10 12:04 ` Yankejian (Hackim Yim)
2016-03-10 2:16 ` [patch net 2/2] net: hns: fixes a bug of RSS Kejian Yan
2016-03-10 8:24 ` Andy Shevchenko [this message]
2016-03-10 13:03 ` Yankejian (Hackim Yim)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1457598253.1347.52.camel@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=andrew@lunn.ch \
--cc=arnd@arndb.de \
--cc=chenny.xu@huawei.com \
--cc=davem@davemloft.net \
--cc=fengguang.wu@intel.com \
--cc=haifeng.wei@huawei.com \
--cc=huangdaode@hisilicon.com \
--cc=ivecera@redhat.com \
--cc=liguozhu@huawei.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=lisheng011@huawei.com \
--cc=netdev@vger.kernel.org \
--cc=salil.mehta@huawei.com \
--cc=yankejian@huawei.com \
--cc=yisen.zhuang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).