Date: Thu, 26 Aug 2021 19:36:49 +0200 From: tuexen@freebsd.org To: "src-committers@freebsd.org" <src-committers@FreeBSD.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@FreeBSD.org>, "dev-commits-src-main@freebsd.org" <dev-commits-src-main@FreeBSD.org> Subject: Re: git: 26d79d40a74f - main - Hyper-V: hn: Enter network epoch when required Message-ID: <62898771-43CF-42E3-81DF-E3467F5BD7C4@freebsd.org> In-Reply-To: <202108261732.17QHWLXT023797@gitrepo.freebsd.org> References: <202108261732.17QHWLXT023797@gitrepo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> On 26. Aug 2021, at 19:32, Michael Tuexen <tuexen@freebsd.org> wrote: >=20 > The branch main has been updated by tuexen: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D26d79d40a74fc804c76acd88a1f8f10f= 9827a2b3 >=20 > commit 26d79d40a74fc804c76acd88a1f8f10f9827a2b3 > Author: Michael Tuexen <tuexen@FreeBSD.org> > AuthorDate: 2021-08-26 17:27:04 +0000 > Commit: Michael Tuexen <tuexen@FreeBSD.org> > CommitDate: 2021-08-26 17:32:00 +0000 >=20 > Hyper-V: hn: Enter network epoch when required >=20 > PR: 254695 Missing: Reviewed by: hselasky, gallatin Tested by: gbe MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D31679 > --- > sys/dev/hyperv/netvsc/if_hn.c | 8 ++++++++ > 1 file changed, 8 insertions(+) >=20 > diff --git a/sys/dev/hyperv/netvsc/if_hn.c = b/sys/dev/hyperv/netvsc/if_hn.c > index cd0b5a5fa8b9..0ec398bed670 100644 > --- a/sys/dev/hyperv/netvsc/if_hn.c > +++ b/sys/dev/hyperv/netvsc/if_hn.c > @@ -83,6 +83,7 @@ __FBSDID("$FreeBSD$"); > #include <sys/taskqueue.h> > #include <sys/buf_ring.h> > #include <sys/eventhandler.h> > +#include <sys/epoch.h> >=20 > #include <machine/atomic.h> > #include <machine/in_cksum.h> > @@ -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 >=20 > /* > @@ -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; > } >=20 > + NET_EPOCH_ENTER(et); > /* Each range represents 1 RNDIS pkt that contains 1 Ethernet = frame */ > for (i =3D 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 =3D (i =3D=3D (count - 1)); > hn_rndis_rxpkt(rxr, rxr->hn_rxbuf + ofs, len); > } > + NET_EPOCH_EXIT(et); >=20 > /* > * Ack the consumed RXBUF associated w/ this channel packet,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?62898771-43CF-42E3-81DF-E3467F5BD7C4>