Skip to content

Commit 8d212ff

Browse files
jialiu02Saeed Mahameed
authored andcommitted
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: Jianbo Liu <[email protected]> Reviewed-by: Mark Bloch <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent 7445cfb commit 8d212ff

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

drivers/net/ethernet/mellanox/mlx5/core/diag/fs_tracepoint.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ TRACE_EVENT(mlx5_fs_set_fte,
187187
__field(u32, index)
188188
__field(u32, action)
189189
__field(u32, flow_tag)
190+
__field(u32, flow_source)
190191
__field(u8, mask_enable)
191192
__field(int, new_fte)
192193
__array(u32, mask_outer, MLX5_ST_SZ_DW(fte_match_set_lyr_2_4))
@@ -205,6 +206,7 @@ TRACE_EVENT(mlx5_fs_set_fte,
205206
__entry->action = fte->action.action;
206207
__entry->mask_enable = __entry->fg->mask.match_criteria_enable;
207208
__entry->flow_tag = fte->flow_context.flow_tag;
209+
__entry->flow_source = fte->flow_context.flow_source;
208210
memcpy(__entry->mask_outer,
209211
MLX5_ADDR_OF(fte_match_param,
210212
&__entry->fg->mask.match_criteria,

drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,9 @@ static int mlx5_cmd_set_fte(struct mlx5_core_dev *dev,
398398

399399
MLX5_SET(flow_context, in_flow_context, flow_tag,
400400
fte->flow_context.flow_tag);
401+
MLX5_SET(flow_context, in_flow_context, flow_source,
402+
fte->flow_context.flow_source);
403+
401404
MLX5_SET(flow_context, in_flow_context, extended_destination,
402405
extended_dest);
403406
if (extended_dest) {

include/linux/mlx5/fs.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ enum {
9595
struct mlx5_flow_context {
9696
u32 flags;
9797
u32 flow_tag;
98+
u32 flow_source;
9899
};
99100

100101
struct mlx5_flow_spec {

0 commit comments

Comments
 (0)