From nobody Tue May 03 17:28:55 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 A3A1D1AC739C; Tue, 3 May 2022 17:28:56 +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 4Kt6Q00X5pz3DRs; Tue, 3 May 2022 17:28:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651598936; 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=BhWVx3CK1AyvqicACYBbO7jUjJClrVTE2YTntqDw9bE=; b=P6yZX6vF5K4Dnex/9iew+XVmrVThWbL/tKcwg1wWhl8VCQhZpZclgHWux05OSbJz5Q2BMy yQ60i1Pj1rEcfxXhlfHMbFg+D3+e3z1Q/6i0pa3He3mDWkk+SQM72aSn8h3oUv9u5kSv9i EaVV0r3nvmIGcDERwYS3iPoRUGpxLp7jTc2/9DizJYUf8wcq27SYsWgnU6Dmn+/2AkQQr1 IGnA9AbRmrT7gHtpX/le6n8auKu3oeO2zBqSOS0ZU97LJqDiYMqGke93lo8lmiPyBIIJoX 9jN0XO81CGWZNeBqG03qsZppoys59hvYErIxerFkc1aEqM0bhTbYKyKaRD652A== 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 C7E0C229AE; Tue, 3 May 2022 17:28:55 +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 243HStc9049998; Tue, 3 May 2022 17:28:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 243HStK6049997; Tue, 3 May 2022 17:28:55 GMT (envelope-from git) Date: Tue, 3 May 2022 17:28:55 GMT Message-Id: <202205031728.243HStK6049997@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marko Zec Subject: git: 0fa5636966c9 - main - Revert "netisr: serialize/restore m_pkthdr.rcvif when queueing mbufs" 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: zec X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0fa5636966c9033ac5a987e1361820a7e15a01a4 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651598936; 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=BhWVx3CK1AyvqicACYBbO7jUjJClrVTE2YTntqDw9bE=; b=mKvLlCu/c0BV0FOyBMOJUPdEYhd8OmD9m7b5ZWI3swvwmAq2CNbN7EXGri4RPBJOUaDEJd +NWRkPkK5W2mfhyZY2E2/+x1cYY+bI4n/wmHQqM+LzDu76RqkV1IdjBal00unnzkZMNQxJ mhf7lJF6cfagivjvO/UltPFw8DrcOVT/iXLcsxCtAwASgg5eO087YahTB73n7e43jEL/ZO 9iXExtxb/eRreRUDx4IpNhnsmiqHHTvacv1qYuvarVOTpgWca0jFA6ct4vTsQsGw7z6/Qm wexSfX3LSujOW+xE055b4Cv0sOddd3XHcrX1tbNkJiADk3QEDD2SGEQcWoTxHQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1651598936; a=rsa-sha256; cv=none; b=b2G6Q1m94QNSfXEu3Vm7slSTTSbVyZLjjRubQPgS37fxaNeK/upHr//hN0ft/zP3qhvQRj 8a0ufZMFSiuCkEdOVKvKj8CKEv5OAxoE3i/gk/EcFy6bHPMih3g8IdkT4sIXWqihkL/vVC MyKIqUfj+dQG/PDTcxMR+e16wr7rMCknLDnELLllazjzlOaF08mZ+vlZ/U+ZmVbLE0flOs nEKFpgHxfmr9J1G+/7T2AKxAW4EjEuOVi17AtCdWyqEHwjRg0S64Kx0YT41GM+yORRly56 BUN6dXKAZvS8vDiwliUG1U/bqGH/RDJo52pNCDU/J9EVVyb/DXVDH8SupaOabQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by zec: URL: https://cgit.FreeBSD.org/src/commit/?id=0fa5636966c9033ac5a987e1361820a7e15a01a4 commit 0fa5636966c9033ac5a987e1361820a7e15a01a4 Author: Marko Zec AuthorDate: 2022-05-03 14:54:50 +0000 Commit: Marko Zec CommitDate: 2022-05-03 17:11:39 +0000 Revert "netisr: serialize/restore m_pkthdr.rcvif when queueing mbufs" This reverts commit 6871de9363e559fef6765f0e49acc47f77544999. Obtained from: github.com/glebius/FreeBSD/commits/backout-ifindex --- sys/net/netisr.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/sys/net/netisr.c b/sys/net/netisr.c index 4d0bce3bedfc..e4abea317440 100644 --- a/sys/net/netisr.c +++ b/sys/net/netisr.c @@ -700,11 +700,9 @@ netisr_register_vnet(const struct netisr_handler *nhp) static void netisr_drain_proto_vnet(struct vnet *vnet, u_int proto) { - struct epoch_tracker et; struct netisr_workstream *nwsp; struct netisr_work *npwp; struct mbuf *m, *mp, *n, *ne; - struct ifnet *ifp; u_int i; KASSERT(vnet != NULL, ("%s: vnet is NULL", __func__)); @@ -725,14 +723,11 @@ netisr_drain_proto_vnet(struct vnet *vnet, u_int proto) */ m = npwp->nw_head; n = ne = NULL; - NET_EPOCH_ENTER(et); while (m != NULL) { mp = m; m = m->m_nextpkt; mp->m_nextpkt = NULL; - if ((ifp = ifnet_byindexgen(mp->m_pkthdr.rcvidx, - mp->m_pkthdr.rcvgen)) != NULL && - ifp->if_vnet != vnet) { + if (mp->m_pkthdr.rcvif->if_vnet != vnet) { if (n == NULL) { n = ne = mp; } else { @@ -741,12 +736,10 @@ netisr_drain_proto_vnet(struct vnet *vnet, u_int proto) } continue; } - /* This is a packet in the selected vnet, or belongs - to destroyed interface. Free it. */ + /* This is a packet in the selected vnet. Free it. */ npwp->nw_len--; m_freem(mp); } - NET_EPOCH_EXIT(et); npwp->nw_head = n; npwp->nw_tail = ne; NWS_UNLOCK(nwsp); @@ -920,10 +913,8 @@ netisr_process_workstream_proto(struct netisr_workstream *nwsp, u_int proto) if (local_npw.nw_head == NULL) local_npw.nw_tail = NULL; local_npw.nw_len--; - if (__predict_false(m_rcvif_restore(m) == NULL)) { - m_freem(m); - continue; - } + VNET_ASSERT(m->m_pkthdr.rcvif != NULL, + ("%s:%d rcvif == NULL: m=%p", __func__, __LINE__, m)); CURVNET_SET(m->m_pkthdr.rcvif->if_vnet); netisr_proto[proto].np_handler(m); CURVNET_RESTORE(); @@ -995,7 +986,6 @@ netisr_queue_workstream(struct netisr_workstream *nwsp, u_int proto, *dosignalp = 0; if (npwp->nw_len < npwp->nw_qlimit) { - m_rcvif_serialize(m); m->m_nextpkt = NULL; if (npwp->nw_head == NULL) { npwp->nw_head = m;