From: Nemanja Marjanovic Date: Mon, 21 Jan 2019 11:11:23 +0000 (+0000) Subject: net/softnic: support QinQ PPPoE encapsulation X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=d08b6845e406181be8b231b03168d07dcbe1ac6d;p=dpdk.git net/softnic: support QinQ PPPoE encapsulation Add implementation of QinQ PPPoE packet encapsulation action. Signed-off-by: Nemanja Marjanovic Acked-by: Cristian Dumitrescu --- diff --git a/drivers/net/softnic/rte_eth_softnic_cli.c b/drivers/net/softnic/rte_eth_softnic_cli.c index 76136c2e2d..410eb54bd9 100644 --- a/drivers/net/softnic/rte_eth_softnic_cli.c +++ b/drivers/net/softnic/rte_eth_softnic_cli.c @@ -1348,7 +1348,7 @@ cmd_port_in_action_profile(struct pmd_internals *softnic, * tc * stats none | pkts | bytes | both] * [tm spp pps ] - * [encap ether | vlan | qinq | mpls | pppoe | + * [encap ether | vlan | qinq | mpls | pppoe | qinq_pppoe | * vxlan offset ipv4 | ipv6 vlan on | off] * [nat src | dst * proto udp | tcp] @@ -1625,10 +1625,14 @@ cmd_table_action_profile(struct pmd_internals *softnic, p.encap.encap_mask = 1LLU << RTE_TABLE_ACTION_ENCAP_VXLAN; n_extra_tokens = 5; + } else if (strcmp(tokens[t0 + 1], "qinq_pppoe") == 0) { + p.encap.encap_mask = + 1LLU << RTE_TABLE_ACTION_ENCAP_QINQ_PPPOE; } else { snprintf(out, out_size, MSG_ARG_MISMATCH, "encap"); return; } + p.action_mask |= 1LLU << RTE_TABLE_ACTION_ENCAP; t0 += 2 + n_extra_tokens; } /* encap */ @@ -3401,6 +3405,7 @@ parse_match(char **tokens, * ether * | vlan * | qinq + * | qinq_pppoe * | mpls unicast | multicast * * label0