mlx5en: Fix domain set usage in TLS tag import functions

(cherry picked from commit 85af37e15958bd050093e6368afe6afe8e7a5ced)
This commit is contained in:
Slava Shwartsman 2025-02-24 20:08:58 +02:00 committed by Konstantin Belousov
parent dc1467c68d
commit b328b79f6f
2 changed files with 3 additions and 2 deletions

View file

@ -117,7 +117,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;

View file

@ -387,11 +387,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;