From nobody Fri Dec 10 10:51:27 2021 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 EA17618DAE43; Fri, 10 Dec 2021 10:51:27 +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 4J9SPq4RWgz3JCQ; Fri, 10 Dec 2021 10:51:27 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 7899718CFE; Fri, 10 Dec 2021 10:51:27 +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 1BAApRTQ028353; Fri, 10 Dec 2021 10:51:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BAApRAg028352; Fri, 10 Dec 2021 10:51:27 GMT (envelope-from git) Date: Fri, 10 Dec 2021 10:51:27 GMT Message-Id: <202112101051.1BAApRAg028352@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: 42cb69e147e3 - stable/13 - Hyper-V: hn: Enter network epoch when required 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: 42cb69e147e30000bd35c97d4212da4540b862dd Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639133487; 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=kIxoIdO2ccTkMsaig1JhhIL83o62K8600HUyPzWmBpI=; b=hLcRhG3tvLQUC36fxdksx/T1EFofULf/OnSQ2nLU97V6ee6YJmYjKSduSPUuK/PW9l2Tja tzWT2g30BPJI5bm8mdS/pIXEY9UpOekvcTtJMuMj/MdfAyOisri4xqF9XELQRXBUEDsbjj /KbnI7dFRXFRi6GutUu6FeYubRUrtZWo26s/lF6WvgwbEJyctMoEnAOUsIZXqU8FdPKUH9 dazodwReLdUX1kHOWn95lt7QkEZV1XzYXt50f+rDFUnDVmAD1Fgwge4Fo5KNG4uGl3eGzK 8tjG6NRkN6guLGZ1XbjkDtJeKSkv+AYjXOPCA5IuVozXkpffBoEZSIHVo0HpFg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639133487; a=rsa-sha256; cv=none; b=n6F4Jl2Z1uOocQGRhlaq58tt7v0/Yo1zh7cXMfCLh8Hborw5fL1ukIJaD6WL/Lru46y171 q8v7KwgUx44CE4PJeuByqdXwJ6CaUWbLPP+Ub/f6cVZ1/ySm14TSqHqYh0xhyhKjgtRywH snp3G6tFT2IyCL10LexRAzQU6KTW0fHW6Wz1vKry4Aj44EeGTlQenBGM/qNlwm415LMx2P BX3GrxgV6jz//bXwj6eGgv++rKNhS5rZ7l0WThrGMB+ze+OETTHiyisnfMujveAMh5PFGk MnD105EXDXG39fIF7KI3hgLUyNLeolIdOPFkVEgZYjrLZNctITUisJ5IHiXiHw== 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=42cb69e147e30000bd35c97d4212da4540b862dd commit 42cb69e147e30000bd35c97d4212da4540b862dd Author: Michael Tuexen AuthorDate: 2021-08-26 17:27:04 +0000 Commit: Michael Tuexen CommitDate: 2021-12-10 10:50:01 +0000 Hyper-V: hn: Enter network epoch when required PR: 254695 (cherry picked from commit 26d79d40a74fc804c76acd88a1f8f10f9827a2b3) --- sys/dev/hyperv/netvsc/if_hn.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/dev/hyperv/netvsc/if_hn.c b/sys/dev/hyperv/netvsc/if_hn.c index 725e3d7a7553..d562a937ecad 100644 --- a/sys/dev/hyperv/netvsc/if_hn.c +++ b/sys/dev/hyperv/netvsc/if_hn.c @@ -83,6 +83,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -2883,7 +2884,11 @@ static void hn_chan_rollup(struct hn_rx_ring *rxr, struct hn_tx_ring *txr) { #if defined(INET) || defined(INET6) + struct epoch_tracker et; + + NET_EPOCH_ENTER(et); tcp_lro_flush_all(&rxr->hn_lro); + NET_EPOCH_EXIT(et); #endif /* @@ -7459,6 +7464,7 @@ static void hn_nvs_handle_rxbuf(struct hn_rx_ring *rxr, struct vmbus_channel *chan, const struct vmbus_chanpkt_hdr *pkthdr) { + struct epoch_tracker et; const struct vmbus_chanpkt_rxbuf *pkt; const struct hn_nvs_hdr *nvs_hdr; int count, i, hlen; @@ -7496,6 +7502,7 @@ hn_nvs_handle_rxbuf(struct hn_rx_ring *rxr, struct vmbus_channel *chan, return; } + NET_EPOCH_ENTER(et); /* Each range represents 1 RNDIS pkt that contains 1 Ethernet frame */ for (i = 0; i < count; ++i) { int ofs, len; @@ -7511,6 +7518,7 @@ hn_nvs_handle_rxbuf(struct hn_rx_ring *rxr, struct vmbus_channel *chan, rxr->rsc.is_last = (i == (count - 1)); hn_rndis_rxpkt(rxr, rxr->hn_rxbuf + ofs, len); } + NET_EPOCH_EXIT(et); /* * Ack the consumed RXBUF associated w/ this channel packet,