mlx5hws_acti..._match_range(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… mlx5hws_action_create_dest_match_range β€” the Kernel API Manual girlies know ✨

okay so bestie, come sit with me, because this one is literally a whole vibe and it's from the Kernel API Manual (yes, the actual manual, we're fancy now πŸŽ€). We're talking about mlx5hws_action_create_dest_match_range β€” the function that builds you a direct rule range match action. Sounds scary? It's giving "math class" but honestly it's so chill once you get it. πŸ¦‹


✨ NAME ✨

mlx5hws_action_create_dest_match_range β€” Create direct rule range match action. That's it, that's the whole job, and she does it flawlessly. πŸ‘‘


🌸 SYNOPSIS 🌸

struct mlx5hws_action * mlx5hws_action_create_dest_match_range (struct
mlx5hws_context *ctx , u32 field , struct mlx5_flow_table *hit_ft ,
struct mlx5_flow_table *miss_ft , u32 min , u32 max , u32 flags );

look at her. seven arguments. seven little besties all lined up. not me being obsessed with a function signature 😭


🧚 ARGUMENTS 🧚

okay so these are the parameters and yes, every single one matters, no skipping, we don't do that here πŸ’–

  • ctx β€” the context where your shiny new action gets created. it's the whole environment, the main character of the setup, you need her.
  • field β€” the field we're comparing the value against. (the original says "comapare" and honestly? typos are a vibe, we keep them in spirit β€” comparison queen πŸ’…)
  • hit_ft β€” the flow table you go to on a hit. yass, success path, gold star ⭐
  • miss_ft β€” the flow table you go to on a miss. it happens to the best of us πŸ™ˆ
  • min β€” the minimal value of the field that still counts as a hit. the floor, the bare minimum, respect it πŸ“
  • max β€” the maximal value of the field that still counts as a hit. the ceiling, the limit, the "you shall not pass" πŸ”₯
  • flags β€” action creation flags, and they're of type enum mlx5hws_action_flags. cute little enum, doing cute little enum things πŸ’œ

🫢 RETURN 🫢

on success you get a pointer to mlx5hws_action β€” slay, iconic, exactly what you wanted ✨

otherwise you get NULL. and ngl, NULL is never the vibe, but at least you know 😭


πŸ‘‘ SEE ALSO πŸ‘‘

the whole friend group, fr fr β€” nobody gets left out:

the kernel file, first of all: ./drivers/net/ethernet/mellanox/mlx5/core/steering/hws/mlx5hws.h

and now the full squad, in order, no cap:

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_create(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_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, that's the whole friend group chat right there. add them all, they're all valid 🫢


ok and one last thing β€” this page lives at ./drivers/net/ethernet/mellano... (yes, truncated, she's mysterious like that πŸ’…) and it's dated October 2026, so future-girlie behavior only. mwah, go build some range match actions, you're gonna eat πŸ’–βœ¨πŸŽ€

ily, go touch grass, then go read the kernel headers 🌈

πŸ“¦ where this page comes from