net/hns3: fix crash with multi-TC
authorHuisong Li <lihuisong@huawei.com>
Fri, 20 Nov 2020 11:27:33 +0000 (19:27 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 20 Nov 2020 20:10:05 +0000 (21:10 +0100)
commit1c359bae182fc64b30fda3777a6c8f8cad7823ab
tree018d97f9d4dac14d5067497919bf70adebe40e48
parentdc328d1c555ae43ba52c6f646384f135f69cf6fd
net/hns3: fix crash with multi-TC

The HW and SW DCB configurations need to be updated only
after the DCB configuration information changed. But the
change of tx/rx queue number is ignored. If user decreases
the number of tx queue after configuring multi-TC, the queue
mapping information in hns3_tc_queue_info can not be updated.
And then accessing the released queue resource in
"hns3_init_tx_ring_tc" will trigger a segment fault.

Fixes: 62e3ccc2b94c ("net/hns3: support flow control")
Cc: stable@dpdk.org
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
drivers/net/hns3/hns3_dcb.c