Merge tag 'mlx5-updates-2018-05-17' of git://git.kernel.org/pub/scm/linux/kernel...
[sfrench/cifs-2.6.git] / drivers / net / ethernet / mellanox / mlx5 / core / fs_core.c
index c39c1692e6744a6fe22c2b0742c5341d58c944e1..806e95523f9e5eb964150a276b60816e079b4023 100644 (file)
@@ -1374,6 +1374,8 @@ static int create_auto_flow_group(struct mlx5_flow_table *ft,
        struct mlx5_core_dev *dev = get_dev(&ft->node);
        int inlen = MLX5_ST_SZ_BYTES(create_flow_group_in);
        void *match_criteria_addr;
        struct mlx5_core_dev *dev = get_dev(&ft->node);
        int inlen = MLX5_ST_SZ_BYTES(create_flow_group_in);
        void *match_criteria_addr;
+       u8 src_esw_owner_mask_on;
+       void *misc;
        int err;
        u32 *in;
 
        int err;
        u32 *in;
 
@@ -1386,6 +1388,14 @@ static int create_auto_flow_group(struct mlx5_flow_table *ft,
        MLX5_SET(create_flow_group_in, in, start_flow_index, fg->start_index);
        MLX5_SET(create_flow_group_in, in, end_flow_index,   fg->start_index +
                 fg->max_ftes - 1);
        MLX5_SET(create_flow_group_in, in, start_flow_index, fg->start_index);
        MLX5_SET(create_flow_group_in, in, end_flow_index,   fg->start_index +
                 fg->max_ftes - 1);
+
+       misc = MLX5_ADDR_OF(fte_match_param, fg->mask.match_criteria,
+                           misc_parameters);
+       src_esw_owner_mask_on = !!MLX5_GET(fte_match_set_misc, misc,
+                                        source_eswitch_owner_vhca_id);
+       MLX5_SET(create_flow_group_in, in,
+                source_eswitch_owner_vhca_id_valid, src_esw_owner_mask_on);
+
        match_criteria_addr = MLX5_ADDR_OF(create_flow_group_in,
                                           in, match_criteria);
        memcpy(match_criteria_addr, fg->mask.match_criteria,
        match_criteria_addr = MLX5_ADDR_OF(create_flow_group_in,
                                           in, match_criteria);
        memcpy(match_criteria_addr, fg->mask.match_criteria,
@@ -1406,7 +1416,7 @@ static bool mlx5_flow_dests_cmp(struct mlx5_flow_destination *d1,
 {
        if (d1->type == d2->type) {
                if ((d1->type == MLX5_FLOW_DESTINATION_TYPE_VPORT &&
 {
        if (d1->type == d2->type) {
                if ((d1->type == MLX5_FLOW_DESTINATION_TYPE_VPORT &&
-                    d1->vport_num == d2->vport_num) ||
+                    d1->vport.num == d2->vport.num) ||
                    (d1->type == MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE &&
                     d1->ft == d2->ft) ||
                    (d1->type == MLX5_FLOW_DESTINATION_TYPE_TIR &&
                    (d1->type == MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE &&
                     d1->ft == d2->ft) ||
                    (d1->type == MLX5_FLOW_DESTINATION_TYPE_TIR &&