Skip to content

Commit

Permalink
net/mlx5: fix RSS expansion for GTP
Browse files Browse the repository at this point in the history
[ upstream commit 3e455a9 ]

The flow did not expand correctly when it included a GTP item.

Added GTP node to the expansion graph as possible next node
after IPv4/IPv6 UDP node.

Fixes: 592f05b ("net/mlx5: add RSS flow action")

Signed-off-by: Lior Margalit <lmargalit@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
  • Loading branch information
liormargalit authored and bluca committed Jul 26, 2021
1 parent 3fd282e commit cf3ae20
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions drivers/net/mlx5/mlx5_flow.c
Expand Up @@ -135,6 +135,7 @@ mlx5_flow_is_rss_expandable_item(const struct rte_flow_item *item)
case RTE_FLOW_ITEM_TYPE_VXLAN_GPE:
case RTE_FLOW_ITEM_TYPE_GRE_KEY:
case RTE_FLOW_ITEM_TYPE_IPV6_FRAG_EXT:
case RTE_FLOW_ITEM_TYPE_GTP:
return true;
default:
break;
Expand Down Expand Up @@ -455,6 +456,7 @@ enum mlx5_expansion {
MLX5_EXPANSION_IPV6_UDP,
MLX5_EXPANSION_IPV6_TCP,
MLX5_EXPANSION_IPV6_FRAG_EXT,
MLX5_EXPANSION_GTP
};

/** Supported expansion of items. */
Expand Down Expand Up @@ -511,7 +513,8 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
[MLX5_EXPANSION_OUTER_IPV4_UDP] = {
.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_VXLAN,
MLX5_EXPANSION_VXLAN_GPE,
MLX5_EXPANSION_MPLS),
MLX5_EXPANSION_MPLS,
MLX5_EXPANSION_GTP),
.type = RTE_FLOW_ITEM_TYPE_UDP,
.rss_types = ETH_RSS_NONFRAG_IPV4_UDP,
},
Expand All @@ -534,7 +537,8 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
[MLX5_EXPANSION_OUTER_IPV6_UDP] = {
.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_VXLAN,
MLX5_EXPANSION_VXLAN_GPE,
MLX5_EXPANSION_MPLS),
MLX5_EXPANSION_MPLS,
MLX5_EXPANSION_GTP),
.type = RTE_FLOW_ITEM_TYPE_UDP,
.rss_types = ETH_RSS_NONFRAG_IPV6_UDP,
},
Expand Down Expand Up @@ -626,6 +630,11 @@ static const struct mlx5_flow_expand_node mlx5_support_expansion[] = {
[MLX5_EXPANSION_IPV6_FRAG_EXT] = {
.type = RTE_FLOW_ITEM_TYPE_IPV6_FRAG_EXT,
},
[MLX5_EXPANSION_GTP] = {
.next = MLX5_FLOW_EXPAND_RSS_NEXT(MLX5_EXPANSION_IPV4,
MLX5_EXPANSION_IPV6),
.type = RTE_FLOW_ITEM_TYPE_GTP
}
};

static struct rte_flow_shared_action *
Expand Down

0 comments on commit cf3ae20

Please sign in to comment.