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 0B1F7A04B6; Sun, 11 Oct 2020 09:22:29 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6628A1D425; Sun, 11 Oct 2020 09:22:28 +0200 (CEST) Received: from hqnvemgate26.nvidia.com (hqnvemgate26.nvidia.com [216.228.121.65]) by dpdk.org (Postfix) with ESMTP id 129D91D423 for ; Sun, 11 Oct 2020 09:22:26 +0200 (CEST) Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Sun, 11 Oct 2020 00:22:12 -0700 Received: from HQMAIL109.nvidia.com (172.20.187.15) by HQMAIL105.nvidia.com (172.20.187.12) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Sun, 11 Oct 2020 07:22:18 +0000 Received: from NAM02-CY1-obe.outbound.protection.outlook.com (104.47.37.55) by HQMAIL109.nvidia.com (172.20.187.15) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Sun, 11 Oct 2020 07:22:18 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SEw7PAz2GZmp5sbal7rzBfVNbN1Vvo1ocknNZYjqgyDjT1E6R+A0ZCkpkzb+506V4ATc49xjryf8BXeTqJYoyuchZJqMjdj1R76YqhTwHGwXhCj8PssadSGS642q8/CjuGgGr43m7U6jPrW6UJsWVPmm5dhsSBmM70fzQJPLLE6OIWf7QauYKPx2HzyjlXPESbXNfbsNcXY+zGdoCX3BCa4xPC0XWPQnMfvqLzjzNKrXR1QS70K7QE6uHDPvFKXvxSUbs3beAM7/NG16eeWjbvHDuPxFWUQOjksSdRLLDMwU1aJUycOhuKUbh9D5JUs3wXGq11qPfV1dihCcLJ2VqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Kl/boLUHJbpYxKNbPF25nxznsq9F9kub6/QnX2XyVqQ=; b=bvkCRH0Pp6o4zKi6Dxw6uERMYRegH4qj5PYgb0GSKwPlVN+/GPR5Oloe95xRI1oNl0zB3u+h/jXI/x9Y61ONET3UOB1UH9PbA6zGE+jGM81MEoxrvnyORL3FsAzGEXRkb0Ww8L0/18cSU/rw5sFDRkVb9yBSEysuk94uKtvtYA5WEicIuIQ/ncgMT3LRfNKPFFCc9lb8BJKTtn3sIx5gtQmo6Vz5L7kAbsRFIblBX/VTSnb39FIsMnZICq4jPId1kWUT74/J3FY9ShnOucvYuNmS5goaiX+u4fvf5iQeBC8pU3NcyHQUn7uvIQ01ZU3BqajEyCEEdrLxoNHT0FXSwg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none Received: from DM5PR12MB2406.namprd12.prod.outlook.com (2603:10b6:4:b7::23) by DM6PR12MB3244.namprd12.prod.outlook.com (2603:10b6:5:18c::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.29; Sun, 11 Oct 2020 07:22:16 +0000 Received: from DM5PR12MB2406.namprd12.prod.outlook.com ([fe80::c806:9c0b:4af5:a686]) by DM5PR12MB2406.namprd12.prod.outlook.com ([fe80::c806:9c0b:4af5:a686%6]) with mapi id 15.20.3455.029; Sun, 11 Oct 2020 07:22:16 +0000 From: Asaf Penso To: "nipun.gupta@nxp.com" , "dev@dpdk.org" CC: NBU-Contact-Thomas Monjalon , "ferruh.yigit@intel.com" , "arybchenko@solarflare.com" , "hemant.agrawal@nxp.com" , "sachin.saxena@nxp.com" , "rohit.raj@nxp.com" , "jerinjacobk@gmail.com" , "stephen@networkplumber.org" Thread-Topic: [PATCH 3/3 v3] app/testpmd: support hardware offload to drop error packets Thread-Index: AQHWnj4NUcuzq4sDK0KhVWyMkAU1pKmSAeEQ Date: Sun, 11 Oct 2020 07:22:16 +0000 Message-ID: References: <20200831075333.10135-1-nipun.gupta@nxp.com> <20201009131331.5897-1-nipun.gupta@nxp.com> <20201009131331.5897-3-nipun.gupta@nxp.com> In-Reply-To: <20201009131331.5897-3-nipun.gupta@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [217.111.27.204] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b68ca289-e30b-4567-26b2-08d86db66214 x-ms-traffictypediagnostic: DM6PR12MB3244: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2958; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: hkRK8GNS4YzvEugg8MhbqZJN8spQD42rE4ptypV8Oje9xVODLJPS4EZ9TWtFV6wGsDOEoqw4J46mb9MXHVsFPK7kr3HEPLiWPc2mSXezJ45fs1qlT0zcktfPaPcyS8kiqdQpP3s38m7Z3X8HPlDBnLy++Eo9qrkqXwIvkq+Qd4LzSfq9zm0Hfpv0yDg6x0iarBOF/Jo1vIul9W+xx2Mxl0Xn9zsRL1go3tY3nMKOR44ZNZv/VeYRBaYPqh6m67dzLpEpnDuQZqoriD299AMMDPbsxRb0RthN0EkxOTCZdIPosel+wYVFSrbW31Zzi4yOpMNJ8+tWfcCfzN0jE2rYsA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR12MB2406.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(136003)(366004)(376002)(39850400004)(396003)(71200400001)(76116006)(66946007)(55016002)(8676002)(66476007)(66556008)(64756008)(66446008)(26005)(9686003)(8936002)(33656002)(5660300002)(110136005)(83380400001)(316002)(4326008)(55236004)(54906003)(52536014)(7696005)(7416002)(478600001)(2906002)(186003)(6506007)(86362001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: eB2za8y3WTdgAgqhmiJjE0Eib9OPuoFaP6dCOo0vOJKG2i/fNzZQ6fiqWmWNcDku98dwOiw2eNbehoi4L77lXiVxz8pdzmkyLsaAW61Xxnay4Uq4VV6kejWYu2KtMM0pB0fw1G+H557Riy1ifJag27O/h6NITVXJjWSqsDe1Bs9XeIG+dRIpd+KkgcIVfDm6hR29TXTupP2Jg2toeWfEZw+MLJWx1OU8TJox274hwtE43ifB4EI4oYnY/5U7nttfyL8BUuFoBw+IBLQnKlcESvTnhzzbnWN0pJ+HxRe2Q4+Y//XriyxwLq24DrjhpTAzINVaeXMOcuAzcyiOwsU7qyG39bjab36WbQh2vG8ceQi6oxnRp+5AXBaw1wbr7/AV2rgYxb0OHXL7hzGiJrf92OltDppRdMWop2Mh/UHsuHTwCt6qCIf1Nob49bg8J2BUduxNo8m6O9owFEnmzfe0RQa2WP49o4E5kNFSnExIrHOMlB1xua4d5zurOBacfn9goSe91n2wwsfoaljIsPnRqgTZRDwfh6UoSJ29dB8TVy7qjKutFbwvhB8I5Fcj30eXNhmrhgd8oO/w5GRS6Jj/25TS3xYPQ33oKX1FiRkJdlk+l9mMerULWXqgEEztpbPbnU3/3c+XfxSBHjzzY+ccVw== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM5PR12MB2406.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b68ca289-e30b-4567-26b2-08d86db66214 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Oct 2020 07:22:16.8839 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: gX4FCe+tF6zXRT52zC95DJY1gTt0azeDFYwob1zi6fbYUb/oEjaFOKGL8+nqBnzg7OqiVK4aPxBcnNTO39JH4g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3244 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1602400932; bh=Kl/boLUHJbpYxKNbPF25nxznsq9F9kub6/QnX2XyVqQ=; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To: CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References: In-Reply-To:Accept-Language:Content-Language:X-MS-Has-Attach: X-MS-TNEF-Correlator:authentication-results:x-originating-ip: x-ms-publictraffictype:x-ms-office365-filtering-correlation-id: x-ms-traffictypediagnostic:x-ld-processed: x-microsoft-antispam-prvs:x-ms-oob-tlc-oobclassifiers: x-ms-exchange-senderadcheck:x-microsoft-antispam: x-microsoft-antispam-message-info:x-forefront-antispam-report: x-ms-exchange-antispam-messagedata:x-ms-exchange-transport-forked: Content-Type:Content-Transfer-Encoding:MIME-Version: X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-AuthSource: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-originalarrivaltime: X-MS-Exchange-CrossTenant-fromentityheader: X-MS-Exchange-CrossTenant-id:X-MS-Exchange-CrossTenant-mailboxtype: X-MS-Exchange-CrossTenant-userprincipalname: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg; b=Lle0y9s+2/JTwKx8Dedw64rEt8Kaqu/D/rC6SdgzIvzJGoJe3XtcnmVbB5odIeiL5 fPaTnmyT1PNB0IJpTkMWY2+SVcNh5OPZ8cqu+fvx9/4wuy7w7RMok4BMR9gE3eSC32 Bb1wDZw76GpecLKN1BUIuFL1kTuVV4HzP8Vxh6p3qdCGHE2lAIXqV5oipjzZaf0v6w /eKLei198hFSj1e2uLzFglAURxwHj2tIuBIYFcltCfrWlTLQ4zaDJUDRkrLlZStIl1 svRA04uOQ0W3PWJYV1cqGeAF3futRH10qwRnuqIRsUPvA5zTM9ojIXBsMx6IwiUKb1 eQePyj/+UUYFA== Subject: Re: [dpdk-dev] [PATCH 3/3 v3] app/testpmd: support hardware offload to drop error packets 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" Regards, Asaf Penso >-----Original Message----- >From: nipun.gupta@nxp.com >Sent: Friday, October 9, 2020 4:14 PM >To: dev@dpdk.org >Cc: NBU-Contact-Thomas Monjalon ; >ferruh.yigit@intel.com; arybchenko@solarflare.com; >hemant.agrawal@nxp.com; sachin.saxena@nxp.com; rohit.raj@nxp.com; >jerinjacobk@gmail.com; stephen@networkplumber.org; Asaf Penso >; Nipun Gupta >Subject: [PATCH 3/3 v3] app/testpmd: support hardware offload to drop erro= r >packets > >From: Nipun Gupta > >With DEV_RX_OFFLOAD_ERR_PKT_DROP now defined as an offload >capability, and separate DEV_RX_ERR_PKT_DROP_OFFLOAD_ALL capability to >drop all error packets in hardware, testpmd showcases this with a new adde= d >configuration option 'enable-hw-drop-err-all'. > >Signed-off-by: Nipun Gupta Reviewed-By: Asaf Penso >--- > app/test-pmd/parameters.c | 7 +++++++ > app/test-pmd/testpmd.c | 8 ++++++++ > app/test-pmd/testpmd.h | 1 + > doc/guides/testpmd_app_ug/run_app.rst | 4 ++++ > 4 files changed, 20 insertions(+) > >diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c index >1ead59579..508612426 100644 >--- a/app/test-pmd/parameters.c >+++ b/app/test-pmd/parameters.c >@@ -142,6 +142,7 @@ usage(char* progname) > 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-hw-drop-err-all: enable hardware packet drop for >+all error packets.\n"); > printf(" --enable-drop-en: enable per queue packet drop.\n"); > printf(" --disable-rss: disable rss.\n"); > printf(" --port-topology=3D: set port topology >(paired " >@@ -631,6 +632,7 @@ launch_args_parse(int argc, char** argv) > { "enable-hw-vlan-strip", 0, 0, 0 }, > { "enable-hw-vlan-extend", 0, 0, 0 }, > { "enable-hw-qinq-strip", 0, 0, 0 }, >+ { "enable-hw-drop-err-all", 0, 0, 0 }, > { "enable-drop-en", 0, 0, 0 }, > { "disable-rss", 0, 0, 0 }, > { "port-topology", 1, 0, 0 }, >@@ -1283,6 +1285,11 @@ launch_args_parse(int argc, char** argv) > rmv_interrupt =3D 0; > if (!strcmp(lgopts[opt_idx].name, "flow-isolate-all")) > flow_isolate_all =3D 1; >+ if (!strcmp(lgopts[opt_idx].name, >+ "enable-hw-drop-err-all")) { >+ rx_err_pkt_drop_all =3D 1; >+ } >+ > if (!strcmp(lgopts[opt_idx].name, "tx-offloads")) { > char *end =3D NULL; > n =3D strtoull(optarg, &end, 16); >diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index >ccba71c07..c9e7397e6 100644 >--- a/app/test-pmd/testpmd.c >+++ b/app/test-pmd/testpmd.c >@@ -359,6 +359,11 @@ uint8_t lsc_interrupt =3D 1; /* enabled by default */ > */ > uint8_t rmv_interrupt =3D 1; /* enabled by default */ > >+/* >+ * Drop all RX error packets on HW itself. >+ */ >+uint8_t rx_err_pkt_drop_all =3D 0; /* disabled by default */ >+ > uint8_t hot_plug =3D 0; /**< hotplug disabled by default. */ > > /* After attach, port setup is called on event or by iterator */ @@ -3359= ,6 >+3364,9 @@ init_port_config(void) > (rte_eth_devices[pid].data->dev_flags & > RTE_ETH_DEV_INTR_RMV)) > port->dev_conf.intr_conf.rmv =3D 1; >+ >+ if (rx_err_pkt_drop_all) >+ port->dev_conf.err_pkt_drop_conf.all =3D 1; > } > } > >diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index >c7e7e41a9..eab154ed4 100644 >--- a/app/test-pmd/testpmd.h >+++ b/app/test-pmd/testpmd.h >@@ -314,6 +314,7 @@ extern uint8_t no_device_start; /**device-start" parameter */ extern volatile int test_done; /* stop packet >forwarding when set to 1. */ extern uint8_t lsc_interrupt; /**< disabled = by "- >-no-lsc-interrupt" parameter */ extern uint8_t rmv_interrupt; /**< disabl= ed >by "--no-rmv-interrupt" parameter */ >+extern uint8_t rx_err_pkt_drop_all; /**< enabled by >+"--enable-hw-drop-err-all" parameter */ > extern uint32_t event_print_mask; > /**< set by "--print-event xxxx" and "--mask-event xxxx parameters */ >extern bool setup_on_probe_event; /**< disabled by port setup-on iterator >*/ diff --git a/doc/guides/testpmd_app_ug/run_app.rst >b/doc/guides/testpmd_app_ug/run_app.rst >index e2539f693..20f2f8083 100644 >--- a/doc/guides/testpmd_app_ug/run_app.rst >+++ b/doc/guides/testpmd_app_ug/run_app.rst >@@ -213,6 +213,10 @@ The command line options are: > > Enable hardware QINQ strip. > >+* ``--enable-hw-drop-err-all`` >+ >+ Enable hardware packet drop for any error packets >+ > * ``--enable-drop-en`` > > Enable per-queue packet drop for packets with no descriptors. >-- >2.17.1