Commit 8d212ff0 authored by Jianbo Liu's avatar Jianbo Liu Committed by Saeed Mahameed

net/mlx5e: Specifying known origin of packets matching the flow

In vport metadata matching, source port number is replaced by metadata.
While FW has no idea about what it is in the metadata, a syndrome will
happen. Specify a known origin to avoid the syndrome.
However, there is no functional change because ANY_VPORT (0) is filled
in flow_source, the same default value as before, as a pre-step towards
metadata matching for fast path.
There are two other values can be filled in flow_source. When setting
0x1, packet matching this rule is from uplink, while 0x2 is for packet
from other local vports.
Signed-off-by: default avatarJianbo Liu <jianbol@mellanox.com>
Reviewed-by: default avatarMark Bloch <markb@mellanox.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
parent 7445cfb1
...@@ -187,6 +187,7 @@ TRACE_EVENT(mlx5_fs_set_fte, ...@@ -187,6 +187,7 @@ TRACE_EVENT(mlx5_fs_set_fte,
__field(u32, index) __field(u32, index)
__field(u32, action) __field(u32, action)
__field(u32, flow_tag) __field(u32, flow_tag)
__field(u32, flow_source)
__field(u8, mask_enable) __field(u8, mask_enable)
__field(int, new_fte) __field(int, new_fte)
__array(u32, mask_outer, MLX5_ST_SZ_DW(fte_match_set_lyr_2_4)) __array(u32, mask_outer, MLX5_ST_SZ_DW(fte_match_set_lyr_2_4))
...@@ -205,6 +206,7 @@ TRACE_EVENT(mlx5_fs_set_fte, ...@@ -205,6 +206,7 @@ TRACE_EVENT(mlx5_fs_set_fte,
__entry->action = fte->action.action; __entry->action = fte->action.action;
__entry->mask_enable = __entry->fg->mask.match_criteria_enable; __entry->mask_enable = __entry->fg->mask.match_criteria_enable;
__entry->flow_tag = fte->flow_context.flow_tag; __entry->flow_tag = fte->flow_context.flow_tag;
__entry->flow_source = fte->flow_context.flow_source;
memcpy(__entry->mask_outer, memcpy(__entry->mask_outer,
MLX5_ADDR_OF(fte_match_param, MLX5_ADDR_OF(fte_match_param,
&__entry->fg->mask.match_criteria, &__entry->fg->mask.match_criteria,
......
...@@ -398,6 +398,9 @@ static int mlx5_cmd_set_fte(struct mlx5_core_dev *dev, ...@@ -398,6 +398,9 @@ static int mlx5_cmd_set_fte(struct mlx5_core_dev *dev,
MLX5_SET(flow_context, in_flow_context, flow_tag, MLX5_SET(flow_context, in_flow_context, flow_tag,
fte->flow_context.flow_tag); fte->flow_context.flow_tag);
MLX5_SET(flow_context, in_flow_context, flow_source,
fte->flow_context.flow_source);
MLX5_SET(flow_context, in_flow_context, extended_destination, MLX5_SET(flow_context, in_flow_context, extended_destination,
extended_dest); extended_dest);
if (extended_dest) { if (extended_dest) {
......
...@@ -95,6 +95,7 @@ enum { ...@@ -95,6 +95,7 @@ enum {
struct mlx5_flow_context { struct mlx5_flow_context {
u32 flags; u32 flags;
u32 flow_tag; u32 flow_tag;
u32 flow_source;
}; };
struct mlx5_flow_spec { struct mlx5_flow_spec {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment