[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Performance enhancements: Checksum offloads.
- To: "paul@xxxxxxx" <paul@xxxxxxx>
- From: Edwin Torok <edvin.torok@xxxxxxxxxx>
- Date: Tue, 7 Jun 2022 17:39:15 +0000
- Accept-language: en-GB, en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=67ck2rkI9AGcf8ZwVC870F7XZERYpH0Je0t3VQC5Q/A=; b=mEIXmUqB1+DpUHSjeaKjZu+0Cnsz4luE891tZ47K3KPznrEPRoAuJ3XVtcNTvPhe4dN4eSU5oAT6lpBNT7jVNMqcORnef/xSlsePOM5E+1achpGxC6vSlnqeE7FigqjuiyVagObPnh9r2Al0gQXn6dQZh5QiHykFusirWIjuHQ2h0CWb5UZ6gHbWJf/q7Gmai+9HTfYpZWduQ01PLOcNN9bkaLrXlIIrNlyONMbbhzon3Ms9Ywc+9ZVijlqUgZWw2OAtNpaIRdb2WZnXRCdRHK45dONu0wXzPhx07gyvl2r/l0BZEQeYBiyQwRP8Wv/C/Wkdtte2go5RQ2iF278+OQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Jc+V214QIgkUSP0snuEGltq1RoJICnQoHR14Bm04wH3RHdVVHlY1aAC3KFBMeVWM9x0bB3uV+9L3uIHb117AwM3trI2rpKXWeGDd3ssJDzTRqt+DTgS1qBBhBA57Yi+KwYsfizte6OWoOco49xRPuZK6OHqKDQMXLzc4tJyjGCLOio/QVrHIF8xicjcuup3EKslgmlLK2R98BzbV1H/H1lZvz4fHbP5nfloP+QZsWP7uNMsOs81OmioDdrJj4tzw8EJYIBjV+G4E2cPrfLQMfbuyPvMaexJrkiPKmDso7aHEnhW0neMuinCmG1HgjlzeOMbsfMg1J7dQ5Q8ukhU3Qg==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Martin Harvey <martin.harvey@xxxxxxxxxx>, Owen Smith <owen.smith@xxxxxxxxxx>, "win-pv-devel@xxxxxxxxxxxxxxxxxxxx" <win-pv-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Wed, 08 Jun 2022 09:40:08 +0000
- Ironport-data: A9a23:4hUeuKMn9JBzrOPvrR3ElsFynXyQoLVcMsEvi/4bfWQNrUp302YFz WZKCm2GP66JZjekKtsga9vi9EJQsMOEytZqTAto+SlhQUwRpJueD7x1DKtR0wB+jCHnZBg6h ynLQoCYdKjYdleF+lH1dOKJQUBUjclkfJKlYAL/En03FFYMpBsJ00o5wbZn2tEw27BVPivW0 T/Mi5yHULOa82Yc3lI8s8pvfzs24ZweEBtB1rAPTagjUG32zhH5P7pGTU2FFFPqQ5E8IwKPb 72rIIdVXI/u10xF5tuNyt4Xe6CRK1LYFVDmZnF+A8BOjvXez8CbP2lS2Pc0MC9qZzu1c99Zi 84W6LzrTiwVfajoiMFDY0N1KyZvIvgTkFPHCSDXXc276WTjKyGp79A1SUY8MMsf5/p9BnxI+ boAMjcRYxufhuWwhrWmVu1rgcdlJ87uVG8dkig4kXeFUrB7H9afH80m5vcBtNs0rs1CA/fYI dYecz1sRB/BfwdOKhEcD5dWcOKA2SOjKmwA+Q39Sawfujb9kVZc9ZHWNpn1U//Udfl/rGSEn zeTl4j+KlRAXDCF8hKd+2+orv/Cm2X8Qo16PKK58Ltynhify3IeDDUSVECnur+ph0imQdVdJ kcIvC00osAPGFeDS9D8W1i0pSWCtxtEAd5ISbVmtEeK17be5BufCi4cVDldZdc6tcgwAzs3y luOmNCvDjtq2FGIdU+gGn6vhWvaEUAowaUqPEfokSNtDwHfnbwO
- Ironport-hdrordr: A9a23:YnmZqqw50OgU30n2WFMJKrPxdegkLtp133Aq2lEZdPULSKGlfp GV9sjziyWetN9IYgBapTiBUJPwIk81bfZOkMUs1MSZLXPbUQyTXc5fBOrZsnDd8kjFmtK1up 0QFJSWZOeQMbE+t7eD3ODaKadv/DDkytHPuQ629R4EIm9XguNbnn5E422gYy9LrXx9dP4E/e 2nl696TlSbGUg/X4CePD0oTuLDr9rEmNbNehgdHSMq7wGIkHeB9KP6OwLw5GZfbxp/hZMZtU TVmQ3w4auu99uhzAXH6mPV55NK3PP819p4AtCWgMR9EESutu/oXvUiZ1SxhkFwnAid0idsrD AKmWZnAy1H0QKVQohym2q15+Cv6kd315ao8y7kvZKqm72EeNt9MbsBuWsRSGqm12Mw+N57y6 5FxGSfqt5eCg7Bhj3045zSWwhtjVfcmwtrrQaC50YvLrf2RYUh27D3xnklWavo3RiKmrwPAa 1rFoXR9fxWeVSVYzTQuXRu2sWlWjA2Eg2dSkYPt8SJ23wO9UoJhXcw1YgahDMN5Zg9Q55L66 DNNblpjqhHSosTYbhmDOkMTMOrAijGQA7KMmiVPVP7fZt3cE7lutry+vE49euqcJsHwN87n4 nASkpRsSood0fnGaS1rep2G9D2MRGAtBjWu7FjDsJCy8zBrZLQQF6+YUFrlde8qPMCBcCeU+ qvOfttcoreEVc=
- List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>
- Thread-index: Adh6UUbHfqbqrYPNRry7tCeUCkLgnwAB3fEAAA8wmwA=
- Thread-topic: Performance enhancements: Checksum offloads.
> On 7 Jun 2022, at 11:24, Durrant, Paul <xadimgnik@xxxxxxxxx> wrote:
>
> [CAUTION - EXTERNAL EMAIL] DO NOT reply, click links, or open attachments
> unless you have verified the sender and know the content is safe.
>
> On 07/06/2022 10:32, Martin Harvey wrote:
>> Since I've been working on a performance related ticket today, a thought
>> about future enhancements:
>> - Can we do checksum offloads all the way from H/W to the guest - if the
>> dom0 drivers support the offloads, then there should be a way to get the
>> calculated checksums all the way thru to the guest?
>
> Absolutely; the netif protocol has support for offloading (see
> NETRXF_data_validated) and you can set the 'Correct TCP/UDP Checksum Value'
> switch to 0 in the XENNET advanced properties if you want to avoid checksum
> recalculation.
Thanks, we should probably do some internal benchmarks with that setting. At
least users with well-behaved applications could chose to avoid the perf hit.
Last time I looked at this there was some extra checksum recalculation going on
when splitting up large receive offloaded packets (which are IIRC around ~64k
in size, much larger than even jumbo frames) and those had to get a checksum
from somewhere. If we can tell it "its fine, it has a valid checksum" without
actually computing one then we can avoid all that, I assume the above setting
will avoid recomputation in this case too?
>
> The reason checksum recalculation is that validated packets coming from
> netback do not always have the correct checksum. Specifically packets from
> one VM to another VM on the same host may only contain a pseudo-header
> checksum. Also, I recall some NIC drivers zero-ing the checksum during
> validation. Now, you'd expect that when XENNET says to the network stack 'all
> is good with this packet' that nothing further up the stack should care about
> the checksum value however some of the good ole Citrix ICA stack (for
> example) actually does... so that's why we have to take the performance hit
> and fully recalculate. It's all rather silly.
That would probably be broken when run on bare metal with NIC drivers that
support hardware offload too though?
Perhaps there could be a setting to zero the checksum field when its
computation is offloaded to more easily detect these cases, at least as
something to use during debugging / automated testing?
Best regards,
--Edwin
>
> Paul
>
>> - This could require some thought, and I'm not sure what the various
>> security implications are.
>> - Pretty sure it would provide a useful performance boost.
>> MH.
>
|