From: Adham Faris Date: Mon, 8 May 2023 11:27:48 +0000 (+0300) Subject: net/mlx5e: aRFS, Warn if aRFS table does not exist for aRFS rule X-Git-Tag: v6.6.7~2079^2~49^2~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7653d80672455658ea106a6ba1bcabfd7a9c3917;p=platform%2Fkernel%2Flinux-starfive.git net/mlx5e: aRFS, Warn if aRFS table does not exist for aRFS rule 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 --- diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c b/drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c index 67d8b19..e8b0acf 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; }