On 10/17/2018 6:07 PM, Ori Kam wrote: > This series implement the raw tunnel encapsulation actions > and is based on rfc [1] "add generic L2/L3 tunnel encapsulation actions" > > Currenlty the encap/decap actions only support encapsulation > of VXLAN and NVGRE L2 packets (L2 encapsulation is where > the inner packet has a valid Ethernet header, while L3 encapsulation > is where the inner packet doesn't have the Ethernet header). > In addtion the parameter to to the encap action is a list of rte items, > this results in 2 extra translation, between the application to the action > and from the action to the NIC. This results in negetive impact on the > insertion performance. > > Looking forward there are going to be a need to support many more tunnel > encapsulations. For example MPLSoGRE, MPLSoUDP. > Adding the new encapsulation will result in duplication of code. > For example the code for handling NVGRE and VXLAN are exactly the same, > and each new tunnel will have the same exact structure. > > This series introduce a raw encapsulation that can support both L2 and L3 > tunnel encapsulation. > In order to encap l3 tunnel for example MPLSoDUP: > ETH / IPV4 / UDP / MPLS / IPV4 / L4 .. L7 > When creating the flow rule we add 2 actions, the first one is decap in order > to remove the original L2 of the packet and then the encap with the tunnel > data. > Decapsulating such a tunnel is done in the following order, first decap the > outer tunnel and then encap the packet with the L2 header. > It is important to notice that from the Nic and PMD both actionsn happens > simultaneously, meaning that at we are always having a valid packet. > > This series also inroduce the following commands for testpmd: > * l2_encap > * l2_decap > * mplsogre_encap > * mplsogre_decap > * mplsoudp_encap > * mplsoudp_decap > > along with helper function to set teh headers that will be used for the > actions, > the same as with vxlan_encap. > > [1]https://mails.dpdk.org/archives/dev/2018-August/109944.html > v4: > * fix typos. > > v4: > * convert to raw encap/decap, according to Adrien suggestion. > * keep the old vxlan and nvgre encapsulation commands. > > v3: > * rebase on tip. > > v2: > * add missing decap_l3 structure. > * fix typo. > > > Ori Kam (3): > ethdev: add raw encapsulation action > app/testpmd: add MPLSoUDP encapsulation > app/testpmd: add MPLSoGRE encapsulation
Getting following build error with gcc, can you please check: .../app/test-pmd/cmdline_flow.c: In function ‘parse_vc_action_mplsoudp_decap’: .../app/test-pmd/cmdline_flow.c:4065:2: error: ‘mpls’ may be used uninitialized in this function [-Werror=maybe-uninitialized] memcpy(header, &mpls, sizeof(mpls)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .../app/test-pmd/cmdline_flow.c: In function ‘parse_vc_action_mplsogre_decap’: .../app/test-pmd/cmdline_flow.c:3874:2: error: ‘mpls’ may be used uninitialized in this function [-Werror=maybe-uninitialized] memcpy(header, &mpls, sizeof(mpls)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~