From nobody Fri Jun 17 19:38:06 2022 X-Original-To: dev-commits-src-branches@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 02CEC85B112; Fri, 17 Jun 2022 19:38:07 +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 4LPq8H1SHNz3QF1; Fri, 17 Jun 2022 19:38:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655494687; 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=GRVWpyFbT2zvWwba/PiMAAyXdtNw32Zi74a/JQ3KMZs=; b=U5zXJxwTUYX+68P2wFNE+AUXRGyJGMcBtzV37IHy/GixjuOZhzepHFwBQGlzSearCKDTsS lH569E40amOKedFwRGYfttk7KwAgo1zjg+gBHh51kfsuPQZWRZOH9Mo4kloxxVR6ixv9pX fBoQwZPQEZU8dQ3zOTs4FVn6pnPkflKL0AsK6LyP2/aw0vorwKGFhIqdjfNZzgFdNWdkIH 56u+ObBVS7zCac1B0Vh50+ZpwgVCfoFJFro4SZewWo2Ak1Yvsd26ZyYrCAksky5QvfMcj2 1qRBEfkjzvTPvYTtCDIs3WHbEdTol16PVDg6WTx0qZ35RwJNwaHYy+D6ATTMnQ== 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 CFF7925D05; Fri, 17 Jun 2022 19:38:06 +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 25HJc6H2014244; Fri, 17 Jun 2022 19:38:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25HJc6LB014243; Fri, 17 Jun 2022 19:38:06 GMT (envelope-from git) Date: Fri, 17 Jun 2022 19:38:06 GMT Message-Id: <202206171938.25HJc6LB014243@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dmitry Chagin Subject: git: 130e81199136 - stable/13 - linux(4): Add LINUX_RATELIMIT_MSG macro for future use. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 130e81199136ae65cf186e5a551fc276a2d24944 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655494687; 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=GRVWpyFbT2zvWwba/PiMAAyXdtNw32Zi74a/JQ3KMZs=; b=HbstJZqraK3yjkvUMWVLkZvz1MuapRn5SYqR9gqVdKmMZpcvSE/jBj/0ARwQSRogcwRsfc bJ8SBy2PqSfgu0D9hm9X3ZlNElWtj8xtuoUqTSBSt9BNDfs8in5ZaKBzm/VWhOqhVDGOq6 JAfpYomOXnM08ZEvHbRGoGm6KEq4EqYF/MIsipOAS2JPRDjXQS3qYn6FituX4nJLTNhiYJ /CrdsLN+q2Zzca//PwBV8QphgJ1yZnuWe9ioh/chL8CiRSVBRCMlzG0UQfUiasIYcHL6c3 sIxpl3BRD+a8uP//eKJuQDc0Se46Y8QnkeL3BudYJZFHzvmGvwv+y+36+PnhEg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1655494687; a=rsa-sha256; cv=none; b=ijzCIP0aAYACdV/9AILy7/CbJiglA9BIkya3hU00ql4ew2WCKV3euDSQ9lucOMa0zWaq2S +J0oQLArbPCb+GXZaFrdb2uboPzbazYFKxGVGrt0bE+KAECe+0mzgG4TwYvJa12FRhFiX8 bqCA3Jkz+DQO1pfDjXLXj/9nnNq76F7+o5LAuh5nLt7vXVCuNrihLp5NP6F46f/cFzyJ20 KSjoSKtYKazZJ8irbmX5Mqc95HEZTXytJfkRQ+ZiHSfMHfOmsPxB4Q/eWzFBHKyZUVeMgY +9ClOCjpc5ZaVKb70cuOQP35Ejy3ju5t6XsGH9DKy1fdtxtx3nIxmTg3ZwWcWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=130e81199136ae65cf186e5a551fc276a2d24944 commit 130e81199136ae65cf186e5a551fc276a2d24944 Author: Dmitry Chagin AuthorDate: 2021-08-12 08:55:55 +0000 Commit: Dmitry Chagin CommitDate: 2022-06-17 19:33:32 +0000 linux(4): Add LINUX_RATELIMIT_MSG macro for future use. Differential Revision: https://reviews.freebsd.org/D31488 MFC after: 2 weeks (cherry picked from commit 0d77f6c0c350ae41acc0653a236a76d981773021) --- sys/compat/linux/linux_util.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sys/compat/linux/linux_util.h b/sys/compat/linux/linux_util.h index 7a8ec80cb1bf..d01058867f06 100644 --- a/sys/compat/linux/linux_util.h +++ b/sys/compat/linux/linux_util.h @@ -174,6 +174,18 @@ bool linux_use_real_ifname(const struct ifnet *ifp); } \ } while (0) +#define LINUX_RATELIMIT_MSG(_message) \ + do { \ + static int seen = 0; \ + \ + if (seen == 0) { \ + linux_msg(curthread, _message); \ + \ + if (linux_debug < 3) \ + seen = 1; \ + } \ + } while (0) + #define LINUX_RATELIMIT_MSG_OPT1(_message, _opt1) \ do { \ static int seen = 0; \