From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0084.outbound.protection.outlook.com [104.47.0.84]) by dpdk.org (Postfix) with ESMTP id 39DCC2C18; Thu, 3 May 2018 07:47:11 +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=4eg/E8K4/pnhdya5wYLRpVLcYx0Z/Nb+J2R/G/mFYfo=; b=pJkt7c/ZNdvM6lKSpajg88t+wTD6BqwQKavEnd0ZfAbP3GDG8T4lJKrFaq8GcjlMr0mBNohGTZzgRe0WQH60T8wWvfNwnarwPgX44GMnLMrG0B7Fj2ktVPXLAq69gYEFYHcpW/Btrhe7txO1lVJDnbsNtXWSSvKzw9bTHMyMpMQ= Received: from DB7PR05MB4426.eurprd05.prod.outlook.com (52.134.109.15) by DB7SPR01MB3.eurprd05.prod.outlook.com (52.134.105.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.735.16; Thu, 3 May 2018 05:47:09 +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.0715.024; Thu, 3 May 2018 05:47:09 +0000 From: Shahaf Shuler To: Ophir Munk , Adrien Mazarguil , "dev@dpdk.org" CC: Thomas Monjalon , Olga Shern , Ophir Munk , "stable@dpdk.org" Thread-Topic: [dpdk-stable] [PATCH v1] net/mlx4: fix CRC stripping capability report Thread-Index: AQHT4H5PUMA47CJZqkyQjM/12o6UvaQdgdWw Date: Thu, 3 May 2018 05:47:09 +0000 Message-ID: References: <1525091101-10782-1-git-send-email-ophirmu@mellanox.com> In-Reply-To: <1525091101-10782-1-git-send-email-ophirmu@mellanox.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: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB7SPR01MB3; 7:axyFANNvcvVnCCwdMgkFpNMe7ZKYBjxa1gcqNWZghlSJSZ8uxnJsvMonmoDB73G5A7u5BE/WoUDfsRpw042t7g2DWxhLuylmmgxk2v9KZXZBCE9BaCerM+Y6/XW4zC8Z/6jhjv5ixvyjij127IQ36OX4w/GRaUtlkH7Y6j68sjRnb3ybk05tPTxcKtmdHkLxecokR6JUMJyVvVkFKboVIKcklXX695UVdXkMbBK5xeUlGbxIHu2uW2OsUGfpBEyZ x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(2017052603328)(7153060)(7193020); SRVR:DB7SPR01MB3; x-ms-traffictypediagnostic: DB7SPR01MB3: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(10201501046)(3231254)(944501410)(52105095)(93006095)(93001095)(6055026)(6041310)(20161123558120)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(6072148)(201708071742011); SRVR:DB7SPR01MB3; BCL:0; PCL:0; RULEID:; SRVR:DB7SPR01MB3; x-forefront-prvs: 066153096A x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(39860400002)(396003)(346002)(366004)(39380400002)(199004)(189003)(76176011)(9686003)(6246003)(55016002)(74316002)(110136005)(54906003)(11346002)(2906002)(2900100001)(476003)(478600001)(446003)(53936002)(6436002)(81156014)(6506007)(81166006)(486006)(33656002)(97736004)(26005)(305945005)(3660700001)(25786009)(3280700002)(8936002)(6116002)(106356001)(105586002)(86362001)(99286004)(3846002)(7696005)(229853002)(14454004)(5660300001)(102836004)(316002)(59450400001)(2501003)(66066001)(7736002)(4326008)(68736007)(5250100002)(21314002)(168613001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB7SPR01MB3; 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: 5otj5vdfIYyQX+eE6WcCZpvVU+/Fyb0nBIcItrOshfTCURLDMuuP6rzZ0Dv/uwFQar+KUb94KYHFpsYuTNBOg38FzpDA73DBVhr+KNtTtU7PtknWfOOcNZcR4N1sJYG33jM6M22FJpqzLioMwHa2eQO2L48Z53xirvJ8ZmIwoElLIMTBGI+O9EL+qMfves6j 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: b87b7ae2-ae80-45cb-14c5-08d5b0b94fac X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: b87b7ae2-ae80-45cb-14c5-08d5b0b94fac X-MS-Exchange-CrossTenant-originalarrivaltime: 03 May 2018 05:47:09.3815 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7SPR01MB3 Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH v1] net/mlx4: fix CRC stripping capability report 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, 03 May 2018 05:47:11 -0000 Hi Ophir, Monday, April 30, 2018 3:25 PM, Ophir Munk: > stable@dpdk.org > Subject: [dpdk-stable] [PATCH v1] net/mlx4: fix CRC stripping capability > report >=20 > There are two capabilities related to CRC stripping: > 1. mlx4 HW capability to perform CRC stripping on a recieved packet. > This capability is built in mlx4 HW. It should be returned by the API cal= l > mlx4_get_rx_queue_offloads(). > 2. mlx4 driver capability to enable/disable HW CRC stripping. This capabi= lity is > dependent on the driver version. > Before this commit the seccond capability was falsely returned by the > mentioned API. This commit fixes it by returning the first capability. >=20 In this fix I also expect documentation update to say it is not possible to= toggle CRC with OFED/rdma-core version less than XXX. Because before this patch: "if CRC offload is set application can set/disable the CRC strip. Otherwise= it is always to strip" With this patch: "if ofed/rdma-core version is > XXX application can disable CRC strip. Othe= rwise it is always to strip" > Fixes: de1df14e6e6ec ("net/mlx4: support CRC strip toggling") > Cc: stable@dpdk.org >=20 > Signed-off-by: Ophir Munk > --- > drivers/net/mlx4/mlx4_rxq.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) >=20 > diff --git a/drivers/net/mlx4/mlx4_rxq.c b/drivers/net/mlx4/mlx4_rxq.c > index b430678..88e5912 100644 > --- a/drivers/net/mlx4/mlx4_rxq.c > +++ b/drivers/net/mlx4/mlx4_rxq.c > @@ -658,10 +658,9 @@ mlx4_rxq_detach(struct rxq *rxq) uint64_t > mlx4_get_rx_queue_offloads(struct priv *priv) { > - uint64_t offloads =3D DEV_RX_OFFLOAD_SCATTER; > + uint64_t offloads =3D DEV_RX_OFFLOAD_SCATTER | > + DEV_RX_OFFLOAD_CRC_STRIP; >=20 > - if (priv->hw_fcs_strip) > - offloads |=3D DEV_RX_OFFLOAD_CRC_STRIP; > if (priv->hw_csum) > offloads |=3D DEV_RX_OFFLOAD_CHECKSUM; > return offloads; > -- > 2.7.4