summaryrefslogtreecommitdiffstats
path: root/sys/ofed/drivers
diff options
context:
space:
mode:
authorsephe <sephe@FreeBSD.org>2016-04-01 06:28:33 +0000
committersephe <sephe@FreeBSD.org>2016-04-01 06:28:33 +0000
commitd0428dd51cb76234d1d95cd80c1d247adfa0c2bb (patch)
tree35cb00c20034dc9b981e3d82e79fbab135221de3 /sys/ofed/drivers
parentcff47489671a6ec6470f706f530df99c158511b0 (diff)
downloadFreeBSD-src-d0428dd51cb76234d1d95cd80c1d247adfa0c2bb.zip
FreeBSD-src-d0428dd51cb76234d1d95cd80c1d247adfa0c2bb.tar.gz
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
Diffstat (limited to 'sys/ofed/drivers')
-rw-r--r--sys/ofed/drivers/net/mlx4/en_rx.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/sys/ofed/drivers/net/mlx4/en_rx.c b/sys/ofed/drivers/net/mlx4/en_rx.c
index 16bf597..b29096d 100644
--- a/sys/ofed/drivers/net/mlx4/en_rx.c
+++ b/sys/ofed/drivers/net/mlx4/en_rx.c
@@ -561,9 +561,6 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud
struct mbuf *mb;
struct mlx4_cq *mcq = &cq->mcq;
struct mlx4_cqe *buf = cq->buf;
-#ifdef INET
- struct lro_entry *queued;
-#endif
int index;
unsigned int length;
int polled = 0;
@@ -669,10 +666,7 @@ next:
/* Flush all pending IP reassembly sessions */
out:
#ifdef INET
- while ((queued = SLIST_FIRST(&ring->lro.lro_active)) != NULL) {
- SLIST_REMOVE_HEAD(&ring->lro.lro_active, next);
- tcp_lro_flush(&ring->lro, queued);
- }
+ tcp_lro_flush_all(&ring->lro);
#endif
AVG_PERF_COUNTER(priv->pstats.rx_coal_avg, polled);
mcq->cons_index = cons_index;
OpenPOWER on IntegriCloud