]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net/mlx5e: aRFS, Warn if aRFS table does not exist for aRFS rule
authorAdham Faris <afaris@nvidia.com>
Mon, 8 May 2023 11:27:48 +0000 (14:27 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Mon, 21 Aug 2023 17:55:14 +0000 (10:55 -0700)
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 <afaris@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c

index 67d8b198a0141e64be272f12d1d93c6234412d50..e8b0acf7d454c27937129eaf65503eacd94ba13f 100644 (file)
@@ -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;
        }