mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 05:58:57 +00:00
Prefer ENETDOWN to ENXIO when returning queuing errors due to a link
down, interface down, etc, with if_cxgb's if_transmit routine. MFC after: 3 days Reviewed by: kmacy
This commit is contained in:
parent
7bed4560f3
commit
a6c19108c5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=189655
@ -120,7 +120,7 @@ cxgb_pcpu_enqueue_packet_(struct sge_qset *qs, struct mbuf *m)
|
||||
KASSERT(m->m_type == MT_DATA, ("bad mbuf type %d", m->m_type));
|
||||
if (qs->qs_flags & QS_EXITING) {
|
||||
m_freem(m);
|
||||
return (ENXIO);
|
||||
return (ENETDOWN);
|
||||
}
|
||||
txq = &qs->txq[TXQ_ETH];
|
||||
err = buf_ring_enqueue(txq->txq_mr, m);
|
||||
@ -301,13 +301,13 @@ cxgb_pcpu_start_(struct sge_qset *qs, struct mbuf *immpkt, int tx_flush)
|
||||
|
||||
retry:
|
||||
if (!pi->link_config.link_ok)
|
||||
initerr = ENXIO;
|
||||
initerr = ENETDOWN;
|
||||
else if (qs->qs_flags & QS_EXITING)
|
||||
initerr = ENXIO;
|
||||
initerr = ENETDOWN;
|
||||
else if ((pi->ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
|
||||
initerr = ENXIO;
|
||||
initerr = ENETDOWN;
|
||||
else if ((pi->ifp->if_flags & IFF_UP) == 0)
|
||||
initerr = ENXIO;
|
||||
initerr = ENETDOWN;
|
||||
else if (immpkt) {
|
||||
|
||||
if (!buf_ring_empty(txq->txq_mr)
|
||||
|
Loading…
Reference in New Issue
Block a user