[2/2] net/bnxt: fix a wrong use of rte_free when freeing mbuf

Message ID 97580c5c0a88e8aa6982a7fcea6f34829891da07.1599292452.git.wangyunjian@huawei.com (mailing list archive)
State Accepted, archived
Delegated to: Ajit Khaparde
Headers
Series fixes for bnxt driver |

Checks

Context Check Description
ci/iol-broadcom-Functional success Functional Testing PASS
ci/Intel-compilation fail Compilation issues
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/travis-robot success Travis build: passed
ci/checkpatch success coding style OK

Commit Message

Yunjian Wang Sept. 5, 2020, 9:36 a.m. UTC
  From: Yunjian Wang <wangyunjian@huawei.com>

We should use rte_pktmbuf_free() instead of rte_free() to free the mbuf.

Fixes: 6dc83230b43b ("net/bnxt: support port representor data path")
Cc: stable@dpdk.org

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
---
 drivers/net/bnxt/bnxt_reps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/drivers/net/bnxt/bnxt_reps.c b/drivers/net/bnxt/bnxt_reps.c
index e924025cf..26bd0f626 100644
--- a/drivers/net/bnxt/bnxt_reps.c
+++ b/drivers/net/bnxt/bnxt_reps.c
@@ -61,7 +61,7 @@  bnxt_vfr_recv(uint16_t port_id, uint16_t queue_id, struct rte_mbuf *mbuf)
 	} else {
 		vfr_bp->rx_drop_bytes[que] += mbuf->pkt_len;
 		vfr_bp->rx_drop_pkts[que]++;
-		rte_free(mbuf); /* Representor Rx ring full, drop pkt */
+		rte_pktmbuf_free(mbuf); /* Representor Rx ring full, drop pkt */
 	}
 
 	return 0;