mlx5dv_create_flow_action_packet_reformat(3) — Linux manual page

NAME | SYNOPSIS | DESCRIPTION | ARGUMENTS | RETURN VALUE | SEE ALSO | COLOPHON

mlx5dv_create_...packet_reformat(3)   mlx5dv_create_...packet_reformat(3)

NAME         top

       mlx5dv_create_flow_action_packet_reformat - Flow action reformat
       packet for mlx5 provider

SYNOPSIS         top

              #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         top

       Create a packet reformat flow steering action.  It allows
       adding/removing packet headers.

ARGUMENTS         top

       ctx

              RDMA device context to create the action on.

       data_sz

              The size of *data* buffer.

       data

              A buffer which contains headers in case the actions requires them.

       reformat_type

              The reformat type to be create. Use enum mlx5dv_flow_action_packet_reformat_type.

              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 is L2 of the original packet will not
              be included.  data should be the encapsulating header.

       ft_type

              It defines the flow table type to which the packet reformat action
              will be attached.

RETURN VALUE         top

       Upon success mlx5dv_create_flow_action_packet_reformat will return
       a new struct ibv_flow_action object, on error NULL will be
       returned and errno will be set.

SEE ALSO         top

       ibv_create_flow(3), ibv_create_flow_action(3)

COLOPHON         top

       This page is part of the rdma-core (RDMA Core Userspace Libraries
       and Daemons) project.  Information about the project can be found
       at ⟨https://github.com/linux-rdma/rdma-core⟩.  If you have a bug
       report for this manual page, send it to
       linux-rdma@vger.kernel.org.  This page was obtained from the
       project's upstream Git repository
       ⟨https://github.com/linux-rdma/rdma-core.git⟩ on 2025-08-11.  (At
       that time, the date of the most recent commit that was found in
       the repository was 2025-08-04.)  If you discover any rendering
       problems in this HTML version of the page, or you believe there is
       a better or more up-to-date source for the page, or you have
       corrections or improvements to the information in this COLOPHON
       (which is not part of the original manual page), send a mail to
       man-pages@man7.org

                                      mlx5dv_create_...packet_reformat(3)