From: David Miller <davem@davemloft.net>
To: jiri@resnulli.us
Cc: netdev@vger.kernel.org, idosch@mellanox.com, mlxsw@mellanox.com
Subject: Re: [patch net] mlxsw: spectrum_router: Don't offload routes next in list
Date: Mon, 24 Jul 2017 14:15:03 -0700 (PDT)	[thread overview]
Message-ID: <20170724.141503.940004981053393636.davem@davemloft.net> (raw)
In-Reply-To: <20170721160428.23149-1-jiri@resnulli.us>
From: Jiri Pirko <jiri@resnulli.us>
Date: Fri, 21 Jul 2017 18:04:28 +0200
> From: Ido Schimmel <idosch@mellanox.com>
> 
> Each FIB node holds a linked list of routes sharing the same prefix and
> length. In the case of IPv4 it's ordered according to table ID, metric
> and TOS and only the first route in the list is actually programmed to
> the device.
> 
> In case a gatewayed route is added somewhere in the list, then after its
> nexthop group will be refreshed and become valid (due to the resolution
> of its gateway), it'll mistakenly overwrite the existing entry.
> 
> Example:
> 192.168.200.0/24 dev enp3s0np3 scope link metric 1000 offload
> 192.168.200.0/24 via 192.168.100.1 dev enp3s0np3 metric 1000 offload
> 
> Both routes are marked as offloaded despite the fact only the first one
> should actually be present in the device's table.
> 
> When refreshing the nexthop group, don't write the route to the device's
> table unless it's the first in its node.
> 
> Fixes: 9aecce1c7d97 ("mlxsw: spectrum_router: Correctly handle identical routes")
> Signed-off-by: Ido Schimmel <idosch@mellanox.com>
> Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Applied.
     prev parent reply	other threads:[~2017-07-24 21:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-21 16:04 [patch net] mlxsw: spectrum_router: Don't offload routes next in list Jiri Pirko
2017-07-24 21:15 ` David Miller [this message]
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=20170724.141503.940004981053393636.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=idosch@mellanox.com \
    --cc=jiri@resnulli.us \
    --cc=mlxsw@mellanox.com \
    --cc=netdev@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;
as well as URLs for NNTP newsgroup(s).