Index: sys/dev/vnic/nicvf_main.c =================================================================== --- sys/dev/vnic/nicvf_main.c +++ sys/dev/vnic/nicvf_main.c @@ -661,12 +661,6 @@ sq = &qs->sq[qidx]; - if (((if_getdrvflags(ifp) & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != - IFF_DRV_RUNNING) || !nic->link_up) { - err = drbr_enqueue(ifp, sq->br, mbuf); - return (err); - } - if (mbuf->m_next != NULL && (mbuf->m_pkthdr.csum_flags & (CSUM_IP | CSUM_TCP | CSUM_UDP | CSUM_SCTP)) != 0) { @@ -680,8 +674,15 @@ } err = drbr_enqueue(ifp, sq->br, mbuf); - if (err != 0) + if (((if_getdrvflags(ifp) & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != + IFF_DRV_RUNNING) || !nic->link_up || (err != 0)) { + /* + * Try to enqueue packet to the ring buffer. + * If the driver is not active, link down or enqueue operation + * failed, return with the appropriate error code. + */ return (err); + } if (NICVF_TX_TRYLOCK(sq) != 0) { err = nicvf_xmit_locked(sq);