net/bnxt: fix crash in vector mode Tx
authorKalesh AP <kalesh-anakkur.purayil@broadcom.com>
Fri, 28 Aug 2020 05:01:10 +0000 (10:31 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 18 Sep 2020 16:55:07 +0000 (18:55 +0200)
commit301cc1b4db590df8bbadbad9a0b2ea2ed125ba86
treec2cfabe32e7c8009bb1a49338f1aafc1b057148b
parentce41561d1b998d9e15f74f9c3a6aff78e0f99871
net/bnxt: fix crash in vector mode Tx

rte_pktmbuf_prefree_seg() can return NULL if the mbuf still
has remaining references on it.

Adding a NULL check to prevent segfault.

Fixes: bc4a000f2f53 ("net/bnxt: implement SSE vector mode")
Fixes: 398358341419 ("net/bnxt: support NEON")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt_rxtx_vec_neon.c
drivers/net/bnxt/bnxt_rxtx_vec_sse.c