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 00FD2A04AB; Wed, 6 Nov 2019 13:39:21 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 209B11C135; Wed, 6 Nov 2019 13:39:21 +0100 (CET) Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10063.outbound.protection.outlook.com [40.107.1.63]) by dpdk.org (Postfix) with ESMTP id 7725F1C10B for ; Wed, 6 Nov 2019 13:39:19 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FBkHP8Xau4AgA/AqondGSRnyyUYHK5CSrh6WGi0uMUsflDQjEtNEYeVveHgEbILFp3nCbeW0zkcM2yPdExnUvsQPL8VdP9c1iWSoH2IDfoiYOq5DrE1Slvl8aQpxuLbdtlg8IQuMaWHS9TjGAfkSJowXMkjRfu8gS6voPQ0LP0jZ8Pz+q5OpPZDOnQ05QTYohKMp/QQ/Ec2E3GQWdKwZixfCpgA3Rmqeoa7OVvnDPXhNM/w+N0ROaiK9b5MTDQf6dCZTrMh6a55H38H7mg4K4CzsevmmLsl5bCE7DKaRNBvCg2GXgmfL4VcqNl7RsAsPb09ATBa2H0fdVR7A1f3pCQ== 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=sXwqfERlbyIXQwMy/BJbr/5ANTXFOiZZUoWWR1nlgHE=; b=fuj5Unu4ig4zJUCkLNLvG+4MFQPyOQjLUy+YvmQZl1BSRQSi3Ns+f8F1CPIWOOTz5pBdUpbfBnN6PtFSn1np8hjP2ZV+YoCyAtrbAciahAZUUwipsoTMiWHUXrhLbWI7aGcXEurIqKbSHRE5ZDRvu05oIHYEWdmcElxubR0iPvZHk98OxXVaZ/WoHwTQ/qfSnycghK/vMDLYUC723Zonao1LWste97AjIYFbYNtUp3F9F8KSx3FeTS2OUKDbay+8M0wuYykKNjIbQXLvsc+wCxv+FnXx23+MiodOaWH3ytiV/5pzh2RofCeXsPK6Zki5hkq7NcJjW0GiMQNAxHVeOQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sXwqfERlbyIXQwMy/BJbr/5ANTXFOiZZUoWWR1nlgHE=; b=JsR/DqNOjlOOl92iYAd6g298dRSeSY/plCGNP2QH796+tGA/BRzRW0wsEd+GntfwniHn8OikShRCIAqknsS0sKxWfc5QOlLNCIcrIJ/TzTjWLhP9l9rajwODgvDvW5hR0YUknuen9mesKk0xsmhAve5+xn4nsE72GQLGXEWAXjA= Received: from AM4PR05MB3460.eurprd05.prod.outlook.com (10.171.187.153) by AM4PR05MB3187.eurprd05.prod.outlook.com (10.171.189.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2408.24; Wed, 6 Nov 2019 12:39:18 +0000 Received: from AM4PR05MB3460.eurprd05.prod.outlook.com ([fe80::117b:8dc0:905e:d154]) by AM4PR05MB3460.eurprd05.prod.outlook.com ([fe80::117b:8dc0:905e:d154%4]) with mapi id 15.20.2430.020; Wed, 6 Nov 2019 12:39:17 +0000 From: Dekel Peled To: Thomas Monjalon CC: "john.mcnamara@intel.com" , "marko.kovacevic@intel.com" , "nhorman@tuxdriver.com" , "ajit.khaparde@broadcom.com" , "somnath.kotur@broadcom.com" , "anatoly.burakov@intel.com" , "xuanziyang2@huawei.com" , "cloud.wangxiaoyun@huawei.com" , "zhouguoyang@huawei.com" , "wenzhuo.lu@intel.com" , "konstantin.ananyev@intel.com" , Matan Azrad , Shahaf Shuler , Slava Ovsiienko , "rmody@marvell.com" , "shshaikh@marvell.com" , "maxime.coquelin@redhat.com" , "tiwei.bie@intel.com" , "zhihong.wang@intel.com" , "yongwang@vmware.com" , "ferruh.yigit@intel.com" , "arybchenko@solarflare.com" , "jingjing.wu@intel.com" , "bernard.iremonger@intel.com" , "dev@dpdk.org" Thread-Topic: [PATCH v2 1/3] ethdev: support API to set max LRO packet size Thread-Index: AQHVlJ1v53Y19aw7IkqgDkOTQEdtiKd+FN7A Date: Wed, 6 Nov 2019 12:39:17 +0000 Message-ID: References: <5761720ab8a57fd331ed03916ff27fd153e8fb85.1573039465.git.dekelp@mellanox.com> <2242698.MuZukdLNMd@xps> In-Reply-To: <2242698.MuZukdLNMd@xps> 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=dekelp@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 67134fb8-dcbc-428f-ec27-08d762b65709 x-ms-traffictypediagnostic: AM4PR05MB3187:|AM4PR05MB3187: x-ms-exchange-purlcount: 1 x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-forefront-prvs: 02135EB356 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(136003)(376002)(366004)(346002)(39860400002)(396003)(199004)(13464003)(189003)(6306002)(74316002)(55016002)(6436002)(81156014)(54906003)(66066001)(6916009)(486006)(14454004)(11346002)(99286004)(81166006)(8936002)(52536014)(25786009)(45080400002)(7416002)(966005)(86362001)(5660300002)(478600001)(186003)(2906002)(6246003)(14444005)(33656002)(26005)(7696005)(4326008)(446003)(476003)(6506007)(102836004)(229853002)(66476007)(76116006)(3846002)(66556008)(64756008)(6116002)(66946007)(71190400001)(71200400001)(66446008)(76176011)(8676002)(305945005)(256004)(316002)(9686003)(53546011)(7736002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3187; H:AM4PR05MB3460.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-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: td2Gz41/tV9ZPA9dM067ngeVyXnIt/9cZHwcIBWLYZGj9+Ubsisu1zbOFptvhvml6bQpSBtsGvCGluHue26ECCTzy+U70MuOnM1gJKL+9cZOTQpSMUxdotX/d6cu5iQEW1x+0UKEvaym+/tfR4sBPxBBy4LURZl0El82T2x8SsBSW464diPzEZCfsfgdGbgrqstkPyuUERf9sKFYtGu1shc1s6NFbhjbRA0xF0VzLQuvwaOCDqvy1OswFenyUoIe7xMJ5fw/9SRVWvaJfYvHhEBNjjVULd96GjDID387f6/TkttbKktWpWCHtaj74jrT41fiiWZ53/WttAQiPu0TVTV3anpkk41fZu8bIdLYcktoaA75J8nUZ3fNUW8rDf2IjIDNtxv/vYlNE5nwYYTe/oMXJsrFUbSMHx8//Kk0MhIDteYqa4c4H9ZO+Oi+EwM1 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: 67134fb8-dcbc-428f-ec27-08d762b65709 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Nov 2019 12:39:17.7993 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: XRVXXLMMTqmlGeZZwTp3khNotmxvnMHEPC8sFfaCrm81Ucm7g+4Bz/FXNmiKbd38cJQZW5U5KgYq5Fc02p6qUw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3187 Subject: Re: [dpdk-dev] [PATCH v2 1/3] ethdev: support API to set max LRO packet size 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" Thanks, PSB. > -----Original Message----- > From: Thomas Monjalon > Sent: Wednesday, November 6, 2019 2:26 PM > To: Dekel Peled > Cc: john.mcnamara@intel.com; marko.kovacevic@intel.com; > nhorman@tuxdriver.com; ajit.khaparde@broadcom.com; > somnath.kotur@broadcom.com; anatoly.burakov@intel.com; > xuanziyang2@huawei.com; cloud.wangxiaoyun@huawei.com; > zhouguoyang@huawei.com; wenzhuo.lu@intel.com; > konstantin.ananyev@intel.com; Matan Azrad ; > Shahaf Shuler ; Slava Ovsiienko > ; rmody@marvell.com; > shshaikh@marvell.com; maxime.coquelin@redhat.com; > tiwei.bie@intel.com; zhihong.wang@intel.com; yongwang@vmware.com; > ferruh.yigit@intel.com; arybchenko@solarflare.com; jingjing.wu@intel.com; > bernard.iremonger@intel.com; dev@dpdk.org > Subject: Re: [PATCH v2 1/3] ethdev: support API to set max LRO packet siz= e >=20 > 06/11/2019 12:34, Dekel Peled: > > This patch implements [1], to support API for configuration and > > validation of max size for LRO aggregated packet. > > API change notice [2] is removed, and release notes for 19.11 are > > updated accordingly. > > > > Various PMDs using LRO offload are updated, the new data members are > > initialized to ensure they don't fail validation. > > > > [1] > > > https://eur03.safelinks.protection.outlook.com/?url=3Dhttp%3A%2F%2Fpatch > > > es.dpdk.org%2Fpatch%2F58217%2F&data=3D02%7C01%7Cdekelp%40mell > anox.co > > > m%7C21fb831af76a46c0597208d762b490f1%7Ca652971c7d2e4d9ba6a4d14925 > 6f461 > > > b%7C0%7C1%7C637086399982280191&sdata=3DAPp12mvk0RP92%2FzoNy > Mj2%2BvV3 > > E4BAaTzo4M8xOIc1yc%3D&reserved=3D0 > > [2] > > > https://eur03.safelinks.protection.outlook.com/?url=3Dhttp%3A%2F%2Fpatch > > > es.dpdk.org%2Fpatch%2F57492%2F&data=3D02%7C01%7Cdekelp%40mell > anox.co > > > m%7C21fb831af76a46c0597208d762b490f1%7Ca652971c7d2e4d9ba6a4d14925 > 6f461 > > > b%7C0%7C1%7C637086399982280191&sdata=3DcBFoqYfJPNKMAv0AMVQ > 9iO77ikiTi > > pFwoFJx5pRQxCE%3D&reserved=3D0 > > > > Signed-off-by: Dekel Peled > > Reviewed-by: Andrew Rybchenko > > --- > [...] > > --- a/lib/librte_ethdev/rte_ethdev.c > > +++ b/lib/librte_ethdev/rte_ethdev.c > > @@ -1156,6 +1156,26 @@ struct rte_eth_dev * > > return name; > > } > > > > +static inline int > > +check_lro_pkt_size(uint16_t port_id, uint32_t config_size, > > + uint32_t dev_info_size) > > +{ > > + int ret =3D 0; > > + > > + if (config_size > dev_info_size) { > > + RTE_ETHDEV_LOG(ERR, "Ethdev port_id=3D%d > max_lro_pkt_size %u > " > > + "max allowed value %u\n", >=20 > Minor comment (can be fixed while merging): > it is better to keep fixed strings together so it can be grepped. > Here I would move " > " on the second line, so we can grep " > max allowe= d > value ". >=20 I'll edit it in v3. > > + port_id, config_size, dev_info_size); > > + ret =3D -EINVAL; > > + } else if (config_size < RTE_ETHER_MIN_LEN) { > > + RTE_ETHDEV_LOG(ERR, "Ethdev port_id=3D%d > max_lro_pkt_size %u < " > > + "min allowed value %u\n", port_id, config_size, >=20 > Same minor comment here. >=20 I'll edit it in v3. > > + (unsigned int)RTE_ETHER_MIN_LEN); > > + ret =3D -EINVAL; > > + } > > + return ret; > > +} > [...] > > --- a/lib/librte_ethdev/rte_ethdev.h > > +++ b/lib/librte_ethdev/rte_ethdev.h > > @@ -395,6 +395,8 @@ struct rte_eth_rxmode { > > + /** Maximal allowed size of LRO aggregated packet. */ >=20 > Not sure, isn't it more correct to say "Maximum" in English? >=20 I'll edit it in v3. > > + uint32_t max_lro_pkt_size; > > @@ -1223,6 +1225,8 @@ struct rte_eth_dev_info { > > + /** Maximum configurable size of LRO aggregated packet. */ > > + uint32_t max_lro_pkt_size; >=20 > Except minor comments above, > Acked-by: Thomas Monjalon >=20