]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: fix "tc qdisc del" failed issue
authorYonglong Liu <liuyonglong@huawei.com>
Thu, 12 Mar 2020 07:11:03 +0000 (15:11 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 12 Mar 2020 18:38:26 +0000 (11:38 -0700)
commit3164e91c59af85f4c413ca0c7a72afe75d8b4a96
tree975c7e0972b5a4510ffb84bd52160ddefa20811b
parent290ff4dcfb8e4ee73e417d9c635d120c6bf65e89
net: hns3: fix "tc qdisc del" failed issue

The HNS3 driver supports to configure TC numbers and TC to priority
map via "tc" tool. But when delete the rule, will fail, because
the HNS3 driver needs at least one TC, but the "tc" tool sets TC
number to zero when delete.

This patch makes sure that the TC number is at least one.

Fixes: 8a99e015dde2 ("net: hns3: Add mqprio hardware offload support in hns3 driver")
Signed-off-by: Yonglong Liu <liuyonglong@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c