public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rtnetlink.7: Document metrics attributes (RTAX_*).
@ 2025-09-19 10:53 Guillaume Nault
  2025-10-02 14:43 ` Guillaume Nault
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Guillaume Nault @ 2025-09-19 10:53 UTC (permalink / raw)
  To: Alejandro Colomar; +Cc: linux-man

Add a brief explanation of the RTAX attributes that can be used in
RTA_METRICS.

Signed-off-by: Guillaume Nault <gnault@redhat.com>
---
 man/man7/rtnetlink.7 | 49 +++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 48 insertions(+), 1 deletion(-)

diff --git a/man/man7/rtnetlink.7 b/man/man7/rtnetlink.7
index cb9f5155f..a04edce79 100644
--- a/man/man7/rtnetlink.7
+++ b/man/man7/rtnetlink.7
@@ -342,7 +342,11 @@ RTA_OIF:int:Output interface index
 RTA_GATEWAY:protocol address:The gateway of the route
 RTA_PRIORITY:int:Priority of route
 RTA_PREFSRC:protocol address:Preferred source address
-RTA_METRICS:int:Route metric
+RTA_METRICS::T{
+Route metrics
+.br
+(see below).
+T}
 RTA_MULTIPATH::T{
 Multipath nexthop data
 .br
@@ -384,6 +388,49 @@ routes (in seconds)
 T}
 .TE
 .IP
+.B RTA_METRICS
+contains an array of
+.I struct rtattr
+with their corresponding attributes:
+.IP
+.in +4n
+.TS
+tab(:);
+c s s
+lb l l.
+Attributes
+rta_type:Value type:Description
+_
+RTAX_UNSPEC:-:unspecified
+RTAX_LOCK:__u32:Bit field indicating which RTAX_* attributes are locked
+RTAX_MTU:__u32:Maximum Transmission Unit for this route
+RTAX_WINDOW:__u32:Maximum size of the receive window for this route
+RTAX_RTT:__u32:Estimated round-trip time for this route
+RTAX_RTTVAR:__u32:Estimated round-trip time variation for this route
+RTAX_SSTHRESH:__u32:Slow start threshold to use for this route
+RTAX_CWND:__u32:Maximum size of the congestion window for this route
+RTAX_ADVMSS:__u32:Maximum Segment Size to advertise for this route
+RTAX_REORDERING:__u32:Initial reordering level of packets for this route
+RTAX_HOPLIMIT:__u32:Hop limit (TTL) to use for this route
+RTAX_INITCWND:__u32:Initial congestion window to use for this route
+RTAX_FEATURES:__u32:Features to enable for this route specifically
+RTAX_RTO_MIN:__u32:Minimum Retransmission TimeOut to use for this route
+RTAX_INITRWND:__u32:Initial size of the receive window for this route
+RTAX_QUICKACK:__u32:Use quick ack for this route
+RTAX_CC_ALGO:asciiz string:Congestion Control algorithm to use for this route
+RTAX_FASTOPEN_NO_COOKIE:__u32:Allow TCP Fast Open without cookie
+.TE
+.IP
+Metrics that are locked with
+.B RTAX_LOCK
+take precedence over the values normally used by the kernel
+(computed or assigned by a sysctl or setsockopt(2)).
+Therefore, some metrics, like
+.BR RTAX_RTO_MIN ,
+have no effect unless their bit is set in
+.BR RTAX_LOCK .
+.in
+.IP
 .B RTA_MULTIPATH
 contains several packed instances of
 .I struct rtnexthop
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] rtnetlink.7: Document metrics attributes (RTAX_*).
  2025-09-19 10:53 [PATCH] rtnetlink.7: Document metrics attributes (RTAX_*) Guillaume Nault
@ 2025-10-02 14:43 ` Guillaume Nault
  2025-10-02 14:59   ` Alejandro Colomar
  2025-10-02 21:33 ` Alejandro Colomar
  2025-10-12 21:28 ` Alejandro Colomar
  2 siblings, 1 reply; 9+ messages in thread
From: Guillaume Nault @ 2025-10-02 14:43 UTC (permalink / raw)
  To: Alejandro Colomar; +Cc: linux-man

On Fri, Sep 19, 2025 at 12:54:01PM +0200, Guillaume Nault wrote:
> Add a brief explanation of the RTAX attributes that can be used in
> RTA_METRICS.

Hi,

I haven't got any feedback for this patch. Anything wrong with it?

> Signed-off-by: Guillaume Nault <gnault@redhat.com>
> ---
>  man/man7/rtnetlink.7 | 49 +++++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 48 insertions(+), 1 deletion(-)
> 
> diff --git a/man/man7/rtnetlink.7 b/man/man7/rtnetlink.7
> index cb9f5155f..a04edce79 100644
> --- a/man/man7/rtnetlink.7
> +++ b/man/man7/rtnetlink.7
> @@ -342,7 +342,11 @@ RTA_OIF:int:Output interface index
>  RTA_GATEWAY:protocol address:The gateway of the route
>  RTA_PRIORITY:int:Priority of route
>  RTA_PREFSRC:protocol address:Preferred source address
> -RTA_METRICS:int:Route metric
> +RTA_METRICS::T{
> +Route metrics
> +.br
> +(see below).
> +T}
>  RTA_MULTIPATH::T{
>  Multipath nexthop data
>  .br
> @@ -384,6 +388,49 @@ routes (in seconds)
>  T}
>  .TE
>  .IP
> +.B RTA_METRICS
> +contains an array of
> +.I struct rtattr
> +with their corresponding attributes:
> +.IP
> +.in +4n
> +.TS
> +tab(:);
> +c s s
> +lb l l.
> +Attributes
> +rta_type:Value type:Description
> +_
> +RTAX_UNSPEC:-:unspecified
> +RTAX_LOCK:__u32:Bit field indicating which RTAX_* attributes are locked
> +RTAX_MTU:__u32:Maximum Transmission Unit for this route
> +RTAX_WINDOW:__u32:Maximum size of the receive window for this route
> +RTAX_RTT:__u32:Estimated round-trip time for this route
> +RTAX_RTTVAR:__u32:Estimated round-trip time variation for this route
> +RTAX_SSTHRESH:__u32:Slow start threshold to use for this route
> +RTAX_CWND:__u32:Maximum size of the congestion window for this route
> +RTAX_ADVMSS:__u32:Maximum Segment Size to advertise for this route
> +RTAX_REORDERING:__u32:Initial reordering level of packets for this route
> +RTAX_HOPLIMIT:__u32:Hop limit (TTL) to use for this route
> +RTAX_INITCWND:__u32:Initial congestion window to use for this route
> +RTAX_FEATURES:__u32:Features to enable for this route specifically
> +RTAX_RTO_MIN:__u32:Minimum Retransmission TimeOut to use for this route
> +RTAX_INITRWND:__u32:Initial size of the receive window for this route
> +RTAX_QUICKACK:__u32:Use quick ack for this route
> +RTAX_CC_ALGO:asciiz string:Congestion Control algorithm to use for this route
> +RTAX_FASTOPEN_NO_COOKIE:__u32:Allow TCP Fast Open without cookie
> +.TE
> +.IP
> +Metrics that are locked with
> +.B RTAX_LOCK
> +take precedence over the values normally used by the kernel
> +(computed or assigned by a sysctl or setsockopt(2)).
> +Therefore, some metrics, like
> +.BR RTAX_RTO_MIN ,
> +have no effect unless their bit is set in
> +.BR RTAX_LOCK .
> +.in
> +.IP
>  .B RTA_MULTIPATH
>  contains several packed instances of
>  .I struct rtnexthop
> -- 
> 2.47.3
> 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] rtnetlink.7: Document metrics attributes (RTAX_*).
  2025-10-02 14:43 ` Guillaume Nault
