DPDK patches and discussions
 help / color / mirror / Atom feed
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
To: <dev@dpdk.org>
Cc: <matan@nvidia.com>, <rasland@nvidia.com>, <stable@dpdk.org>
Subject: [PATCH v2] net/mlx5: fix single not inline packet elts storing
Date: Wed, 17 Aug 2022 10:04:25 +0300	[thread overview]
Message-ID: <20220817070425.30121-1-viacheslavo@nvidia.com> (raw)
In-Reply-To: <20220811055215.30214-1-viacheslavo@nvidia.com>

The mlx5 PMD can inline packet data into transmitting descriptor (WQE)
and free mbuf immediately as data no longer needed, for non-inline
packets the mbuf pointer should be stored in elts array for coming
freeing on send completion. There was an optimization on storing
pointers in batch and there was missed storing mbuf for single
packet if non-inline was explicitly requested by flag.

Fixes: cacb44a09962 ("net/mlx5: add no-inline Tx flag")
Cc: stable@dpdk.org

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
v2: "Fixes tag" added

 drivers/net/mlx5/mlx5_tx.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)


diff --git a/drivers/net/mlx5/mlx5_tx.h b/drivers/net/mlx5/mlx5_tx.h
index 20776919c2..c65031ed3b 100644
--- a/drivers/net/mlx5/mlx5_tx.h
+++ b/drivers/net/mlx5/mlx5_tx.h
@@ -3314,7 +3314,9 @@ mlx5_tx_burst_single_send(struct mlx5_txq_data *__rte_restrict txq,
 			 * if no inlining is configured, this is done
 			 * by calling routine in a batch copy.
 			 */
-			MLX5_ASSERT(!MLX5_TXOFF_CONFIG(INLINE));
+			if (MLX5_TXOFF_CONFIG(INLINE))
+				txq->elts[txq->elts_head++ & txq->elts_m] =
+							loc->mbuf;
 			--loc->elts_free;
 #ifdef MLX5_PMD_SOFT_COUNTERS
 			/* Update sent data bytes counter. */
-- 
2.18.1


  parent reply	other threads:[~2022-08-17  7:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-11  5:52 [PATCH] " Viacheslav Ovsiienko
2022-08-17  6:56 ` Viacheslav Ovsiienko
2022-08-17  7:04 ` Viacheslav Ovsiienko [this message]
2022-08-17  8:21   ` [PATCH v2] " Raslan Darawsheh

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=20220817070425.30121-1-viacheslavo@nvidia.com \
    --to=viacheslavo@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=matan@nvidia.com \
    --cc=rasland@nvidia.com \
    --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).