Page MenuHomeFreeBSD

D5537.diff
No OneTemporary

D5537.diff

Index: head/sys/dev/vnic/nicvf_queues.c
===================================================================
--- head/sys/dev/vnic/nicvf_queues.c
+++ head/sys/dev/vnic/nicvf_queues.c
@@ -1771,7 +1771,6 @@
}
ip = (struct ip *)(mbuf->m_data + ehdrlen);
- ip->ip_sum = 0;
iphlen = ip->ip_hl << 2;
poff = ehdrlen + iphlen;
@@ -1984,19 +1983,23 @@
/*
* HW by default verifies IP & TCP/UDP/SCTP checksums
*/
-
- /* XXX: Do we need to include IP with options too? */
- if (__predict_true(cqe_rx->l3_type == L3TYPE_IPV4 ||
- cqe_rx->l3_type == L3TYPE_IPV6)) {
+ if (__predict_true(cqe_rx->l3_type == L3TYPE_IPV4)) {
mbuf->m_pkthdr.csum_flags =
(CSUM_IP_CHECKED | CSUM_IP_VALID);
}
- if (cqe_rx->l4_type == L4TYPE_TCP ||
- cqe_rx->l4_type == L4TYPE_UDP ||
- cqe_rx->l4_type == L4TYPE_SCTP) {
+
+ switch (cqe_rx->l4_type) {
+ case L4TYPE_UDP:
+ case L4TYPE_TCP: /* fall through */
mbuf->m_pkthdr.csum_flags |=
(CSUM_DATA_VALID | CSUM_PSEUDO_HDR);
- mbuf->m_pkthdr.csum_data = htons(0xffff);
+ mbuf->m_pkthdr.csum_data = 0xffff;
+ break;
+ case L4TYPE_SCTP:
+ mbuf->m_pkthdr.csum_flags |= CSUM_SCTP_VALID;
+ break;
+ default:
+ break;
}
}
}

File Metadata

Mime Type
text/plain
Expires
Sat, Jan 31, 5:20 PM (4 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28138047
Default Alt Text
D5537.diff (1 KB)

Event Timeline