* [dpdk-dev] [PATCH] net/mlx5: fix legacy inline multi-packet performance
@ 2019-11-27 13:06 Viacheslav Ovsiienko
2019-11-27 13:54 ` Matan Azrad
2020-01-06 14:54 ` Matan Azrad
0 siblings, 2 replies; 4+ messages in thread
From: Viacheslav Ovsiienko @ 2019-11-27 13:06 UTC (permalink / raw)
To: dev; +Cc: matan, rasland, orika
The legacy multi-packet write is the feature allowing to
put multiple packets into one transmitting descriptor,
this feature is supported by only NIC ConnectX-4LX.
The number of packets should be limited to provide
optimal size descriptor and better performance.
Fixes: 18a1c20044c0 ("net/mlx5: implement Tx burst template")
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
drivers/net/mlx5/mlx5_prm.h | 1 +
drivers/net/mlx5/mlx5_rxtx.c | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_prm.h b/drivers/net/mlx5/mlx5_prm.h
index 2bac6a7..a805363 100644
--- a/drivers/net/mlx5/mlx5_prm.h
+++ b/drivers/net/mlx5/mlx5_prm.h
@@ -100,6 +100,7 @@
*/
#define MLX5_EMPW_MAX_PACKETS MLX5_TX_COMP_THRESH
#define MLX5_MPW_MAX_PACKETS 6
+#define MLX5_MPW_INLINE_MAX_PACKETS 2
/*
* Default packet length threshold to be inlined with
diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index 25d915c..acf0fd7 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -4059,7 +4059,9 @@ enum mlx5_txcmp_code {
* Limits the amount of packets in one WQE
* to improve CQE latency generation.
*/
- nlim = RTE_MIN(pkts_n, MLX5_EMPW_MAX_PACKETS);
+ nlim = RTE_MIN(pkts_n, MLX5_TXOFF_CONFIG(MPW) ?
+ MLX5_MPW_INLINE_MAX_PACKETS :
+ MLX5_EMPW_MAX_PACKETS);
/* Check whether we have minimal amount WQEs */
if (unlikely(loc->wqe_free <
((2 + MLX5_EMPW_MIN_PACKETS + 3) / 4)))
--
1.8.3.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] net/mlx5: fix legacy inline multi-packet performance
2019-11-27 13:06 [dpdk-dev] [PATCH] net/mlx5: fix legacy inline multi-packet performance Viacheslav Ovsiienko
@ 2019-11-27 13:54 ` Matan Azrad
2019-11-27 15:27 ` Thomas Monjalon
2020-01-06 14:54 ` Matan Azrad
1 sibling, 1 reply; 4+ messages in thread
From: Matan Azrad @ 2019-11-27 13:54 UTC (permalink / raw)
To: Slava Ovsiienko, dev; +Cc: Raslan Darawsheh, Ori Kam
From: Viacheslav Ovsiienko
> The legacy multi-packet write is the feature allowing to put multiple packets
> into one transmitting descriptor, this feature is supported by only NIC
> ConnectX-4LX.
> The number of packets should be limited to provide optimal size descriptor
> and better performance.
>
> Fixes: 18a1c20044c0 ("net/mlx5: implement Tx burst template")
>
> Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] net/mlx5: fix legacy inline multi-packet performance
2019-11-27 13:54 ` Matan Azrad
@ 2019-11-27 15:27 ` Thomas Monjalon
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2019-11-27 15:27 UTC (permalink / raw)
To: Slava Ovsiienko; +Cc: dev, Matan Azrad, Raslan Darawsheh, Ori Kam
27/11/2019 14:54, Matan Azrad:
> From: Viacheslav Ovsiienko
> > The legacy multi-packet write is the feature allowing to put multiple packets
> > into one transmitting descriptor, this feature is supported by only NIC
> > ConnectX-4LX.
> > The number of packets should be limited to provide optimal size descriptor
> > and better performance.
> >
> > Fixes: 18a1c20044c0 ("net/mlx5: implement Tx burst template")
> >
> > Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
> Acked-by: Matan Azrad <matan@mellanox.com>
Applied, thanks
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] net/mlx5: fix legacy inline multi-packet performance
2019-11-27 13:06 [dpdk-dev] [PATCH] net/mlx5: fix legacy inline multi-packet performance Viacheslav Ovsiienko
2019-11-27 13:54 ` Matan Azrad
@ 2020-01-06 14:54 ` Matan Azrad
1 sibling, 0 replies; 4+ messages in thread
From: Matan Azrad @ 2020-01-06 14:54 UTC (permalink / raw)
To: Slava Ovsiienko, dev; +Cc: Raslan Darawsheh, Ori Kam
From: Viacheslav Ovsiienko
> The legacy multi-packet write is the feature allowing to put multiple packets
> into one transmitting descriptor, this feature is supported by only NIC
> ConnectX-4LX.
> The number of packets should be limited to provide optimal size descriptor
> and better performance.
>
> Fixes: 18a1c20044c0 ("net/mlx5: implement Tx burst template")
>
> Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-01-06 14:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-27 13:06 [dpdk-dev] [PATCH] net/mlx5: fix legacy inline multi-packet performance Viacheslav Ovsiienko
2019-11-27 13:54 ` Matan Azrad
2019-11-27 15:27 ` Thomas Monjalon
2020-01-06 14:54 ` Matan Azrad
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).