mlx5hws_matcher_create(9)
π mlx5hws_matcher_create β it's giving "Kernel API Manual" realness β¨
okay so bestie, this is a page from the Kernel API Manual and honestly? it's a little icon and it deserves your attention. let's get into it π
πΈ NAME πΈ
mlx5hws_matcher_create β Create a new direct rule matcher. yes that's literally the whole vibe. we're making a matcher. π
π¦ SYNOPSIS π¦
struct mlx5hws_matcher * mlx5hws_matcher_create (struct mlx5hws_table
*table , struct mlx5hws_match_template *mt[] , u8 num_of_mt , struct
mlx5hws_action_template *at[] , u8 num_of_at , struct
mlx5hws_matcher_attr *attr );
like look at that signature. so many arguments. so much main character energy. π₯
β¨ ARGUMENTS β¨
tableβ The table in which the new matcher will be opened. it's the home base, the safe space, the place our matcher lives πmtβ Array of match templates to be used on matcher. plural. an array. we love to see it πnum_of_mtβ Number of match templates inmtarray. like, the count. math but make it cute π’atβ Array of action templates to be used on matcher. this is the "what happens after" part π¬num_of_atβ Number of action templates inatarray. again. a count. slay π
π§ DESCRIPTION π§
okay so listen π«Ά Each matcher can contain multiple rules. not just one. multiple. we're thriving π
Matchers on the table will be processed by priority. so like, order matters, bestie β it's giving a queue at a boba shop where nobody tells you what the priority numbers mean β
Matching fields and mask are described by the match template. yes, the template is doing the heavy lifting here. it's the blueprint, the aesthetic, the vision πβ¨
And here's the fun part: in some cases, multiple match templates can be used on the same matcher. like, more than one?? on the same matcher?? lowkey iconic, highkey allowed π
π RETURN π
Pointer to mlx5hws_matcher on success, NULL otherwise. so like, if you get a pointer you ate π
and if you get NULLβ¦ well. we don't talk about that π
π SEE ALSO π
ooh okay here comes the whole friend group. brace yourself πΈ
Kernel file:
./drivers/net/ethernet/mellanox/mlx5/core/steering/hws/mlx5hws.h
and then the entire extended universe, fr fr:
mlx5hws_is_supported(9), mlx5hws_context_open(9), mlx5hws_context_close(9), mlx5hws_context_set_peer(9), mlx5hws_table_create(9), mlx5hws_table_destroy(9), mlx5hws_table_get_id(9), mlx5hws_table_set_default_miss(9), mlx5hws_match_template_create(9), mlx5hws_match_template_destroy(9), mlx5hws_action_template_create(9), mlx5hws_action_template_destroy(9), mlx5hws_matcher_destroy(9), mlx5hws_matcher_attach_at(9), mlx5hws_matcher_resize_set_target(9), mlx5hws_matcher_resize_rule_move(9), mlx5hws_rule_create(9), mlx5hws_rule_destroy(9), mlx5hws_rule_action_update(9), mlx5hws_action_get_type(9), mlx5hws_action_get_dev(9), mlx5hws_action_create_dest_drop(9), mlx5hws_action_create_default_miss(9), mlx5hws_action_create_dest_table(9), mlx5hws_action_create_dest_table_num(9), mlx5hws_action_create_dest_match_range(9), mlx5hws_action_create_flow_sampler(9), mlx5hws_action_create_dest_vport(9), mlx5hws_action_create_tag(9), mlx5hws_action_create_counter(9), mlx5hws_action_create_reformat(9), mlx5hws_action_create_modify_header(9), mlx5hws_action_create_aso_meter(9), mlx5hws_action_create_pop_vlan(9), mlx5hws_action_create_push_vlan(9), mlx5hws_action_create_dest_array(9), mlx5hws_action_create_insert_header(9), mlx5hws_action_create_remove_header(9), mlx5hws_action_create_last(9), mlx5hws_action_destroy(9), mlx5hws_send_queue_poll(9), mlx5hws_send_queue_action(9), mlx5hws_debug_dump(9), mlx5hws_bwc_matcher_create(9), mlx5hws_bwc_matcher_destroy(9), mlx5hws_bwc_rule_create(9), mlx5hws_bwc_rule_destroy(9), mlx5hws_bwc_rule_action_update(9)
like okay that's a lot of friends but every single one of them matters, no cap π
ngl bestie, this whole page is from./drivers/net/ethernet/mellano...and it's dated October 2026, in the Kernel API Manual, pagemlx5hws_matcher_create(9). go forth and create your matchers πβ¨π¦
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms