From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=S0r0zICT; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTPS id 875455A0274 for ; Thu, 09 Apr 2026 09:40:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775720456; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/PzTGLgQjPUCXtmTwXru4jL7HlyyuEmWwr37xaSfxpU=; b=S0r0zICTbmbKHTsSjIw5ZB7Tnr/j4fyUOAZ13u08NqmWz56ltFY+uBbRp+4/98QDxNb7oI 8OcMjewE7vlbEVJQ9aqmeKcxv+AFjQSJ7FzFnlsRaFqip9mPIOgPTFVHurDdMYxSdKEy/X VBpFsXFl8lJv83wdYR5dvRBLrSGzY8k= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-163-HQ-z0DyzOc69Dk4pMuP7fw-1; Thu, 09 Apr 2026 03:40:54 -0400 X-MC-Unique: HQ-z0DyzOc69Dk4pMuP7fw-1 X-Mimecast-MFC-AGG-ID: HQ-z0DyzOc69Dk4pMuP7fw_1775720453 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-43d0de4bfb7so654777f8f.3 for ; Thu, 09 Apr 2026 00:40:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775720453; x=1776325253; h=date:content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=/PzTGLgQjPUCXtmTwXru4jL7HlyyuEmWwr37xaSfxpU=; b=eOGQzXaHLQacgFxLygEE/f1QvEM6YdFs1d4kTqCgh2C0c69jgHnzbgbRvYpEGbnEO7 Vh8T6ueqgW3VcaRbYVsawZs1HSaCbkLohhGJs2g75v3FmvtNdBZVhxn5OVdhdCGGPcVb kXtmgPMF0zTW8lyu02+5G9NlNnYnGCOCqKbnI+cbUzvcnyejPabACwPFmvXtCMs/+IOx fs1xDjGkPoO3aMfk8gtAPYBh6DfhCf+3KwT/h8yPcnwsfNgDvdTvYOjtrNTI8+nKfhmd 22XVPc/LuulbxpghAlnRObyHQysGUBxu6xnqIGpmjkQnyx2VnLGLZuC6XNH2Y0SWiBxc 89pw== X-Gm-Message-State: AOJu0Yz197QNEOKCDlJcg5ZxGJNTBPDtqzLyxKROYVIyilnpuVzjtBis Rnj3C05rX7XXnIHj5K57cubwS/GcrpZbnAdtpVWQMP6knmgFE6iqSObefnIQMlG1VWHg2Zsd8H0 AZUlFR2ApaFMlx0Yj4l/QML4WX5zf/nG3gmQMqv1rz31D3Cx6FHlmfw== X-Gm-Gg: AeBDiesD2Ipt+rhrVchYmBmHlOoZTLJ5p+O2uGo7/lv0Kdm9eaJp6Y+EjSmCU9HK4eH iknO/5vpJzEwcTybONpfFSuc52YHf19HAF/d+RP5hiuWCG284xEpDXIpZEHW9PNStVXDN7Gb4Gr AW97iPqZ65y6mvegLtlQxOKdPw8YhJAdtf0iFs822G6l78LG+gO2KYc8DnpLMJ/JmFjg+dKxmzJ 4D39N76Q4RFLJymXnCFTxFCcZ/6Bhn6L1iZVTjzNzKmhbdKId9zd1s9l/ioSmXO7DXgs/YPYLwk pVSbq22re24HlZ3Fw3oNT+eowd5BjPJibrmo2ggdvC3jsEKKjngqx/gcsCFpyMomcEhrTIxSDZJ i3zFDn03eKQFDqY9WjR8JbUiBJKJ/JL9e X-Received: by 2002:a05:6000:1789:b0:43d:533:953a with SMTP id ffacd0b85a97d-43d2926ae44mr34455053f8f.1.1775720452569; Thu, 09 Apr 2026 00:40:52 -0700 (PDT) X-Received: by 2002:a05:6000:1789:b0:43d:533:953a with SMTP id ffacd0b85a97d-43d2926ae44mr34454993f8f.1.1775720451971; Thu, 09 Apr 2026 00:40:51 -0700 (PDT) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [2a10:fc81:a806:d6a9::1]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43d5e969be7sm1969708f8f.6.2026.04.09.00.40.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Apr 2026 00:40:51 -0700 (PDT) From: Stefano Brivio To: David Gibson Subject: Re: [PATCH 13/18] conf: Rework stepping through chunks of port specifiers Message-ID: <20260409094049.78ff18db@elisabeth> In-Reply-To: References: <20260407031630.2457081-1-david@gibson.dropbear.id.au> <20260407031630.2457081-14-david@gibson.dropbear.id.au> <20260408234021.7f35406b@elisabeth> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.49; x86_64-pc-linux-gnu) MIME-Version: 1.0 Date: Thu, 09 Apr 2026 09:40:50 +0200 (CEST) X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: Qq_UMf7JlSfBoHVpCJmLGUlRk58eYh7DHF_hRVnvDXc_1775720453 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: K2SXOJI5UP7I3EHV4H5VT6S7R5SBPXRZ X-Message-ID-Hash: K2SXOJI5UP7I3EHV4H5VT6S7R5SBPXRZ X-MailFrom: sbrivio@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Thu, 9 Apr 2026 10:13:26 +1000 David Gibson wrote: > On Wed, Apr 08, 2026 at 11:40:22PM +0200, Stefano Brivio wrote: > > On Tue, 7 Apr 2026 13:16:25 +1000 > > David Gibson wrote: > > > > > Port specifier strings are made up of ',' separated chunks. Rework the > > > logic we use to step through the chunks. > > > > > > Specifically, maintain a pointer to the end of each chunk as well as the > > > start. This is not really used yet, but will be useful in future. > > > > > > This also has side effect on semantics. Previously an empty specifier (0 > > > chunks) was not accepted. Now it is, and will be treated as an "exclude > > > only" spec which excludes only ephemeral ports. > > > > Not really, because getopt_long() wants an argument for those options > > anyway. > > This allows an *empty* specifier, not a missing one. i.e. > $ pasta -t '' -u '' > > That's a kind of weird thing to do, but it does work after this patch. Ah, oops, right, of course. -- Stefano