From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3C7BFA3160 for ; Thu, 10 Oct 2019 06:17:39 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 73B281E8DD; Thu, 10 Oct 2019 06:17:38 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id B94801C234 for ; Thu, 10 Oct 2019 06:17:36 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x9A4AJMs022419; Wed, 9 Oct 2019 21:17:35 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=pfpt0818; bh=e4UFCOwwVD2rJzTfSSfEIWc0diEw1tfPMHTnZ4u6GjE=; b=aCHOaZ+HBkSthiGvfbhuySsi9Jb8SZhfDDRNNBBVutLu6VCFM8VMaOBBcMqN+w3+PdHg niIe5+JAxDtNEUjhTVN2XpazmlNwsD+78Px0BH/Gn00jHO/yTrp3ZX65zMPwOwWPtzd8 10mt+Lba6dcwYkqhrXh6og4GriiTGJZQmskFpLOuLDlZN6Y3P7G8AZhyLY/EtS87JQmI /bzt+PPdKaabXihDdfeHf+XEnm8xVhMBdhgVM5bLHGt/JS8e9htAJiSGiGd/xzcUv974 5FPKO0h9vIvSy4GpyTi5pPSHc9cT5zCT2Co624fH80X6mRBA9tRZG2MvXoA13WD00i62 zw== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0a-0016f401.pphosted.com with ESMTP id 2vh5rqn9y3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 09 Oct 2019 21:17:35 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 9 Oct 2019 21:17:34 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Wed, 9 Oct 2019 21:17:34 -0700 Received: from dell-e5540.caveonetworks.com (unknown [10.29.16.81]) by maili.marvell.com (Postfix) with ESMTP id DA7493F703F; Wed, 9 Oct 2019 21:17:30 -0700 (PDT) From: To: CC: , , Vivek Sharma Date: Thu, 10 Oct 2019 09:47:25 +0530 Message-ID: <1570681045-1257-1-git-send-email-viveksharma@marvell.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,1.0.8 definitions=2019-10-10_01:2019-10-08,2019-10-10 signatures=0 Subject: [dpdk-dev] [PATCH] app/testpmd: introduce QinQ offload argument 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Vivek Sharma Introduce boot time argument for configuring QinQ strip offload. Fix port info display to distinguish between qinq strip and extend offloads. Signed-off-by: Vivek Sharma --- app/test-pmd/config.c | 9 +++++++-- app/test-pmd/parameters.c | 6 ++++++ doc/guides/testpmd_app_ug/run_app.rst | 4 ++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 24158e5..85848c3 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -534,9 +534,14 @@ port_infos_display(portid_t port_id) printf(" filter off \n"); if (vlan_offload & ETH_VLAN_EXTEND_OFFLOAD) - printf(" qinq(extend) on \n"); + printf(" extend on\n"); else - printf(" qinq(extend) off \n"); + printf(" extend off\n"); + + if (vlan_offload & ETH_QINQ_STRIP_OFFLOAD) + printf(" qinq strip on\n"); + else + printf(" qinq strip off\n"); } if (dev_info.hash_key_size > 0) diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c index 6c78dca..6885eed 100644 --- a/app/test-pmd/parameters.c +++ b/app/test-pmd/parameters.c @@ -135,6 +135,7 @@ usage(char* progname) printf(" --enable-hw-vlan-filter: enable hardware vlan filter.\n"); printf(" --enable-hw-vlan-strip: enable hardware vlan strip.\n"); printf(" --enable-hw-vlan-extend: enable hardware vlan extend.\n"); + printf(" --enable-hw-qinq-strip: enable hardware qinq strip.\n"); printf(" --enable-drop-en: enable per queue packet drop.\n"); printf(" --disable-rss: disable rss.\n"); printf(" --port-topology=N: set port topology (N: paired (default) or " @@ -608,6 +609,7 @@ launch_args_parse(int argc, char** argv) { "enable-hw-vlan-filter", 0, 0, 0 }, { "enable-hw-vlan-strip", 0, 0, 0 }, { "enable-hw-vlan-extend", 0, 0, 0 }, + { "enable-hw-qinq-strip", 0, 0, 0 }, { "enable-drop-en", 0, 0, 0 }, { "disable-rss", 0, 0, 0 }, { "port-topology", 1, 0, 0 }, @@ -995,6 +997,10 @@ launch_args_parse(int argc, char** argv) "enable-hw-vlan-extend")) rx_offloads |= DEV_RX_OFFLOAD_VLAN_EXTEND; + if (!strcmp(lgopts[opt_idx].name, + "enable-hw-qinq-strip")) + rx_offloads |= DEV_RX_OFFLOAD_QINQ_STRIP; + if (!strcmp(lgopts[opt_idx].name, "enable-drop-en")) rx_drop_en = 1; diff --git a/doc/guides/testpmd_app_ug/run_app.rst b/doc/guides/testpmd_app_ug/run_app.rst index d0d89b3..9723cf5 100644 --- a/doc/guides/testpmd_app_ug/run_app.rst +++ b/doc/guides/testpmd_app_ug/run_app.rst @@ -198,6 +198,10 @@ The command line options are: Enable hardware VLAN extend. +* ``--enable-hw-qinq-strip`` + + Enable hardware QINQ strip. + * ``--enable-drop-en`` Enable per-queue packet drop for packets with no descriptors. -- 2.7.4