@ 2025-10-02 14:59   ` Alejandro Colomar
  2025-10-02 15:06     ` Guillaume Nault
  0 siblings, 1 reply; 9+ messages in thread
From: Alejandro Colomar @ 2025-10-02 14:59 UTC (permalink / raw)
  To: Guillaume Nault; +Cc: linux-man

[-- Attachment #1: Type: text/plain, Size: 3419 bytes --]

Hi Guillaume,

On Thu, Oct 02, 2025 at 04:43:44PM +0200, Guillaume Nault wrote:
> On Fri, Sep 19, 2025 at 12:54:01PM +0200, Guillaume Nault wrote:
> > Add a brief explanation of the RTAX attributes that can be used in
> > RTA_METRICS.
> 
> Hi,
> 
> I haven't got any feedback for this patch. Anything wrong with it?

Nope, I was attending a conference last week and didn't have time to
look at this patch.

I'll try to have a look later today.  Thanks for the ping!


Have a lovely day!
Alex

> 
> > Signed-off-by: Guillaume Nault <gnault@redhat.com>
> > ---
> >  man/man7/rtnetlink.7 | 49 +++++++++++++++++++++++++++++++++++++++++++-
> >  1 file changed, 48 insertions(+), 1 deletion(-)
> > 
> > diff --git a/man/man7/rtnetlink.7 b/man/man7/rtnetlink.7
> > index cb9f5155f..a04edce79 100644
> > --- a/man/man7/rtnetlink.7
> > +++ b/man/man7/rtnetlink.7
> > @@ -342,7 +342,11 @@ RTA_OIF:int:Output interface index
> >  RTA_GATEWAY:protocol address:The gateway of the route
> >  RTA_PRIORITY:int:Priority of route
> >  RTA_PREFSRC:protocol address:Preferred source address
> > -RTA_METRICS:int:Route metric
> > +RTA_METRICS::T{
> > +Route metrics
> > +.br
> > +(see below).
> > +T}
> >  RTA_MULTIPATH::T{
> >  Multipath nexthop data
> >  .br
> > @@ -384,6 +388,49 @@ routes (in seconds)
> >  T}
> >  .TE
> >  .IP
> > +.B RTA_METRICS
> > +contains an array of
> > +.I struct rtattr
> > +with their corresponding attributes:
> > +.IP
> > +.in +4n
> > +.TS
> > +tab(:);
> > +c s s
> > +lb l l.
> > +Attributes
> > +rta_type:Value type:Description
> > +_
> > +RTAX_UNSPEC:-:unspecified
> > +RTAX_LOCK:__u32:Bit field indicating which RTAX_* attributes are locked
> > +RTAX_MTU:__u32:Maximum Transmission Unit for this route
> > +RTAX_WINDOW:__u32:Maximum size of the receive window for this route
> > +RTAX_RTT:__u32:Estimated round-trip time for this route
> > +RTAX_RTTVAR:__u32:Estimated round-trip time variation for this route
> > +RTAX_SSTHRESH:__u32:Slow start threshold to use for this route
> > +RTAX_CWND:__u32:Maximum size of the congestion window for this route
> > +RTAX_ADVMSS:__u32:Maximum Segment Size to advertise for this route
> > +RTAX_REORDERING:__u32:Initial reordering level of packets for this route
> > +RTAX_HOPLIMIT:__u32:Hop limit (TTL) to use for this route
> > +RTAX_INITCWND:__u32:Initial congestion window to use for this route
> > +RTAX_FEATURES:__u32:Features to enable for this route specifically
> > +RTAX_RTO_MIN:__u32:Minimum Retransmission TimeOut to use for this route
> > +RTAX_INITRWND:__u32:Initial size of the receive window for this route
> > +RTAX_QUICKACK:__u32:Use quick ack for this route
> > +RTAX_CC_ALGO:asciiz string:Congestion Control algorithm to use for this route
> > +RTAX_FASTOPEN_NO_COOKIE:__u32:Allow TCP Fast Open without cookie
> > +.TE
> > +.IP
> > +Metrics that are locked with
> > +.B RTAX_LOCK
> > +take precedence over the values normally used by the kernel
> > +(computed or assigned by a sysctl or setsockopt(2)).
> > +Therefore, some metrics, like
> > +.BR RTAX_RTO_MIN ,
> > +have no effect unless their bit is set in
> > +.BR RTAX_LOCK .
> > +.in
> > +.IP
> >  .B RTA_MULTIPATH
> >  contains several packed instances of
> >  .I struct rtnexthop
> > -- 
> > 2.47.3
> > 
> 
> 

-- 
<https://www.alejandro-colomar.es>
Use port 80 (that is, <...:80/>).

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] rtnetlink.7: Document metrics attributes (RTAX_*).
  2025-10-02 14:59   ` Alejandro Colomar
@ 2025-10-02 15:06     ` Guillaume Nault
  0 siblings, 0 replies; 9+ messages in thread
