From: John Fastabend <john.fastabend@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: sfeldma@gmail.com, netdev@vger.kernel.org, jiri@resnulli.us,
roopa@cumulusnetworks.com
Subject: Re: [PATCH net-next v3 0/7] switchdev: add IPv4 routing offload
Date: Wed, 04 Mar 2015 23:18:52 -0800 [thread overview]
Message-ID: <54F8035C.3060400@gmail.com> (raw)
In-Reply-To: <20150304.160604.2259380248170644628.davem@davemloft.net>
On 03/04/2015 01:06 PM, David Miller wrote:
> From: Scott Feldman <sfeldma@gmail.com>
> Date: Tue, 3 Mar 2015 23:28:06 -0800
>
>> On Tue, Mar 3, 2015 at 9:38 PM, David Miller <davem@davemloft.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.
Also at some point we will need a way to get it out of the
fib_hw_screwed state. But I guess we can lump this into the "better
policy" later.
Sorry for the noise on the last post...
.John
--
John Fastabend Intel Corporation
prev parent reply other threads:[~2015-03-05 7:19 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-03 23:31 [PATCH net-next v3 0/7] switchdev: add IPv4 routing offload sfeldma
2015-03-03 23:31 ` [PATCH net-next v3 1/7] rtnetlink: add RTNH_F_EXTERNAL flag for fib offload sfeldma
2015-03-03 23:31 ` [PATCH net-next v3 2/7] netdevice: add IPv4 fib add/del ops sfeldma
2015-03-03 23:31 ` [PATCH net-next v3 3/7] switchdev: add IPv4 fib ndo ops wrappers sfeldma
2015-03-03 23:31 ` [PATCH net-next v3 4/7] switchdev: don't support custom ip rules, for now sfeldma
2015-03-03 23:31 ` [PATCH net-next v3 5/7] switchdev: implement IPv4 fib ndo wrappers sfeldma
2015-03-03 23:31 ` [PATCH net-next v3 6/7] fib: hook IPv4 fib for hardware offload sfeldma
2015-03-04 0:01 ` Alexander Duyck
2015-03-04 3:16 ` Scott Feldman
2015-03-05 7:03 ` John Fastabend
2015-03-05 7:05 ` David Miller
2015-03-03 23:32 ` [PATCH net-next v3 7/7] rocker: implement IPv4 fib offloading sfeldma
2015-03-04 5:38 ` [PATCH net-next v3 0/7] switchdev: add IPv4 routing offload David Miller
2015-03-04 7:28 ` Scott Feldman
2015-03-04 21:06 ` David Miller
2015-03-05 4:50 ` Scott Feldman
2015-03-05 5:04 ` David Miller
2015-03-05 5:07 ` David Miller
2015-03-05 7:18 ` John Fastabend [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=54F8035C.3060400@gmail.com \
--to=john.fastabend@gmail.com \
--cc=davem@davemloft.net \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=roopa@cumulusnetworks.com \
--cc=sfeldma@gmail.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 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).