Date: Wed, 3 Dec 2008 03:20:18 +0000 (UTC) From: Pyun YongHyeon <yongari@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r185575 - head/sys/pci Message-ID: <200812030320.mB33KIE6079468@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: yongari Date: Wed Dec 3 03:20:18 2008 New Revision: 185575 URL: http://svn.freebsd.org/changeset/base/185575 Log: Update if_iqdrops instead of if_ierrors when m_devget(9) fails. Modified: head/sys/pci/if_rl.c Modified: head/sys/pci/if_rl.c ============================================================================== --- head/sys/pci/if_rl.c Wed Dec 3 01:48:19 2008 (r185574) +++ head/sys/pci/if_rl.c Wed Dec 3 03:20:18 2008 (r185575) @@ -1302,18 +1302,13 @@ rl_rxeof(struct rl_softc *sc) if (total_len > wrap) { m = m_devget(rxbufpos, total_len, RL_ETHER_ALIGN, ifp, NULL); - if (m == NULL) { - ifp->if_ierrors++; - } else { + if (m != NULL) m_copyback(m, wrap, total_len - wrap, sc->rl_cdata.rl_rx_buf); - } cur_rx = (total_len - wrap + ETHER_CRC_LEN); } else { m = m_devget(rxbufpos, total_len, RL_ETHER_ALIGN, ifp, NULL); - if (m == NULL) - ifp->if_ierrors++; cur_rx += total_len + 4 + ETHER_CRC_LEN; } @@ -1321,8 +1316,10 @@ rl_rxeof(struct rl_softc *sc) cur_rx = (cur_rx + 3) & ~3; CSR_WRITE_2(sc, RL_CURRXADDR, cur_rx - 16); - if (m == NULL) + if (m == NULL) { + ifp->if_iqdrops++; continue; + } ifp->if_ipackets++; RL_UNLOCK(sc);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812030320.mB33KIE6079468>