From: Guillaume Nault @ 2025-10-02 15:06 UTC (permalink / raw)
  To: Alejandro Colomar; +Cc: linux-man

On Thu, Oct 02, 2025 at 04:59:21PM +0200, Alejandro Colomar wrote:
> Hi Guillaume,
> 
> On Thu, Oct 02, 2025 at 04:43:44PM +0200, Guillaume Nault wrote:
> > On Fri, Sep 19, 2025 at 12:54:01PM +0200, Guillaume Nault wrote:
> > > Add a brief explanation of the RTAX attributes that can be used in
> > > RTA_METRICS.
> > 
> > Hi,
> > 
> > I haven't got any feedback for this patch. Anything wrong with it?
> 
> Nope, I was attending a conference last week and didn't have time to
> look at this patch.

No problem. I just wanted to make sure it didn't fall through the
cracks. Thanks!

> I'll try to have a look later today.  Thanks for the ping!
> 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] rtnetlink.7: Document metrics attributes (RTAX_*).
  2025-09-19 10:53 [PATCH] rtnetlink.7: Document metrics attributes (RTAX_*) Guillaume Nault
  2025-10-02 14:43 ` Guillaume Nault
@ 2025-10-02 21:33 ` Alejandro Colomar
  2025-10-08 14:41   ` Guillaume Nault
  2025-10-12 21:28 ` Alejandro Colomar
  2 siblings, 1 reply; 9+ messages in thread
From: Alejandro Colomar @ 2025-10-02 21:33 UTC (permalink / raw)
  To: Guillaume Nault; +Cc: linux-man

