net/mlx5: fix send skew settings when using wait on time
PATCH 1/1 net/mlx5: fix send skew settings when using wait on time
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).
--- drivers/net/mlx5/mlx5.c | 2 ++ drivers/net/mlx5/mlx5_txpp.c | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-)
drivers/net/mlx5/mlx5.c +2 -0
@@ -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),
drivers/net/mlx5/mlx5_txpp.c +0 -3
@@ -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 ; }/**
Signature · 1 line
2.34.1
Quoted 11 lines · Viacheslav Ovsiienko
There are two modes to support tx send scheduling in mlx5 drivers, using the Clock Queue and
tx_ppparameter, and using thewait_on_timehardware capability. Thetx_skewdevarg is applicable for both, but in case of tx_pp=0 (that supposeswait_on_timemode is engaged on ConnectX-7 and above), thetx_skewsetting was missed (asmlx5_txpp_createwas not invoked).Fixes 2f5122dfc41f ("net/mlx5: configure Tx queue with send on time offload")Signed-off-by Viacheslav Ovsiienko <[email protected]>
Best regards,
Dariusz Sosnowski
Hi,
Quoted 11 lines · Viacheslav Ovsiienko
There are two modes to support tx send scheduling in mlx5 drivers, using the Clock Queue and
tx_ppparameter, and using thewait_on_timehardware capability. Thetx_skewdevarg is applicable for both, but in case of tx_pp=0 (that supposeswait_on_timemode is engaged on ConnectX-7 and above), thetx_skewsetting was missed (asmlx5_txpp_createwas not invoked).Fixes 2f5122dfc41f ("net/mlx5: configure Tx queue with send on time offload")Signed-off-by Viacheslav Ovsiienko <[email protected]>
Patch applied to next-net-mlx,
Kindest regards
Raslan Darawsheh