From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 3ED8D5F14 for ; Tue, 15 Jan 2019 11:56:41 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Jan 2019 02:56:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,481,1539673200"; d="scan'208";a="116882438" Received: from silpixa00391954.ir.intel.com (HELO silpixa00391954.ger.corp.intel.com) ([10.237.223.32]) by fmsmga008.fm.intel.com with ESMTP; 15 Jan 2019 02:56:38 -0800 From: "Marjanovic,Nemanja" To: dev@dpdk.org Cc: jasvinder.singh@intel.com, cristian.dumitrescu@intel.com, "Marjanovic,Nemanja" Date: Tue, 15 Jan 2019 10:55:35 +0000 Message-Id: <20190115105535.8872-1-nemanja.marjanovic@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190114102310.25596-1-nemanja.marjanovic@intel.com> References: <20190114102310.25596-1-nemanja.marjanovic@intel.com> Subject: [dpdk-dev] [PATCH v3] ip_pipeline: add QinQ PPPoE encapsulation action X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2019 10:56:41 -0000 Add implementation of QinQ PPPoE packet encapsulation action. Signed-off-by: Nemanja Marjanovic --- v2:Fix changes from check patch v3:Changed to use internally defined ETHER_TYPE_PPPOE_SESSION macro --- examples/ip_pipeline/cli.c | 46 ++++++++++++++++++- lib/librte_pipeline/rte_table_action.c | 61 ++++++++++++++++++++++++++ lib/librte_pipeline/rte_table_action.h | 16 +++++++ 3 files changed, 121 insertions(+), 2 deletions(-) diff --git a/examples/ip_pipeline/cli.c b/examples/ip_pipeline/cli.c index 910386282..dd05393ef 100644 --- a/examples/ip_pipeline/cli.c +++ b/examples/ip_pipeline/cli.c @@ -1022,7 +1022,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" @@ -1290,7 +1290,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; } @@ -3090,6 +3093,7 @@ parse_match(char **tokens, * ether * | vlan * | qinq + * | qinq_pppoe * | mpls unicast | multicast * * label0