[-- Attachment #1: Type: text/plain, Size: 7108 bytes --]

Hi Guillaume,

On Fri, Sep 19, 2025 at 12:53:55PM +0200, Guillaume Nault wrote:
> Add a brief explanation of the RTAX attributes that can be used in
> RTA_METRICS.
> 
> Signed-off-by: Guillaume Nault <gnault@redhat.com>
> ---
>  man/man7/rtnetlink.7 | 49 +++++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 48 insertions(+), 1 deletion(-)
> 
> diff --git a/man/man7/rtnetlink.7 b/man/man7/rtnetlink.7
> index cb9f5155f..a04edce79 100644
> --- a/man/man7/rtnetlink.7
> +++ b/man/man7/rtnetlink.7
> @@ -342,7 +342,11 @@ RTA_OIF:int:Output interface index
>  RTA_GATEWAY:protocol address:The gateway of the route
>  RTA_PRIORITY:int:Priority of route
>  RTA_PREFSRC:protocol address:Preferred source address
> -RTA_METRICS:int:Route metric
> +RTA_METRICS::T{
> +Route metrics
> +.br
> +(see below).
> +T}
>  RTA_MULTIPATH::T{
>  Multipath nexthop data
>  .br
> @@ -384,6 +388,49 @@ routes (in seconds)
>  T}
>  .TE
>  .IP
> +.B RTA_METRICS
> +contains an array of
> +.I struct rtattr
> +with their corresponding attributes:
> +.IP
> +.in +4n

I would use

	.RS
	.IP

and get rid of the .in +4n.

> +.TS
> +tab(:);
> +c s s
> +lb l l.
> +Attributes
> +rta_type:Value type:Description
> +_
> +RTAX_UNSPEC:-:unspecified
> +RTAX_LOCK:__u32:Bit field indicating which RTAX_* attributes are locked
> +RTAX_MTU:__u32:Maximum Transmission Unit for this route
> +RTAX_WINDOW:__u32:Maximum size of the receive window for this route
> +RTAX_RTT:__u32:Estimated round-trip time for this route
> +RTAX_RTTVAR:__u32:Estimated round-trip time variation for this route
> +RTAX_SSTHRESH:__u32:Slow start threshold to use for this route
> +RTAX_CWND:__u32:Maximum size of the congestion window for this route
> +RTAX_ADVMSS:__u32:Maximum Segment Size to advertise for this route
> +RTAX_REORDERING:__u32:Initial reordering level of packets for this route
> +RTAX_HOPLIMIT:__u32:Hop limit (TTL) to use for this route
> +RTAX_INITCWND:__u32:Initial congestion window to use for this route
> +RTAX_FEATURES:__u32:Features to enable for this route specifically
> +RTAX_RTO_MIN:__u32:Minimum Retransmission TimeOut to use for this route
> +RTAX_INITRWND:__u32:Initial size of the receive window for this route
> +RTAX_QUICKACK:__u32:Use quick ack for this route
> +RTAX_CC_ALGO:asciiz string:Congestion Control algorithm to use for this route
> +RTAX_FASTOPEN_NO_COOKIE:__u32:Allow TCP Fast Open without cookie
> +.TE

And here use .RE.

> +.IP
> +Metrics that are locked with
> +.B RTAX_LOCK
> +take precedence over the values normally used by the kernel
> +(computed or assigned by a sysctl or setsockopt(2)).
> +Therefore, some metrics, like
> +.BR RTAX_RTO_MIN ,
> +have no effect unless their bit is set in
> +.BR RTAX_LOCK .
> +.in

I find this placement of .in weird.  The preceding paragraph isn't
indented by it.  I think I prefer using .RS/.RE, and then you'd have to
put .RE before this paragraph to get the same indentation.

Here's how your patch looks like:

	$ MANWIDTH=72 diffman-git HEAD 2>/dev/null
	--- HEAD^:man/man7/rtnetlink.7
	+++ HEAD:man/man7/rtnetlink.7
	@@ -218,7 +218,8 @@ DESCRIPTION
		     RTA_GATEWAY     protocol address      The gateway of the route
		     RTA_PRIORITY    int                   Priority of route
		     RTA_PREFSRC     protocol address      Preferred source address
	-            RTA_METRICS     int                   Route metric
	+            RTA_METRICS                           Route metrics
	+                                                  (see below).
		     RTA_MULTIPATH                         Multipath nexthop data
							   (see below).
		     RTA_PROTOINFO                         No longer used
	@@ -242,6 +243,37 @@ DESCRIPTION
		     RTA_EXPIRES     int                   Expire time for IPv6
							   routes (in seconds)
	 
	+            RTA_METRICS contains an array of struct rtattr with their
	+            corresponding attributes:
	+
	+                                                           Attributes
	+                rta_type                  Value type      Description
	+                ──────────────────────────────────────────────────────────────────────────────────────────────────
	+                RTAX_UNSPEC               ‐               unspecified
	+                RTAX_LOCK                 __u32           Bit field indicating which RTAX_* attributes are locked
	+                RTAX_MTU                  __u32           Maximum Transmission Unit for this route
	+                RTAX_WINDOW               __u32           Maximum size of the receive window for this route
	+                RTAX_RTT                  __u32           Estimated round‐trip time for this route
	+                RTAX_RTTVAR               __u32           Estimated round‐trip time variation for this route
	+                RTAX_SSTHRESH             __u32           Slow start threshold to use for this route
	+                RTAX_CWND                 __u32           Maximum size of the congestion window for this route
	+                RTAX_ADVMSS               __u32           Maximum Segment Size to advertise for this route
	+                RTAX_REORDERING           __u32           Initial reordering level of packets for this route
	+                RTAX_HOPLIMIT             __u32           Hop limit (TTL) to use for this route
	+                RTAX_INITCWND             __u32           Initial congestion window to use for this route
	+                RTAX_FEATURES             __u32           Features to enable for this route specifically
	+                RTAX_RTO_MIN              __u32           Minimum Retransmission TimeOut to use for this route
	+                RTAX_INITRWND             __u32           Initial size of the receive window for this route
	+                RTAX_QUICKACK             __u32           Use quick ack for this route
	+                RTAX_CC_ALGO              asciiz string   Congestion Control algorithm to use for this route
	+                RTAX_FASTOPEN_NO_COOKIE   __u32           Allow TCP Fast Open without cookie
	+
	+            Metrics that are locked with RTAX_LOCK take precedence over
	+            the values normally used by the kernel (computed or as‐
	+            signed by a sysctl or setsockopt(2)).  Therefore, some met‐
	+            rics, like RTAX_RTO_MIN, have no effect unless their bit is
	+            set in RTAX_LOCK.
	+
		     RTA_MULTIPATH contains several packed instances of struct
		     rtnexthop together with nested RTAs (RTA_GATEWAY):
	 
Is this indentation what you intended?


Have a lovely night!
Alex

> +.IP
>  .B RTA_MULTIPATH
>  contains several packed instances of
>  .I struct rtnexthop
> -- 
> 2.47.3
> 

-- 
<https://www.alejandro-colomar.es>
Use port 80 (that is, <...:80/>).

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] rtnetlink.7: Document metrics attributes (RTAX_*).
  2025-10-02 21:33 ` Alejandro Colomar
@ 2025-10-08 14:41   ` Guillaume Nault
  2025-10-08 16:05     ` Alejandro Colomar
  0 siblings, 1 reply; 9+ messages in thread
From: Guillaume Nault @ 2025-10-08 14:41 UTC (permalink / raw)
  To: Alejandro Colomar; +Cc: linux-man

On Thu, Oct 02, 2025 at 11:33:09PM +0200, Alejandro Colomar wrote:
> Hi Guillaume,
> 
> On Fri, Sep 19, 2025 at 12:53:55PM +0200, Guillaume Nault wrote:
> > Add a brief explanation of the RTAX attributes that can be used in
> > RTA_METRICS.
> > 
> > Signed-off-by: Guillaume Nault <gnault@redhat.com>
> > ---
> >  man/man7/rtnetlink.7 | 49 +++++++++++++++++++++++++++++++++++++++++++-
> >  1 file changed, 48 insertions(+), 1 deletion(-)
> > 
> > diff --git a/man/man7/rtnetlink.7 b/man/man7/rtnetlink.7
> > index cb9f5155f..a04edce79 100644
> > --- a/man/man7/rtnetlink.7
> > +++ b/man/man7/rtnetlink.7
> > @@ -342,7 +342,11 @@ RTA_OIF:int:Output interface index
> >  RTA_GATEWAY:protocol address:The gateway of the route
> >  RTA_PRIORITY:int:Priority of route
> >  RTA_PREFSRC:protocol address:Preferred source address
> > -RTA_METRICS:int:Route metric
> > +RTA_METRICS::T{
> > +Route metrics
> > +.br
> > +(see below).
> > +T}
> >  RTA_MULTIPATH::T{
> >  Multipath nexthop data
> >  .br
> > @@ -384,6 +388,49 @@ routes (in seconds)
> >  T}
> >  .TE
> >  .IP
> > +.B RTA_METRICS
> > +contains an array of
> > +.I struct rtattr
> > +with their corresponding attributes:
> > +.IP
> > +.in +4n
> 
> I would use
> 
> 	.RS
> 	.IP
> 
> and get rid of the .in +4n.

I have no preference, I was just following the commands used elsewhere
in this man page.

> > +.TS
> > +tab(:);
> > +c s s
> > +lb l l.
> > +Attributes
> > +rta_type:Value type:Description
> > +_
> > +RTAX_UNSPEC:-:unspecified
> > +RTAX_LOCK:__u32:Bit field indicating which RTAX_* attributes are locked
> > +RTAX_MTU:__u32:Maximum Transmission Unit for this route
> > +RTAX_WINDOW:__u32:Maximum size of the receive window for this route
> > +RTAX_RTT:__u32:Estimated round-trip time for this route
> > +RTAX_RTTVAR:__u32:Estimated round-trip time variation for this route
> > +RTAX_SSTHRESH:__u32:Slow start threshold to use for this route
> > +RTAX_CWND:__u32:Maximum size of the congestion window for this route
> > +RTAX_ADVMSS:__u32:Maximum Segment Size to advertise for this route
> > +RTAX_REORDERING:__u32:Initial reordering level of packets for this route
> > +RTAX_HOPLIMIT:__u32:Hop limit (TTL) to use for this route
> > +RTAX_INITCWND:__u32:Initial congestion window to use for this route
> > +RTAX_FEATURES:__u32:Features to enable for this route specifically
> > +RTAX_RTO_MIN:__u32:Minimum Retransmission TimeOut to use for this route
> > +RTAX_INITRWND:__u32:Initial size of the receive window for this route
> > +RTAX_QUICKACK:__u32:Use quick ack for this route
> > +RTAX_CC_ALGO:asciiz string:Congestion Control algorithm to use for this route
> > +RTAX_FASTOPEN_NO_COOKIE:__u32:Allow TCP Fast Open without cookie
> > +.TE
> 
> And here use .RE.

Okay, I'll use .RS/.RE in v2.

> > +.IP
> > +Metrics that are locked with
> > +.B RTAX_LOCK
> > +take precedence over the values normally used by the kernel
> > +(computed or assigned by a sysctl or setsockopt(2)).
> > +Therefore, some metrics, like
> > +.BR RTAX_RTO_MIN ,
> > +have no effect unless their bit is set in
> > +.BR RTAX_LOCK .
> > +.in
> 
> I find this placement of .in weird.  The preceding paragraph isn't
> indented by it.  I think I prefer using .RS/.RE, and then you'd have to
> put .RE before this paragraph to get the same indentation.
> 
> Here's how your patch looks like:
> 
> 	$ MANWIDTH=72 diffman-git HEAD 2>/dev/null
> 	--- HEAD^:man/man7/rtnetlink.7
> 	+++ HEAD:man/man7/rtnetlink.7
> 	@@ -218,7 +218,8 @@ DESCRIPTION
> 		     RTA_GATEWAY     protocol address      The gateway of the route
> 		     RTA_PRIORITY    int                   Priority of route
> 		     RTA_PREFSRC     protocol address      Preferred source address
> 	-            RTA_METRICS     int                   Route metric
> 	+            RTA_METRICS                           Route metrics
> 	+                                                  (see below).
> 		     RTA_MULTIPATH                         Multipath nexthop data
> 							   (see below).
> 		     RTA_PROTOINFO                         No longer used
> 	@@ -242,6 +243,37 @@ DESCRIPTION
> 		     RTA_EXPIRES     int                   Expire time for IPv6
> 							   routes (in seconds)
> 	 
> 	+            RTA_METRICS contains an array of struct rtattr with their
> 	+            corresponding attributes:
> 	+
> 	+                                                           Attributes
> 	+                rta_type                  Value type      Description
> 	+                ──────────────────────────────────────────────────────────────────────────────────────────────────
> 	+                RTAX_UNSPEC               ‐               unspecified
> 	+                RTAX_LOCK                 __u32           Bit field indicating which RTAX_* attributes are locked
> 	+                RTAX_MTU                  __u32           Maximum Transmission Unit for this route
> 	+                RTAX_WINDOW               __u32           Maximum size of the receive window for this route
> 	+                RTAX_RTT                  __u32           Estimated round‐trip time for this route
> 	+                RTAX_RTTVAR               __u32           Estimated round‐trip time variation for this route
> 	+                RTAX_SSTHRESH             __u32           Slow start threshold to use for this route
> 	+                RTAX_CWND                 __u32           Maximum size of the congestion window for this route
> 	+                RTAX_ADVMSS               __u32           Maximum Segment Size to advertise for this route
> 	+                RTAX_REORDERING           __u32           Initial reordering level of packets for this route
> 	+                RTAX_HOPLIMIT             __u32           Hop limit (TTL) to use for this route
> 	+                RTAX_INITCWND             __u32           Initial congestion window to use for this route
> 	+                RTAX_FEATURES             __u32           Features to enable for this route specifically
> 	+                RTAX_RTO_MIN              __u32           Minimum Retransmission TimeOut to use for this route
> 	+                RTAX_INITRWND             __u32           Initial size of the receive window for this route
> 	+                RTAX_QUICKACK             __u32           Use quick ack for this route
> 	+                RTAX_CC_ALGO              asciiz string   Congestion Control algorithm to use for this route
> 	+                RTAX_FASTOPEN_NO_COOKIE   __u32           Allow TCP Fast Open without cookie
> 	+
> 	+            Metrics that are locked with RTAX_LOCK take precedence over
> 	+            the values normally used by the kernel (computed or as‐
> 	+            signed by a sysctl or setsockopt(2)).  Therefore, some met‐
> 	+            rics, like RTAX_RTO_MIN, have no effect unless their bit is
> 	+            set in RTAX_LOCK.
> 	+
> 		     RTA_MULTIPATH contains several packed instances of struct
> 		     rtnexthop together with nested RTAs (RTA_GATEWAY):
> 	 
> Is this indentation what you intended?

Yes. Is that indentation confusing? I can change it if necessary.

> 
> Have a lovely night!
> Alex
> 
> > +.IP
> >  .B RTA_MULTIPATH
> >  contains several packed instances of
> >  .I struct rtnexthop
> > -- 
> > 2.47.3
> > 
> 
> -- 
> <https://www.alejandro-colomar.es>
> Use port 80 (that is, <...:80/>).



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] rtnetlink.7: Document metrics attributes (RTAX_*).
  2025-10-08 14:41   ` Guillaume Nault
