mlx5dv_create_flow(3)
okay bestie, this is mlx5dv_create_flow(3) straight out of the mlx5 Programmerโs Manual โ and yes, the manual name is folded in right here near the top, no copied header line, weโre doing this ๐
โจ
โจ NAME โจ
mlx5dv_create_flow โ creates a steering flow rule ๐
๐ฆ SYNOPSIS ๐ฆ
#include <infiniband/mlx5dv.h>
struct ibv_flow *
mlx5dv_create_flow(struct mlx5dv_flow_matcher *flow_matcher,
struct mlx5dv_flow_match_parameters *match_value,
size_t num_actions,
struct mlx5dv_flow_action_attr actions_attr[])
๐ DESCRIPTION ๐
mlx5dv_create_flow() creates a steering flow rule with the ability to specify specific driver properties. itโs giving โmake me a flow rule, but make it driver-property-specificโ fr fr ๐
๐ง ARGUMENTS ๐ง
bestie, for flow_matcher and match_value, please see mlx5dv_create_flow_matcher(3) โ theyโre literally the whole setup vibe ๐ธ
num_actionsโ specifies how many actions are passed inactions_attr๐ข
๐ซถ actions_attr ๐ซถ
struct mlx5dv_flow_action_attr {
enum mlx5dv_flow_action_type type;
union {
struct ibv_qp *qp;
struct ibv_counters *counter;
struct ibv_flow_action *action;
uint32_t tag_value;
struct mlx5dv_devx_obj *obj;
struct {
struct mlx5dv_devx_obj *obj;
uint32_t offset;
} bulk_obj;
};
};
type is the main-character field here; it tells the flow rule what kind of action itโs getting. the values are:
MLX5DV_FLOW_ACTION_DEST_IBV_QPโ theQPpassed will receive the matched packets ๐MLX5DV_FLOW_ACTION_IBV_FLOW_ACTIONโ the flow action to be applied โจMLX5DV_FLOW_ACTION_TAGโ flow tag to be provided in work completion ๐ท๏ธMLX5DV_FLOW_ACTION_DEST_DEVXโ the DEVX destination object for the matched packets ๐ฏMLX5DV_FLOW_ACTION_COUNTERS_DEVXโ the DEVX counter object for the matched packets ๐งฎMLX5DV_FLOW_ACTION_DEFAULT_MISSโ steer the packet to the default miss destination ๐ซฅMLX5DV_FLOW_ACTION_DROPโ action is dropping the matched packet ๐MLX5DV_FLOW_ACTION_COUNTERS_DEVX_WITH_OFFSETโ the DEVX bulk counter object and its counter offset for the matched packets ๐
and now the field lowdown:
qpโ QP passed, to be used with typeMLX5DV_FLOW_ACTION_DEST_IBV_QP๐actionโ flow action, to be used with typeMLX5DV_FLOW_ACTION_IBV_FLOW_ACTION; seemlx5dv_create_flow_action_modify_header(3)andmlx5dv_create_flow_action_packet_reformat(3)๐tag_valueโ tag value to be passed in the work completion, to be used with typeMLX5DV_FLOW_ACTION_TAG; seeibv_create_cq_ex(3)๐ท๏ธobjโ DEVX object, to be used with typeMLX5DV_FLOW_ACTION_DEST_DEVXor byMLX5DV_FLOW_ACTION_COUNTERS_DEVXor byMLX5DV_FLOW_ACTION_COUNTERS_DEVX_WITH_OFFSET๐งoffsetโ offset to the target counter within a bulk DEVX object, to be used with typeMLX5DV_FLOW_ACTION_COUNTERS_DEVX_WITH_OFFSET๐ฏ
๐ RETURN VALUE ๐
mlx5dv_create_flow returns a pointer to the created flow rule. on error, NULL will be returned and errno will be set. no cap, thatโs the whole return-value tea ๐ญ
๐ SEE ALSO ๐
mlx5dv_create_flow_action_modify_header(3)mlx5dv_create_flow_action_packet_reformat(3)mlx5dv_create_flow_matcher(3)mlx5dv_create_qp(3)ibv_create_qp_ex(3)ibv_create_cq_ex(3)ibv_create_counters(3)
๐ธ AUTHOR ๐ธ
Mark Bloch <marb@mellanox.com> ๐
and thatโs the page, bestie โ cute little footer sign-off: source/version mlx5, date 2018-9-19, page title mlx5dv_create_flow(3). slay, go build that flow rule ๐ซถโจ
๐ฆ 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