Call drbr_stats_update to update ifp stats directly when we bypass the buf_ring on transmit
This commit is contained in:
parent
bf422e5f27
commit
8222d237cb
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=192081
@ -1006,14 +1006,17 @@ em_transmit_locked(struct ifnet *ifp, struct mbuf *m)
|
||||
|| (!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.
|
||||
|
Loading…
Reference in New Issue
Block a user