From nobody Thu Jul 07 08:44: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 6987A8D2EA4; Thu, 7 Jul 2022 08:44:55 +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 4LdqjM2XXnz4SSS; Thu, 7 Jul 2022 08:44:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657183495; 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=WHaZqvt9mWMuPPmOzsqGob9hUyOLs5x1tCStt4uvSa0=; b=xSyLB1H9oRK1TGMPjtb355eu2NRwM0BphepupMbbQQ/eNNtWGeHwmLng68Q7SW7wv2JX/C l79mrDta/uVzeP1NNNXPgD6gjB3pIl35TvTQY4tvplqrHBKa1OGiM5t3DnJCdyCxbwQZaE UZjeOtqU8lzs6xq51J1PaQx2U4pGlQ98yLwwEzWY7he32hYX6xqmsh3/4Hlp8iSeBdrHK/ eo+kjKZFb61jaG2pSV/eA6GNSYimaOzNlmyXFMqree/siIcdqwvvcdd78MIuHQGAG47ZZN QJGCp83Ye2PTeR/QVF1ZWrbnQUX9b0QyvDafKmNte56iGOT8jJXNE9mGmOIsKQ== 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 4LdqjM1brLzcff; Thu, 7 Jul 2022 08:44: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 2678itE7058691; Thu, 7 Jul 2022 08:44:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2678it6b058690; Thu, 7 Jul 2022 08:44:55 GMT (envelope-from git) Date: Thu, 7 Jul 2022 08:44:55 GMT Message-Id: <202207070844.2678it6b058690@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 37f604b49d4a - main - vnet: make VNET_FOREACH() always be a loop 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 37f604b49d4aa1d27ad8d034ec33007bc8013671 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657183495; 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=WHaZqvt9mWMuPPmOzsqGob9hUyOLs5x1tCStt4uvSa0=; b=KsyIGHJwPOt0JvQc8brEED0dM4GByPpOsfjEuBzT9phpx/3Ukz13JEc7zL7uaO0wgNapyg 6h5S0doNdacRCf+VUigRITcNXyhoLGJCT01SsLgvpvR/+pc4JPOqumlQy/oC/6n+2m6GTq b/8jekGkGWrilhZsUIrF0deoUnDE3euALaekCA+AnbSjI1yYEUxR0Sc9ESSv36DyTfg3Id irPmPoG1lvJOroPXisVYQQH4omOLLfstMOnRg4d4qsjNEtjNq7l00OITD6vOVBnx8JAhOS vsqA/HJgSwtNvOu5CnEzeL34T+C3uZLwi7dQ08sUqdOkYQ2oo7PidgVXsauEhQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1657183495; a=rsa-sha256; cv=none; b=lSLo2AaNVptLhZna3erfr6KEowzQ32ogP6aKIw7C36QfZVLsYQQkrePn/o0Io/qQCsYv+2 UlfWJZUURtVi8RJOfdzrSFn45ZU95wZpvbSABn/q9cD4AvbDCRf0byc7Ln5G6t2sDAZGAw D495bR8lGewiJo6j5lHbhAbcOsBw4sR1NZdspHxg6G1uVu7Fyn6YJRQHWqdQYU+TtauStt VvsIdNi1d277P9NB7VF3i/kI/CGlxfFkExpM862kacIcmHeGYDcpC+2/4wsr8x2Uzz3Q2o o5oTt/X1lNj/94T+J39A7DRs8tjAN6y5lcq7bfqVw33llM3mHb9WFZTkTurspQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=37f604b49d4aa1d27ad8d034ec33007bc8013671 commit 37f604b49d4aa1d27ad8d034ec33007bc8013671 Author: Kristof Provost AuthorDate: 2022-07-06 09:13:52 +0000 Commit: Kristof Provost CommitDate: 2022-07-07 07:52:21 +0000 vnet: make VNET_FOREACH() always be a loop VNET_FOREACH() is a LIST_FOREACH if VIMAGE is set, but empty if it's not. This means that users of the macro couldn't use 'continue' or 'break' as one would expect of a loop. Change VNET_FOREACH() to be a loop in all cases (although one that is fixed to one iteration if VIMAGE is not set). Reviewed by: karels, melifaro, glebius Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D35739 --- sys/net/vnet.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/vnet.h b/sys/net/vnet.h index 48c2536be8b4..afb6857bbccc 100644 --- a/sys/net/vnet.h +++ b/sys/net/vnet.h @@ -414,7 +414,7 @@ do { \ #define VNET_LIST_RUNLOCK() #define VNET_LIST_RUNLOCK_NOSLEEP() #define VNET_ITERATOR_DECL(arg) -#define VNET_FOREACH(arg) +#define VNET_FOREACH(arg) for (int _vn = 0; _vn == 0; _vn++) #define IS_DEFAULT_VNET(arg) 1 #define CRED_TO_VNET(cr) NULL