From efb9dd148e234aecd01966cd1d2aaa4b75836966 Mon Sep 17 00:00:00 2001 From: Pavan Nikhilesh Date: Tue, 24 Jul 2018 16:13:50 +0530 Subject: [PATCH] net/octeontx: fix stop clearing Rx/Tx functions On dev_stop the Rx/Tx_burst functions are being set to NULL, this causes a SEGFAULT in cases where control path calls stop and a paket is still being processed by a worker. Instead clear the fastpath functions in dev_close. Fixes: da6c687471a3 ("net/octeontx: add start and stop support") Cc: stable@dpdk.org Signed-off-by: Pavan Nikhilesh Acked-by: Jerin Jacob --- drivers/net/octeontx/octeontx_ethdev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c index 974ef57c47..0f3d5d6736 100644 --- a/drivers/net/octeontx/octeontx_ethdev.c +++ b/drivers/net/octeontx/octeontx_ethdev.c @@ -353,6 +353,9 @@ octeontx_dev_close(struct rte_eth_dev *dev) rte_free(txq); } + + dev->tx_pkt_burst = NULL; + dev->rx_pkt_burst = NULL; } static int @@ -446,9 +449,6 @@ octeontx_dev_stop(struct rte_eth_dev *dev) ret); return; } - - dev->tx_pkt_burst = NULL; - dev->rx_pkt_burst = NULL; } static void -- 2.20.1