From: David Ahern <dsahern@gmail.com>
To: Qingtao Cao <qingtao.cao.au@gmail.com>,
netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org,
kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, corbet@lwn.net
Cc: Qingtao Cao <qingtao.cao@digi.com>,
David Leonard <david.leonard@digi.com>
Subject: Re: [PATCH 1/1] Network: support default route metric per interface
Date: Fri, 25 Sep 2020 21:05:10 -0600 [thread overview]
Message-ID: <609cfeac-5056-1668-46ca-e083aa6b06b5@gmail.com> (raw)
In-Reply-To: <20200925231159.945-2-qingtao.cao.au@gmail.com>
On 9/25/20 5:11 PM, Qingtao Cao wrote:
> From: Qingtao Cao <qingtao.cao@digi.com>
>
> Add /proc/sys/net/ipv[4|6]/conf/<device>/def_rt_metric sysfs attribute
> file for each network interface so that userspace programs can specify
> different default route metrics for each interface, which will also be
> applied by the kernel when new routes are automatically created for
> relevant interfaces, when userspace programs may have not specified
> metrics via relevant netlink messages for example.
>
> Signed-off-by: Qingtao Cao <qingtao.cao@digi.com>
> Signed-off-by: David Leonard <david.leonard@digi.com>
> ---
> Documentation/networking/ip-sysctl.rst | 8 +++++
> include/linux/inetdevice.h | 4 +++
> include/linux/ipv6.h | 3 ++
> include/net/ip6_route.h | 15 ++++++++
> include/uapi/linux/ip.h | 1 +
> include/uapi/linux/ipv6.h | 1 +
> net/ipv4/Kconfig | 13 +++++++
> net/ipv4/devinet.c | 3 ++
> net/ipv4/fib_frontend.c | 27 ++++++++++++++
> net/ipv6/addrconf.c | 30 ++++++++++++++--
> net/ipv6/route.c | 50 ++++++++++++++++++++++++--
> 11 files changed, 150 insertions(+), 5 deletions(-)
uh, no.
The metric can be specified for prefix routes via IFA_RT_PRIORITY. There
is no reason for bloating the code and adding another sys knob for this.
Fix your network manager to set the priority when the address is created.
next prev parent reply other threads:[~2020-09-26 3:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-25 23:11 Support default route metric per interface Qingtao Cao
2020-09-25 23:11 ` [PATCH 1/1] Network: support " Qingtao Cao
2020-09-26 3:05 ` David Ahern [this message]
[not found] ` <CAPcThSEqFwTFoU8_9+Wa3GrruGKHVBDD13ZNfeV7C1D4psm4Ew@mail.gmail.com>
[not found] ` <CAPcThSFGYd=Q95GqifUu8QX4L1J_eJ=H_L5H3wDz2UgMxVbQ3Q@mail.gmail.com>
2020-09-29 3:06 ` David Ahern
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=609cfeac-5056-1668-46ca-e083aa6b06b5@gmail.com \
--to=dsahern@gmail.com \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=david.leonard@digi.com \
--cc=kuba@kernel.org \
--cc=kuznet@ms2.inr.ac.ru \
--cc=netdev@vger.kernel.org \
--cc=qingtao.cao.au@gmail.com \
--cc=qingtao.cao@digi.com \
--cc=yoshfuji@linux-ipv6.org \
/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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.