From nobody Fri Jan 21 05:19:00 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 CC5E51958D7E; Fri, 21 Jan 2022 05:19:00 +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 4Jg72r5Nfsz3F2T; Fri, 21 Jan 2022 05:19:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642742340; 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=De+n2KNNlribQCzvcOeP6BJ1Vsh9R5lA+rwfxaxToaw=; b=HfqUvR+CG8JEXYOHkvNyOkGqOB0GA9L7hRChYTL4QGbsEnOfFKeEoiATqB2Nj3umbp4eWA lBVKM6KnDEkjWcuFMKRb9YdScqYIJJFiRJZMDtr33UGRjRwnmu9ZtvEY+nc01eVTGpS3PT ARcMrP6y0CSvEYRrOw0zeD6gvIEs2wqjn+w0ZeLxqn8LhGq05Es6NQf7STwdJn3ndVbxpv c8OzCP/g4PNvHxKSsEJSq4Nx3OifZ53/Er85eysfYYY5pgZJ/+LHRnILE0ziuUC+KLmgGO T1UY8Mtnj0dgSaT7GxdwQFV6z+/VBDCc/j80HJdSJI0lMoBkkt6m5WsRwaV+EA== 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 936B815F60; Fri, 21 Jan 2022 05:19:00 +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 20L5J0qV029300; Fri, 21 Jan 2022 05:19:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20L5J0bd029299; Fri, 21 Jan 2022 05:19:00 GMT (envelope-from git) Date: Fri, 21 Jan 2022 05:19:00 GMT Message-Id: <202201210519.20L5J0bd029299@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wojciech Macek Subject: git: 58630bdd13fd - main - Revert "ip_mroute: do not call epoch_waitwhen lock is taken" 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: wma X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 58630bdd13fd086fe11f239528ee7a82e2b9d685 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642742340; 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=De+n2KNNlribQCzvcOeP6BJ1Vsh9R5lA+rwfxaxToaw=; b=HbEDDxdO8pD5kmUJ5kXFSChxYJHY/d7WL75GmzQQKpofTSz4bZTAVKDbkRaUm6y7OAEDAh EBICqWtsYf/s9r9oUJ0LHFSSz2fWnmj+M4jt+5uOVdjIiEyQTIHKAc7GQqrF2og5IFnG0O Fo8j5t0kGl+Py83OQxNGA2YbSXp+eLBRqSmwqYowURuWxblPFfaOpppAGMElNI7OkChVKm gLJjMUOsqJRG3HvzQMmGbj63k6Jdrl6PFICfTBGXFCwiqwNqHb1mEg/8z0cB60pR0PSPmo xnHsbbTe+nw0QhpyHq0vIvMS1uWkA+oxMhbu62XCXrmbEYRWwKf9iTgiox3rqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1642742340; a=rsa-sha256; cv=none; b=FX4TB/2NO3XjZhe9+lwKDno95C7+OCVbyovoJuTeAcsyObXpkka3hw7NFtjZWwdZlkbj5e LVLvkPXGJTX6CZ582KUSk3PnyFBzfIJYy0tDDyYxSMYberbhC3LiXCNKpfDtwV0MGoMpu4 H5AbqVjosON4/HnoQinbW1GQlYxavBZ1XvT8aFSDvYHaH7oqUFi0DobkNKuzDTzUxTOUN7 iDbFirXGSWK9hjlBgJq7BO3R06rgiynyuCPA0Oo+pAxs8nprhve5X8aa1fFv7B0QM4Gv3f n7sLpq8kTaND0OwD08VPsE3HfCMPB9kSwCqOPOkNDXStnD/c7vP88siYQtzmZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by wma: URL: https://cgit.FreeBSD.org/src/commit/?id=58630bdd13fd086fe11f239528ee7a82e2b9d685 commit 58630bdd13fd086fe11f239528ee7a82e2b9d685 Author: Wojciech Macek AuthorDate: 2022-01-20 12:12:23 +0000 Commit: Wojciech Macek CommitDate: 2022-01-21 05:17:19 +0000 Revert "ip_mroute: do not call epoch_waitwhen lock is taken" This reverts commit 2e72208b6c622505323ed48dc58830fc307392b1. --- sys/netinet/ip_mroute.h | 9 ++++----- sys/netinet/raw_ip.c | 1 - 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/sys/netinet/ip_mroute.h b/sys/netinet/ip_mroute.h index faf5b8c72a46..65c5bdd3a025 100644 --- a/sys/netinet/ip_mroute.h +++ b/sys/netinet/ip_mroute.h @@ -365,12 +365,11 @@ extern int (*ip_mrouter_set)(struct socket *, struct sockopt *); extern int (*ip_mrouter_get)(struct socket *, struct sockopt *); extern int (*ip_mrouter_done)(void); extern int (*mrt_ioctl)(u_long, caddr_t, int); -extern int ip_mrouter_critical_section_cnt; -#define MROUTER_RLOCK_TRACKER -#define MROUTER_RLOCK() atomic_add_int(&ip_mrouter_critical_section_cnt, 1) -#define MROUTER_RUNLOCK() atomic_subtract_int(&ip_mrouter_critical_section_cnt, 1) -#define MROUTER_WAIT() do {} while (atomic_load_int(&ip_mrouter_critical_section_cnt) != 0) +#define MROUTER_RLOCK_TRACKER struct epoch_tracker mrouter_et +#define MROUTER_RLOCK() epoch_enter_preempt(net_epoch_preempt, &mrouter_et) +#define MROUTER_RUNLOCK() epoch_exit_preempt(net_epoch_preempt, &mrouter_et) +#define MROUTER_WAIT() epoch_wait_preempt(net_epoch_preempt) #endif /* _KERNEL */ diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c index dc49c36f25ad..7c495745806e 100644 --- a/sys/netinet/raw_ip.c +++ b/sys/netinet/raw_ip.c @@ -120,7 +120,6 @@ VNET_DEFINE(struct socket *, ip_mrouter); int (*ip_mrouter_set)(struct socket *, struct sockopt *); int (*ip_mrouter_get)(struct socket *, struct sockopt *); int (*ip_mrouter_done)(void); -int ip_mrouter_critical_section_cnt; int (*ip_mforward)(struct ip *, struct ifnet *, struct mbuf *, struct ip_moptions *); int (*mrt_ioctl)(u_long, caddr_t, int);