.\" Automatically generated by Pandoc 3.1.3 .\" .\" Define V font for inline verbatim, using C font in formats .\" that render this, and otherwise B font. .ie "\f[CB]x\f[]"x" \{\ . ftr V B . ftr VI BI . ftr VB B . ftr VBI BI .\} .el \{\ . ftr V CR . ftr VI CI . ftr VB CB . ftr VBI CBI .\} .TH "mlx5dv_create_flow_action_packet_reformat" "3" "" "" "" .hy .SH NAME .PP mlx5dv_create_flow_action_packet_reformat - Flow action reformat packet for mlx5 provider .SH SYNOPSIS .IP .nf \f[C] #include 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) \f[R] .fi .SH DESCRIPTION .PP Create a packet reformat flow steering action. It allows adding/removing packet headers. .SH ARGUMENTS .TP \f[I]ctx\f[R] .IP .nf \f[C] RDMA device context to create the action on. \f[R] .fi .TP \f[I]data_sz\f[R] .IP .nf \f[C] The size of *data* buffer. \f[R] .fi .TP \f[I]data\f[R] .IP .nf \f[C] A buffer which contains headers in case the actions requires them. \f[R] .fi .TP \f[I]reformat_type\f[R] .IP .nf \f[C] The reformat type to be create. Use enum mlx5dv_flow_action_packet_reformat_type. \f[R] .fi .RS .PP MLX5DV_FLOW_ACTION_PACKET_REFORMAT_TYPE_L2_TUNNEL_TO_L2: Decap a generic L2 tunneled packet up to inner L2. .PP MLX5DV_FLOW_ACTION_PACKET_REFORMAT_TYPE_L2_TO_L2_TUNNEL: Generic encap, \f[I]data\f[R] should contain the encapsulating headers. .PP MLX5DV_FLOW_ACTION_PACKET_REFORMAT_TYPE_L3_TUNNEL_TO_L2: Will do decap where the inner packet starts from L3. \f[I]data\f[R] should be MAC or MAC + vlan (14 or 18 bytes) to be appended to the packet after the decap action. .PP MLX5DV_FLOW_ACTION_PACKET_REFORMAT_TYPE_L2_TO_L3_TUNNEL: Will do encap where is L2 of the original packet will not be included. \f[I]data\f[R] should be the encapsulating header. .RE .TP \f[I]ft_type\f[R] .IP .nf \f[C] It defines the flow table type to which the packet reformat action \f[R] .fi .RS will be attached. .RE .SH RETURN VALUE .PP Upon success \f[I]mlx5dv_create_flow_action_packet_reformat\f[R] will return a new \f[I]struct ibv_flow_action\f[R] object, on error NULL will be returned and errno will be set. .SH SEE ALSO .PP \f[I]ibv_create_flow(3)\f[R], \f[I]ibv_create_flow_action(3)\f[R]