Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1355110
| From | "Yankejian (Hackim Yim)" <yankejian@huawei.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [patch net 2/2] net: hns: fixes a bug of RSS |
| Date | 2016-03-10 14:10 +0100 |
| Message-ID | <rb8vN-7qT-35@gated-at.bofh.it> (permalink) |
| References | <raY3p-8ft-15@gated-at.bofh.it> <raY3o-8ft-13@gated-at.bofh.it> <rb48O-4bb-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 2016/3/10 16:24, Andy Shevchenko wrote:
> 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;
ok, thanks. i will fix it in next submit.
>> +}
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[patch net 2/2] net: hns: fixes a bug of RSS Kejian Yan <yankejian@huawei.com> - 2016-03-10 03:00 +0100
Re: [patch net 2/2] net: hns: fixes a bug of RSS Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2016-03-10 09:30 +0100
Re: [patch net 2/2] net: hns: fixes a bug of RSS "Yankejian (Hackim Yim)" <yankejian@huawei.com> - 2016-03-10 14:10 +0100
csiph-web