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 the data buffer. 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. use enum mlx5dv_flow_action_packet_reformat_type for 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; data should contain the encapsulating headers ✨
    • MLX5DV_FLOW_ACTION_PACKET_REFORMAT_TYPE_L3_TUNNEL_TO_L2 β€” will do decap where the inner packet starts from L3. data should 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. data should 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