DPDK patches and discussions
 help / color / mirror / Atom feed
From: Viacheslav Galaktionov <viacheslav.galaktionov@arknetworks.am>
To: dev@dpdk.org
Cc: stable@dpdk.org, Ivan Malov <ivan.malov@arknetworks.am>,
	Andy Moreton <amoreton@xilinx.com>,
	Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Subject: [PATCH] net/sfc: account for data offset on Tx
Date: Mon, 11 Sep 2023 14:47:41 +0400	[thread overview]
Message-ID: <20230911104739.31452-3-viacheslav.galaktionov@arknetworks.am> (raw)

Memory buffers passed by the application may contain private data,
which must not be sent to the NIC. Omit this private data by using
the actual data address instead of the default one.

Fixes: 3037e6cf3dde ("net/sfc: support regioned NIC DMA memory mapping type")
Cc: stable@dpdk.org

Signed-off-by: Viacheslav Galaktionov <viacheslav.galaktionov@arknetworks.am>
Reviewed-by: Ivan Malov <ivan.malov@arknetworks.am>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
---
 drivers/net/sfc/sfc_ef100_tx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/sfc/sfc_ef100_tx.c b/drivers/net/sfc/sfc_ef100_tx.c
index 4c2205f7a4..1b6374775f 100644
--- a/drivers/net/sfc/sfc_ef100_tx.c
+++ b/drivers/net/sfc/sfc_ef100_tx.c
@@ -405,7 +405,7 @@ sfc_ef100_tx_qdesc_send_create(const struct sfc_ef100_txq *txq,
 				m->l2_len + m->l3_len) >> 1;
 	}
 
-	rc = sfc_ef100_tx_map(txq, rte_mbuf_data_iova_default(m),
+	rc = sfc_ef100_tx_map(txq, rte_mbuf_data_iova(m),
 			      rte_pktmbuf_data_len(m), &dma_addr);
 	if (unlikely(rc != 0))
 		return rc;
-- 
2.42.0


             reply	other threads:[~2023-09-11 10:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-11 10:47 Viacheslav Galaktionov [this message]
2023-09-11 13:06 ` Andrew Rybchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230911104739.31452-3-viacheslav.galaktionov@arknetworks.am \
    --to=viacheslav.galaktionov@arknetworks.am \
    --cc=amoreton@xilinx.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=ivan.malov@arknetworks.am \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).