On Fri, Sep 23, 2022 at 05:41:41PM -0400, Josiah Frentsos wrote:
> Index: vm.conf.5
> ===================================================================

hi. some comments, inline:

> RCS file: /cvs/src/usr.sbin/vmd/vm.conf.5,v
> retrieving revision 1.59
> diff -u -p -r1.59 vm.conf.5
> --- vm.conf.5 13 Sep 2022 10:28:19 -0000      1.59
> +++ vm.conf.5 23 Sep 2022 19:36:01 -0000
> @@ -25,8 +25,7 @@
>  .Nm
>  is the configuration file to configure the virtual machine monitor
>  (VMM) subsystem.
> -A VMM manages virtual machines (VMs) on a
> -.Ar host .
> +A VMM manages virtual machines (VMs) on a host.
>  The VMM subsystem is responsible for creating, destroying, and
>  executing VMs.
>  .Pp
> @@ -45,8 +44,7 @@ Configuration for each individual virtua
>  Configuration for virtual switches.
>  .El
>  .Pp
> -Within the sections,
> -the
> +Within the sections, the
>  .Ar bytes
>  argument can be specified with a human-readable scale,
>  using the format described in
> @@ -91,7 +89,11 @@ vm "vm1.example.com" {
>  .Sh GLOBAL CONFIGURATION
>  The following setting can be configured globally:
>  .Bl -tag -width Ds
> -.It Ic agentx Oo Ic context Ar context Oc Oo Ic path Ar path Oc
> +.It Xo
> +.Ic agentx
> +.Op Ic context Ar context
> +.Op Ic path Ar path
> +.Xc

in the past, we had to use Xo/Xc when dealing with long argument lists.
that is no longer the case, so Xo/Xc now is used less. in cases like
this, using them is basically adding extra macros, but gaining the
benefit of potentially (depending on where you stand) making the doc
source look tidier.

personally i would make a change like this only if all the other list
items were formatted this way. but here they are not, so i would not.

you could however replace the final Oo/Oc with a single Op.

>  Export vm metrics via an AgentX compatible
>  .Pq snmp
>  daemon by connecting to
> @@ -102,9 +104,9 @@ If
>  .Ar path
>  is omitted it will default to
>  .Pa /var/agentx/master .
> -.Ar Context
> +.Ar context
>  is the SNMPv3 context and can usually be omitted.
> -.It Ic local prefix Ar address Ns Li / Ns Ar prefix
> +.It Ic local prefix Ar address Ns / Ns Ar prefix
>  Set the network prefix that is used to allocate subnets for
>  local interfaces, see
>  .Ic local interface
> @@ -112,22 +114,23 @@ in the
>  .Sx VM CONFIGURATION
>  section below.
>  The default is
> -.Ar 100.64.0.0/10 .
> -.It Ic local inet6 Op Ic prefix Ar address Ns Li / Ns Ar prefix
> +.Cm 100.64.0.0/10 .

i don;t think either Ar or Cm really make sense. i would either quote it
(without using a macro) or not add any punctuation or mark up at all.

> +.It Ic local inet6 Op Ic prefix Ar address Ns / Ns Ar prefix
>  Enable IPv6 on local interfaces and allocate routable subnets.
>  If the prefix is not specified,
>  a random prefix from the
>  .Dq unique local
> -network range
> -.Ar fd00::/8
> -will be generated on startup.
> +network range fd00::/8 will be generated on startup.

so here you have done it without punctuation/mark up ;) that's what i'd
do too, above.

>  The specified prefix length must be /64 or smaller.
> -.It Cm socket owner Ar user : Ns Ar group
> -Set the control socket owner to the specified user and group.
> +.It Ic socket owner Ar user : Ns Ar group

i'd have to look seperately at the Ic/Cm change to try and decide what
makes sense where. to that end, i'd rather a diff for such changes was
mailed seperately.

> +Set the control socket owner to the specified
> +.Ar user
> +and
> +.Ar group .
>  Users with access to the control socket will be allowed to use
> -.Nm vmctl
> +.Xr vmctl 8
>  for restricted access to
> -.Nm vmd .
> +.Xr vmd 8 .
>  If only
>  .Ar user
>  is given,
> @@ -137,7 +140,7 @@ If only
>  is given,
>  only the group is set.
>  The default is
> -.Ar root : Ns Ar wheel .
> +.Cm root:wheel .

again, i would use no mark up, or quote it if you must.

