Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6346f0bf authored by Yishai Hadas's avatar Yishai Hadas Committed by Jason Gunthorpe
Browse files

IB/mlx5: Add support for a flow table destination for driver flow steering



Add support to set a destination that is a flow table, this can come from
the DEVX destination.

Signed-off-by: default avatarYishai Hadas <yishaih@mellanox.com>
Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent d4be3f44
Loading
Loading
Loading
Loading
+8 −5
Original line number Original line Diff line number Diff line
@@ -3789,9 +3789,6 @@ mlx5_ib_raw_fs_rule_add(struct mlx5_ib_dev *dev,
	if (fs_matcher->priority > MLX5_IB_FLOW_LAST_PRIO)
	if (fs_matcher->priority > MLX5_IB_FLOW_LAST_PRIO)
		return ERR_PTR(-ENOMEM);
		return ERR_PTR(-ENOMEM);


	if (dest_type != MLX5_FLOW_DESTINATION_TYPE_TIR)
		return ERR_PTR(-ENOTSUPP);

	dst = kzalloc(sizeof(*dst), GFP_KERNEL);
	dst = kzalloc(sizeof(*dst), GFP_KERNEL);
	if (!dst)
	if (!dst)
		return ERR_PTR(-ENOMEM);
		return ERR_PTR(-ENOMEM);
@@ -3805,8 +3802,14 @@ mlx5_ib_raw_fs_rule_add(struct mlx5_ib_dev *dev,
		goto unlock;
		goto unlock;
	}
	}


	if (dest_type == MLX5_FLOW_DESTINATION_TYPE_TIR) {
		dst->type = dest_type;
		dst->type = dest_type;
		dst->tir_num = dest_id;
		dst->tir_num = dest_id;
	} else {
		dst->type = MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE_NUM;
		dst->ft_num = dest_id;
	}

	handler = _create_raw_flow_rule(dev, ft_prio, dst, fs_matcher, cmd_in,
	handler = _create_raw_flow_rule(dev, ft_prio, dst, fs_matcher, cmd_in,
					inlen);
					inlen);