Flush the LRO ctrl as soon as lro_mbufs fills up. There is no need to

wait for the next enqueue from the driver.

Reviewed by:	gnn@, hselasky@, gallatin@
MFC after:	1 week
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D10432
This commit is contained in:
Navdeep Parhar 2017-04-24 22:35:00 +00:00
parent ea9a92f112
commit f8acc03ef1

View File

@ -959,10 +959,6 @@ tcp_lro_queue_mbuf(struct lro_ctrl *lc, struct mbuf *mb)
return;
}
/* check if array is full */
if (__predict_false(lc->lro_mbuf_count == lc->lro_mbuf_max))
tcp_lro_flush_all(lc);
/* create sequence number */
lc->lro_mbuf_data[lc->lro_mbuf_count].seq =
(((uint64_t)M_HASHTYPE_GET(mb)) << 56) |
@ -970,7 +966,11 @@ tcp_lro_queue_mbuf(struct lro_ctrl *lc, struct mbuf *mb)
((uint64_t)lc->lro_mbuf_count);
/* enter mbuf */
lc->lro_mbuf_data[lc->lro_mbuf_count++].mb = mb;
lc->lro_mbuf_data[lc->lro_mbuf_count].mb = mb;
/* flush if array is full */
if (__predict_false(++lc->lro_mbuf_count == lc->lro_mbuf_max))
tcp_lro_flush_all(lc);
}
/* end */