svn commit: r368314 - head/sys/dev/cxgbe/tom
John Baldwin
jhb at FreeBSD.org
Thu Dec 3 22:01:14 UTC 2020
Author: jhb
Date: Thu Dec 3 22:01:13 2020
New Revision: 368314
URL: https://svnweb.freebsd.org/changeset/base/368314
Log:
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
Modified:
head/sys/dev/cxgbe/tom/t4_cpl_io.c
Modified: head/sys/dev/cxgbe/tom/t4_cpl_io.c
==============================================================================
--- head/sys/dev/cxgbe/tom/t4_cpl_io.c Thu Dec 3 22:00:41 2020 (r368313)
+++ head/sys/dev/cxgbe/tom/t4_cpl_io.c Thu Dec 3 22:01:13 2020 (r368314)
@@ -721,6 +721,8 @@ t4_push_frames(struct adapter *sc, struct toepcb *toep
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
/* 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
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)
More information about the svn-src-all
mailing list