mlx5hws_matcher_create(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 in mt array. 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 in at array. 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, page mlx5hws_matcher_create(9). go forth and create your matchers πŸ’–βœ¨πŸ¦‹
πŸ“¦ where this page comes from