Date: Thu, 14 May 2009 03:33:04 +0000 (UTC) From: Kip Macy <kmacy@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r192081 - head/sys/dev/e1000 Message-ID: <200905140333.n4E3X4sG075932@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kmacy Date: Thu May 14 03:33:04 2009 New Revision: 192081 URL: http://svn.freebsd.org/changeset/base/192081 Log: Call drbr_stats_update to update ifp stats directly when we bypass the buf_ring on transmit Modified: head/sys/dev/e1000/if_em.c Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Thu May 14 03:24:22 2009 (r192080) +++ head/sys/dev/e1000/if_em.c Thu May 14 03:33:04 2009 (r192081) @@ -1006,15 +1006,18 @@ em_transmit_locked(struct ifnet *ifp, st || (!adapter->link_active)) { error = drbr_enqueue(ifp, adapter->br, m); return (error); - } - - if (ADAPTER_RING_EMPTY(adapter) && + } else if (ADAPTER_RING_EMPTY(adapter) && (adapter->num_tx_desc_avail > EM_TX_OP_THRESHOLD)) { if (em_xmit(adapter, &m)) { if (m && (error = drbr_enqueue(ifp, adapter->br, m)) != 0) return (error); } else { /* + * We've bypassed the buf ring so we need to update + * ifp directly + */ + drbr_stats_update(ifp, m->m_pkthdr.len, m->m_flags); + /* ** Send a copy of the frame to the BPF ** listener and set the watchdog on. */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905140333.n4E3X4sG075932>