All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hangbin Liu <liuhangbin@gmail.com>
To: David Ahern <dsahern@kernel.org>
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	Ido Schimmel <idosch@idosch.org>,
	netdev@vger.kernel.org, "David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Thomas Haller <thaller@redhat.com>
Subject: Re: [Questions] Some issues about IPv4/IPv6 nexthop route
Date: Thu, 27 Jul 2023 12:19:16 +0800	[thread overview]
Message-ID: <ZMHwROD1AJrd4pND@Laptop-X1> (raw)
In-Reply-To: <9a421bef-2b19-8619-601e-b00c0b1dc515@kernel.org>

On Wed, Jul 26, 2023 at 09:57:59AM -0600, David Ahern wrote:
> > So my questions are, should we show weight/scope for IPv4? How to deal the
> > type/proto info missing for IPv6? How to deal with the difference of merging
> > policy for IPv4/IPv6?
> > + ip route add 172.16.105.0/24 table 100 via 172.16.104.100 dev dummy1
> > + ip route append 172.16.105.0/24 table 100 via 172.16.104.100 dev dummy2
> 
> > + ip route add 172.16.106.0/24 table 100 nexthop via 172.16.104.100 dev dummy1 weight 1
> > + ip route append 172.16.106.0/24 table 100 nexthop via 172.16.104.100 dev dummy1 weight 2
> 
> Weight only has meaning with a multipath route. In both of these caess
> these are 2 separate entries in the FIB

Yes, we know these are 2 separate entries. The NM developers know these
are 2 separate entries. But the uses don't know, and the route daemon don't
know. If a user add these 2 entires. And kernel show them as the same. The
route daemon will store them as a same entries. But if the user delete the
entry. We actually delete one and left one in the kernel. This will make
the route daemon and user confused.

So my question is, should we export the weight/scope? Or stop user add
the second entry? Or just leave it there and ask route daemon/uses try
the new nexthop api.

> with the second one only hit under certain conditions.

Just curious, with what kind of certain conditions we will hit the second one?

> 
> > + ip route show table 200
> > default dev dummy1 scope link
> > local default dev dummy1 scope host
> > 172.16.107.0/24 via 172.16.104.100 dev dummy1
> > 172.16.107.0/24 via 172.16.104.100 dev dummy1
> > 
> > + ip addr add 2001:db8:101::1/64 dev dummy1
> > + ip addr add 2001:db8:101::2/64 dev dummy2
> > + ip route add 2001:db8:102::/64 via 2001:db8:101::10 dev dummy1 table 100
> > + ip route prepend 2001:db8:102::/64 via 2001:db8:101::10 dev dummy2 table 100
> > + ip route add local 2001:db8:103::/64 via 2001:db8:101::10 dev dummy1 table 100
> > + ip route prepend unicast 2001:db8:103::/64 via 2001:db8:101::10 dev dummy2 table 1
> Unfortunately the original IPv6 multipath implementation did not follow
> the same semantics as IPv4. Each leg in a MP route is a separate entry
> and the append and prepend work differently for v6. :-(
> 
> This difference is one of the many goals of the separate nexthop objects
> -- aligning ipv4 and ipv6 behavior which can only be done with a new
> API. There were many attempts to make the legacy route infrastructure
> more closely aligned between v4 and v6 and inevitably each was reverted
> because it broke some existing user.

Yes, I understand the difficult and risk to aligned the v4/v6 behavior.
On the other hand, changing to new nexthop api also a large work for the
routing daemons. Here is a quote from NM developers replied to me.

"If the issues (this and others) of the netlink API for route objects can be
fixed, then there seems less reason to change NetworkManager to nexthop
objects. If it cannot (won't) be fixed, then would be another argument for using
nexthop objects..."

I will check if all the issues could be fixed with new nexthop api.

Thanks
Hangbin

  reply	other threads:[~2023-07-27  4:19 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-18  8:00 [PATCH net-next] ipv4/fib: send RTM_DELROUTE notify when flush fib Hangbin Liu
2023-07-18 10:19 ` Ido Schimmel
2023-07-18 10:32   ` Ido Schimmel
2023-07-18 14:45     ` David Ahern
2023-07-18 15:58   ` Stephen Hemminger
2023-07-20  7:51     ` Hangbin Liu
2023-07-20 14:29       ` Ido Schimmel
2023-07-21  1:34         ` Hangbin Liu
2023-07-21  4:01           ` David Ahern
2023-07-21  5:46             ` Hangbin Liu
2023-07-23  7:38               ` Ido Schimmel
2023-07-24  8:56                 ` Hangbin Liu
2023-07-24 15:48                   ` Stephen Hemminger
2023-07-25  8:20                     ` Hangbin Liu
2023-07-25 16:36                       ` Stephen Hemminger
2023-07-28 13:01                         ` Nicolas Dichtel
2023-07-28 15:42                           ` David Ahern
2023-08-02  9:10                             ` Thomas Haller
2023-08-08  1:44                               ` David Ahern
2023-08-08 18:59                                 ` Benjamin Poirier
2023-09-11  9:50                                   ` Thomas Haller
2023-09-13  7:58                                     ` Nicolas Dichtel
2023-09-13  9:54                                       ` Hangbin Liu
2023-09-13 14:11                                         ` Nicolas Dichtel
2023-09-13 14:43                                           ` David Ahern
2023-09-13 14:53                                             ` Nicolas Dichtel
2023-09-14 15:43                                               ` Nicolas Dichtel
2023-09-15  3:07                                                 ` David Ahern
2023-09-15 15:54                                                   ` Nicolas Dichtel
2023-09-13 14:41                                       ` David Ahern
2023-09-15 16:59                                         ` Stephen Hemminger
2023-07-26 10:17                     ` [Questions] Some issues about IPv4/IPv6 nexthop route (was Re: [PATCH net-next] ipv4/fib: send RTM_DELROUTE notify when flush fib) Hangbin Liu
2023-07-26 15:57                       ` David Ahern
2023-07-27  4:19                         ` Hangbin Liu [this message]
2023-07-27 15:35                           ` [Questions] Some issues about IPv4/IPv6 nexthop route David Ahern
2023-07-27 14:45                       ` [Questions] Some issues about IPv4/IPv6 nexthop route (was Re: [PATCH net-next] ipv4/fib: send RTM_DELROUTE notify when flush fib) Ido Schimmel
2023-08-28  7:53                         ` [Questions] Some issues about IPv4/IPv6 nexthop route Hangbin Liu
2023-08-28 15:06                           ` David Ahern
2023-08-29  1:07                             ` Hangbin Liu
2023-08-29  1:42                               ` David Ahern
2023-08-02  9:06                 ` [PATCH net-next] ipv4/fib: send RTM_DELROUTE notify when flush fib Thomas Haller
2023-08-04  8:09                 ` Hangbin Liu
2023-08-09  7:06                   ` Ido Schimmel
2023-08-09 10:02                     ` Hangbin Liu
2023-07-25 14:13 ` kernel test robot

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=ZMHwROD1AJrd4pND@Laptop-X1 \
    --to=liuhangbin@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=idosch@idosch.org \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=stephen@networkplumber.org \
    --cc=thaller@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.
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.