Index: sys/dev/vnic/nicvf_queues.c =================================================================== --- sys/dev/vnic/nicvf_queues.c +++ sys/dev/vnic/nicvf_queues.c @@ -1797,7 +1797,6 @@ } ip = (struct ip *)(mbuf->m_data + ehdrlen); - ip->ip_sum = 0; iphlen = ip->ip_hl << 2; poff = ehdrlen + iphlen; @@ -2015,19 +2014,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; } } }