Don't transmit mbufs that aren't yet ready on TOE sockets.
This includes mbufs waiting for data from sendfile() I/O requests, or mbufs awaiting encryption for KTLS. Reviewed by: np MFC after: 2 weeks Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D27469
This commit is contained in:
parent
dbc5c85c66
commit
99963f5343
@ -721,6 +721,8 @@ t4_push_frames(struct adapter *sc, struct toepcb *toep, int drop)
|
||||
for (m = sndptr; m != NULL; m = m->m_next) {
|
||||
int n;
|
||||
|
||||
if ((m->m_flags & M_NOTAVAIL) != 0)
|
||||
break;
|
||||
if (m->m_flags & M_EXTPG) {
|
||||
#ifdef KERN_TLS
|
||||
if (m->m_epg_tls != NULL) {
|
||||
@ -803,8 +805,9 @@ t4_push_frames(struct adapter *sc, struct toepcb *toep, int drop)
|
||||
|
||||
/* nothing to send */
|
||||
if (plen == 0) {
|
||||
KASSERT(m == NULL,
|
||||
("%s: nothing to send, but m != NULL", __func__));
|
||||
KASSERT(m == NULL || (m->m_flags & M_NOTAVAIL) != 0,
|
||||
("%s: nothing to send, but m != NULL is ready",
|
||||
__func__));
|
||||
break;
|
||||
}
|
||||
|
||||
@ -892,7 +895,7 @@ t4_push_frames(struct adapter *sc, struct toepcb *toep, int drop)
|
||||
toep->txsd_avail--;
|
||||
|
||||
t4_l2t_send(sc, wr, toep->l2te);
|
||||
} while (m != NULL);
|
||||
} while (m != NULL && (m->m_flags & M_NOTAVAIL) == 0);
|
||||
|
||||
/* Send a FIN if requested, but only if there's no more data to send */
|
||||
if (m == NULL && toep->flags & TPF_SEND_FIN)
|
||||
|
Loading…
Reference in New Issue
Block a user