From: David Ahern <dsahern@gmail.com>
To: Ido Schimmel <idosch@nvidia.com>, netdev@vger.kernel.org
Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
edumazet@google.com, petrm@nvidia.com, amcohen@nvidia.com,
nicolas.dichtel@6wind.com, mlxsw@nvidia.com,
stable@vger.kernel.org
Subject: Re: [PATCH net] mlxsw: spectrum_router: Fix IPv4 nexthop gateway indication
Date: Tue, 19 Jul 2022 12:03:42 -0600 [thread overview]
Message-ID: <c66afab7-732c-c68e-cc53-7425d92df42b@gmail.com> (raw)
In-Reply-To: <20220719122626.2276880-1-idosch@nvidia.com>
On 7/19/22 6:26 AM, Ido Schimmel wrote:
> mlxsw needs to distinguish nexthops with a gateway from connected
> nexthops in order to write the former to the adjacency table of the
> device. The check used to rely on the fact that nexthops with a gateway
> have a 'link' scope whereas connected nexthops have a 'host' scope. This
> is no longer correct after commit 747c14307214 ("ip: fix dflt addr
> selection for connected nexthop").
>
> Fix that by instead checking the address family of the gateway IP. This
> is a more direct way and also consistent with the IPv6 counterpart in
> mlxsw_sp_rt6_is_gateway().
>
> Cc: stable@vger.kernel.org
> Fixes: 747c14307214 ("ip: fix dflt addr selection for connected nexthop")
> Fixes: 597cfe4fc339 ("nexthop: Add support for IPv4 nexthops")
> Signed-off-by: Ido Schimmel <idosch@nvidia.com>
> Reviewed-by: Amit Cohen <amcohen@nvidia.com>
> ---
> Copied stable since Nicolas' patch has stable copied and I don't want
> stable trees to have his patch, but not mine. To make it clear how far
> this patch needs to be backported, I have included the same Fixes tag as
> him.
> ---
> drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Reviewed-by: David Ahern <dsahern@kernel.org>
next prev parent reply other threads:[~2022-07-19 18:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-19 12:26 [PATCH net] mlxsw: spectrum_router: Fix IPv4 nexthop gateway indication Ido Schimmel
2022-07-19 12:58 ` Nicolas Dichtel
2022-07-19 18:03 ` David Ahern [this message]
2022-07-20 10:10 ` patchwork-bot+netdevbpf
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=c66afab7-732c-c68e-cc53-7425d92df42b@gmail.com \
--to=dsahern@gmail.com \
--cc=amcohen@nvidia.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=idosch@nvidia.com \
--cc=kuba@kernel.org \
--cc=mlxsw@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=nicolas.dichtel@6wind.com \
--cc=pabeni@redhat.com \
--cc=petrm@nvidia.com \
--cc=stable@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox