From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50056.outbound.protection.outlook.com [40.107.5.56]) by dpdk.org (Postfix) with ESMTP id 4E2FE231E for ; Tue, 4 Sep 2018 07:13:33 +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:X-MS-Exchange-SenderADCheck; bh=vPaDfTclRe99HfTqok83Dzypj0OYp+nrNBZeqOBZ/9M=; b=JifhmxX8CCSfIwmJPGv8jcr0cCywzHVWG3Eml0NAWL+UTNTcOkPsSksuhCZJ8frkRu8nFHN7R2ZKyF0pyGbjWG9+ZzeGfZE+0zgFoIF4La6jiETI4nCh98gdx9H0Yt9wShMLSvAXtrEsPx7VVsotXlEA6AhqdZJ3Yxq4ZrW9tok= Received: from DB7PR05MB4426.eurprd05.prod.outlook.com (52.134.109.15) by DB7PR05MB4172.eurprd05.prod.outlook.com (52.134.107.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1080.17; Tue, 4 Sep 2018 05:13:29 +0000 Received: from DB7PR05MB4426.eurprd05.prod.outlook.com ([fe80::c8e7:d9c1:5054:693b]) by DB7PR05MB4426.eurprd05.prod.outlook.com ([fe80::c8e7:d9c1:5054:693b%6]) with mapi id 15.20.1101.016; Tue, 4 Sep 2018 05:13:29 +0000 From: Shahaf Shuler To: Ferruh Yigit , Jerin Jacob , Wenzhuo Lu , Jingjing Wu , Bernard Iremonger , John McNamara , Marko Kovacevic , Qi Zhang , Xiao Wang , Neil Horman , Remy Horton , Ori Kam , Bruce Richardson , Pablo de Lara , Radu Nicolau , Akhil Goyal , Tomasz Kantecki , "John W. Linville" , Allain Legacy , Matt Peters , Ravi Kumar , Ajit Khaparde , Somnath Kotur , Rahul Lakkireddy , Hemant Agrawal , Shreyansh Jain , John Daley , Hyong Youb Kim , Gaetan Rivet , Beilei Xing , Konstantin Ananyev , Matan Azrad , Yongseok Koh , Tomasz Duszynski , Dmitri Epshtein , Natalie Samsonov , Stephen Hemminger , kys , haiyangz , Alejandro Lucero , Tetsuya Mukawa , Santosh Shukla , Rasesh Mody , Harish Patil , Shahed Shaikh , Andrew Rybchenko , Jasvinder Singh , Cristian Dumitrescu , Jan Remes , Keith Wiles , Maciej Czekaj , Maxime Coquelin , Tiwei Bie , Zhihong Wang , Yong Wang , Amr Mokhtar , Declan Doherty , Chas Williams , David Hunt , Anatoly Burakov , Harry van Haaren , Xiaoyun Li , Thomas Monjalon CC: "dev@dpdk.org" Thread-Topic: [PATCH] ethdev: make default behavior CRC strip on Rx Thread-Index: AQHUQ4xqFykpMwLPwEGp5kZuL+7MSaTfk4vw Date: Tue, 4 Sep 2018 05:13:28 +0000 Message-ID: References: <20180903144501.31373-1-ferruh.yigit@intel.com> In-Reply-To: <20180903144501.31373-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; DB7PR05MB4172; 6:XiKrKF3ekjhayHzr5+Ar9QvXjt0aFrVduV8Fxp9dV/+OGychd74SqLsndoZwOMIJDaHn6jIhVMEs4WhAwQuyEGvxDUFKda6r6Jdh91IhBto59Uo7n0dNM2b8iRzrZNWXVajE4L8b91c4HUK0ifWhOy5d/IxwvpssXy/FfNbzEzS9qnjvwQiqqo9weTp5ny+tsTI2tRzfpRRZsxhx0aP/XHAfK54AeVQtVx7J21KEjpDfubRbfMvaZuoaux2egbqr8fbDV3nCy07z2KPzkZ60Ri4NwRFEzb01V2+whWESfVAtwac2TxeGzqIgGvJn1mAqpj6kVh+iOlfruYBeDVcHWesFxBqhmj/MroD/H3vDSNtkBhY5/9TMGh3OhekLT/K4m4iIaCiq2VePd8xbjaPJQZS974EqKuNjh9YG7VGyYC7tOpc3FbkJA+C6kvi65r93XRLN0ywFfdLvd6Rs2OVHZg==; 5:T3c+rJtiePwHv0YMOzHPPYC+VoMM5MLUQ1Rt+90PM4NIPqOgJAK9ILL974iEdPH560Ju1VDW8mSvnanFFiTDhktmx879upQleZncXZaPjCGuTbwk+6ysnFio9RAsaJE6F3+bBalEzOKg6DpEuvQmfeinotbVT+CgCXldy8KAAPY=; 7:VOjTSuq4Wzb+niEpC4bosYChSO4N+ssJsbqL1Xbe9+2cuOEtr+Tk4xK7sckttTXS4yavxhIjfjozX32ASn+jS4sI3njW2zQlR7Pnw4AAg60riehgUmFOPVX++ub9L03ouzU27Cb4LB1fqfS9JPOy4eq2r0QBTcSqO6kRYw9jNGaH5uV9spq3Lw1VxmDpWpjVp9KqjTVGCZearcl+kdSxTMwmSViBuqzXWTamz/xcJFeyp6NZLMqG7J+n7KbcNnda x-ms-office365-filtering-correlation-id: 5cd42f54-9bcd-4668-2361-08d6122526aa x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:DB7PR05MB4172; x-ms-traffictypediagnostic: DB7PR05MB4172: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(278428928389397)(228905959029699); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(823301075)(10201501046)(93006095)(93001095)(3231311)(944501410)(52105095)(3002001)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123560045)(20161123564045)(20161123562045)(201708071742011)(7699016); SRVR:DB7PR05MB4172; BCL:0; PCL:0; RULEID:; SRVR:DB7PR05MB4172; x-forefront-prvs: 0785459C39 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(346002)(366004)(376002)(39860400002)(396003)(189003)(199004)(316002)(1191002)(6436002)(53936002)(9686003)(55016002)(76176011)(99286004)(25786009)(14454004)(7416002)(4326008)(5250100002)(7366002)(7406005)(97736004)(33656002)(2906002)(39060400002)(110136005)(256004)(478600001)(229853002)(5660300001)(2900100001)(6506007)(186003)(3846002)(6116002)(1511001)(6246003)(68736007)(26005)(8676002)(11346002)(102836004)(446003)(7696005)(476003)(8936002)(81156014)(86362001)(66066001)(105586002)(74316002)(106356001)(7736002)(305945005)(486006)(81166006)(83323001)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:DB7PR05MB4172; H:DB7PR05MB4426.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: DB3F4ORDsQHLWHqYEFvqt+cTBlKA3VR2inZprEO8GA9ydsHG2um3AiVd+KadoUzghBoMxImlVypqZ++Ml4yj1kCpoDk0eqkX12EDh02I0wsC5RJYDBg7voyI9CGxFnyNmdf+EukaTRB1i5YAR16UoD4Uhk3rsaOU0aggFSwoejTE39HaDo+LDD+t5tNT1wcgeYlRMQS/fJquObyKLw9S2cKs3e1NCp2htAqB7SCooXQAMqMlw0BltACr3uIdsuJGUY/vBkx9HnMmDZXOqvwl9eke949Z6lRknAbIQcMzI352dW9WZL8eLa9ckQqFgs9ukPi0qp0NaiZ8U4ShWpXD9pLQjfpGQtNAamDS06N/JQI= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5cd42f54-9bcd-4668-2361-08d6122526aa X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Sep 2018 05:13:28.6755 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR05MB4172 X-Mailman-Approved-At: Tue, 04 Sep 2018 13:41:08 +0200 Subject: Re: [dpdk-dev] [PATCH] ethdev: make default behavior CRC strip on Rx 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: Tue, 04 Sep 2018 05:13:34 -0000 Hi Ferruh,=20 Monday, September 3, 2018 5:45 PM, Ferruh Yigit: > Subject: [PATCH] ethdev: make default behavior CRC strip on Rx >=20 > Removed DEV_RX_OFFLOAD_CRC_STRIP offload flag. > Without any specific Rx offload flag, default behavior by PMDs is to > strip CRC. >=20 > PMDs that support keeping CRC should advertise > DEV_RX_OFFLOAD_KEEP_CRC > Rx offload capability. >=20 > Applications that require keeping CRC should check PMD capability first > and if it is supported can enable this feature by setting > DEV_RX_OFFLOAD_KEEP_CRC in Rx offload flag in rte_eth_dev_configure() >=20 > Signed-off-by: Ferruh Yigit [...] > diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c > index 1f7bfd441..718f4b1d9 100644 > --- a/drivers/net/mlx5/mlx5_rxq.c > +++ b/drivers/net/mlx5/mlx5_rxq.c > @@ -388,7 +388,6 @@ mlx5_get_rx_queue_offloads(struct rte_eth_dev > *dev) > DEV_RX_OFFLOAD_TIMESTAMP | > DEV_RX_OFFLOAD_JUMBO_FRAME); >=20 > - offloads |=3D DEV_RX_OFFLOAD_CRC_STRIP; > if (config->hw_fcs_strip) > offloads |=3D DEV_RX_OFFLOAD_KEEP_CRC; >=20 > @@ -1438,7 +1437,7 @@ mlx5_rxq_new(struct rte_eth_dev *dev, uint16_t > idx, uint16_t desc, > tmpl->rxq.vlan_strip =3D !!(offloads & > DEV_RX_OFFLOAD_VLAN_STRIP); > /* By default, FCS (CRC) is stripped by hardware. */ > tmpl->rxq.crc_present =3D 0; > - if (rte_eth_dev_must_keep_crc(offloads)) { > + if (offloads | DEV_RX_OFFLOAD_KEEP_CRC) { I don't understand this logic, and it exists on many other location in the = patch. Shouldn't it be (offloads & DEV_RX_OFFLOAD_KEEP_CRC) ?=20 > if (config->hw_fcs_strip) { > tmpl->rxq.crc_present =3D 1; > } else { Also I think the CRC offload should have an entry on the port caps printed = by testpmt "show port caps 0" (see port_offload_cap_display()).=20