]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
net/mlx5: Introduce termination table bits
authorEli Britstein <elibr@mellanox.com>
Wed, 29 May 2019 22:50:29 +0000 (22:50 +0000)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 31 May 2019 19:28:14 +0000 (12:28 -0700)
Termination table is a flow table with a termination flag. The flag
allows the firmware to assume that the the specified actions are the last
actions list. This assumption allows the FW to safely perform potential
looping logic (e.g. hairpin). Introduce the bits for this attribute.

Signed-off-by: Eli Britstein <elibr@mellanox.com>
Reviewed-by: Oz Shlomo <ozsh@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c
include/linux/mlx5/fs.h
include/linux/mlx5/mlx5_ifc.h

index 013b1ca4a79126b27390c04444831cbfa8bcd6c1..bb24c3797218254b1ccf3292df78623221a1ec53 100644 (file)
@@ -147,6 +147,7 @@ static int mlx5_cmd_create_flow_table(struct mlx5_flow_root_namespace *ns,
 {
        int en_encap = !!(ft->flags & MLX5_FLOW_TABLE_TUNNEL_EN_REFORMAT);
        int en_decap = !!(ft->flags & MLX5_FLOW_TABLE_TUNNEL_EN_DECAP);
+       int term = !!(ft->flags & MLX5_FLOW_TABLE_TERMINATION);
        u32 out[MLX5_ST_SZ_DW(create_flow_table_out)] = {0};
        u32 in[MLX5_ST_SZ_DW(create_flow_table_in)]   = {0};
        struct mlx5_core_dev *dev = ns->dev;
@@ -167,6 +168,8 @@ static int mlx5_cmd_create_flow_table(struct mlx5_flow_root_namespace *ns,
                 en_decap);
        MLX5_SET(create_flow_table_in, in, flow_table_context.reformat_en,
                 en_encap);
+       MLX5_SET(create_flow_table_in, in, flow_table_context.termination_table,
+                term);
 
        switch (ft->op_mod) {
        case FS_FT_OP_MOD_NORMAL:
index e690ba0f965ce1f362345414cda0159390c12472..2ddaa97f217988c0101da96f1973eac27f104fb4 100644 (file)
@@ -47,6 +47,7 @@ enum {
 enum {
        MLX5_FLOW_TABLE_TUNNEL_EN_REFORMAT = BIT(0),
        MLX5_FLOW_TABLE_TUNNEL_EN_DECAP = BIT(1),
+       MLX5_FLOW_TABLE_TERMINATION = BIT(2),
 };
 
 #define LEFTOVERS_RULE_NUM      2
index 7ee422e38826eb580941dd2b5ba923a0b4e6690b..feaa909bf14f8f91e30d0c585a3a6d16ceb60d44 100644 (file)
@@ -382,7 +382,8 @@ struct mlx5_ifc_flow_table_prop_layout_bits {
        u8         reformat_and_modify_action[0x1];
        u8         reserved_at_15[0x2];
        u8         table_miss_action_domain[0x1];
-       u8         reserved_at_18[0x8];
+       u8         termination_table[0x1];
+       u8         reserved_at_19[0x7];
        u8         reserved_at_20[0x2];
        u8         log_max_ft_size[0x6];
        u8         log_max_modify_header_context[0x8];
@@ -7239,7 +7240,8 @@ struct mlx5_ifc_create_flow_table_out_bits {
 struct mlx5_ifc_flow_table_context_bits {
        u8         reformat_en[0x1];
        u8         decap_en[0x1];
-       u8         reserved_at_2[0x2];
+       u8         reserved_at_2[0x1];
+       u8         termination_table[0x1];
        u8         table_miss_action[0x4];
        u8         level[0x8];
        u8         reserved_at_10[0x8];