net/hns3: fix Tx prepare after stop
authorHuisong Li <lihuisong@huawei.com>
Sat, 17 Jul 2021 02:02:56 +0000 (10:02 +0800)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 23 Jul 2021 12:49:20 +0000 (14:49 +0200)
commit1cc574c41a8e4a901b822aad9c85a07e98a7b661
treede935d4c14cc9be3a78e7da095436d6a787d7c96
parent9b290a3a63ca31ba7bd0a071315dc2e72ba75d8a
net/hns3: fix Tx prepare after stop

In some special scenarios, such as TSO scenarios, the user layer may need
to call the tx_pkt_prepare(), and then call tx_pkt_burst() to send packets.
If the return value of tx_pkt_parepare() isn't equal to the numbers of
packets requested to send, warning message may be printed at the user
layer. Currently, tx_pkt_prepare() is assigned to dummy function when
dev_stop() is called in hns3 PMD. At this moment, if user layer continues
to send packets, the warning message will always be printed. So this patch
modifies the address to NULL.

Fixes: 2790c6464725 ("net/hns3: support device reset")
Cc: stable@dpdk.org
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
drivers/net/hns3/hns3_rxtx.c