@ 2025-10-08 16:05     ` Alejandro Colomar
  2025-10-08 18:51       ` Guillaume Nault
  0 siblings, 1 reply; 9+ messages in thread
From: Alejandro Colomar @ 2025-10-08 16:05 UTC (permalink / raw)
  To: Guillaume Nault; +Cc: linux-man

[-- Attachment #1: Type: text/plain, Size: 3022 bytes --]

Hi Guillaume,

On Wed, Oct 08, 2025 at 04:41:19PM +0200, Guillaume Nault wrote:
> > > +.IP
> > > +.in +4n
> > 
> > I would use
> > 
> > 	.RS
> > 	.IP
> > 
> > and get rid of the .in +4n.
> 
> I have no preference, I was just following the commands used elsewhere
> in this man page.

Hmmm, I'll have a look at the source of that page later.  Maybe I need
to fix the existing code.

> > > +.TE
> > 
> > And here use .RE.
> 
> Okay, I'll use .RS/.RE in v2.
> 
> > > +.IP
> > > +Metrics that are locked with
> > > +.B RTAX_LOCK
> > > +take precedence over the values normally used by the kernel
> > > +(computed or assigned by a sysctl or setsockopt(2)).
> > > +Therefore, some metrics, like
> > > +.BR RTAX_RTO_MIN ,
> > > +have no effect unless their bit is set in
> > > +.BR RTAX_LOCK .
> > > +.in
> > 
> > I find this placement of .in weird.  The preceding paragraph isn't
> > indented by it.  I think I prefer using .RS/.RE, and then you'd have to
> > put .RE before this paragraph to get the same indentation.
> > 
> > Here's how your patch looks like:
> > 
> > 	$ MANWIDTH=72 diffman-git HEAD 2>/dev/null
> > 	--- HEAD^:man/man7/rtnetlink.7
> > 	+++ HEAD:man/man7/rtnetlink.7
> > 	@@ -218,7 +218,8 @@ DESCRIPTION
> > 		     RTA_GATEWAY     protocol address      The gateway of the route
> > 		     RTA_PRIORITY    int                   Priority of route
> > 		     RTA_PREFSRC     protocol address      Preferred source address

[...]

> > 	+                RTAX_RTO_MIN              __u32           Minimum Retransmission TimeOut to use for this route
> > 	+                RTAX_INITRWND             __u32           Initial size of the receive window for this route
> > 	+                RTAX_QUICKACK             __u32           Use quick ack for this route
> > 	+                RTAX_CC_ALGO              asciiz string   Congestion Control algorithm to use for this route
> > 	+                RTAX_FASTOPEN_NO_COOKIE   __u32           Allow TCP Fast Open without cookie
> > 	+
> > 	+            Metrics that are locked with RTAX_LOCK take precedence over
> > 	+            the values normally used by the kernel (computed or as‐
> > 	+            signed by a sysctl or setsockopt(2)).  Therefore, some met‐
> > 	+            rics, like RTAX_RTO_MIN, have no effect unless their bit is
> > 	+            set in RTAX_LOCK.
> > 	+
> > 		     RTA_MULTIPATH contains several packed instances of struct
> > 		     rtnexthop together with nested RTAs (RTA_GATEWAY):
> > 	 
> > Is this indentation what you intended?
> 
> Yes.

Thanks!

> Is that indentation confusing? I can change it if necessary.

The indentation is fine.  Please keep it like that.  What's confusing is
the source code, since the '.in' goes after the unindented paragraph,
while I'd expect it to be the indentation terminator.  .RS/.RE is much
more intuitive.


Have a lovely day!
Alex

-- 
<https://www.alejandro-colomar.es>
Use port 80 (that is, <...:80/>).

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] rtnetlink.7: Document metrics attributes (RTAX_*).
  2025-10-08 16:05     ` Alejandro Colomar
@ 2025-10-08 18:51       ` Guillaume Nault
  0 siblings, 0 replies; 9+ messages in thread
