mlx5hws_act...odify_header(9)
π mlx5hws_act...odify_header(9) β Kernel API Manual π
okay bestie, buckle up, because this is the page for mlx5hws_action_create_modify_header from the Kernel API Manual, section 9. yeah. that's the one. she's a little niche but she's iconic π
β¨ NAME β¨
mlx5hws_action_create_modify_header β create a direct rule modify header action. that's it, that's the whole thing, but like... explained properly below π«Ά
πΈ SYNOPSIS πΈ
struct mlx5hws_action * mlx5hws_action_create_modify_header (struct
mlx5hws_context *ctx , u8 num_of_patterns , struct
mlx5hws_action_mh_pattern *patterns , u32 log_bulk_size , u32 flags );
literally just one function, no cap, and it returns a pointer to struct mlx5hws_action π
π¦ ARGUMENTS π¦
okay so here's the tea on every single parameter, and yes you need all of them:
ctxβ the context where your brand new action is gonna live. think of it as the group chat this action gets added to π¬num_of_patternsβ how many patterns you actually put in thepatternsarray. like, count them. don't lie to her.patternsβ the array itself, carrying all the pattern info. this is the main character of the whole function ngl πlog_bulk_sizeβ the number of unique values used with this pattern. yes that's the description, no I'm not elaborating, it means what it says β¨flagsβ the action creation flags, and they come fromenum mlx5hws_action_flags. real ones know.
β RETURN β
she gives you a pointer to mlx5hws_action on success π
and NULL otherwise π that's it. no in-between. no "maybe". it's giving all or nothing, periodt.
π SEE ALSO π
first up, the Kernel file itself, go read the source bestie, it's right here:
./drivers/net/ethernet/mellanox/mlx5/core/steering/hws/mlx5hws.h
and then the whole extended friend group of pages, in the exact order they were listed, no gatekeeping:
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_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_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)
that's the whole roster, go follow them all, they all post good content π
π tiny reminder bestie: the return value can be NULL, and that is not a vibe. check it before you dereference, or the kernel will humble you in front of everyone. fr fr.
and that's the page!! π source and version live at ./drivers/net/ethernet/mellano... and she was dated October 2026 β mwah, sending you off with a kiss, go modify some headers responsibly π
β¨π¦
π¦ 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