From 9087a3df608ffcfcd1e8b83f00031fffe0f42aaf Mon Sep 17 00:00:00 2001 From: Navdeep Parhar Date: Mon, 3 Feb 2020 23:06:42 +0000 Subject: [PATCH] cxgbe(4): Only checksummed TCP should be considered for LRO. This avoids the per-packet nanouptime in tcp_lro_rx for traffic that's not even TCP. MFC after: 1 week Sponsored by: Chelsio Communications --- sys/dev/cxgbe/t4_sge.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c index 53b7673374bf..b32cb5426045 100644 --- a/sys/dev/cxgbe/t4_sge.c +++ b/sys/dev/cxgbe/t4_sge.c @@ -2040,7 +2040,9 @@ t4_eth_rx(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m0) m0->m_pkthdr.numa_domain = ifp->if_numa_domain; #endif #if defined(INET) || defined(INET6) - if (iq->flags & IQ_LRO_ENABLED) { + if (iq->flags & IQ_LRO_ENABLED && + (M_HASHTYPE_GET(m0) == M_HASHTYPE_RSS_TCP_IPV4 || + M_HASHTYPE_GET(m0) == M_HASHTYPE_RSS_TCP_IPV6)) { if (sort_before_lro(lro)) { tcp_lro_queue_mbuf(lro, m0); return (0); /* queued for sort, then LRO */