net/mlx5: E-Switch, Reorganize and rename fdb flow tables
[sfrench/cifs-2.6.git] / drivers / net / ethernet / mellanox / mlx5 / core / eswitch.h
index 4cd773fa55e333f20dad15619a0509bdb3006f1a..d1a3f7fcca1c683bc9050e9733ecdd0d8ec081b5 100644 (file)
@@ -117,16 +117,17 @@ struct mlx5_vport {
 };
 
 struct mlx5_eswitch_fdb {
-       void *fdb;
        union {
                struct legacy_fdb {
+                       struct mlx5_flow_table *fdb;
                        struct mlx5_flow_group *addr_grp;
                        struct mlx5_flow_group *allmulti_grp;
                        struct mlx5_flow_group *promisc_grp;
                } legacy;
 
                struct offloads_fdb {
-                       struct mlx5_flow_table *fdb;
+                       struct mlx5_flow_table *fast_fdb;
+                       struct mlx5_flow_table *slow_fdb;
                        struct mlx5_flow_group *send_to_vport_grp;
                        struct mlx5_flow_group *miss_grp;
                        struct mlx5_flow_handle *miss_rule_uni;
@@ -227,9 +228,18 @@ enum {
        SET_VLAN_INSERT = BIT(1)
 };
 
+enum mlx5_flow_match_level {
+       MLX5_MATCH_NONE = MLX5_INLINE_MODE_NONE,
+       MLX5_MATCH_L2   = MLX5_INLINE_MODE_L2,
+       MLX5_MATCH_L3   = MLX5_INLINE_MODE_IP,
+       MLX5_MATCH_L4   = MLX5_INLINE_MODE_TCP_UDP,
+};
+
 struct mlx5_esw_flow_attr {
        struct mlx5_eswitch_rep *in_rep;
        struct mlx5_eswitch_rep *out_rep;
+       struct mlx5_core_dev    *out_mdev;
+       struct mlx5_core_dev    *in_mdev;
 
        int     action;
        __be16  vlan_proto;
@@ -238,6 +248,7 @@ struct mlx5_esw_flow_attr {
        bool    vlan_handled;
        u32     encap_id;
        u32     mod_hdr_id;
+       u8      match_level;
        struct mlx5e_tc_flow_parse_attr *parse_attr;
 };