svn commit: r317390 - head/sys/netinet
Navdeep Parhar
np at FreeBSD.org
Mon Apr 24 22:35:01 UTC 2017
Author: np
Date: Mon Apr 24 22:35:00 2017
New Revision: 317390
URL: https://svnweb.freebsd.org/changeset/base/317390
Log:
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
Modified:
head/sys/netinet/tcp_lro.c
Modified: head/sys/netinet/tcp_lro.c
==============================================================================
--- head/sys/netinet/tcp_lro.c Mon Apr 24 22:31:56 2017 (r317389)
+++ head/sys/netinet/tcp_lro.c Mon Apr 24 22:35:00 2017 (r317390)
@@ -959,10 +959,6 @@ tcp_lro_queue_mbuf(struct lro_ctrl *lc,
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,
((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 */
More information about the svn-src-all
mailing list