]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
net: hns3: fix the ring count for ETHTOOL_GRXRINGS
authorLipeng <lipeng321@huawei.com>
Tue, 10 Oct 2017 08:42:07 +0000 (16:42 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 10 Oct 2017 20:09:14 +0000 (13:09 -0700)
This patch fix the ring count for ETHTOOL_GRXRINGS. Ring count
not TC size should be return for command "ethtool -n ethx".

Signed-off-by: Lipeng <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_ethtool.c

index b64fbd3c369ad99fc2a196107985f6439d3240e0..9b36ce081f620854b69e1e4c7bdcf769783196fa 100644 (file)
@@ -450,7 +450,7 @@ static int hns3_get_rxnfc(struct net_device *netdev,
 
        switch (cmd->cmd) {
        case ETHTOOL_GRXRINGS:
-               cmd->data = h->ae_algo->ops->get_tc_size(h);
+               cmd->data = h->kinfo.num_tc * h->kinfo.rss_size;
                break;
        case ETHTOOL_GRXFH:
                return h->ae_algo->ops->get_rss_tuple(h, cmd);