From: David Gibson <david@gibson.dropbear.id.au>
To: Jon Maloy <jmaloy@redhat.com>
Cc: sbrivio@redhat.com, dgibson@redhat.com, passt-dev@passt.top
Subject: Re: [PATCH v3 2/2] doc: Document CIDR notation support for -a/--address option
Date: Sun, 21 Dec 2025 23:11:25 +1100 [thread overview]
Message-ID: <aUfj7R4A4hbPPaer@zatzit> (raw)
In-Reply-To: <20251218222213.703693-3-jmaloy@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 3005 bytes --]
On Thu, Dec 18, 2025 at 05:22:13PM -0500, Jon Maloy wrote:
> Update the man page to document the new CIDR notation support:
>
> - Update -a/--address to show addr[/prefix_len] syntax
> - Document that prefix length (0-32) can be appended for IPv4
> - Note that mixing CIDR notation with -n results in an error
> - Update -n/--netmask to mention CIDR alternative
>
> Signed-off-by: Jon Maloy <jmaloy@redhat.com>
I don't see much reason to keep this a separate patch from the
previous one.
> ---
> passt.1 | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/passt.1 b/passt.1
> index db0d662..117239f 100644
> --- a/passt.1
> +++ b/passt.1
> @@ -156,10 +156,14 @@ By default, the advertised MTU is 65520 bytes, that is, the maximum 802.3 MTU
> minus the length of a 802.3 header, rounded to 32 bits (IPv4 words).
>
> .TP
> -.BR \-a ", " \-\-address " " \fIaddr
> +.BR \-a ", " \-\-address " " \fIaddr\fR[\fB/\fR\fIprefix_len\fR]
> Assign IPv4 \fIaddr\fR via DHCP (\fByiaddr\fR), or \fIaddr\fR via DHCPv6 (option
> 5) and an \fIaddr\fR-based prefix via NDP Router Advertisement (option type 3)
> for an IPv6 \fIaddr\fR.
> +For IPv4 addresses, an optional \fB/\fR\fIprefix_len\fR (0-32) can be
> +appended in CIDR notation (e.g., 192.168.1.1/24). This is an alternative to
> +using the \fB-n\fR, \fB--netmask\fR option. Mixing CIDR notation with
> +\fB-n\fR results in an error.
This seems to imply that the CIDR notation is only for Ipv4, which is
not what's implemented.
> This option can be specified zero (for defaults) to two times (once for IPv4,
> once for IPv6).
> By default, assigned IPv4 and IPv6 addresses are taken from the host interfaces
> @@ -172,7 +176,9 @@ is assigned for IPv4, and no additional address will be assigned for IPv6.
> .TP
> .BR \-n ", " \-\-netmask " " \fImask
> Assign IPv4 netmask \fImask\fR, expressed as dot-decimal or number of bits, via
> -DHCP (option 1).
> +DHCP (option 1). Alternatively, the prefix length can be specified using CIDR
> +notation with the \fB-a\fR, \fB--address\fR option (e.g., \fB-a\fR 192.168.1.1/24).
> +Mixing \fB-n\fR with CIDR notation results in an error.
> By default, the netmask associated to the host address matching the assigned one
> is used. If there's no matching address on the host, the netmask is determined
> according to the CIDR block of the assigned address (RFC 4632).
Pre-existing, but this seems a bit misleading. If we *don't* specify
-a, then, yes, the netmask will be copied from the host, along with
the address. If we specify a specific address with -a, I think we'll
always use the network class (which is rarely useful these days), even
if the specified address happens to be one that's on the host.
--
David Gibson (he or they) | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you, not the other way
| around.
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2025-12-21 12:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-18 22:22 [PATCH v3 0/2] conf: Support CIDR notation " Jon Maloy
2025-12-18 22:22 ` [PATCH v3 1/2] " Jon Maloy
2025-12-21 12:06 ` David Gibson
2025-12-18 22:22 ` [PATCH v3 2/2] doc: Document CIDR notation support " Jon Maloy
2025-12-21 12:11 ` David Gibson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aUfj7R4A4hbPPaer@zatzit \
--to=david@gibson.dropbear.id.au \
--cc=dgibson@redhat.com \
--cc=jmaloy@redhat.com \
--cc=passt-dev@passt.top \
--cc=sbrivio@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).