File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
drivers/infiniband/hw/mlx5 Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -3544,10 +3544,6 @@ static struct mlx5_ib_flow_handler *_create_flow_rule(struct mlx5_ib_dev *dev,
3544
3544
}
3545
3545
3546
3546
INIT_LIST_HEAD (& handler -> list );
3547
- if (dst ) {
3548
- memcpy (& dest_arr [0 ], dst , sizeof (* dst ));
3549
- dest_num ++ ;
3550
- }
3551
3547
3552
3548
for (spec_index = 0 ; spec_index < flow_attr -> num_of_specs ; spec_index ++ ) {
3553
3549
err = parse_flow_attr (dev -> mdev , spec ,
@@ -3560,6 +3556,11 @@ static struct mlx5_ib_flow_handler *_create_flow_rule(struct mlx5_ib_dev *dev,
3560
3556
ib_flow += ((union ib_flow_spec * )ib_flow )-> size ;
3561
3557
}
3562
3558
3559
+ if (dst && !(flow_act .action & MLX5_FLOW_CONTEXT_ACTION_DROP )) {
3560
+ memcpy (& dest_arr [0 ], dst , sizeof (* dst ));
3561
+ dest_num ++ ;
3562
+ }
3563
+
3563
3564
if (!flow_is_multicast_only (flow_attr ))
3564
3565
set_underlay_qp (dev , spec , underlay_qpn );
3565
3566
@@ -3600,10 +3601,8 @@ static struct mlx5_ib_flow_handler *_create_flow_rule(struct mlx5_ib_dev *dev,
3600
3601
}
3601
3602
3602
3603
if (flow_act .action & MLX5_FLOW_CONTEXT_ACTION_DROP ) {
3603
- if (!( flow_act . action & MLX5_FLOW_CONTEXT_ACTION_COUNT )) {
3604
+ if (!dest_num )
3604
3605
rule_dst = NULL ;
3605
- dest_num = 0 ;
3606
- }
3607
3606
} else {
3608
3607
if (is_egress )
3609
3608
flow_act .action |= MLX5_FLOW_CONTEXT_ACTION_ALLOW ;
You can’t perform that action at this time.
0 commit comments