From patchwork Thu Mar 7 08:42:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 13585213 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 AA6A583CC4 for ; Thu, 7 Mar 2024 08:42:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709800971; cv=none; b=pdwHja1ftKIGnu4c/3ybdIVABxB1vPSakpysP2ji2uEYpw3bceAR6QzPYGxoc1RUnjzt+sa0U2R8FN1KllmKUleEpZ3wpDoVE4wYD2b65eE9zvWH5qehLU8rXg5r/IatCqIkTFOQj+wlWrkDeGsB6rgcohWGtnK6vuKOdjKYLNw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709800971; c=relaxed/simple; bh=+Sy7v4QeR72jlTZ8HobQ495BabO97y6qzQq47FkzzjE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=k9pjLtmbHfEvartdDpJ0xBXH81vbMJPfRT2xXRs1nhMbTUX8CAlyf6iAI8a/VQQFhGdxhhM/yU42jeyCBqmeqdREiIEpIkKwrBZozbNygffy/nfqVXfwU4nhDp3BdIrnvpNQi5eq1RexkO+o7KCqX8UogDkO35VeMjv+ezGi9ts= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=GZNe2LO1; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="GZNe2LO1" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2A6ADC433F1; Thu, 7 Mar 2024 08:42:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709800971; bh=+Sy7v4QeR72jlTZ8HobQ495BabO97y6qzQq47FkzzjE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GZNe2LO1dQSV7vqIqtXbOZsmEbxLeatvKyBkhVPoW0DzjXrkK6gepOvebe0czkEE/ f1A90XWf6AlEl8/re1HTyJ+KAfICTW8RCl0TtbC1VCVYyHDyL/D/PpJrX0eLHxbGiS MQrHBWuvJpd9gWHjBRowQF17wx1L5zbWFdIiVrqIXa5W/QulPI5ShCwwJ+Ot8qCGVR XVL+xMzyweLFFEMpxb1Q8PFIDJfvXwov64AUrGiwbLzQKQ8tiQ8G4mi+YBTaejoPmJ V/505gMZY7Ff0mwMcE+hmw/xP8XiPvpPhzEZS6vYe4NI0l+lMAy+ZTjc7Vnga8mbma +l7Orz3nogFEQ== From: Saeed Mahameed To: "David S. Miller" , Jakub Kicinski , Paolo Abeni , Eric Dumazet Cc: Saeed Mahameed , netdev@vger.kernel.org, Tariq Toukan , Gal Pressman , Leon Romanovsky Subject: [net-next V6 14/15] net/mlx5: Enable SD feature Date: Thu, 7 Mar 2024 00:42:28 -0800 Message-ID: <20240307084229.500776-15-saeed@kernel.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240307084229.500776-1-saeed@kernel.org> References: <20240307084229.500776-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 41f03b352401..bf9324a31ae9 100644 --- a/include/linux/mlx5/driver.h +++ b/include/linux/mlx5/driver.h @@ -823,6 +823,7 @@ struct mlx5_core_dev { struct blocking_notifier_head macsec_nh; #endif u64 num_ipsec_offloads; + struct mlx5_sd *sd; }; struct mlx5_db {