Page MenuHomeFreeBSD

route.8: Describe weight modifier
ClosedPublic

Authored by pouria on Apr 3 2026, 6:57 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, May 14, 1:34 AM
Unknown Object (File)
Sat, May 2, 8:55 AM
Unknown Object (File)
Sat, May 2, 7:40 AM
Unknown Object (File)
Sat, May 2, 6:54 AM
Unknown Object (File)
Fri, May 1, 11:29 AM
Unknown Object (File)
Wed, Apr 29, 8:45 PM
Unknown Object (File)
Sat, Apr 25, 7:28 AM
Unknown Object (File)
Sat, Apr 25, 6:00 AM

Details

Summary

Add and describe -weight argument
to the manual.

Test Plan

mandoc -Tlint

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

pouria requested review of this revision.Apr 3 2026, 6:57 PM
sbin/route/route.8
309

(I am not familiar with how this actually works.) What does "twice as likely" mean? Where does the weight actually get evaluated?

I want to work on metric or administrative distance too.
But I'm waiting on @melifaro response to some of my questions.

sbin/route/route.8
309

sys/net/route/nhgrp_ctl.c:233:

224 /*
225  * Compile actual list of nexthops to be used by datapath from
226  *  the nexthop group @dst.
227  *
228  * For example, compiling control plane list of 2 nexthops
229  *  [(200, A), (100, B)] would result in the datapath array
230  *  [A, A, B]
231  */
glebius added a subscriber: glebius.

IMHO, the description is good enough and clear. Later, native-speakers-doc-committers can improve.

This revision is now accepted and ready to land.Apr 12 2026, 7:35 PM

Thanks for the ping!

sbin/route/route.8
306

I don't know how this works. It's rendering as:

-gateway -3fff::1 -weight -100

Is that correct? Seems like the IP addresses aren't usually a flag?

pouria marked an inline comment as done.

@ziaee done.

This revision now requires review to proceed.Apr 14 2026, 7:54 AM
sbin/route/route.8
306

You're right. I should prefix it with Li tag.
Now it should be:

-gateway 3fff::1 -weight 100
sbin/route/route.8
306

Prefixing with Li makes it look like this when rendered to things other than terminal. I think they are arguments to the flag, so should use Ar probably.

sbin/route/route.8
306

What do you think of if we did them like this?

My rule is, if the page uses Ql, then use that, and if it uses Dq, then I try to use that. We have some other Dq's on the page. It bloats the lines a bit, but I think it kinda looks nice.

pouria added inline comments.
sbin/route/route.8
306

Definitely better.

pouria marked an inline comment as done.

Use .Dq.

This revision is now accepted and ready to land.Apr 14 2026, 2:30 PM
This revision was automatically updated to reflect the committed changes.