From 33e7afe6318d5eb3c0f852091af1c984cfbf5101 Mon Sep 17 00:00:00 2001 From: Nemanja Marjanovic Date: Mon, 21 Jan 2019 11:11:22 +0000 Subject: [PATCH] examples/ip_pipeline: support QinQ PPPoE encapsulation Add implementation of QinQ PPPoE packet encapsulation action. Signed-off-by: Nemanja Marjanovic Acked-by: Cristian Dumitrescu --- examples/ip_pipeline/cli.c | 46 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/examples/ip_pipeline/cli.c b/examples/ip_pipeline/cli.c index a92467e63d..74215857ba 100644 --- a/examples/ip_pipeline/cli.c +++ b/examples/ip_pipeline/cli.c @@ -1035,7 +1035,7 @@ static const char cmd_table_action_profile_help[] = " tc \n" " stats none | pkts | bytes | both]\n" " [tm spp pps ]\n" -" [encap ether | vlan | qinq | mpls | pppoe |\n" +" [encap ether | vlan | qinq | mpls | pppoe | qinq_pppoe \n" " vxlan offset ipv4 | ipv6 vlan on | off]\n" " [nat src | dst\n" " proto udp | tcp]\n" @@ -1301,7 +1301,10 @@ cmd_table_action_profile(char **tokens, p.encap.encap_mask = 1LLU << RTE_TABLE_ACTION_ENCAP_VXLAN; n_extra_tokens = 5; - } else { + } 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; } @@ -3085,6 +3088,7 @@ parse_match(char **tokens, * ether * | vlan * | qinq + * | qinq_pppoe * | mpls unicast | multicast * * label0