diff options
author | Sepherosa Ziehau <sephe@FreeBSD.org> | 2016-04-01 06:28:33 +0000 |
---|---|---|
committer | Sepherosa Ziehau <sephe@FreeBSD.org> | 2016-04-01 06:28:33 +0000 |
commit | 6dd38b8716bd9c53029707749f00ced53c5ceb7c (patch) | |
tree | 35cb00c20034dc9b981e3d82e79fbab135221de3 /sys/dev/xen | |
parent | 04c247a1d073b57419345ae83581f2cb4db7d61f (diff) | |
download | src-6dd38b8716bd9c53029707749f00ced53c5ceb7c.tar.gz src-6dd38b8716bd9c53029707749f00ced53c5ceb7c.zip |
tcp/lro: Use tcp_lro_flush_all in device drivers to avoid code duplication
And factor out tcp_lro_rx_done, which deduplicates the same logic with
netinet/tcp_lro.c
Reviewed by: gallatin (1st version), hps, zbb, np, Dexuan Cui <decui microsoft com>
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5725
Notes
Notes:
svn path=/head/; revision=297482
Diffstat (limited to 'sys/dev/xen')
-rw-r--r-- | sys/dev/xen/netfront/netfront.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/sys/dev/xen/netfront/netfront.c b/sys/dev/xen/netfront/netfront.c index 22ca81c45ccf..7add70ac5c1d 100644 --- a/sys/dev/xen/netfront/netfront.c +++ b/sys/dev/xen/netfront/netfront.c @@ -1202,7 +1202,6 @@ xn_rxeof(struct netfront_rxq *rxq) struct netfront_info *np = rxq->info; #if (defined(INET) || defined(INET6)) struct lro_ctrl *lro = &rxq->lro; - struct lro_entry *queued; #endif struct netfront_rx_info rinfo; struct netif_rx_response *rx = &rinfo.rx; @@ -1296,11 +1295,7 @@ xn_rxeof(struct netfront_rxq *rxq) /* * Flush any outstanding LRO work */ - while (!SLIST_EMPTY(&lro->lro_active)) { - queued = SLIST_FIRST(&lro->lro_active); - SLIST_REMOVE_HEAD(&lro->lro_active, next); - tcp_lro_flush(lro, queued); - } + tcp_lro_flush_all(lro); #endif xn_alloc_rx_buffers(rxq); |