Flow table supports three types of miss action: 1. Default miss action - go to default miss table according to table. 2. Go to specific table. 3. Switch domain - go to the root table of an alternative steering table domain. New table miss action was added - switch_domain. The next domain for RDMA_RX namespace is the NIC RX domain.
Unified · Split
| @@ -172,9 +172,14 @@ static int mlx5_cmd_create_flow_table(struct mlx5_flow_root_namespace *ns, · 171 unmodified lines | |||
| 172 | case FS_FT_OP_MOD_NORMAL: | 172 | case FS_FT_OP_MOD_NORMAL: |
| 173 | if (next_ft) { | 173 | if (next_ft) { |
| 174 | MLX5_SET(create_flow_table_in, in, | 174 | MLX5_SET(create_flow_table_in, in, |
| 175 | flow_table_context.table_miss_action, 1); | 175 | flow_table_context.table_miss_action, |
| 176 | MLX5_FLOW_TABLE_MISS_ACTION_FWD); | ||
| 176 | MLX5_SET(create_flow_table_in, in, | 177 | MLX5_SET(create_flow_table_in, in, |
| 177 | flow_table_context.table_miss_id, next_ft->id); | 178 | flow_table_context.table_miss_id, next_ft->id); |
| 179 | } else { | ||
| 180 | MLX5_SET(create_flow_table_in, in, | ||
| 181 | flow_table_context.table_miss_action, | ||
| 182 | ns->def_miss_action); | ||
| 178 | } | 183 | } |
| 179 | break; | 184 | break; |
| 180 | 185 | ||
| @@ -246,13 +251,15 @@ static int mlx5_cmd_modify_flow_table(struct mlx5_flow_root_namespace *ns, · 65 unmodified lines | |||
| 246 | MLX5_MODIFY_FLOW_TABLE_MISS_TABLE_ID); | 251 | MLX5_MODIFY_FLOW_TABLE_MISS_TABLE_ID); |
| 247 | if (next_ft) { | 252 | if (next_ft) { |
| 248 | MLX5_SET(modify_flow_table_in, in, | 253 | MLX5_SET(modify_flow_table_in, in, |
| 249 | flow_table_context.table_miss_action, 1); | 254 | flow_table_context.table_miss_action, |
| 255 | MLX5_FLOW_TABLE_MISS_ACTION_FWD); | ||
| 250 | MLX5_SET(modify_flow_table_in, in, | 256 | MLX5_SET(modify_flow_table_in, in, |
| 251 | flow_table_context.table_miss_id, | 257 | flow_table_context.table_miss_id, |
| 252 | next_ft->id); | 258 | next_ft->id); |
| 253 | } else { | 259 | } else { |
| 254 | MLX5_SET(modify_flow_table_in, in, | 260 | MLX5_SET(modify_flow_table_in, in, |
| 255 | flow_table_context.table_miss_action, 0); | 261 | flow_table_context.table_miss_action, |
| 262 | ns->def_miss_action); | ||
| 256 | } | 263 | } |
| 257 | } | 264 | } |
| 258 | 265 | ||
| @@ -2504,6 +2504,9 @@ static int init_rdma_rx_root_ns(struct mlx5_flow_steering *steering) · 2503 unmodified lines | |||
| 2504 | if (!steering->rdma_rx_root_ns) | 2504 | if (!steering->rdma_rx_root_ns) |
| 2505 | return -ENOMEM; | 2505 | return -ENOMEM; |
| 2506 | 2506 | ||
| 2507 | steering->rdma_rx_root_ns->def_miss_action = | ||
| 2508 | MLX5_FLOW_TABLE_MISS_ACTION_SWITCH_DOMAIN; | ||
| 2509 | |||
| 2507 | /* Create single prio */ | 2510 | /* Create single prio */ |
| 2508 | prio = fs_create_prio(&steering->rdma_rx_root_ns->ns, 0, 1); | 2511 | prio = fs_create_prio(&steering->rdma_rx_root_ns->ns, 0, 1); |
| 2509 | if (IS_ERR(prio)) { | 2512 | if (IS_ERR(prio)) { |
| @@ -2748,7 +2751,8 @@ int mlx5_init_fs(struct mlx5_core_dev *dev) · 238 unmodified lines | |||
| 2748 | goto err; | 2751 | goto err; |
| 2749 | } | 2752 | } |
| 2750 | 2753 | ||
| 2751 | if (MLX5_CAP_FLOWTABLE_RDMA_RX(dev, ft_support)) { | 2754 | if (MLX5_CAP_FLOWTABLE_RDMA_RX(dev, ft_support) && |
| 2755 | MLX5_CAP_FLOWTABLE_RDMA_RX(dev, table_miss_action_domain)) { | ||
| 2752 | err = init_rdma_rx_root_ns(steering); | 2756 | err = init_rdma_rx_root_ns(steering); |
| 2753 | if (err) | 2757 | if (err) |
| 2754 | goto err; | 2758 | goto err; |
| @@ -218,6 +218,7 @@ struct mlx5_flow_root_namespace { · 217 unmodified lines | |||
| 218 | struct mutex chain_lock; | 218 | struct mutex chain_lock; |
| 219 | struct list_head underlay_qpns; | 219 | struct list_head underlay_qpns; |
| 220 | const struct mlx5_flow_cmds *cmds; | 220 | const struct mlx5_flow_cmds *cmds; |
| 221 | enum mlx5_flow_table_miss_action def_miss_action; | ||
| 221 | }; | 222 | }; |
| 222 | 223 | ||
| 223 | int mlx5_init_fc_stats(struct mlx5_core_dev *dev); | 224 | int mlx5_init_fc_stats(struct mlx5_core_dev *dev); |
| @@ -370,7 +370,9 @@ struct mlx5_ifc_flow_table_prop_layout_bits { · 369 unmodified lines | |||
| 370 | u8 reformat_l3_tunnel_to_l2[0x1]; | 370 | u8 reformat_l3_tunnel_to_l2[0x1]; |
| 371 | u8 reformat_l2_to_l3_tunnel[0x1]; | 371 | u8 reformat_l2_to_l3_tunnel[0x1]; |
| 372 | u8 reformat_and_modify_action[0x1]; | 372 | u8 reformat_and_modify_action[0x1]; |
| 373 | u8 reserved_at_15[0xb]; | 373 | u8 reserved_at_15[0x2]; |
| 374 | u8 table_miss_action_domain[0x1]; | ||
| 375 | u8 reserved_at_18[0x8]; | ||
| 374 | u8 reserved_at_20[0x2]; | 376 | u8 reserved_at_20[0x2]; |
| 375 | u8 log_max_ft_size[0x6]; | 377 | u8 log_max_ft_size[0x6]; |
| 376 | u8 log_max_modify_header_context[0x8]; | 378 | u8 log_max_modify_header_context[0x8]; |
| @@ -1284,6 +1286,12 @@ enum mlx5_flow_destination_type { · 907 unmodified lines | |||
| 1284 | MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE_NUM = 0x101, | 1286 | MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE_NUM = 0x101, |
| 1285 | }; | 1287 | }; |
| 1286 | 1288 | ||
| 1289 | enum mlx5_flow_table_miss_action { | ||
| 1290 | MLX5_FLOW_TABLE_MISS_ACTION_DEF, | ||
| 1291 | MLX5_FLOW_TABLE_MISS_ACTION_FWD, | ||
| 1292 | MLX5_FLOW_TABLE_MISS_ACTION_SWITCH_DOMAIN, | ||
| 1293 | }; | ||
| 1294 | |||
| 1287 | struct mlx5_ifc_dest_format_struct_bits { | 1295 | struct mlx5_ifc_dest_format_struct_bits { |
| 1288 | u8 destination_type[0x8]; | 1296 | u8 destination_type[0x8]; |
| 1289 | u8 destination_id[0x18]; | 1297 | u8 destination_id[0x18]; |