Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151588008
D4131.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1015 B
Referenced Files
None
Subscribers
None
D4131.diff
View Options
Index: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
===================================================================
--- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
+++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
@@ -128,6 +128,15 @@
#define HV_NV_SC_PTR_OFFSET_IN_BUF 0
#define HV_NV_PACKET_OFFSET_IN_BUF 16
+/*
+ * A unified flag for all outbound check sum flags is useful,
+ * and it helps avoiding unnecessary check sum calculation in
+ * network forwarding scenario.
+ */
+#define HV_CSUM_FOR_OUTBOUND \
+ (CSUM_IP|CSUM_IP_UDP|CSUM_IP_TCP|CSUM_IP_SCTP|CSUM_IP_TSO| \
+ CSUM_IP_ISCSI|CSUM_IP6_UDP|CSUM_IP6_TCP|CSUM_IP6_SCTP| \
+ CSUM_IP6_TSO|CSUM_IP6_ISCSI)
/*
* Data types
@@ -570,7 +579,8 @@
packet->vlan_tci & 0xfff;
}
- if (0 == m_head->m_pkthdr.csum_flags) {
+ /* Only check the flags for outbound and ignore the ones for inbound */
+ if (0 == (m_head->m_pkthdr.csum_flags & HV_CSUM_FOR_OUTBOUND)) {
goto pre_send;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 10, 8:53 AM (18 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31214967
Default Alt Text
D4131.diff (1015 B)
Attached To
Mode
D4131: Fix a checksum offloading bug in Hyper-V netvsc driver
Attached
Detach File
Event Timeline
Log In to Comment