hyperv/hn: Enable IP header checksum offloading
So that: - TCP/IP stack will not do unnecessary IP header checksum for TSO packets. - Reduce guest load for non-TSO IP packets. Reviewed by: adrian Approved by: adrian (mentor) MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D5099
This commit is contained in:
parent
74506a55d6
commit
b0fde7e820
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=295298
@ -172,7 +172,7 @@ struct hn_txdesc {
|
||||
* Windows releases.
|
||||
*/
|
||||
#define HN_CSUM_ASSIST_WIN8 (CSUM_TCP)
|
||||
#define HN_CSUM_ASSIST (CSUM_UDP | CSUM_TCP)
|
||||
#define HN_CSUM_ASSIST (CSUM_IP | CSUM_UDP | CSUM_TCP)
|
||||
|
||||
/* XXX move to netinet/tcp_lro.h */
|
||||
#define HN_LRO_HIWAT_MAX 65535
|
||||
@ -867,6 +867,9 @@ hn_start_locked(struct ifnet *ifp, int len)
|
||||
rppi->per_packet_info_offset);
|
||||
|
||||
csum_info->xmit.is_ipv4 = 1;
|
||||
if (m_head->m_pkthdr.csum_flags & CSUM_IP)
|
||||
csum_info->xmit.ip_header_csum = 1;
|
||||
|
||||
if (m_head->m_pkthdr.csum_flags & CSUM_TCP) {
|
||||
csum_info->xmit.tcp_csum = 1;
|
||||
csum_info->xmit.tcp_header_offset = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user