Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Feb 2016 05:01:17 +0000
From:      Phabricator <phabric-noreply@FreeBSD.org>
To:        freebsd-net@freebsd.org
Subject:   [Differential] [Closed] D5099: hyperv/hn: Enable IP header checksum offloading
Message-ID:  <b0cdd3fe745e279cfefc402b3159ad84@localhost.localdomain>
In-Reply-To: <differential-rev-PHID-DREV-px4dekca4zurcmyqbhmi-req@FreeBSD.org>
References:  <differential-rev-PHID-DREV-px4dekca4zurcmyqbhmi-req@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
This revision was automatically updated to reflect the committed changes.
Closed by commit rS295298: hyperv/hn: Enable IP header checksum offloading (authored by sephe).

CHANGED PRIOR TO COMMIT
  https://reviews.freebsd.org/D5099?vs=12775&id=13032#toc

REPOSITORY
  rS FreeBSD src repository

CHANGES SINCE LAST UPDATE
  https://reviews.freebsd.org/D5099?vs=12775&id=13032

REVISION DETAIL
  https://reviews.freebsd.org/D5099

AFFECTED FILES
  head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c

CHANGE DETAILS
  diff --git a/head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c b/head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
  --- a/head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
  +++ b/head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
  @@ -172,7 +172,7 @@
    * 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 @@
   			    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;

EMAIL PREFERENCES
  https://reviews.freebsd.org/settings/panel/emailpreferences/

To: sepherosa_gmail.com, delphij, royger, decui_microsoft.com, honzhan_microsoft.com, howard0su_gmail.com, adrian, network
Cc: freebsd-net-list

[-- Attachment #2 --]
diff --git a/head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c b/head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
--- a/head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
+++ b/head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
@@ -172,7 +172,7 @@
  * 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 @@
 			    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;


Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b0cdd3fe745e279cfefc402b3159ad84>