From: Guillaume Nault @ 2025-10-08 18:51 UTC (permalink / raw)
  To: Alejandro Colomar; +Cc: linux-man

On Wed, Oct 08, 2025 at 06:05:41PM +0200, Alejandro Colomar wrote:
> Hi Guillaume,
> 
> On Wed, Oct 08, 2025 at 04:41:19PM +0200, Guillaume Nault wrote:
> > > > +.IP
> > > > +.in +4n
> > > 
> > > I would use
> > > 
> > > 	.RS
> > > 	.IP
> > > 
> > > and get rid of the .in +4n.
> > 
> > I have no preference, I was just following the commands used elsewhere
> > in this man page.
> 
> Hmmm, I'll have a look at the source of that page later.  Maybe I need
> to fix the existing code.
> 
> > > > +.TE
> > > 
> > > And here use .RE.
> > 
> > Okay, I'll use .RS/.RE in v2.
> > 
> > > > +.IP
> > > > +Metrics that are locked with
> > > > +.B RTAX_LOCK
> > > > +take precedence over the values normally used by the kernel
> > > > +(computed or assigned by a sysctl or setsockopt(2)).
> > > > +Therefore, some metrics, like
> > > > +.BR RTAX_RTO_MIN ,
> > > > +have no effect unless their bit is set in
> > > > +.BR RTAX_LOCK .
> > > > +.in
> > > 
> > > I find this placement of .in weird.  The preceding paragraph isn't
> > > indented by it.  I think I prefer using .RS/.RE, and then you'd have to
> > > put .RE before this paragraph to get the same indentation.
> > > 
> > > Here's how your patch looks like:
> > > 
> > > 	$ MANWIDTH=72 diffman-git HEAD 2>/dev/null
> > > 	--- HEAD^:man/man7/rtnetlink.7
> > > 	+++ HEAD:man/man7/rtnetlink.7
> > > 	@@ -218,7 +218,8 @@ DESCRIPTION
> > > 		     RTA_GATEWAY     protocol address      The gateway of the route
> > > 		     RTA_PRIORITY    int                   Priority of route
> > > 		     RTA_PREFSRC     protocol address      Preferred source address
> 
> [...]
> 
> > > 	+                RTAX_RTO_MIN              __u32           Minimum Retransmission TimeOut to use for this route
> > > 	+                RTAX_INITRWND             __u32           Initial size of the receive window for this route
> > > 	+                RTAX_QUICKACK             __u32           Use quick ack for this route
> > > 	+                RTAX_CC_ALGO              asciiz string   Congestion Control algorithm to use for this route
> > > 	+                RTAX_FASTOPEN_NO_COOKIE   __u32           Allow TCP Fast Open without cookie
> > > 	+
> > > 	+            Metrics that are locked with RTAX_LOCK take precedence over
> > > 	+            the values normally used by the kernel (computed or as‐
> > > 	+            signed by a sysctl or setsockopt(2)).  Therefore, some met‐
> > > 	+            rics, like RTAX_RTO_MIN, have no effect unless their bit is
> > > 	+            set in RTAX_LOCK.
> > > 	+
> > > 		     RTA_MULTIPATH contains several packed instances of struct
> > > 		     rtnexthop together with nested RTAs (RTA_GATEWAY):
> > > 	 
> > > Is this indentation what you intended?
> > 
> > Yes.
> 
> Thanks!
> 
> > Is that indentation confusing? I can change it if necessary.
> 
> The indentation is fine.  Please keep it like that.  What's confusing is
> the source code, since the '.in' goes after the unindented paragraph,
> while I'd expect it to be the indentation terminator.  .RS/.RE is much
> more intuitive.

