git: 85af37e15958 - main - mlx5en: Fix domain set usage in TLS tag import functions
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 04 Mar 2025 04:58:34 UTC
The branch main has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=85af37e15958bd050093e6368afe6afe8e7a5ced
commit 85af37e15958bd050093e6368afe6afe8e7a5ced
Author: Slava Shwartsman <slavash@nvidia.com>
AuthorDate: 2025-02-24 18:08:58 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2025-03-04 04:58:07 +0000
mlx5en: Fix domain set usage in TLS tag import functions
Use the correct device pointer to obtain the domain set for memory
allocation. Previously, the functions were incorrectly using the arg
parameter directly instead of accessing mlx5_core_dev.
Signed-off-by: Slava Shwartsman <slavash@nvidia.com>
Sponsored by: NVidia networking
MFC after: 1 week
---
sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c | 2 +-
sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls_rx.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c b/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c
index 0759cd84c307..6c83de5f3580 100644
--- a/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c
+++ b/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls.c
@@ -118,7 +118,7 @@ mlx5e_tls_tag_import(void *arg, void **store, int cnt, int domain, int flags)
for (i = 0; i != cnt; i++) {
ptag = malloc_domainset(sizeof(*ptag), M_MLX5E_TLS,
- mlx5_dev_domainset(arg), flags | M_ZERO);
+ mlx5_dev_domainset(priv->mdev), flags | M_ZERO);
if (ptag == NULL)
return (i);
ptag->tls = &priv->tls;
diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls_rx.c b/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls_rx.c
index 55768038c20f..8b8f2e570245 100644
--- a/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls_rx.c
+++ b/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls_rx.c
@@ -388,11 +388,12 @@ static int
mlx5e_tls_rx_tag_import(void *arg, void **store, int cnt, int domain, int flags)
{
struct mlx5e_tls_rx_tag *ptag;
+ struct mlx5_core_dev *mdev = arg;
int i;
for (i = 0; i != cnt; i++) {
ptag = malloc_domainset(sizeof(*ptag), M_MLX5E_TLS_RX,
- mlx5_dev_domainset(arg), flags | M_ZERO);
+ mlx5_dev_domainset(mdev), flags | M_ZERO);
mtx_init(&ptag->mtx, "mlx5-tls-rx-tag-mtx", NULL, MTX_DEF);
INIT_WORK(&ptag->work, mlx5e_tls_rx_work);
store[i] = ptag;