From patchwork Thu Dec 21 00:57:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 13500863 X-Patchwork-Delegate: kuba@kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 86507A939 for ; Thu, 21 Dec 2023 00:57:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="U7yhkVSw" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 393E6C433CA; Thu, 21 Dec 2023 00:57:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1703120270; bh=bIDQ4AKpaNonIFYk9ferFztQ4SEfb+Lt+mCsNZvE9pI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U7yhkVSwPrVf6F+WonM1BhZwHdsD0rdswWeB5U/rKykZAhLFbM8W95oU+g8+8Wyd1 zQe1nyjSKWlfYojWk3Ryaf7+5mcjghdGv1ZR9968pqtjKRkG0/NiNb0//zSgGauRG9 IMRnsTX/p+RXlnLrl8NEeR3XJsmPZJAc6YjcvWhgismusTCdSGxlv8Q5OesNOg+4vd Mo6eON71Mo9l+RZ3FwITms07YtutnUy7EWQS8OjOt7Xxysb7w14aYjxlTTzqCwNE45 Aqt+g3QqgLkQeoQ92RHwrxCreOVyv4XSHFJ9C1yNRxyrTwVxUzqT3y9X0YxM9a5ozk LE/XQUxPWWAYA== From: Saeed Mahameed To: "David S. Miller" , Jakub Kicinski , Paolo Abeni , Eric Dumazet Cc: Saeed Mahameed , netdev@vger.kernel.org, Tariq Toukan , Gal Pressman Subject: [net-next 14/15] net/mlx5: Enable SD feature Date: Wed, 20 Dec 2023 16:57:20 -0800 Message-ID: <20231221005721.186607-15-saeed@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231221005721.186607-1-saeed@kernel.org> References: <20231221005721.186607-1-saeed@kernel.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org From: Tariq Toukan Have an actual mlx5_sd instance in the core device, and fix the getter accordingly. This allows SD stuff to flow, the feature becomes supported only here. Signed-off-by: Tariq Toukan Reviewed-by: Gal Pressman Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/lib/mlx5.h | 3 ++- include/linux/mlx5/driver.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lib/mlx5.h b/drivers/net/ethernet/mellanox/mlx5/core/lib/mlx5.h index 0810b92b48d0..37d5f445598c 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/lib/mlx5.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/lib/mlx5.h @@ -59,10 +59,11 @@ struct mlx5_sd; static inline struct mlx5_sd *mlx5_get_sd(struct mlx5_core_dev *dev) { - return NULL; + return dev->sd; } static inline void mlx5_set_sd(struct mlx5_core_dev *dev, struct mlx5_sd *sd) { + dev->sd = sd; } #endif diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h index aafb36c9e5d9..cd286b681970 100644 --- a/include/linux/mlx5/driver.h +++ b/include/linux/mlx5/driver.h @@ -822,6 +822,7 @@ struct mlx5_core_dev { struct blocking_notifier_head macsec_nh; #endif u64 num_ipsec_offloads; + struct mlx5_sd *sd; }; struct mlx5_db {