DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/mlx5: fix single not inline packet elts storing
@ 2022-08-11  5:52 Viacheslav Ovsiienko
  2022-08-17  6:56 ` Viacheslav Ovsiienko
  2022-08-17  7:04 ` [PATCH v2] " Viacheslav Ovsiienko
  0 siblings, 2 replies; 4+ messages in thread
From: Viacheslav Ovsiienko @ 2022-08-11  5:52 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, matan, rasland

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.

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 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 f081921ffc..8e113e3778 100644
--- a/drivers/net/mlx5/mlx5_tx.h
+++ b/drivers/net/mlx5/mlx5_tx.h
@@ -3322,7 +3322,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


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

* [PATCH] net/mlx5: fix single not inline packet elts storing
  2022-08-11  5:52 [PATCH] net/mlx5: fix single not inline packet elts storing Viacheslav Ovsiienko
@ 2022-08-17  6:56 ` Viacheslav Ovsiienko
  2022-08-17  7:04 ` [PATCH v2] " Viacheslav Ovsiienko
  1 sibling, 0 replies; 4+ messages in thread
From: Viacheslav Ovsiienko @ 2022-08-17  6:56 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, matan, rasland, stable

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>
---
 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


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

* [PATCH v2] net/mlx5: fix single not inline packet elts storing
  2022-08-11  5:52 [PATCH] net/mlx5: fix single not inline packet elts storing Viacheslav Ovsiienko
  2022-08-17  6:56 ` Viacheslav Ovsiienko
@ 2022-08-17  7:04 ` Viacheslav Ovsiienko
  2022-08-17  8:21   ` Raslan Darawsheh
  1 sibling, 1 reply; 4+ messages in thread
From: Viacheslav Ovsiienko @ 2022-08-17  7:04 UTC (permalink / raw)
  To: dev; +Cc: matan, rasland, stable

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


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

* RE: [PATCH v2] net/mlx5: fix single not inline packet elts storing
  2022-08-17  7:04 ` [PATCH v2] " Viacheslav Ovsiienko
@ 2022-08-17  8:21   ` Raslan Darawsheh
  0 siblings, 0 replies; 4+ messages in thread
From: Raslan Darawsheh @ 2022-08-17  8:21 UTC (permalink / raw)
  To: Slava Ovsiienko, dev; +Cc: Matan Azrad, stable

Hi,

> -----Original Message-----
> From: Slava Ovsiienko <viacheslavo@nvidia.com>
> Sent: Wednesday, August 17, 2022 10:04 AM
> To: dev@dpdk.org
> Cc: Matan Azrad <matan@nvidia.com>; Raslan Darawsheh
> <rasland@nvidia.com>; stable@dpdk.org
> Subject: [PATCH v2] net/mlx5: fix single not inline packet elts storing
> 
> 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
> 
Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh

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

end of thread, other threads:[~2022-08-17  8:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-11  5:52 [PATCH] net/mlx5: fix single not inline packet elts storing Viacheslav Ovsiienko
2022-08-17  6:56 ` Viacheslav Ovsiienko
2022-08-17  7:04 ` [PATCH v2] " Viacheslav Ovsiienko
2022-08-17  8:21   ` Raslan Darawsheh

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).