I understand what you mean now. Placing '.in' after the RTAX_LOCK
paragraph was an oversight.

I'm about to send v2, with .in replaced by .RS/.RE, as you proposed.
Thanks for the feedbacks!

> 
> Have a lovely day!
> Alex
> 
> -- 
> <https://www.alejandro-colomar.es>
> Use port 80 (that is, <...:80/>).



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] rtnetlink.7: Document metrics attributes (RTAX_*).
  2025-09-19 10:53 [PATCH] rtnetlink.7: Document metrics attributes (RTAX_*) Guillaume Nault
  2025-10-02 14:43 ` Guillaume Nault
  2025-10-02 21:33 ` Alejandro Colomar
@ 2025-10-12 21:28 ` Alejandro Colomar
  2 siblings, 0 replies; 9+ messages in thread
From: Alejandro Colomar @ 2025-10-12 21:28 UTC (permalink / raw)
  To: Guillaume Nault; +Cc: linux-man

[-- Attachment #1: Type: text/plain, Size: 3222 bytes --]

Hi Guillaume,

On Fri, Sep 19, 2025 at 12:53:55PM +0200, Guillaume Nault wrote:
> Add a brief explanation of the RTAX attributes that can be used in
> RTA_METRICS.
> 
> Signed-off-by: Guillaume Nault <gnault@redhat.com>

Thanks!  I've applied the patch.  I've amended it with some formatting
fixes, to make the table fit in 80 columns.
<https://www.alejandro-colomar.es/src/alx/linux/man-pages/man-pages.git/commit/?h=contrib&id=6ad569611a1b5c7e4d8c2f019d04bacaa85dbbce>
(Use port 80.)


Have a lovely night!
Alex

> ---
>  man/man7/rtnetlink.7 | 49 +++++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 48 insertions(+), 1 deletion(-)
> 
> diff --git a/man/man7/rtnetlink.7 b/man/man7/rtnetlink.7
> index cb9f5155f..a04edce79 100644
> --- a/man/man7/rtnetlink.7
> +++ b/man/man7/rtnetlink.7
> @@ -342,7 +342,11 @@ RTA_OIF:int:Output interface index
>  RTA_GATEWAY:protocol address:The gateway of the route
>  RTA_PRIORITY:int:Priority of route
>  RTA_PREFSRC:protocol address:Preferred source address
> -RTA_METRICS:int:Route metric
> +RTA_METRICS::T{
> +Route metrics
> +.br
> +(see below).
> +T}
>  RTA_MULTIPATH::T{
>  Multipath nexthop data
>  .br
> @@ -384,6 +388,49 @@ routes (in seconds)
>  T}
>  .TE
>  .IP
> +.B RTA_METRICS
> +contains an array of
> +.I struct rtattr
> +with their corresponding attributes:
> +.IP
> +.in +4n
> +.TS
> +tab(:);
> +c s s
> +lb l l.
> +Attributes
> +rta_type:Value type:Description
> +_
> +RTAX_UNSPEC:-:unspecified
> +RTAX_LOCK:__u32:Bit field indicating which RTAX_* attributes are locked
> +RTAX_MTU:__u32:Maximum Transmission Unit for this route
> +RTAX_WINDOW:__u32:Maximum size of the receive window for this route
> +RTAX_RTT:__u32:Estimated round-trip time for this route
> +RTAX_RTTVAR:__u32:Estimated round-trip time variation for this route
> +RTAX_SSTHRESH:__u32:Slow start threshold to use for this route
> +RTAX_CWND:__u32:Maximum size of the congestion window for this route
> +RTAX_ADVMSS:__u32:Maximum Segment Size to advertise for this route
> +RTAX_REORDERING:__u32:Initial reordering level of packets for this route
> +RTAX_HOPLIMIT:__u32:Hop limit (TTL) to use for this route
> +RTAX_INITCWND:__u32:Initial congestion window to use for this route
> +RTAX_FEATURES:__u32:Features to enable for this route specifically
> +RTAX_RTO_MIN:__u32:Minimum Retransmission TimeOut to use for this route
> +RTAX_INITRWND:__u32:Initial size of the receive window for this route
> +RTAX_QUICKACK:__u32:Use quick ack for this route
> +RTAX_CC_ALGO:asciiz string:Congestion Control algorithm to use for this route
> +RTAX_FASTOPEN_NO_COOKIE:__u32:Allow TCP Fast Open without cookie
> +.TE
> +.IP
> +Metrics that are locked with
> +.B RTAX_LOCK
> +take precedence over the values normally used by the kernel
> +(computed or assigned by a sysctl or setsockopt(2)).
> +Therefore, some metrics, like
> +.BR RTAX_RTO_MIN ,
> +have no effect unless their bit is set in
> +.BR RTAX_LOCK .
> +.in
> +.IP
>  .B RTA_MULTIPATH
>  contains several packed instances of
>  .I struct rtnexthop
> -- 
> 2.47.3
> 

-- 
<https://www.alejandro-colomar.es>
Use port 80 (that is, <...:80/>).

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-10-12 21:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-19 10:53 [PATCH] rtnetlink.7: Document metrics attributes (RTAX_*) Guillaume Nault
2025-10-02 14:43 ` Guillaume Nault
2025-10-02 14:59   ` Alejandro Colomar
2025-10-02 15:06     ` Guillaume Nault
2025-10-02 21:33 ` Alejandro Colomar
2025-10-08 14:41   ` Guillaume Nault
2025-10-08 16:05     ` Alejandro Colomar
2025-10-08 18:51       ` Guillaume Nault
2025-10-12 21:28 ` Alejandro Colomar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox