From nobody Mon Apr 18 22:44:52 2022 X-Original-To: dev-commits-src-main@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 DD4095D1E4C; Mon, 18 Apr 2022 22:44:52 +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 4Kj27S5tBCz3lL5; Mon, 18 Apr 2022 22:44:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650321892; 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=arXyA+3PvS9foI9JMJvm2KUcY1aQZnHGmsUZ07zL5zw=; b=YWgQL8idfrzHEQaK8xg9B+UIXN7cbupiHbauTjvqZerhPPjStLnDBewf41Ef6pJXjyQkeh q19rqkEUyUV0I3ntqOTMbW+6in4s2xvpP+cSeaCwMvgh2FzVGBYgmVpyAOQcKMJRQAob5F VSAtN+yKZhMUz5uRAfElvJ8AodEuaNViXnVE3tyVtcjteiQOvqybGstWlYXJR2WBEmO8Av w5Oao/MrW1r+asRKJY7Zdr988GtaHU0dCeg+2k2XYYYw/piSCyoNKyVuknIpo1GY2ZTLEW QbxzxbHjiLDMz9uCESsZKADQ6qJeINorF6UCLlgzXtPgifcnuNk0BkKVatGlBA== 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 AA4EC1BBAA; Mon, 18 Apr 2022 22:44:52 +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 23IMiqxD085418; Mon, 18 Apr 2022 22:44:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23IMiq2a085417; Mon, 18 Apr 2022 22:44:52 GMT (envelope-from git) Date: Mon, 18 Apr 2022 22:44:52 GMT Message-Id: <202204182244.23IMiq2a085417@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 53236f905dbf - main - if_vtnet: improve dumping a kernel List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 53236f905dbf4f3d58b1d5eff5c9b14f100d0c5d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650321892; 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=arXyA+3PvS9foI9JMJvm2KUcY1aQZnHGmsUZ07zL5zw=; b=if4oJ0iT8LcD+EH1SEIhwI3xHeMLb9mMKeoyUVsU7pVHwmVZOdYpAoqXN38o31LwLZ9uBs hMcx0Uv1GMR3ezp5do8Br4TaaggHLfioTCNsxFy292DTmZGRU+57RwdnkJhM0UBo/rzfp9 DoQ/STzeS7dTolw9TX7JM6iW/VUxSzl3ud3jJ/65kt5193FslB35LiaXb1XrI+ow22hiZe MTVCbh8P9+MtFOkZy90VdEDKIK5mVZkduN9MqArtbDP0o5J0OkMSsE3H9u5pct76V2weY8 S/LHWFogsfv93hDZoHZw9fYV3ISu/V7TUF4FsO7t9FYobgRG2/MUfeZtdbyXqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1650321892; a=rsa-sha256; cv=none; b=OAGMu5gNzHdG9G9hqM6MW5eJuPZ17ahukB9Xe93b9eagT7RPDPM7oJxEnPhnbYPeUJsgvt oGNznvB7XRimPd+qCzjX8e5Zqos6z7F6FbILlkc0T0GpUbZJsFbHHTACu+LTTP8ow/BMtV 8KnxtiLD08jiGEF5XuOUEX0fLycRFZcuUdVSV8+QyGBQKLJEp2kTaVxH1nMtmzKfkeUBuU XP3D6WBRAplZLIun+/eLDUl6O95Yr20ZAjIf1jfkQAHCY0RlnKMdoKM++T7oVek36FERKk nXS2ijnAlAy9tn05i7uB1CB8MumH9i0AQtfhdVouTNhasmfA50QYqLwCa6LFUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=53236f905dbf4f3d58b1d5eff5c9b14f100d0c5d commit 53236f905dbf4f3d58b1d5eff5c9b14f100d0c5d Author: Michael Tuexen AuthorDate: 2022-04-18 22:40:31 +0000 Commit: Michael Tuexen CommitDate: 2022-04-18 22:40:31 +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 MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D34787 --- 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 bb659b7b2ef5..d86dec6a141d 100644 --- a/sys/dev/virtio/network/if_vtnet.c +++ b/sys/dev/virtio/network/if_vtnet.c @@ -4404,8 +4404,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