diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2007-05-04 22:54:43 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2007-05-04 22:54:43 +0000 |
commit | f100e7b44b0074164c2534ea2ec4212730a4dfc7 (patch) | |
tree | 4de4d8c806e9b892656cba267ed369d332edd77e | |
parent | 8f7b3bb6e138d0654119b2a1d07765ec494ed1c5 (diff) |
the hardware does checksumming on rx as well. mark the mbufs with what the
hw says.
-rw-r--r-- | sys/dev/pci/if_tht.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/dev/pci/if_tht.c b/sys/dev/pci/if_tht.c index ae84701df2e..a4c3d551b21 100644 --- a/sys/dev/pci/if_tht.c +++ b/sys/dev/pci/if_tht.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tht.c,v 1.93 2007/05/04 22:39:55 dlg Exp $ */ +/* $OpenBSD: if_tht.c,v 1.94 2007/05/04 22:54:42 dlg Exp $ */ /* * Copyright (c) 2007 David Gwynne <dlg@openbsd.org> @@ -1282,6 +1282,13 @@ tht_rxd(struct tht_softc *sc) m->m_pkthdr.rcvif = ifp; m->m_pkthdr.len = m->m_len = letoh16(rxd.len); + if (!ISSET(flags, THT_RXD_FLAGS_IPCS)) + m->m_pkthdr.csum_flags |= M_IPV4_CSUM_IN_OK; + if (!ISSET(flags, THT_RXD_FLAGS_TCPCS)) + m->m_pkthdr.csum_flags |= M_TCP_CSUM_IN_OK; + if (!ISSET(flags, THT_RXD_FLAGS_UDPCS)) + m->m_pkthdr.csum_flags |= M_UDP_CSUM_IN_OK; + /* XXX process type 3 rx descriptors */ #if NBPFILTER > 0 |