public inbox for dev@dpdk.org
 help / color / mirror / Atom feed
From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
To: <dev@dpdk.org>
Cc: <rasland@nvidia.com>, <matan@nvidia.com>, <suanmingm@nvidia.com>,
	<dsosnowski@nvidia.com>, <stable@dpdk.org>
Subject: [PATCH] net/mlx5: fix send skew settings when using wait on time
Date: Fri, 20 Mar 2026 13:14:10 +0200	[thread overview]
Message-ID: <20260320111410.148572-1-viacheslavo@nvidia.com> (raw)

There are two modes to support tx send scheduling in mlx5 drivers,
using the Clock Queue and tx_pp parameter, and using the wait_on_time
hardware capability. The tx_skew devarg is applicable for both, but
in case of tx_pp=0 (that supposes wait_on_time mode is engaged
on ConnectX-7 and above), the tx_skew setting was missed (as
mlx5_txpp_create was not invoked).

Fixes: 2f5122dfc41f ("net/mlx5: configure Tx queue with send on time offload")
Cc: stable@dpdk.org

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 drivers/net/mlx5/mlx5.c      | 2 ++
 drivers/net/mlx5/mlx5_txpp.c | 3 ---
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index f5784761f9..b70792d77c 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -1906,6 +1906,8 @@ mlx5_alloc_shared_dev_ctx(const struct mlx5_dev_spawn_data *spawn,
 			strerror(rte_errno));
 		goto error;
 	}
+	/* Used on Tx send scheduling (tx_pp=1 or wait-on-time). */
+	sh->txpp.skew = sh->config.tx_skew;
 	sh->refcnt = 1;
 	sh->max_port = spawn->max_port;
 	strncpy(sh->ibdev_name, mlx5_os_get_ctx_device_name(sh->cdev->ctx),
diff --git a/drivers/net/mlx5/mlx5_txpp.c b/drivers/net/mlx5/mlx5_txpp.c
index 756a772cc5..a8cfe233d6 100644
--- a/drivers/net/mlx5/mlx5_txpp.c
+++ b/drivers/net/mlx5/mlx5_txpp.c
@@ -908,7 +908,6 @@ mlx5_txpp_create(struct mlx5_dev_ctx_shared *sh)
 	/* Store the requested pacing parameters. */
 	sh->txpp.tick = tx_pp >= 0 ? tx_pp : -tx_pp;
 	sh->txpp.test = !!(tx_pp < 0);
-	sh->txpp.skew = sh->config.tx_skew;
 	sh->txpp.freq = sh->cdev->config.hca_attr.dev_freq_khz;
 	ret = mlx5_txpp_create_event_channel(sh);
 	if (ret)
@@ -934,7 +933,6 @@ mlx5_txpp_create(struct mlx5_dev_ctx_shared *sh)
 		mlx5_txpp_destroy_event_channel(sh);
 		sh->txpp.tick = 0;
 		sh->txpp.test = 0;
-		sh->txpp.skew = 0;
 	}
 	return ret;
 }
@@ -956,7 +954,6 @@ mlx5_txpp_destroy(struct mlx5_dev_ctx_shared *sh)
 	mlx5_txpp_destroy_event_channel(sh);
 	sh->txpp.tick = 0;
 	sh->txpp.test = 0;
-	sh->txpp.skew = 0;
 }
 
 /**
-- 
2.34.1


             reply	other threads:[~2026-03-20 11:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-20 11:14 Viacheslav Ovsiienko [this message]
2026-03-23 10:10 ` [PATCH] net/mlx5: fix send skew settings when using wait on time Dariusz Sosnowski
2026-03-24 12:29 ` 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=20260320111410.148572-1-viacheslavo@nvidia.com \
    --to=viacheslavo@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=dsosnowski@nvidia.com \
    --cc=matan@nvidia.com \
    --cc=rasland@nvidia.com \
    --cc=stable@dpdk.org \
    --cc=suanmingm@nvidia.com \
    /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