]> 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)
commit9d1b7ac707ac615f8bbdfdfba8421c2fbd05ae2a
tree975c7e0972b5a4510ffb84bd52160ddefa20811b
parentaaa93f59a7f07d233cf78bf1583680234bba9018
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: b39ee044b772 ("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