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=N6B/iUwq; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTPS id 845225A0265 for ; Thu, 07 May 2026 04:10:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778119839; 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=GgM80F9QCIBwqNbdtrJ2m6ngQjpTpTSE5QbtUdqXdls=; b=N6B/iUwq307Q1bGQLvHYNPzAYC4KGrVbdhpNH2vhApYzoN8F84PSB7Np0bCm9/juGGL69c nhSnZlSjP8Mnb+zc6erP5KO+R6i7lYRFY1Xx9pcghm6C5Lch+IMkAwMVnuVlsUahy8NDp9 UbVZx5R/SYmhJpi2v7PwdahE74d0jds= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-580-Z5YwAn8yOVqOzW6DKBBpKg-1; Wed, 06 May 2026 22:10:38 -0400 X-MC-Unique: Z5YwAn8yOVqOzW6DKBBpKg-1 X-Mimecast-MFC-AGG-ID: Z5YwAn8yOVqOzW6DKBBpKg_1778119835 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-48d144d3428so1444385e9.3 for ; Wed, 06 May 2026 19:10:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778119835; x=1778724635; 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=GgM80F9QCIBwqNbdtrJ2m6ngQjpTpTSE5QbtUdqXdls=; b=elkaglONyB7bZHHS7bdIKGDoAQjTzHK+GKzt8z76tCRr8ajPNFM55emoxoBCIN5Mvi WCYBDGv+3g4U+6jX77c3XdZIQOR578VtZDeLB/rD/IZDk0cn5/Ah3E08rQc2NWwaywxL COcHsEg3sK3H6VIDujwqgfJUqXAc/WAp2w1AmBarjDLjFnF0gbMrGvujzWy7U0r9ggul c4fY0otC/Yv7OKuhwpqpOptlqJkqM8eDF7ynHX+38TVfuBL+yRcnGfmPkK1fTrdeRB4S 1pv4Cp+FW4TwH5n9L/4QSUjeKFVn8a+c+GcZcr5D+GMKZNvtPV3dW6eYRLZ60zZUO/+7 gJ1A== X-Gm-Message-State: AOJu0YxFgDOtJ/SIP+up+lRfUZz49E0LYofe4I17S4pd+gg8PaEgPAkk 09XNUzQ8gnc525ctOZ552aluyoXp58wJZLL5E998Ds7dRNGD7BvEuwbtBPiy1ELqiPnuLEroJzm vYnvZmGPkjg4+FQQQRnknPzUq2KSnFuvg+uJSlKWZ+jI4OJkVT+JUiw== X-Gm-Gg: AeBDiesLQJsXU8+9ZsOcIEWNa8PzEfHHbVhOjSS/FYCXEi+U45yJo5P4kHb7RtRJVRx 3EW9BMlHxuiEOD5djekH/ueSdWt7+gDyC31f86By6vB6Aw3rbESDZ6f68woMfZI6wYyWlFy63Ai h4/s+mJdT/B7JG32zfQy7uNpeV9iRrCHqRb5FQ92sQZr3R0lToyoFlGxU4mLNxxMzZGQOev/CUk O/U9YdWC6uBXYFNwtQjbRlwp5T43CUb2m/IEMa0z4Aqp6x9YKwHW3QdtchKqxOfGyJzR9iAlYvk uRGRa4DDYSjWmQgu2OMzkYVi/JqCMWArzNN3+sCfnM2MujIoV4eckpDG0MTlQ7eUF3JZF7cvz9s 2jUfw/FfCCnFmaQZJQ+k8C8svya+MP0jnbRl1jTOwM2w= X-Received: by 2002:a05:600c:1f0d:b0:48a:93d2:60d2 with SMTP id 5b1f17b1804b1-48e51dd9772mr90316575e9.0.1778119834789; Wed, 06 May 2026 19:10:34 -0700 (PDT) X-Received: by 2002:a05:600c:1f0d:b0:48a:93d2:60d2 with SMTP id 5b1f17b1804b1-48e51dd9772mr90316275e9.0.1778119834331; Wed, 06 May 2026 19:10:34 -0700 (PDT) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [2a10:fc81:a806:d6a9::1]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48e538a547bsm94866485e9.5.2026.05.06.19.10.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 May 2026 19:10:33 -0700 (PDT) From: Stefano Brivio To: David Gibson Subject: Re: [PATCH v11 19/23] pesto, conf, fwd_rule: Add options and modes to add, delete, clear rules Message-ID: <20260507041032.065058a1@elisabeth> In-Reply-To: References: <20260506213155.1886983-1-sbrivio@redhat.com> <20260506213155.1886983-20-sbrivio@redhat.com> 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, 07 May 2026 04:10:33 +0200 (CEST) X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: O03kkVzCMFZHPDlP5kFD5rLgIq_3H9Aa9MgCA2RqoZQ_1778119835 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: FHTPR3IMB3EY6ESJ2VTYY32XUB2QAA32 X-Message-ID-Hash: FHTPR3IMB3EY6ESJ2VTYY32XUB2QAA32 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, Jon Maloy , Laurent Vivier , Paul Holzinger 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, 7 May 2026 09:51:10 +1000 David Gibson wrote: > On Wed, May 06, 2026 at 11:31:51PM +0200, Stefano Brivio wrote: > > Instead of just being able to add to the existing tables, implement > > an explicit --clear option to replace them, which now becomes the > > default behaviour, and implement explicit --add and --delete options > > to maintain the table and add or delete specific ports. > > > > The option --clear PIF forces the clearing of a table, instead. > > > > These options can be combined arbitrarily and are handled as > > sequential commands, as now described in pesto(1). > > > > If no option is given before forwarding specifiers for a matching > > table, the command line is interpreted as a replacement of the > > existing rules. > > > > To this end: > > > > - there's no protocol change, as pesto is anyway sending updated > > copies of the table > > > > - the forwarding table functions now include a new fwd_rule_del(), > > which deletes existing rule only if a matching one is found > > > > - a trivial fwd_rule_clear() is factored out from the existing > > conf_handler() implementation, so that it can be directly used > > in pesto > > > > The entry points for parsing of port specifiers now take an additional > > 'del' parameter which is passed down all the way before reaching the > > fwd_rule_add() implementation. If a rule should be deleted, at that > > point, fwd_rule_del() is called instead. > > > > Signed-off-by: Stefano Brivio > > Reviewed-by: Laurent Vivier > > Reviewed-by: David Gibson > > Several concerns below, but they can all be addressed as follow ups. Just to set expectations: I won't take care of those, mostly because there are actual blocking issues (not with this series, they would also be follow up) that I'm trying to take care of instead, see e.g.: https://github.com/containers/container-libs/pull/755#issuecomment-4392427315 so you'll need to follow up with patches, in case (and expect delays in reviews). -- Stefano