aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mlx5/fs.h
diff options
context:
space:
mode:
authorYevgeny Kliteynik <kliteyn@nvidia.com>2022-08-15 12:45:28 +0300
committerSaeed Mahameed <saeedm@nvidia.com>2022-12-08 16:10:53 -0800
commit38bf24c38d19dc4ba5ec684ac2afa2f8e256db1e (patch)
tree659b5a4ff22d1f8100605c1ed5eaa3eb126d8f49 /include/linux/mlx5/fs.h
parentnet/mlx5: mlx5_ifc updates for MATCH_DEFINER general object (diff)
downloadlinux-38bf24c38d19dc4ba5ec684ac2afa2f8e256db1e.tar.xz
linux-38bf24c38d19dc4ba5ec684ac2afa2f8e256db1e.zip
net/mlx5: fs, add match on ranges API
Range is a new flow destination type which allows matching on a range of values instead of matching on a specific value. Range flow destination has the following fields: - hit_ft: flow table to forward the traffic in case of hit - miss_ft: flow table to forward the traffic in case of miss - field: which packet characteristic to match on - min: minimal value for the selected field - max: maximal value for the selected field Note: - In order to match, the value in the packet should meet the following criteria: min <= value < max - Currently, the only supported field type is L2 packet length Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com> Reviewed-by: Alex Vesker <valex@nvidia.com> Reviewed-by: Mark Bloch <mbloch@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'include/linux/mlx5/fs.h')
-rw-r--r--include/linux/mlx5/fs.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/mlx5/fs.h b/include/linux/mlx5/fs.h
index c7a91981cd5a..ba6958b49a8e 100644
--- a/include/linux/mlx5/fs.h
+++ b/include/linux/mlx5/fs.h
@@ -50,6 +50,7 @@ enum mlx5_flow_destination_type {
MLX5_FLOW_DESTINATION_TYPE_PORT,
MLX5_FLOW_DESTINATION_TYPE_COUNTER,
MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE_NUM,
+ MLX5_FLOW_DESTINATION_TYPE_RANGE,
};
enum {
@@ -143,6 +144,10 @@ enum {
MLX5_FLOW_DEST_VPORT_REFORMAT_ID = BIT(1),
};
+enum mlx5_flow_dest_range_field {
+ MLX5_FLOW_DEST_RANGE_FIELD_PKT_LEN = 0,
+};
+
struct mlx5_flow_destination {
enum mlx5_flow_destination_type type;
union {
@@ -156,6 +161,13 @@ struct mlx5_flow_destination {
struct mlx5_pkt_reformat *pkt_reformat;
u8 flags;
} vport;
+ struct {
+ struct mlx5_flow_table *hit_ft;
+ struct mlx5_flow_table *miss_ft;
+ enum mlx5_flow_dest_range_field field;
+ u32 min;
+ u32 max;
+ } range;
u32 sampler_id;
};
};