From: roopa <roopa@cumulusnetworks.com>
To: Scott Feldman <sfeldma@gmail.com>
Cc: "Jamal Hadi Salim" <jhs@mojatatu.com>,
Netdev <netdev@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
"Jiří Pírko" <jiri@resnulli.us>,
"alexander.h.duyck@redhat.com" <alexander.h.duyck@redhat.com>
Subject: Re: [PATCH net-next v4 2/8] netdevice: add IPv4 fib add/del ops
Date: Sun, 08 Mar 2015 07:31:50 -0700 [thread overview]
Message-ID: <54FC5D56.3090702@cumulusnetworks.com> (raw)
In-Reply-To: <CAE4R7bAcfJ8M0eQMdZdS3aDgPVWSQznABZymGq+PU34vJx1suA@mail.gmail.com>
On 3/6/15, 11:59 AM, Scott Feldman wrote:
>
> I considered passing netlink flags in to driver, but the kernel logic
> in fib_table_insert() already takes care of the checks required by the
> flags, and from the driver's perspective, only three ops are needed:
> add, del, and mod. And I've combined add and mod into the same op,
> with the assumption the driver can know if an entry exists or not.
>
> Can it work?
>
> Let's try the various user cmds and see what happens:
>
> ip route add ... CREATE|EXCL
>
> if kernel FIB entry exists
> return -EEXIST to user
> else
> call driver add op
> add kernel FIB entry
>
> ip route change ... REPLACE
>
> if kernel FIB entry exists
> call driver add op // driver treats this as a mod
> modify kernel FIB entry
> else
> return -ENOENT
>
> ip route replace ... CREATE|REPLACE
>
> if kernel FIB entry exists
> call driver add op // driver treats this as a mod
> modify kernel FIB entry
> else
> call driver add op
> add kernel FIB entry
>
> ip route prepend ... CREATE
>
> if kernel FIB entry exists
> call driver add op // driver treats this as a mod
> prepend kernel FIB entry
> else
> call driver add op
> add kernel FIB entry
>
> ip route append ... CREATE|APPEND
>
> if kernel FIB entry exists
> call driver add op // driver treats this as a mod
> append kernel FIB entry
> else
> call driver add op
> add kernel FIB entry
>
>
> I'm not 100% on the prepend/append cases. Maybe don't try to offload
> prepend/append cases?
We will have to offload prepend/append cases as well (I had also raised
this earlier in v2).
And, I dont see a problem passing the flags to the driver in the ndo op.
Thanks,
Roopa
next prev parent reply other threads:[~2015-03-08 14:31 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-06 5:21 [PATCH net-next v4 0/8] switchdev: add IPv4 routing offload sfeldma
2015-03-06 5:21 ` [PATCH net-next v4 1/8] rtnetlink: add RTNH_F_EXTERNAL flag for fib offload sfeldma
2015-03-06 5:21 ` [PATCH net-next v4 2/8] netdevice: add IPv4 fib add/del ops sfeldma
2015-03-06 14:55 ` Jamal Hadi Salim
2015-03-06 19:59 ` Scott Feldman
2015-03-08 14:31 ` roopa [this message]
2015-03-08 22:16 ` Scott Feldman
2015-03-09 6:22 ` roopa
2015-03-09 8:38 ` Scott Feldman
2015-03-09 13:47 ` Jamal Hadi Salim
2015-03-09 18:07 ` Scott Feldman
2015-03-06 5:21 ` [PATCH net-next v4 3/8] switchdev: add IPv4 fib ndo ops wrappers sfeldma
2015-03-06 5:21 ` [PATCH net-next v4 4/8] switchdev: don't support custom ip rules, for now sfeldma
2015-03-06 5:21 ` [PATCH net-next v4 5/8] switchdev: implement IPv4 fib ndo wrappers sfeldma
2015-03-06 7:24 ` Jiri Pirko
2015-03-06 9:38 ` Scott Feldman
2015-03-06 11:53 ` Jiri Pirko
2015-03-06 5:21 ` [PATCH net-next v4 6/8] ipv4: add net bool fib_offload_disabled sfeldma
2015-03-06 5:21 ` [PATCH net-next v4 7/8] fib: hook IPv4 fib for hardware offload sfeldma
2015-03-06 5:21 ` [PATCH net-next v4 8/8] rocker: implement IPv4 fib offloading sfeldma
2015-03-06 5:27 ` [PATCH net-next v4 0/8] switchdev: add IPv4 routing offload David Miller
2015-03-06 15:43 ` Alexander Duyck
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=54FC5D56.3090702@cumulusnetworks.com \
--to=roopa@cumulusnetworks.com \
--cc=alexander.h.duyck@redhat.com \
--cc=davem@davemloft.net \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--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 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.