diff options
author | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2012-11-07 12:46:50 +0000 |
---|---|---|
committer | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2012-11-07 12:46:50 +0000 |
commit | 739ccb1a8c1a7fd6202022d6a9f7910800b3b025 (patch) | |
tree | cdd56410fd8f159b62af8aa60e08bba813251e85 /sys | |
parent | fbd5e83fa6edbc9a225c0352277e2b93188a9905 (diff) |
do not depend on IFCAP_CSUM flags set when reading rx checksumming
results from the hardware
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/if_oce.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/sys/dev/pci/if_oce.c b/sys/dev/pci/if_oce.c index b5d6794f436..84eaaaa4125 100644 --- a/sys/dev/pci/if_oce.c +++ b/sys/dev/pci/if_oce.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_oce.c,v 1.42 2012/11/07 12:43:35 mikeb Exp $ */ +/* $OpenBSD: if_oce.c,v 1.43 2012/11/07 12:46:49 mikeb Exp $ */ /* * Copyright (c) 2012 Mike Belopuhov @@ -1163,18 +1163,16 @@ oce_rxeof(struct oce_rq *rq, struct oce_nic_rx_cqe *cqe) /* first fragment, fill out much of the packet header */ pkt->mbuf->m_pkthdr.len = len; pkt->mbuf->m_pkthdr.csum_flags = 0; - if (IF_CSUM_ENABLED(ifp)) { - if (cqe->u0.s.ip_cksum_pass) { - if (!cqe->u0.s.ip_ver) { /* IPV4 */ - pkt->mbuf->m_pkthdr.csum_flags = - M_IPV4_CSUM_IN_OK; - } - } - if (cqe->u0.s.l4_cksum_pass) { - pkt->mbuf->m_pkthdr.csum_flags |= - M_TCP_CSUM_IN_OK | M_UDP_CSUM_IN_OK; + if (cqe->u0.s.ip_cksum_pass) { + if (!cqe->u0.s.ip_ver) { /* IPV4 */ + pkt->mbuf->m_pkthdr.csum_flags = + M_IPV4_CSUM_IN_OK; } } + if (cqe->u0.s.l4_cksum_pass) { + pkt->mbuf->m_pkthdr.csum_flags |= + M_TCP_CSUM_IN_OK | M_UDP_CSUM_IN_OK; + } m = tail = pkt->mbuf; } pkt->mbuf = NULL; |