mlx5dv_cre...ow_matcher(3)
π
mlx5dv_create_flow_matcher(3) β your matcher-making bestie π
Okay bestie, this is the mlx5dv_create_flow_matcher(3) page from the mlx5 Programmerβs Manual, and itβs literally about making a matcher (a mask) to go with mlx5dv_create_flow(3) π. Yes, thatβs the whole main-character job. Letβs get into it β¨.
πΈ NAME πΈ
mlx5dv_create_flow_matcher β creates a matcher to be used with mlx5dv_create_flow(3) π«Ά.
β¨ SYNOPSIS β¨
#include <infiniband/mlx5dv.h>
struct mlx5dv_flow_matcher *
mlx5dv_create_flow_matcher(struct ibv_context *context,
struct mlx5dv_flow_matcher_attr *attr)
π¦ DESCRIPTION π¦
mlx5dv_create_flow_matcher() creates a flow matcher (mask) to be used with mlx5dv_create_flow(3) π. Thatβs it β itβs the setup bestie for your flow, no cap.
π ARGUMENTS π
Please see ibv_open_device(3) for context π«Ά.
π attr π
struct mlx5dv_flow_matcher_attr {
enum ibv_flow_attr_type type;
uint32_t flags; /* From enum ibv_flow_flags */
uint16_t priority;
uint8_t match_criteria_enable; /* Device spec format */
struct mlx5dv_flow_match_parameters *match_mask;
uint64_t comp_mask;
enum mlx5dv_flow_table_type ft_type;
uint32_t ib_port;
};
typeβ type of matcher to be created:IBV_FLOW_ATTR_NORMAL: normal rule according to specification π.flagsβ special flags to control the rule:0: nothing or zero value means the matcher will store ingress flow rules.IBV_FLOW_ATTR_FLAGS_EGRESS: specified this matcher will store egress flow rules π¦.priorityβ seeibv_create_flow(3)π«Ά.match_criteria_enableβ what match criteria is configured inmatch_mask, passed in device spec format π§.
πͺ match_mask πͺ
struct mlx5dv_flow_match_parameters {
size_t match_sz;
uint64_t match_buf[]; /* Device spec format */
};
match_szβ size in bytes ofmatch_bufπ.match_bufβ set which mask to be used, passed in device spec format π―.
Back on attr, the rest of the fields go like this:
comp_maskβMLX5DV_FLOW_MATCHER_MASK_FT_TYPEforft_type;MLX5DV_FLOW_MATCHER_MASK_IB_PORTforib_portπ .ft_typeβ specified in which flow table type the matcher will store the flow rules:MLX5DV_FLOW_TABLE_TYPE_NIC_RX: specified this matcher will store ingress flow rules.MLX5DV_FLOW_TABLE_TYPE_NIC_TX: specified this matcher will store egress flow rules.MLX5DV_FLOW_TABLE_TYPE_FDB: specified this matcher will store FDB rules.MLX5DV_FLOW_TABLE_TYPE_RDMA_RX: specified this matcher will store ingress RDMA flow rules.MLX5DV_FLOW_TABLE_TYPE_RDMA_TX: specified this matcher will store egress RDMA flow rules.MLX5DV_FLOW_TABLE_TYPE_RDMA_TRANSPORT_RX: specified this matcher will store RDMA transport domain flow rules.MLX5DV_FLOW_TABLE_TYPE_RDMA_TRANSPORT_TX: specified this matcher will store RDMA transport domain flow rules.
ib_portβ specified to which vport attach the matcher. This is valid and required only when creating the steering RDMA transport domain flow table:MLX5DV_FLOW_TABLE_TYPE_RDMA_TRANSPORT_RX,MLX5DV_FLOW_TABLE_TYPE_RDMA_TRANSPORT_TXπ¨.
π RETURN VALUE π
mlx5dv_create_flow_matcher returns a pointer to mlx5dv_flow_matcher π. On error, NULL will be returned and errno will be set π. So vibe check that pointer, bestie.
π SEE ALSO π
π AUTHOR π
Mark Bloch <markb@mellanox.com> π.
Source/version: mlx5; date: 2018-9-19; page: mlx5dv_cre...ow_matcher(3) β love u, bye bestie πβ¨
π¦ where this page comes from
- alpine 3.24: rdma-core-doc 61.0-r0 Β· GPL-2.0-only OR BSD-2-Clause
- centos-stream 10: rdma-core-devel 62.0-3.el10 Β· GPLv2 or BSD
- centos-stream 9: rdma-core-devel 61.0-3.el9 Β· GPLv2 or BSD
- centos-stream 9: rdma-core-devel 61.0-3.el9 Β· GPLv2 or BSD
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms