From nobody Mon Apr 04 20:57:57 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id CB21B1A98228; Mon, 4 Apr 2022 20:57:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KXNQY5M4wz4h3x; Mon, 4 Apr 2022 20:57:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649105877; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fab7QWVnKr/CHZu7k0UmJZwqmsDq1387EMiAYxq/h7U=; b=vtErvnUUGQUYTYKdVBP77Gun60S5PFTKDC+8X624bRkbUWsry9UJ7kbbl5Bwv1ovE4xQJS 6oO3+FUs2+mDQpZSeDZP2Xbv98DX0PMSA5T5sG0bSA7ss0ApBo0FWdm/kYV8zqOrMZ3KRe kvcWxzhbgQHgRaSJcSVHNveGmaHoXTV//TdmcmUHxxB+D6NYXclyqMFbCyT61SOuM9IHwS po/v72LotHZ2LWUB4Y8W3plUoSX45Z2IHzKKz2hxeVZ6fqYbP7VF+A+2a3thCZDXI7y3YR XxtI7qfrohURb1vDOaTRhbSaHk15Ui35yh+CjmJEemdUQbVeKIWUCyKFAlQzrA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 97D4219676; Mon, 4 Apr 2022 20:57:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 234KvvkS088461; Mon, 4 Apr 2022 20:57:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 234KvvbW088460; Mon, 4 Apr 2022 20:57:57 GMT (envelope-from git) Date: Mon, 4 Apr 2022 20:57:57 GMT Message-Id: <202204042057.234KvvbW088460@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Navdeep Parhar Subject: git: 3aad5b1fe251 - releng/13.1 - cxgbe: fix enabling lro & rxtimestamps List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: np X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.1 X-Git-Reftype: branch X-Git-Commit: 3aad5b1fe251d2a4a0d5f8b0832931dbb96ec1cd Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649105877; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fab7QWVnKr/CHZu7k0UmJZwqmsDq1387EMiAYxq/h7U=; b=mDnekP/qb8SULwJmXUctho+IvK9coI26gaG8ivsV41XfvZx2BXs85yrrOhYcza3YslgU1s y4/nJmEDXybn7CJKCWrKQ7Q70U08By8qiHGAphhhrJDRlr92WfYpLK7MUZaATZZkI1XJvg wLs/TsIjGbUkuTZaeybiHnmHL9iqzzSyzit1UCVa4xDcTwgvVDXwWMwcFf+t8CSc/fwyIc 5LodTWakMFCqcq1jNnqbSnhYd74kAKkRk74kgmfjJM8IEjfxIJU97UsoaDgu3xy2DQnREd OiPTLjy/JZf9KYDLcKiq+FintNkEVm98f2vVBYlU9UPRSaVwZgo///LLUoDazA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649105877; a=rsa-sha256; cv=none; b=nUUPXnjsrmpNdxm0MkT4RryTsTjPzgS5xByAbzgBvZR3oIJ26o/yau5M93nHj0aspDOEIJ Jn/u8u/KSaqUXFW81OWqlZIUxloeJrubzvXpTDnHHR+tB4iYyBoRQxJD5hS3YVMpmjaS// v6aOdiWLCBGrMqTKa/bHKxzxaUfL4BuYpNHtX8gErGnVf5mUc/skgu+udi+HWTZygsE930 Qwm8egcod21rCMDXtSfaOV9K8GQiARpBQ5RkKpg1yMpFbZYg8ZchZn3ov/XRvjCG0FqxUr 7bZyjBtwt6TSy5DGQ/apGxakQx+QzcffKZOf87v8YKqV0odQgYUIr4/E4jWVBw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch releng/13.1 has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=3aad5b1fe251d2a4a0d5f8b0832931dbb96ec1cd commit 3aad5b1fe251d2a4a0d5f8b0832931dbb96ec1cd Author: Andrew Gallatin AuthorDate: 2021-05-26 13:54:26 +0000 Commit: Navdeep Parhar CommitDate: 2022-04-04 20:05:03 +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 (cherry picked from commit df8437a93dd5268e5bfd06411c01a5cbdb38c6ac) (cherry picked from commit 392d7f026962b273cdcd3b230403efaa05f29efe) Approved by: re@ (gjb@) --- 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 1c2102f4f06e..da0ac13c90e4 100644 --- a/sys/dev/cxgbe/t4_sge.c +++ b/sys/dev/cxgbe/t4_sge.c @@ -3953,12 +3953,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); @@ -3968,6 +3963,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);