Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 May 2021 14:03:48 GMT
From:      Andrew Gallatin <gallatin@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: df8437a93dd5 - main - cxgbe: fix enabling lro & rxtimestamps
Message-ID:  <202105261403.14QE3mLC029627@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by gallatin:

URL: https://cgit.FreeBSD.org/src/commit/?id=df8437a93dd5268e5bfd06411c01a5cbdb38c6ac

commit df8437a93dd5268e5bfd06411c01a5cbdb38c6ac
Author:     Andrew Gallatin <gallatin@FreeBSD.org>
AuthorDate: 2021-05-26 13:54:26 +0000
Commit:     Andrew Gallatin <gallatin@FreeBSD.org>
CommitDate: 2021-05-26 14:00:07 +0000

    cxgbe: fix enabling lro & rxtimestamps
    
    A recent change caused iq flags, like LRO, to be set before
    init_iq(). However, init_iq() clears those flags, so they
    became effectively impossible to set.   This change moves
    the initializion of these flags to after the call to init_iq().
    This fixes LRO.
    
    Differential Revision: https://reviews.freebsd.org/D30460
    Reviewed by: np, rrs
    Sponsored by: Netflix
    Fixes: 43bbae19483fbde0a91e61acad8a6e71e334c8b8 <https://reviews.freebsd.org/R10:43bbae19483fbde0a91e61acad8a6e71e334c8b8>"
---
 sys/dev/cxgbe/t4_sge.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c
index 4b685129193e..0b429c602a91 100644
--- a/sys/dev/cxgbe/t4_sge.c
+++ b/sys/dev/cxgbe/t4_sge.c
@@ -3938,12 +3938,7 @@ alloc_rxq(struct vi_info *vi, struct sge_rxq *rxq, int idx, int intr_idx,
 		if (rc != 0)
 			return (rc);
 		MPASS(rxq->lro.ifp == ifp);	/* also indicates LRO init'ed */
-
-		if (ifp->if_capenable & IFCAP_LRO)
-			rxq->iq.flags |= IQ_LRO_ENABLED;
 #endif
-		if (ifp->if_capenable & IFCAP_HWRXTSTMP)
-			rxq->iq.flags |= IQ_RX_TIMESTAMP;
 		rxq->ifp = ifp;
 
 		snprintf(name, sizeof(name), "%d", idx);
@@ -3953,6 +3948,12 @@ alloc_rxq(struct vi_info *vi, struct sge_rxq *rxq, int idx, int intr_idx,
 
 		init_iq(&rxq->iq, sc, vi->tmr_idx, vi->pktc_idx, vi->qsize_rxq,
 		    intr_idx, tnl_cong(vi->pi, cong_drop));
+#if defined(INET) || defined(INET6)
+		if (ifp->if_capenable & IFCAP_LRO)
+			rxq->iq.flags |= IQ_LRO_ENABLED;
+#endif
+		if (ifp->if_capenable & IFCAP_HWRXTSTMP)
+			rxq->iq.flags |= IQ_RX_TIMESTAMP;
 		snprintf(name, sizeof(name), "%s rxq%d-fl",
 		    device_get_nameunit(vi->dev), idx);
 		init_fl(sc, &rxq->fl, vi->qsize_rxq / 8, maxp, name);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202105261403.14QE3mLC029627>