From mboxrd@z Thu Jan 1 00:00:00 1970 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 3200AE54A for ; Mon, 21 Aug 2023 17:57:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E9B89C433CA; Mon, 21 Aug 2023 17:57:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692640672; bh=2UE98QX5sk2RSQ5a/NjxXbQrmjCdmOL9t0G2a09dYWY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RYxTxjAyIoess2aeqPlDznNBPC6ISRhyHaV6+T3Nb1E7WXQSnFUqo8xyWcKm+Yb1q xCj9vcwotMjLlq9k92vRLWgdxnweSCq61tt1rXBKqawI/a9JAZdaXd0NHDpQoiQTi2 Ud8XK4yFVIR8+VMjeAiTRu1xmqFfBKxHg4bykIurRG9FM4rxw8wPyNjCo3b/HTyEyd r077qlXSfqRjJNSd7Hi4b24mUPvUqki19V8bxs1e9qa1rFDOUWN9M+Ofr70+QrY420 f0w/bE/s4cLxiRzr4x5kkC49LTYX+TAItqCLoo+HqfZR3p/K6vSQ7MYyo+3TLABKrA dEUEvNm9Xb4eg== From: Saeed Mahameed To: "David S. Miller" , Jakub Kicinski , Paolo Abeni , Eric Dumazet Cc: Saeed Mahameed , netdev@vger.kernel.org, Tariq Toukan , Adham Faris Subject: [net-next V2 02/14] net/mlx5e: aRFS, Warn if aRFS table does not exist for aRFS rule Date: Mon, 21 Aug 2023 10:57:27 -0700 Message-ID: <20230821175739.81188-3-saeed@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230821175739.81188-1-saeed@kernel.org> References: <20230821175739.81188-1-saeed@kernel.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Adham Faris aRFS tables should be allocated and exist in advance. Driver shouldn't reach a point where it tries to add aRFS rule to table that does not exist. Add warning if driver encounters such situation. Signed-off-by: Adham Faris Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c b/drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c index 67d8b198a014..e8b0acf7d454 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c @@ -519,6 +519,8 @@ static struct mlx5_flow_handle *arfs_add_rule(struct mlx5e_priv *priv, ntohs(tuple->etype)); arfs_table = arfs_get_table(arfs, tuple->ip_proto, tuple->etype); if (!arfs_table) { + WARN_ONCE(1, "arfs table does not exist for etype %u and ip_proto %u\n", + tuple->etype, tuple->ip_proto); err = -EINVAL; goto out; } -- 2.41.0