mlx5dv_create_fl...n_packet_reformat(3)
β¨ NAME β¨
okay so this is mlx5dv_create_flow_action_packet_reformat β the flow action that reformat packets for the mlx5 provider π
it lives in manual section 3, bestie, and yes the header up top abbreviates it as mlx5dv_create_fl...n_packet_reformat(3) because apparently even man pages gotta cut it short for the vibes.
πΈ SYNOPSIS πΈ
#include <infiniband/mlx5dv.h>
struct ibv_flow_action *
mlx5dv_create_flow_action_packet_reformat(struct ibv_context *ctx,
size_t data_sz,
void *data,
enum mlx5dv_flow_action_packet_reformat_type reformat_type,
enum mlx5dv_flow_table_type ft_type)
π¦ DESCRIPTION π¦
bestie listen. this function creates a packet reformat flow steering action β¨ and what that means, no cap, is that it lets you add packet headers or remove packet headers. that's the whole vibe. adding and removing. iconic behavior honestly π
π ARGUMENTS π
ctxβ the RDMA device context you're creating this action on. like, your whole entire context, your main character energy source πdata_szβ the size of thedatabuffer. that's it. that's the size. πΈdataβ a buffer that contains headers, in the case that the actions need them. yes the original page says "the actions" and yes i'm keeping it because i don't make the rules π«Άreformat_typeβ the reformat type you're creating. useenum mlx5dv_flow_action_packet_reformat_typefor this one, bestie. here's the whole menu:MLX5DV_FLOW_ACTION_PACKET_REFORMAT_TYPE_L2_TUNNEL_TO_L2β decap a generic L2 tunneled packet up to inner L2 π¦MLX5DV_FLOW_ACTION_PACKET_REFORMAT_TYPE_L2_TO_L2_TUNNELβ generic encap;datashould contain the encapsulating headers β¨MLX5DV_FLOW_ACTION_PACKET_REFORMAT_TYPE_L3_TUNNEL_TO_L2β will do decap where the inner packet starts from L3.datashould be MAC or MAC + vlan (14 or 18 bytes) to be appended to the packet after the decap action πMLX5DV_FLOW_ACTION_PACKET_REFORMAT_TYPE_L2_TO_L3_TUNNELβ will do encap where the L2 of the original packet will not be included.datashould be the encapsulating header π
ft_typeβ this defines the flow table type that the packet reformat action is gonna be attached to. where it lives, basically π
π₯ RETURN VALUE π₯
upon success, mlx5dv_create_flow_action_packet_reformat will return a brand new struct ibv_flow_action object π slay.
on error, NULL will be returned and errno will be set π so like. check it. pls.
π SEE ALSO π
and that's the whole page, bestie π«Ά this one comes to you courtesy of the mlx5dv_create_fl...n_packet_reformat(3) man page β same abbreviated name, section 3, straight from the source/version info at the bottom of the original, footer date and all π go forth and reformat those packets, you got this π
β¨
π¦ 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
- ubuntu jammy: libibverbs-dev 39.0-1 Β· BSD-MIT OR GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms