DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH 01/15] net/cnxk: resolve sefgault caused during transmit completion
@ 2023-03-03  8:09 Nithin Dabilpuram
  2023-03-03  8:10 ` [PATCH 02/15] net/cnxk: fix data len for first seg with multi seg pkt Nithin Dabilpuram
                   ` (13 more replies)
  0 siblings, 14 replies; 16+ messages in thread
From: Nithin Dabilpuram @ 2023-03-03  8:09 UTC (permalink / raw)
  To: Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, Satha Rao
  Cc: jerinj, dev, Rakesh Kudurumalla

From: Rakesh Kudurumalla <rkudurumalla@marvell.com>

while sending external buffers from application
if tx_compl_ena is not provided as devargs, cq for
transmit completion is not initialized but the same
is accessed in driver resulting in segfault.
This patch fixes the same by calling callback handler
before the actual packet is transmitted

Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
---

Depends-on: series-27133 ("common/cnxk: add cnf10ka A1 platform")

 drivers/net/cnxk/cn10k_tx.h | 4 ++++
 drivers/net/cnxk/cn9k_tx.h  | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/drivers/net/cnxk/cn10k_tx.h b/drivers/net/cnxk/cn10k_tx.h
index 1c1ce9642a..d0f7bc22a4 100644
--- a/drivers/net/cnxk/cn10k_tx.h
+++ b/drivers/net/cnxk/cn10k_tx.h
@@ -650,6 +650,10 @@ cn10k_nix_prefree_seg(struct rte_mbuf *m, struct cn10k_eth_txq *txq,
 	uint32_t sqe_id;
 
 	if (RTE_MBUF_HAS_EXTBUF(m)) {
+		if (unlikely(txq->tx_compl.ena == 0)) {
+			rte_pktmbuf_free_seg(m);
+			return 1;
+		}
 		if (send_hdr->w0.pnc) {
 			txq->tx_compl.ptr[send_hdr->w1.sqe_id]->next = m;
 		} else {
diff --git a/drivers/net/cnxk/cn9k_tx.h b/drivers/net/cnxk/cn9k_tx.h
index b4ef45d65c..52661a624c 100644
--- a/drivers/net/cnxk/cn9k_tx.h
+++ b/drivers/net/cnxk/cn9k_tx.h
@@ -88,6 +88,10 @@ cn9k_nix_prefree_seg(struct rte_mbuf *m, struct cn9k_eth_txq *txq,
 	uint32_t sqe_id;
 
 	if (RTE_MBUF_HAS_EXTBUF(m)) {
+		if (unlikely(txq->tx_compl.ena == 0)) {
+			rte_pktmbuf_free_seg(m);
+			return 1;
+		}
 		if (send_hdr->w0.pnc) {
 			txq->tx_compl.ptr[send_hdr->w1.sqe_id]->next = m;
 		} else {
-- 
2.25.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2023-03-06  9:55 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-03  8:09 [PATCH 01/15] net/cnxk: resolve sefgault caused during transmit completion Nithin Dabilpuram
2023-03-03  8:10 ` [PATCH 02/15] net/cnxk: fix data len for first seg with multi seg pkt Nithin Dabilpuram
2023-03-03  8:10 ` [PATCH 03/15] net/cnxk: release LBK bpid for after freeing resources Nithin Dabilpuram
2023-03-03  8:10 ` [PATCH 04/15] common/cnxk: add separate inline dev stats API Nithin Dabilpuram
2023-03-03  8:10 ` [PATCH 05/15] common/cnxk: distribute SQ's to sdp channels Nithin Dabilpuram
2023-03-03  8:10 ` [PATCH 06/15] common/cnxk: remove flow control config at queue setup Nithin Dabilpuram
2023-03-03  8:10 ` [PATCH 07/15] common/cnxk: enable 10K B0 support for inline IPsec Nithin Dabilpuram
2023-03-03  8:10 ` [PATCH 08/15] net/cnxk: check flow control config per queue on dev start Nithin Dabilpuram
2023-03-03  8:10 ` [PATCH 09/15] net/cnxk: don't allow PFC configuration on started port Nithin Dabilpuram
2023-03-03  8:10 ` [PATCH 10/15] net/cnxk: aura handle for fastpath Rx queues Nithin Dabilpuram
2023-03-03  8:10 ` [PATCH 11/15] common/cnxk: support of per NIX LF meta aura Nithin Dabilpuram
2023-03-03  8:10 ` [PATCH 12/15] common/cnxk: enable one to one SQ QINT mapping Nithin Dabilpuram
2023-03-03  8:10 ` [PATCH 13/15] common/cnxk: add RSS error messages on mbox failure Nithin Dabilpuram
2023-03-03  8:10 ` [PATCH 14/15] common/cnxk: add memory clobber to steor and ldeor Nithin Dabilpuram
2023-03-03  8:10 ` [PATCH 15/15] common/cnxk: enable SDP channel backpressure to TL4 Nithin Dabilpuram
2023-03-06  9:55   ` Jerin Jacob

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).