[dpdk-dev] [PATCH v6 2/3] app/testpmd: add MPLSoUDP encapsulation

Ferruh Yigit ferruh.yigit at intel.com
Tue Oct 23 11:55:51 CEST 2018


On 10/22/2018 6:38 PM, Ori Kam wrote:
> MPLSoUDP is an example for L3 tunnel encapsulation.
> 
> L3 tunnel type is a tunnel that is missing the layer 2 header of the
> inner packet.
> 
> Example for MPLSoUDP tunnel:
> ETH / IPV4 / UDP / MPLS / IP / L4..L7
> 
> In order to encapsulate such a tunnel there is a need to remove L2 of
> the inner packet and encap the remaining tunnel, this is done by
> applying 2 rte flow commands l2_decap followed by mplsoudp_encap.
> Both commands must appear in the same flow, and from the point of the
> packet it both actions are applyed at the same time. (There is no part
> where a packet doesn't have L2 header).
> 
> Decapsulating such a tunnel works the other way, first we need to decap
> the outer tunnel header and then apply the new L2.
> So the commands will be mplsoudp_decap / l2_encap
> 
> Due to the complex encapsulation of MPLSoUDP and L2  flow actions and
> based on the fact testpmd does not allocate memory, this patch adds a new
> command in testpmd to initialise a global structurs containing the
> necessary information to make the outer layer of the packet.  This same
> global structures will then be used by the flow commands in testpmd when
> the action mplsoudp_encap, mplsoudp_decap, l2_encap, l2_decap, will be
> parsed, at this point, the conversion into such action becomes trivial.
> 
> The l2_encap and l2_decap actions can also be used for other L3 tunnel
> types.
> 
> Signed-off-by: Ori Kam <orika at mellanox.com>

Reviewed-by: Ferruh Yigit <ferruh.yigit at intel.com>


More information about the dev mailing list