From patchwork Mon Aug 16 23:22:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 497861 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 359BCC432BE for ; Mon, 16 Aug 2021 23:22:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1932F60F36 for ; Mon, 16 Aug 2021 23:22:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234391AbhHPXXG (ORCPT ); Mon, 16 Aug 2021 19:23:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:51298 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233956AbhHPXXC (ORCPT ); Mon, 16 Aug 2021 19:23:02 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6A36360F38; Mon, 16 Aug 2021 23:22:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1629156149; bh=+5g4pSeZu8dFHEFyOFMCQxMfQBOVj7J4EAMtRl9ojII=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GE+mh0t2IuW8Aj48heBKaJB9VQNEPAq7738kldJH5ecEPIvPo29wi01w/2lzsKEtB cj8ujMbFwjeKAMsuOHGTp5w7wI3ByCnzK8hTiEELlHGl+dKhvkZiXwFAzSWqQ0hSTc hMBa1tUMvXrwC6ZY9eqMhq4kArazEBtDyvf2Z2JNF7Cpg+M3dEh9pXsVu6v3fxoI4u OazmOZ5s50N9inee4d+YXwrW03EeZWzAdnH7qR5qoKcj2KQfoSRHIgAVl7qd1vqR8+ X6N8FN/MsAxUFM3UtuX02a+ldI3GGygYvy9hMzUFpVhewROj0XZjmwrdlxoiafESEu cbzdTRVCe1MuA== From: Saeed Mahameed To: "David S. Miller" , Jakub Kicinski Cc: netdev@vger.kernel.org, Tariq Toukan , Leon Romanovsky , Maxim Mikityanskiy , Saeed Mahameed Subject: [net-next V2 01/17] net/mlx5e: Do not try enable RSS when resetting indir table Date: Mon, 16 Aug 2021 16:22:03 -0700 Message-Id: <20210816232219.557083-2-saeed@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210816232219.557083-1-saeed@kernel.org> References: <20210816232219.557083-1-saeed@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Tariq Toukan All calls to mlx5e_rx_res_rss_set_indir_uniform() occur while the RSS state is inactive, i.e. the RQT is pointing to the drop RQ, not to the channels' RQs. It means that the "apply" part of the function is not called. Remove this part from the function, and document the change. It will be useful for next patches in the series, allows code simplifications when multiple RSS contexts are introduced. Signed-off-by: Tariq Toukan Reviewed-by: Maxim Mikityanskiy Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en/rx_res.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/rx_res.c b/drivers/net/ethernet/mellanox/mlx5/core/en/rx_res.c index e2a8fe13f29d..2d0e8c809936 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/rx_res.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/rx_res.c @@ -617,14 +617,11 @@ mlx5e_rx_res_rss_get_current_tt_config(struct mlx5e_rx_res *res, enum mlx5_traff return rss_tt; } +/* Updates the indirection table SW shadow, does not update the HW resources yet */ void mlx5e_rx_res_rss_set_indir_uniform(struct mlx5e_rx_res *res, unsigned int nch) { + WARN_ON_ONCE(res->rss_active); mlx5e_rss_params_indir_init_uniform(&res->rss_params.indir, nch); - - if (!res->rss_active) - return; - - mlx5e_rx_res_rss_enable(res); } void mlx5e_rx_res_rss_get_rxfh(struct mlx5e_rx_res *res, u32 *indir, u8 *key, u8 *hfunc)