gve: Simplify tx loop over buffer ring
Reviewed by: markj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D41281
This commit is contained in:
parent
37e5d49e1e
commit
543cf924bc
@ -696,10 +696,9 @@ gve_xmit_br(struct gve_tx_ring *tx)
|
||||
struct ifnet *ifp = priv->ifp;
|
||||
struct mbuf *mbuf;
|
||||
|
||||
while (!drbr_empty(ifp, tx->br) &&
|
||||
(if_getdrvflags(ifp) & IFF_DRV_RUNNING) != 0) {
|
||||
while ((if_getdrvflags(ifp) & IFF_DRV_RUNNING) != 0 &&
|
||||
(mbuf = drbr_peek(ifp, tx->br)) != NULL) {
|
||||
|
||||
mbuf = drbr_peek(ifp, tx->br);
|
||||
if (__predict_false(gve_xmit(tx, mbuf) != 0)) {
|
||||
drbr_putback(ifp, tx->br, mbuf);
|
||||
taskqueue_enqueue(tx->xmit_tq, &tx->xmit_task);
|
||||
|
Loading…
Reference in New Issue
Block a user