[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Performance enhancements: Checksum offloads.



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.

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.

  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.




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.