net/hns3: fix clearing HW ring after queue stop
authorChengchang Tang <tangchengchang@huawei.com>
Thu, 29 Oct 2020 12:51:55 +0000 (20:51 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 3 Nov 2020 22:35:06 +0000 (23:35 +0100)
commit821496d2144c0014d62477721f74fb15dc819f7f
tree1db5edc599dc2f56ad31965f3384cbd00e98509d
parent708ecc07d23edff628008669401cfaf37a503ce8
net/hns3: fix clearing HW ring after queue stop

Currently, the rx HW ring is not cleared after queue stop.
When there are packets remaining in the HW rings and the
queues have been stopped, if upper layer user calls the
rx_burst function at this time, an illegal memory access
will occur due to the sw rings has been released.

This patch fix this by reset the sw ring after disable the
queue.

Fixes: fa29fe45a7b4 ("net/hns3: support queue start and stop")
Cc: stable@dpdk.org
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Lijun Ou <oulijun@huawei.com>
drivers/net/hns3/hns3_rxtx.c