>  .It Ic staggered start parallel Ar parallelism Ic delay Ar seconds
>  Start all configured VMs in a staggered fashion with
>  .Ar parallelism
> @@ -166,28 +169,28 @@ Typically this is a hostname.
>  .Pp
>  Followed by a block of parameters that is enclosed in curly brackets:
>  .Bl -tag -width Ds
> -.It Cm allow instance Brq ...
> +.It Ic allow instance Brq ...
>  Set the permissions to create VM instances.
>  See
>  .Sx VM INSTANCES .
> -.It Cm boot Ar path
> +.It Ic boot Ar path
>  Kernel or BIOS image to load when booting the VM.
>  If not specified, the default is to boot using the BIOS image in
>  .Pa /etc/firmware/vmm-bios .
> -.It Cm boot device Ar device
> +.It Ic boot device Ar device
>  Force VM to boot from
>  .Ar device .
>  Valid values are:
>  .Bl -tag -width "cdrom"
> -.It Ar cdrom
> +.It Cm cdrom
>  Boot the ISO image file specified using the
>  .Ic cdrom
>  parameter.
> -.It Ar disk
> +.It Cm disk
>  Boot from the disk image file specified using the
>  .Ic disk
>  parameter.
> -.It Ar net
> +.It Cm net
>  Boot the kernel specified using the
>  .Ic boot
>  parameter as if the VM was network booted.
> @@ -201,45 +204,50 @@ but rather a simulated network boot.
>  .El
>  .Pp
>  Currently
> -.Ar disk
> +.Cm disk
>  and
> -.Ar cdrom
> +.Cm cdrom
>  only work with VMs booted using BIOS.
> -.It Cm cdrom Ar path
> +.It Ic cdrom Ar path
>  ISO image file.
> -.It Cm enable
> +.It Ic enable
>  Automatically start the VM.
>  This is the default if neither
> -.Cm enable
> +.Ic enable
>  nor
> -.Cm disable
> +.Ic disable
>  is specified.
> -.It Cm disable
> +.It Ic disable
>  Do not start this VM.
> -.It Cm disk Ar path Op Cm format Ar fmt
> +.It Ic disk Ar path Op Ic format Ar fmt
>  Disk image file (may be specified multiple times to add multiple disk 
> images).
>  The format may be specified as either
> -.Ar qcow2
> +.Cm qcow2
>  or
> -.Ar raw .
> +.Cm raw .
>  If left unspecified, the format defaults to
> -.Pa raw
> +.Cm raw
>  if it cannot be derived automatically.
> -.It Oo Cm local Oc Cm interface Oo name Oc Op Brq ...
> +.It Xo
> +.Op Ic local
> +.Ic interface
> +.Op Ar name
> +.Op Brq ...
> +.Xc
>  Network interface to add to the VM.
>  The optional
>  .Ar name
>  can be either
> -.Sq tap
> +.Cm tap
>  to select the next available
>  .Xr tap 4
>  interface on the VM host side (the default) or
> -.Ar tapN
> +.Cm tap Ns Ar N
>  to select a specific one.
>  .Pp
>  Valid options are:
>  .Bl -tag -width Ds
> -.It Cm group Ar group-name
> +.It Ic group Ar group-name
>  Assign the interface to a specific interface
>  .Dq group .
>  For example, this can be used to write
> @@ -250,13 +258,17 @@ The
>  must not be longer than 15 characters or end with a digit,
>  as described in
>  .Xr ifconfig 8 .
> -.It Oo Cm locked Oc Cm lladdr Op Ar etheraddr
> +.It Xo
> +.Op Ic locked
> +.Ic lladdr
> +.Op Ar etheraddr
> +.Xc
>  Change the link layer address (MAC address) of the interface on the
>  VM guest side.
>  If not specified, a randomized address will be assigned by
>  .Xr vmd 8 .
>  If the
> -.Cm locked
> +.Ic locked
>  keyword is specified,
>  .Xr vmd 8
>  will drop packets from the VM with altered source addresses.
> @@ -268,52 +280,54 @@ If attaching to a switch that also has a
>  set, the
>  .Ar rdomainid
>  configured for the interface takes precedence.
> -.It Cm switch Ar name
> -Set the virtual switch
> -by
> +.It Ic switch Ar name
> +Set the virtual switch by
>  .Ar name .
>  See the
>  .Sx SWITCH CONFIGURATION
>  section about virtual switches.
>  This option is ignored if a switch with a matching name cannot be found.
> -.It Cm up
> +.It Ic up
>  Start the interface forwarding packets.
>  This is the default.
> -.It Cm down
> +.It Ic down
>  Stop the interface from forwarding packets.
>  .El
>  .Pp
>  A
> -.Cm local
> +.Ic local
>  interface will auto-generate an IPv4 subnet for the interface,
>  configure a gateway address on the VM host side,
>  and run a simple DHCP/BOOTP server for the VM.
>  This option can be used for layer 3 mode without configuring a switch.
>  .Pp
>  If the global
> -.Cm local inet6
> +.Ic local inet6
>  option is enabled, a routable IPv6 gateway address will be generated
>  on the host side.
>  Unlike the IPv4 option,
> -.Nm vmd
> +.Xr vmd 8
>  does not respond to DHCPv6 or router solicitation messages itself.
>  Use
>  .Xr rad 8
>  listening on the interface group, e.g.\&
> -.Ar interface tap
> +.Ic interface Cm tap
>  for auto-configuring the VMs accordingly.
> -.It Cm interfaces Ar count
> +.It Ic interfaces Ar count
>  Optional minimum number of network interfaces to add to the VM.
>  If the
>  .Ar count
>  is greater than the number of
>  .Ic interface
>  statements, additional default interfaces will be added.
> -.It Cm memory Ar bytes
> +.It Ic memory Ar bytes
>  Memory size of the VM, in bytes, rounded to megabytes.
>  The default is 512M.
> -.It Cm owner Ar user : Ns Ar group
> -Set the owner of the VM to the specified user and group.
> +.It Ic owner Ar user : Ns Ar group
> +Set the owner of the VM to the specified
> +.Ar user
> +and
> +.Ar group .
>  The owner will be allowed to start or stop the VM, pause or unpause the VM,
>  and open the VM's console.
>  If only
> @@ -343,7 +357,7 @@ except for exclusive options such as
>  .Ic disk ,
>  .Ic interface lladdr ,
>  or
> -.Ic interface name .
> +.Ic interface Ar name .
>  The configuration options are identical to the
>  .Sx VM CONFIGURATION ,
>  but restricted to the allowed instance options.
> @@ -352,7 +366,7 @@ The allowed instance options are configu
>  .Ar parent
>  VM:
>  .Bl -tag -width Ds
> -.It Cm allow instance Brq ...
> +.It Ic allow instance Brq ...
>  Allow users to use this VM as a template for VM instances.
>  By default, the root user can always create instances without
>  restrictions and users or non-root owners cannot create instances.
> @@ -362,28 +376,28 @@ if permitted, will be allowed to configu
>  .Pp
>  Valid options are:
>  .Bl -tag -width Ds
> -.It Cm boot
> +.It Ic boot
>  Allow user to configure the kernel or BIOS image.
>  The user needs read access to the image.
> -.It Cm cdrom
> +.It Ic cdrom
>  Allow user to configure the ISO file.
>  The user needs read access to the file.
> -.It Cm disk
> +.It Ic disk
>  Allow user to configure the disk images.
>  The user needs read and write access to image and instances are not
>  allowed to reuse disks from the parent VM.
> -.It Cm instance
> +.It Ic instance
>  Allow user to create additional instances from the instances.
> -.It Cm interface
> +.It Ic interface
>  Allow user to change network interface settings.
> -.It Cm memory
> +.It Ic memory
>  Allow user to configure the memory size.
> -.It Cm owner Ar user Ns Op : Ns Ar group
> +.It Ic owner Ar user Ns Op : Ns Ar group
>  Allow the specified user or group to create the instances.
>  The owner will be allowed to create VM instances, start or stop the
>  instances, pause or unpause the instances, and open the instances'
>  consoles.
> -.It Cm owner Pf : Ar group
> +.It Ic owner Pf : Ar group
>  Set the owner to the specified group.
>  .El
>  .Sh SWITCH CONFIGURATION
> @@ -421,21 +435,21 @@ This name can be any string, and is typi
>  .Pp
>  Followed by a block of parameters that is enclosed in curly brackets:
>  .Bl -tag -width Ds
> -.It Cm enable
> +.It Ic enable
>  Automatically configure the switch.
>  This is the default if neither
> -.Cm enable
> +.Ic enable
>  nor
> -.Cm disable
> +.Ic disable
>  is specified.
> -.It Cm locked lladdr
> +.It Ic locked lladdr
>  If this option is specified,
>  .Xr vmd 8
> -will drop packets with altered sources addresses that do not match the
> +will drop packets with altered source addresses that do not match the
>  link layer addresses (MAC addresses) of the VM interfaces in this switch.
> -.It Cm disable
> +.It Ic disable
>  Do not configure this switch.
> -.It Cm group Ar group-name
> +.It Ic group Ar group-name
>  Assign each interface to a specific interface
>  .Dq group .
>  For example, this can be used to write
> @@ -446,19 +460,19 @@ The
>  must not be longer than 15 characters or end with a digit,
>  as described in
>  .Xr ifconfig 8 .
> -.It Cm interface Ar name
> +.It Ic interface Ar name
>  Set the
>  .Xr bridge 4
>  or
>  .Xr veb 4
>  network interface of this switch.
> -.It Cm rdomain Ar rdomainid
> +.It Ic rdomain Ar rdomainid
>  Set the routing domain of the switch and all of its VM interfaces to
>  .Ar rdomainid .
> -.It Cm up
> +.It Ic up
>  Start the switch forwarding packets.
>  This is the default.
> -.It Cm down
> +.It Ic down
>  Stop the switch from forwarding packets.
>  .El
>  .Sh FILES
> @@ -470,7 +484,7 @@ Stop the switch from forwarding packets.
>  Create a new VM with 1GB memory, 1 network interface connected to
>  .Dq uplink ,
>  with one disk image
> -.Sq /home/joe/vm2-disk.img ,
> +.Pa /home/joe/vm2-disk.img ,
>  owned by user
>  .Sq joe :
>  .Bd -literal -offset indent
> 

can you resend with an updated diff, and a seperate Ic->Cm diff?

thanks,
jmc

Reply via email to