summaryrefslogtreecommitdiffstats
path: root/sys/dev/et
diff options
context:
space:
mode:
authoryongari <yongari@FreeBSD.org>2009-11-20 20:25:21 +0000
committeryongari <yongari@FreeBSD.org>2009-11-20 20:25:21 +0000
commit7856588d16dc891d24b88fb285dc4035e1de2c4a (patch)
tree6afa7031259e5aaaa7313f34e72dc8e465bf1081 /sys/dev/et
parent19294d603b35303d46a6a07dbb96c305895c6fe7 (diff)
downloadFreeBSD-src-7856588d16dc891d24b88fb285dc4035e1de2c4a.zip
FreeBSD-src-7856588d16dc891d24b88fb285dc4035e1de2c4a.tar.gz
Because we know received bytes including CRC there is no reason to
call m_adj(9). The controller also seems to have a capability to strip CRC bytes but I failed to activate this feature except for loopback traffic.
Diffstat (limited to 'sys/dev/et')
-rw-r--r--sys/dev/et/if_et.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/et/if_et.c b/sys/dev/et/if_et.c
index 01ba9de..c0748b0 100644
--- a/sys/dev/et/if_et.c
+++ b/sys/dev/et/if_et.c
@@ -1982,11 +1982,9 @@ et_rxeof(struct et_softc *sc)
m = NULL;
ifp->if_ierrors++;
} else {
- m->m_pkthdr.len = m->m_len = buflen;
+ m->m_pkthdr.len = m->m_len =
+ buflen - ETHER_CRC_LEN;
m->m_pkthdr.rcvif = ifp;
-
- m_adj(m, -ETHER_CRC_LEN);
-
ifp->if_ipackets++;
ET_UNLOCK(sc);
ifp->if_input(ifp, m);
OpenPOWER on IntegriCloud