From nobody Tue Feb 22 22:38:09 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 2D7C119E1937; Tue, 22 Feb 2022 22:38:10 +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 4K3Db60lxKz3KLf; Tue, 22 Feb 2022 22:38:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645569490; 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=NM6xRj5BIGIWBzYztXCFqtqeInbo2/xkAVxWSAngP4w=; b=NeV1QV1ZWv4Abg9+OWJTRo404PXETbFzF2cTGuFIXV/TPmv7ULz6hasLmFynVBL1jb9E+o WR1YUZuIvrGaKiuadheFAptgCa7FWR7KN0SF7OAiO0bmqS4qcmOJs4aZFqihgoz4B9si6G /nBAvygjcLIetHO59qHloSEztAWm2RAT6d7BxgpgukSQx98HXJpC1Sb6NJDnFNVVHblAea StqFBddTua7gsJln/Y3SqAcmns2hn2Mk52GK437kbKL/GRKjVOZyrLkyovXsoRLlzXe8RS 9E4u76qPV3DjIh8U1SYKWjuHBOzYZrLyMIcZZRfrgV6vUs2hNUHVX0IKFw6aFw== 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 EF6054BA7; Tue, 22 Feb 2022 22:38:09 +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 21MMc9Xw042137; Tue, 22 Feb 2022 22:38:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21MMc9pb042136; Tue, 22 Feb 2022 22:38:09 GMT (envelope-from git) Date: Tue, 22 Feb 2022 22:38:09 GMT Message-Id: <202202222238.21MMc9pb042136@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 2a2dd4bd435d - stable/13 - tcp: make network epoch expectations of LRO explicit 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: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2a2dd4bd435d2ad29e89f0be75d849dc910f66f3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645569490; 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=NM6xRj5BIGIWBzYztXCFqtqeInbo2/xkAVxWSAngP4w=; b=rjrL44ecvIthQssiYLgPO5dTXGkWvL9U+HKA5mjfGpv0TCBu7i7NFXcWL7grkKcKUbl2Nk BfxTn3r/KbXKTQHVbUJ7rus4F2aLjlAbkzdvbKzzAC8RnwqorBunytbFcOnuqKYePvWsNs O9a+gh0ykguWfeqx8KY6U3SEW+PatOknnQky+Jtp5DD0tMEEPn1O42DixAGHKm+L825ReN Cb5f18Zw8cF+Ae1cVSZTeJOMUHB3Lx4CWG5OXoYc2wEIlxU6bcmdS7c02dBilIxerrbFKz k6F0etuvMv0Fg3kHVhbxM2hHekRrYNu3Gcyaol4pGdItU+haD/Z4UQfhUAgCSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1645569490; a=rsa-sha256; cv=none; b=JC1M3DwVr0k5UE+3iNJhdaadncjcDFkXXrwPKlRv6XNXZp8NANmGicO+O8ooeQt/Uxef+y 4wbpTIhjQBFU9vO1S7QadSh4RsNYNO7bDWiC3rjaGH9AvwTYswvZlCVOE2LO3H3rwky6XR Kx0OTAr76rGzplTDJXT08QpBUqgvBCdPbAUYGXVqD6OaErhmLofRRjVG2CwPqvKgPTtiy0 g8/HcUNUIcsbS33SW6dXRiU+KAT160fnA+66Ls3MzdMzTx2GEsNaLojhA5qk6j9tF2rAb2 lv60oJOTIR26Y/8JSkk9yOYs4RWIWmjXYTY0gNFhOg7uIkVwPZxNfxaUOi7anw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=2a2dd4bd435d2ad29e89f0be75d849dc910f66f3 commit 2a2dd4bd435d2ad29e89f0be75d849dc910f66f3 Author: Michael Tuexen AuthorDate: 2021-08-25 15:09:25 +0000 Commit: Michael Tuexen CommitDate: 2022-02-22 22:37:44 +0000 tcp: make network epoch expectations of LRO explicit Reviewed by: gallatin, hselasky Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D31648 (cherry picked from commit dc6ab77d66f892566de926274e6a58a637975510) --- sys/netinet/tcp_lro.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/netinet/tcp_lro.c b/sys/netinet/tcp_lro.c index cfc84707abd2..d53391454062 100644 --- a/sys/netinet/tcp_lro.c +++ b/sys/netinet/tcp_lro.c @@ -574,6 +574,7 @@ tcp_lro_flush_inactive(struct lro_ctrl *lc, const struct timeval *timeout) uint64_t now, tov; struct bintime bt; + NET_EPOCH_ASSERT(); if (LIST_EMPTY(&lc->lro_active)) return; @@ -1172,8 +1173,6 @@ tcp_lro_lookup(struct ifnet *ifp, struct lro_parser *pa) { struct inpcb *inp; - NET_EPOCH_ASSERT(); - switch (pa->data.lro_type) { #ifdef INET6 case LRO_TYPE_IPV6_TCP: @@ -1363,7 +1362,10 @@ tcp_lro_flush(struct lro_ctrl *lc, struct lro_entry *le) /* Only optimise if there are multiple packets waiting. */ #ifdef TCPHPTS int error; +#endif + NET_EPOCH_ASSERT(); +#ifdef TCPHPTS CURVNET_SET(lc->ifp->if_vnet); error = tcp_lro_flush_tcphpts(lc, le); CURVNET_RESTORE(); @@ -1474,6 +1476,7 @@ tcp_lro_flush_all(struct lro_ctrl *lc) uint64_t nseq; unsigned x; + NET_EPOCH_ASSERT(); /* check if no mbufs to flush */ if (lc->lro_mbuf_count == 0) goto done; @@ -1894,6 +1897,7 @@ tcp_lro_rx(struct lro_ctrl *lc, struct mbuf *m, uint32_t csum) void tcp_lro_queue_mbuf(struct lro_ctrl *lc, struct mbuf *mb) { + NET_EPOCH_ASSERT(); /* sanity checks */ if (__predict_false(lc->ifp == NULL || lc->lro_mbuf_data == NULL || lc->lro_mbuf_max == 0)) {