From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0058.outbound.protection.outlook.com [104.47.0.58]) by dpdk.org (Postfix) with ESMTP id 4E0761B8A3 for ; Thu, 10 May 2018 06:39:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=XhoXeOFe+O4dnKyWau0UiqvnHp+4axLS90OUTglOwvg=; b=sOjEoBGH+zkHxOD+zwOuMj/+CDRT6XcMgvUb3W8GhUPAoI2VAvebSkrf3Gkg7C43VxOnUuj5n91BMgfMOguS11mEGLUq8A7XytfVKqzNYxQ9hGqW7cWx2QR3tYmalGpi/Dh9vtLwLNeU0Qx++H6PkCW8M2NxFSb9giRmvziNTG8= Received: from DB7PR05MB4426.eurprd05.prod.outlook.com (52.134.109.15) by DB7PR05MB4507.eurprd05.prod.outlook.com (52.134.109.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.755.16; Thu, 10 May 2018 04:39:21 +0000 Received: from DB7PR05MB4426.eurprd05.prod.outlook.com ([fe80::f116:5be4:ba29:fed8]) by DB7PR05MB4426.eurprd05.prod.outlook.com ([fe80::f116:5be4:ba29:fed8%13]) with mapi id 15.20.0735.021; Thu, 10 May 2018 04:39:21 +0000 From: Shahaf Shuler To: Ferruh Yigit , Wenzhuo Lu , Jingjing Wu CC: "dev@dpdk.org" , Wei Dai , Qi Zhang Thread-Topic: [PATCH] app/testpmd: check if CRC strip offload supported Thread-Index: AQHT5+JiXZDLxCSRdUyrjC9EGNh7MKQoYZxA Date: Thu, 10 May 2018 04:39:20 +0000 Message-ID: References: <20180509220904.128983-1-ferruh.yigit@intel.com> In-Reply-To: <20180509220904.128983-1-ferruh.yigit@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; x-originating-ip: [31.154.10.105] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB7PR05MB4507; 7:CIk4rg1u0HcuAH3kqlNRGYFIupB3Dc6j4qvub4QPl6atup6U347H9X36TXkD14xpQq7PSaDEB5TV4CR77B5S8WZX66CpSXTRvjr0d37umAbKIshFvs+RQCdHFdzbMfay8krCmbma8i1c28RGDhMtSl2NOC9wOe41i7foEgTJ4bpN6Vp6LmHNUHUabY6FtQaqJIwR7gGxjgo9Mt3uSLzldzD/HFdRaixBK5onYIyCrEsaSiERemJObI80mbIJondT x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(48565401081)(2017052603328)(7153060)(7193020); SRVR:DB7PR05MB4507; x-ms-traffictypediagnostic: DB7PR05MB4507: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(228905959029699); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(3231254)(944501410)(52105095)(93006095)(93001095)(3002001)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123564045)(20161123558120)(6072148)(201708071742011); SRVR:DB7PR05MB4507; BCL:0; PCL:0; RULEID:; SRVR:DB7PR05MB4507; x-forefront-prvs: 066898046A x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39380400002)(366004)(396003)(39860400002)(346002)(376002)(199004)(189003)(2900100001)(2906002)(316002)(5660300001)(3280700002)(229853002)(6436002)(33656002)(3660700001)(8676002)(8936002)(68736007)(81156014)(66066001)(81166006)(4326008)(6116002)(53936002)(9686003)(55016002)(6246003)(3846002)(105586002)(106356001)(7736002)(74316002)(486006)(305945005)(6506007)(446003)(11346002)(476003)(76176011)(97736004)(7696005)(5250100002)(14454004)(86362001)(26005)(102836004)(25786009)(110136005)(478600001)(54906003)(99286004)(186003); DIR:OUT; SFP:1101; SCL:1; SRVR:DB7PR05MB4507; H:DB7PR05MB4426.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 5z3tAwvXfFBUHK6OYpWJOJjbw4ECirfd86e0+s3KyDaXZK9PdJ8W9/7uvA/2rNSoZwx16IpQJcGgpEGgZQAhYpnF2eFAS80wIk4unCv0/Zdf8X1uu6oQCtLOKoyKgZIWg20lhAiDVjQ4UtwPeMjf77o2qzQD1LU8+QWutu39F65DsBvmlNjP0uhYMKOLJy09 spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 2d0ae782-8fba-4482-5210-08d5b62fffa0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2d0ae782-8fba-4482-5210-08d5b62fffa0 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 May 2018 04:39:20.9801 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR05MB4507 Subject: Re: [dpdk-dev] [PATCH] app/testpmd: check if CRC strip offload supported 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: Thu, 10 May 2018 04:39:23 -0000 Thursday, May 10, 2018 1:09 AM, Ferruh Yigit: > Subject: [PATCH] app/testpmd: check if CRC strip offload supported >=20 > Testpmd set CRC_STRIP offload blindly, this is wrong according offload AP= I > definition, and will cause error for the PMDs that doesn't support CRC_ST= RIP > like virtual PMDs. >=20 > Check if underlying device report this capability and don't set it if not > supported. >=20 > Fixes: 0074d02fca21 ("app/testpmd: convert to new Rx offloads API") > Cc: shahafs@mellanox.com >=20 > Signed-off-by: Ferruh Yigit Yes this is the correct behavior. I hope all the PMDs report the CRC strip = correctly.=20 Acked-by: Shahaf Shuler < shahafs@mellanox.com> > --- > Cc: Wei Dai > Cc: Qi Zhang > --- > app/test-pmd/testpmd.c | 5 +++++ > 1 file changed, 5 insertions(+) >=20 > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index > db23f23e5..1938283f6 100644 > --- a/app/test-pmd/testpmd.c > +++ b/app/test-pmd/testpmd.c > @@ -701,6 +701,11 @@ init_config(void) > port->dev_conf.txmode =3D tx_mode; > port->dev_conf.rxmode =3D rx_mode; > rte_eth_dev_info_get(pid, &port->dev_info); > + > + if (!(port->dev_info.rx_offload_capa & > + DEV_RX_OFFLOAD_CRC_STRIP)) > + port->dev_conf.rxmode.offloads &=3D > + ~DEV_RX_OFFLOAD_CRC_STRIP; > if (!(port->dev_info.tx_offload_capa & > DEV_TX_OFFLOAD_MBUF_FAST_FREE)) > port->dev_conf.txmode.offloads &=3D > -- > 2.14.3