From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 9B7CE2B9D for ; Fri, 18 Jan 2019 10:12:26 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jan 2019 01:12:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,489,1539673200"; d="scan'208";a="139342513" Received: from silpixa00391954.ir.intel.com (HELO silpixa00391954.ger.corp.intel.com) ([10.237.223.32]) by fmsmga001.fm.intel.com with ESMTP; 18 Jan 2019 01:12:24 -0800 From: Nemanja Marjanovic To: dev@dpdk.org Cc: jasvinder.singh@intel.com, cristian.dumitrescu@intel.com, "Nemanja Marjanovic" Date: Fri, 18 Jan 2019 09:12:21 +0000 Message-Id: <20190118091222.70534-3-nemanja.marjanovic@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190118091222.70534-1-nemanja.marjanovic@intel.com> References: <20190115105535.8872-1-nemanja.marjanovic@intel.com> <20190118091222.70534-1-nemanja.marjanovic@intel.com> Subject: [dpdk-dev] [PATCH v4 3/4] net/softnic: support QinQ PPPoE encap 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: Fri, 18 Jan 2019 09:12:27 -0000 From: "Nemanja Marjanovic" Add implementation of QinQ PPPoE packet encapsulation action. Signed-off-by: Nemanja Marjanovic --- v4:Added implementation of QinQ PPPoE packet encapsulation action. --- drivers/net/softnic/rte_eth_softnic_cli.c | 44 ++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/drivers/net/softnic/rte_eth_softnic_cli.c b/drivers/net/softnic/rte_eth_softnic_cli.c index 57b623377..c15b57b5b 100644 --- a/drivers/net/softnic/rte_eth_softnic_cli.c +++ b/drivers/net/softnic/rte_eth_softnic_cli.c @@ -1335,7 +1335,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] @@ -1612,10 +1612,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 */ @@ -3353,6 +3357,7 @@ parse_match(char **tokens, * ether * | vlan * | qinq + * | qinq_pppoe * | mpls unicast | multicast * * label0