Ping….

 

From: Vamsi Krishna Attunuru
Sent: Tuesday, February 14, 2023 2:22 PM
To: orika@nvidia.com; dev@dpdk.org
Subject: DPDK rte flow raw encap & decap actions

 

Hi Ori Kam & dpdk dev team,

 

For the below rte flow action types, the description sounds a bit confusing to me. Description says the data must start with ETH header up to the tunnel item. But the next following statement(that describes MPLSoGRE example) mentions data just holds layer 2 header. Same is described for raw_decap action also. Could you please elaborate on what exactly data must hold and the expected actual packet’s header(before/after the action) for the example (MPLSoGRE) mentioned or for any other tunnel encap/decap types.

 

/**

* @warning

* @b EXPERIMENTAL: this structure may change without prior notice

*

* RTE_FLOW_ACTION_TYPE_RAW_ENCAP

*

* Raw tunnel end-point encapsulation data definition.

*

* The data holds the headers definitions to be applied on the packet.

* The data must start with ETH header up to the tunnel item header itself.

* When used right after RAW_DECAP (for decapsulating L3 tunnel type for

* example MPLSoGRE) the data will just hold layer 2 header.

*

* The preserve parameter holds which bits in the packet the PMD is not allowed

* to change, this parameter can also be NULL and then the PMD is allowed

* to update any field.

*

* size holds the number of bytes in @p data and @p preserve.

*/

struct rte_flow_action_raw_encap {

        uint8_t *data; /**< Encapsulation data. */

        uint8_t *preserve; /**< Bit-mask of @p data to preserve on output. */

        size_t size; /**< Size of @p data and @p preserve. */

};

 

/**

* @warning

* @b EXPERIMENTAL: this structure may change without prior notice

*

* RTE_FLOW_ACTION_TYPE_RAW_DECAP

*

* Raw tunnel end-point decapsulation data definition.

*

* The data holds the headers definitions to be removed from the packet.

* The data must start with ETH header up to the tunnel item header itself.

* When used right before RAW_DECAP (for encapsulating L3 tunnel type for

* example MPLSoGRE) the data will just hold layer 2 header.

*

* size holds the number of bytes in @p data.

*/

struct rte_flow_action_raw_decap {

        uint8_t *data; /**< Encapsulation data. */

        size_t size; /**< Size of @p data and @p preserve. */

};

 

Regards

Vamsi