From nobody Wed Feb 01 22:44:11 2023 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 4P6cRJ0WnKz3cFB3; Wed, 1 Feb 2023 22:44:12 +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 4P6cRJ037zz4MvB; Wed, 1 Feb 2023 22:44:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675291452; 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=LtiJcXDFLRgleHwvvvn77TZBVk7jwmM6ko+addaMQ/c=; b=j1qPrV3epoNHAJvvc9jnV2fzAWB0eeTT0n08Ulo7irHtgju3ku2zAYOAaMYC0ahL19QFzA /ee2w5V0AElSoW6EVEtiM2Se8Oo2pMa510swEi0+Pf49lqkE8dQxh/kcUfmJ6HeLhrVSBg 7k4ZTyPOUIi17hUaKlibvwOFUsQnD+mKdpvjK2XH7XluGjCBWU9h+ogiKCy9y770CBDLwi bdBfMNsGB+LTWmFbPRl86vFQ623ahXaIlArzY9hhu/T0u59MsOeRR3fTDWY74D48ew/J+Z b4ExYWCDXFIfLG0i4y7FgKQgFR0d/2ex1Cz6GtPFKUX+MgKcklqzMaq9vkyQ+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675291452; 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=LtiJcXDFLRgleHwvvvn77TZBVk7jwmM6ko+addaMQ/c=; b=NaPIPXbLa903OB/CtzLiqKWrCViBoz6U49RLQj34MOhUQuvpM3gHyuT5IOxfPj90B/uPfN sOI4VPqMIkHdU27HRmdzdaQiGcTolUsxI+CXChn3jck0Ho5qKYdIJtdo3E3yvCmSEP9mTM hp9K64VbJ4HGoIQVqecNtwhBkrGj+Esb7rthOIo07uDr9IS9jWmqpazUpZlu4Rf4OCnKQP NyO4K8L/RJSiaR/ZgEV/JcqBjCxxFboZAanBRMP784BXbPycgaVhv/0cEQC8skf5hRLDrj 0qCc4C7C3SCxfwtKApcT4vtIB7Hi5ivoaHiAlRILxUuYUQ1jqfXWRDy5BCS4ow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675291452; a=rsa-sha256; cv=none; b=VoUzVzxoYCmlfPjt+ZB/KfdhhGtjtgB9JLFdU2QwyNioc10nExn0eZKnJfnER0/f657PTN vkvONK48w+T1jB1YDyXTc8cKSIAkKuIY6ebZwUeVdzDqK8Zc6eC/fD8ji031g7fY0C26fd 2iINrVSs8tWi5P6C+tje0L/nNbZS6k9YewmxXCWtNRVYI3GgpWeh3+RPKMFXAo/HhlMeng p69gRSBURgaPDL68gQf1/KwfMUUvC2UgwRfrdYWuhXxtt8TfW+TbZ3UWMTq2N5Wi9NTSzC DxGRg1yNza/ADjRG18FnCI+h2QJKH+aQLWRRggMGrAYApbJoarVP27tyrJiU0Q== 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 4P6cRH6BLdzWjx; Wed, 1 Feb 2023 22:44:11 +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 311MiBia002079; Wed, 1 Feb 2023 22:44:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 311MiBB3002078; Wed, 1 Feb 2023 22:44:11 GMT (envelope-from git) Date: Wed, 1 Feb 2023 22:44:11 GMT Message-Id: <202302012244.311MiBB3002078@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: 126767e314cc - stable/13 - if_vtnet: improve dumping a kernel 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: 126767e314ccdc77c82b6f29aeda3b715b31683a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=126767e314ccdc77c82b6f29aeda3b715b31683a commit 126767e314ccdc77c82b6f29aeda3b715b31683a Author: Michael Tuexen AuthorDate: 2022-04-18 22:40:31 +0000 Commit: Michael Tuexen CommitDate: 2023-02-01 22:43:44 +0000 if_vtnet: improve dumping a kernel Disable software LRO during kernel dumping, because having it enabled requires to be in a network epoch, which might or might not be the case depending on the code path resulting in the panic. Reviewed by: markj Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D34787 (cherry picked from commit 53236f905dbf4f3d58b1d5eff5c9b14f100d0c5d) --- sys/dev/virtio/network/if_vtnet.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/sys/dev/virtio/network/if_vtnet.c b/sys/dev/virtio/network/if_vtnet.c index 2b25fbfb6b93..79011a2abfb8 100644 --- a/sys/dev/virtio/network/if_vtnet.c +++ b/sys/dev/virtio/network/if_vtnet.c @@ -4388,8 +4388,27 @@ vtnet_debugnet_init(struct ifnet *ifp, int *nrxr, int *ncl, int *clsize) } static void -vtnet_debugnet_event(struct ifnet *ifp __unused, enum debugnet_ev event __unused) +vtnet_debugnet_event(struct ifnet *ifp, enum debugnet_ev event) { + struct vtnet_softc *sc; + static bool sw_lro_enabled = false; + + /* + * Disable software LRO, since it would require entering the network + * epoch when calling vtnet_txq_eof() in vtnet_debugnet_poll(). + */ + sc = if_getsoftc(ifp); + switch (event) { + case DEBUGNET_START: + sw_lro_enabled = (sc->vtnet_flags & VTNET_FLAG_SW_LRO) != 0; + if (sw_lro_enabled) + sc->vtnet_flags &= ~VTNET_FLAG_SW_LRO; + break; + case DEBUGNET_END: + if (sw_lro_enabled) + sc->vtnet_flags |= VTNET_FLAG_SW_LRO; + break; + } } static int