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 232B4A00E6 for ; Thu, 8 Aug 2019 13:16:13 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 18CBA1BDF1; Thu, 8 Aug 2019 13:16:12 +0200 (CEST) Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50076.outbound.protection.outlook.com [40.107.5.76]) by dpdk.org (Postfix) with ESMTP id 203721BDEC for ; Thu, 8 Aug 2019 13:16:10 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FLDtgq+gySy5QExsDvoHoyE6SBwPqaISEgkM15+tjWwYji0s/ZFOT1PfZzU16W/Xg0XiT6homElEfjimotBFi8I4cyD4z1ZoDm7JIcTL8YpOQ4rpXwqmfCZOGG58DzE5vJPj1ULP6BNrKe/CxotuS/3el0U2JDNTqkETYsnbPqsgu9fkSc+PC6VrP12YqEKzyTh5XCvhviKnCun7/ETIP6sou+TspqFk1o7Rzif34AdN1XY9+sWpGczU1nnRx/qluie7xiceQGOsOW8poKbszLvv48iyjdis8mE8JyLxc6dhSx7opVxEnAF2lnxmLwpWKbzmpJWCCmBxlWmt6WLj3g== 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=bk8SdHaJluQGgv//nAN5un9p6tx735MUkbYz1x9Vs7Y=; b=bUKZtD46Zr2eHG+g/doqVDPgHQhfkovxdvLF4CfbbDxGKjvaVJ9KANI7VzzhMvOhzuCCzVJ/uQWUbTo3+IaBK5RZ+8NCUuacBcG4KzBbtV2kQI/dL2r8CLg7kA62FvYujYIp42dv8mpJ9bOJgTTHXJBwvjcnUSx5/6PUuBduOJkq9q5e4XjBQ57zg6snilQ8xgy4OsO9Qg9Cqh2uY82/EV3ND3nEUU+20s355IG6wZbkJjybPaMUDfaxAeLluJ6ZHTpIVDGnOR3TNwpXaqHzhM766KfBZINk/wnQYnzunBuKgoMfZ9jPozVw+vhChYuIjLLZjYpAc5+dEetOPxYwSw== 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=bk8SdHaJluQGgv//nAN5un9p6tx735MUkbYz1x9Vs7Y=; b=S2MPCeB3vPHkU4kKPkQcEw47ljqWmaiFdJedWF5syL4XX4yX6jR5yPCll25PrcMhiTcDtz4HNGePqtz2YXUqvlpxlTxluCqPeNuxVlXYXxttofMgQVvdtfygCvo1TtDLnaWKq3NEL3vmGGMRdC6CY5l8wxv78fzSdCkynYRzxxU= Received: from AM0PR0502MB4019.eurprd05.prod.outlook.com (52.133.39.139) by AM0PR0502MB3746.eurprd05.prod.outlook.com (52.133.47.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2157.15; Thu, 8 Aug 2019 11:16:08 +0000 Received: from AM0PR0502MB4019.eurprd05.prod.outlook.com ([fe80::ccc2:2dd4:ca86:7639]) by AM0PR0502MB4019.eurprd05.prod.outlook.com ([fe80::ccc2:2dd4:ca86:7639%3]) with mapi id 15.20.2157.015; Thu, 8 Aug 2019 11:16:08 +0000 From: Matan Azrad To: "Ananyev, Konstantin" , "dev@dpdk.org" CC: Thomas Monjalon , "Yigit, Ferruh" , Andrew Rybchenko , Olivier Matz Thread-Topic: [PATCH 2/2] doc: announce new mbuf field for LRO Thread-Index: AQHVTHA1m/9TJlXicUS/FSlQ1Ewcz6buck4ggAEHdoCAAAsOgIAAOFOAgAFLr5CAAAvzgIAAAZiw Date: Thu, 8 Aug 2019 11:16:08 +0000 Message-ID: References: <1565103383-23864-1-git-send-email-matan@mellanox.com> <1565103383-23864-2-git-send-email-matan@mellanox.com> <2601191342CEEE43887BDE71AB9772580168A62AC0@irsmsx105.ger.corp.intel.com> <2601191342CEEE43887BDE71AB9772580168A630E5@irsmsx105.ger.corp.intel.com> <2601191342CEEE43887BDE71AB9772580168A6325D@irsmsx105.ger.corp.intel.com> <2601191342CEEE43887BDE71AB9772580168A63A39@irsmsx105.ger.corp.intel.com> In-Reply-To: <2601191342CEEE43887BDE71AB9772580168A63A39@irsmsx105.ger.corp.intel.com> Accept-Language: en-US, he-IL Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=matan@mellanox.com; x-originating-ip: [85.64.81.213] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a21cdbc4-a902-4437-9780-08d71bf1cfe1 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:AM0PR0502MB3746; x-ms-traffictypediagnostic: AM0PR0502MB3746: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-forefront-prvs: 012349AD1C x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(136003)(366004)(39860400002)(376002)(346002)(396003)(189003)(76094002)(199004)(2906002)(81166006)(99286004)(4326008)(6246003)(81156014)(55016002)(9686003)(54906003)(6436002)(229853002)(256004)(7696005)(2501003)(76176011)(53936002)(33656002)(71200400001)(71190400001)(102836004)(478600001)(66066001)(3846002)(6116002)(5660300002)(66946007)(76116006)(305945005)(66476007)(8936002)(74316002)(64756008)(8676002)(66556008)(66446008)(486006)(25786009)(52536014)(11346002)(316002)(26005)(6506007)(7736002)(476003)(186003)(446003)(110136005)(14454004)(86362001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR0502MB3746; H:AM0PR0502MB4019.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-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: zguwSPcaGvryTMNYwV9bwt0qeo9yuhkbOXvemvZ3g+6LIGXHjEPBvEv/cRQl01RX79Ygzu0I57ljCgPHSnBkfeJo+8bpKP4FCqyuHaBkZaLmKzNrdgKfaRNiYIeXo2Ob5FY4BY+Grq16TjbsOKT4Im4y0smNaZRia7qpaM1KpmJRefBika3KDEtX49xbhXmLo6J/D4yH3lHsof7OveUDtrezvzYk9WHa7BCWNPoYLPQ3IXxX/vxR/L8yVx0aNJzWQNMgtden4QB/6r8PW1NZOcebLV8tEc5eCn4XsNCVR9+yD0+DkURsJlX9cjVVMQmrXdj/VQ2gA5ciBKqgkxpv+dH+cPZmv+xop8GFQChbQnkzfAp93ybKrXY2XHWVXOAnBpb10gb8uF08uzgW2q01DFomTBSVxt9XiK4riz9jbjI= x-ms-exchange-transport-forked: True 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: a21cdbc4-a902-4437-9780-08d71bf1cfe1 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Aug 2019 11:16:08.3671 (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: dwGVBpwzCccbvU3bdWkcKWOqeOTjwMRiQNR+nrUm4/1NuHPMig/ICeezMUywUhwutZ3qUFZlA+wQ7Cm0/UswyA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR0502MB3746 Subject: Re: [dpdk-dev] [PATCH 2/2] doc: announce new mbuf field for LRO 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" Hi From: Ananyev, Konstantin > Hi Matan, >=20 > > > > > > > > > > > > > > > > The API breakage is because the ``tso_segsz`` field was > > > > > > > > documented for LRO. > > > > > > > > > > > > > > > > The ``tso_segsz`` field in mbuf indicates the size of each > > > > > > > > segment in the LRO packet in Rx path and should be > > > > > > > > provided by the LRO packet port. > > > > > > > > > > > > > > > > While the generic LRO packet may aggregate different > > > > > > > > segments sizes in one packet, it is impossible to expose > > > > > > > > this information for each segment by one field and it > > > > > > > > doesn't make sense to expose all the segments sizes in the > mbuf. > > > > > > > > > > > > > > > > A new field may be added as union with the above field to > > > > > > > > expose the number of segments aggregated in the LRO packet. > > > > > > > > > > > > > > > > Signed-off-by: Matan Azrad > > > > > > > > --- > > > > > > > > doc/guides/rel_notes/deprecation.rst | 4 ++++ > > > > > > > > 1 file changed, 4 insertions(+) > > > > > > > > > > > > > > > > diff --git a/doc/guides/rel_notes/deprecation.rst > > > > > > > > b/doc/guides/rel_notes/deprecation.rst > > > > > > > > index c0cd9bc..e826b69 100644 > > > > > > > > --- a/doc/guides/rel_notes/deprecation.rst > > > > > > > > +++ b/doc/guides/rel_notes/deprecation.rst > > > > > > > > @@ -45,6 +45,10 @@ Deprecation Notices > > > > > > > > - ``eal_parse_pci_DomBDF`` replaced by ``rte_pci_addr_pa= rse`` > > > > > > > > - ``rte_eal_compare_pci_addr`` replaced by > > > > > > > > ``rte_pci_addr_cmp`` > > > > > > > > > > > > > > > > +* mbuf: Remove ``tso_segsz`` mbuf field providing for LRO > > > support. > > > > > > > > +Use union > > > > > > > > + block for the field memory to be shared with a new > > > > > > > > +field ``lro_segs_n`` > > > > > > > > + indicates the number of segments aggregated in the LRO > packet. > > > > > > > > + > > > > > > > > > > > > > > Wonder how the upper layer will use that information (except > > > > > > > for > > > stats)? > > > > > > > Could you guys provide any examples? > > > > > > > > > > > > 1. Stats, allow to calc accurate PPS. > > > > > > 2. Supply accurate information unlike the seg size which > > > > > > cannot be > > > > > accurate. > > > > > > 2. Let the user all the information (segs num allow an average > > > > > > seg size calculation) > > > > > > > > > > So just for stats, right? > > > > > > > > Stats it is one option. > > > > > > > > The user configured LRO, means he wants X > 1 packets to be > > > > aggregated > > > by the port. > > > > > > > > Don't you think X is interesting for the user? > > > > > > > > For example, maybe there is Y for the next calculation: > > > > > > > > If average(X) < Y: > > > > Stop LRO - not very good for performance to aggregate small > > > > number > > > of packets - stop LRO. > > > > > > > > > > Might be, but I think user can use other metrics (let say average > > > aggregated packet size) for that purpose. > > > > Yes, but I think it is better to supply the segs number which is an acc= urate > number instead of average size of segment. > > Then, user can decide any calculation he prefers. > > > > > > > > > > > > > > > > > > If so, wouldn't it be more plausible to extend PMD itself to > > > > > provide some extra statistics? > > > > > Just a thought. > > > > > > > > Yes, may be interesting but it can be redundant work when the user > > > > don't > > > need it. > > > > > > > > > > > > > > > > > > > > > > Also what PMD should do if HW does supports LRO, but doesn't > > > > > > > to information? > > > > > > > > > > > > If the PMD knows all the segments size he can calculate it, no? > > > > > > 0 means PMD doesn't support it. > > > > > > > > > > I mean HW/PMD might support LRO, but doesn't provide information > > > > > about number of coalesced segments. > > > > > What PMD should do in that case? > > > > > > > > As I said, to set this field with 0 and set the PKT_RX_LRO flag in = ol_flags. > > > > 0 in this case means support LRO but cannot supply the segments num= . > > > > > > Ok..., but then what for then to set PKT_RX_LRO at all? > > > From PMD perspective it would be easier not to set that flag at all > > > and not to touch tso_segsz. > > > > The user should know that LRO is working. LRO flag should be set in any > case. >=20 > Well, then I think you trying to introduce a new requirement for PMD. Yes, this is the patch purpose. > Right now, as I can see it is optional, and supposed to be set only when = PMD > RX path updates tso_segsz. >=20 > /** > * When packets are coalesced by a hardware or virtual driver, this flag > * can be set in the RX mbuf, meaning that the m->tso_segsz field is > * valid and is set to the segment size of original packets. > */ > #define PKT_RX_LRO (1ULL << 16) Yes, need to be changed to: /** * When packets are coalesced by a hardware or virtual driver, this flag * is set in the RX mbuf. */ > > > > > > > > > > Do you familiar with PMDs that supports LRO but cannot provide the > > > segments num? > > > > If so, what do these PMDs can provide instead? > > > > > > Yes, ixgbe PMD. > > > It does support TCP_LRO offload, and when enabled, does coalesce the > > > packets, but doesn't set PKT_RX_LRO and doesn't touch tso_segsz. > > > > I think it should be changed to set the flag. > > > > > > > > > > > > > > Still set DEV_RX_OFFLOAD_TCP_LRO as enabled RX offload, but > > > > > don't set PKT_RX_LRO flag in the RX-ed mbuf, even if it does > > > > > contain coalesced packets? > > > > > > > > No, read above. > > > > > > > > > As I understand that what happens now. > > > > > It is probably ok by me (as means no changes in ixgbe PMD)... > > > > > But wouldn't that mean no defined way for the user to determine > > > > > will HW/PMD provide that information or not? > > > > > > > > Will compare to 0, see above. > > > > > > I mean how the user will determine in advance would given PMD/HW > > > provide that info in tso_segsz or not? > > > Wait for the first LRO packet? Something else? > > > > Or wait to for the first LRO packet, or we can add a new ethdev capabil= ity > for it. > > > > What do you think? >=20 > I still in doubt is it really worth to support that feature at all... > Though if we'll decide to add it, then I think it needs to be a new capab= ility > DEV_RX_OFFLOAD_LRO_STAT (or so) and probably new mbuf.ol_flag value > for it. I don't think that new mbuf ol_flag should be introduced. Only capability. We discussed on 2 topics: 1. Changing the LRO field meaning in mbuf. segs size =3D> segs num. 2. Whether to set the PKT_RX_LRO when the PMD cannot supply the field but c= an coalesce packets or not. If we do only 1, the flag setting method can be stay as is. Can you agree with 1? this is the main reason for this patch. I think it is problematic that ixgbe PMD doesn't allow to the user to know = whether the packet is coalesced or not. IMO setting the PKT_RX_LRO flag and 0 in the LRO field is better. >=20 > Konstantin