[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20150304.160604.2259380248170644628.davem@davemloft.net>
Date: Wed, 04 Mar 2015 16:06:04 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: sfeldma@...il.com
Cc: netdev@...r.kernel.org, jiri@...nulli.us, roopa@...ulusnetworks.com
Subject: Re: [PATCH net-next v3 0/7] switchdev: add IPv4 routing offload
From: Scott Feldman <sfeldma@...il.com>
Date: Tue, 3 Mar 2015 23:28:06 -0800
> On Tue, Mar 3, 2015 at 9:38 PM, David Miller <davem@...emloft.net> wrote:
> In v3, the setting and clearing of RTNH_F_EXTERNAL moved to the
> driver, the implementer of the add/del ndo ops. So RTNH_F_EXTERNAL
> does get cleared by the driver on fib_flush_external(). We could add
> an additional clear above the driver, just in case the driver screwed
> up and forgot to clear it. Driver bug in that case; not sure where to
> draw the line.
I'd rather the state bit get managed by net/ipv4/*.c rather than
duplicate this into every driver, that's error prone and duplicates
logic unnecessarily.
>> Secondly, if you call fib_flush_external() because an add returned an
>> error, you have to set some boolean state which prevents the next new
>> route insert from loading only that new route into the hardware
>> because that's exactly what will happen with your current
>> implementation.
>
> I guess we could add a net.ipv4.fib_hw_screwed. But that kills other
> innocent switch devices on same netns. Or is it a private driver
> bool, which gets set on first install err, and is checked on
> subsequent installs?
You can make it per-netdevice if you want. Put it into the inetdevice
area perhaps.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists