All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roopa Prabhu <roopa@cumulusnetworks.com>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: Jiri Pirko <jiri@resnulli.us>,
	netdev@vger.kernel.org, davem@davemloft.net, idosch@mellanox.com,
	eladr@mellanox.com, yotamg@mellanox.com, nogahf@mellanox.com,
	ogerlitz@mellanox.com, nikolay@cumulusnetworks.com,
	linville@tuxdriver.com, tgraf@suug.ch, gospo@cumulusnetworks.com,
	sfeldma@gmail.com, ast@plumgrid.com, edumazet@google.com,
	hannes@stressinduktion.org, dsa@cumulusnetworks.com,
	jhs@mojatatu.com, vivien.didelot@savoirfairelinux.com,
	john.fastabend@intel.com, andrew@lunn.ch, ivecera@redhat.com
Subject: Re: [patch net-next RFC 0/2] fib4 offload: notifier to let hw to be aware of all prefixes
Date: Sun, 18 Sep 2016 16:16:17 -0700	[thread overview]
Message-ID: <57DF2041.3040509@cumulusnetworks.com> (raw)
In-Reply-To: <fc177125-a9b8-fcce-281b-5fdc25639944@gmail.com>

On 9/18/16, 1:00 PM, Florian Fainelli wrote:
> Le 06/09/2016 à 05:01, Jiri Pirko a écrit :
>> From: Jiri Pirko <jiri@mellanox.com>
>>
>> This is RFC, unfinished. I came across some issues in the process so I would
>> like to share those and restart the fib offload discussion in order to make it
>> really usable.
>>
>> So the goal of this patchset is to allow driver to propagate all prefixes
>> configured in kernel down HW. This is necessary for routing to work
>> as expected. If we don't do that HW might forward prefixes known to kernel
>> incorrectly. Take an example when default route is set in switch HW and there
>> is an IP address set on a management (non-switch) port.
>>
>> Currently, only fibs related to the switch port netdev are offloaded using
>> switchdev ops. This model is not extendable so the first patch introduces
>> a replacement: notifier to propagate fib additions and removals to whoever
>> interested. The second patch makes mlxsw to adopt this new way, registering
>> one notifier block for each mlxsw (asic) instance.
> Instead of introducing another specialization of a notifier_block
> implementation, could we somehow have a kernel-based netlink listener
> which receives the same kind of event information from rtmsg_fib()?
>
> The reason is that having such a facility would hook directly onto
> existing rtmsg_* calls that exist throughout the stack, and that seems
> to scale better.
I was thinking along the same lines. Instead of proliferating notifier blocks
through-out the stack for switchdev offload, putting existing events to use would be nice.

But the problem though is drivers having to parse the netlink msg again. also, the intent
here is to do the offload first ..before the route is added to the kernel (though i don't see that in
the current series). existing netlink rmsg_fib events are generated after the route is added to the kernel.


Jiri, instead of the notifier, do you see a problem with always calling the existing switchdev
offload api for every route  for every asic instance ?. the first device where the route fits wins.
it seems similar to driver registering for notifier and looking at every route ...
am i missing something ?
and the policies you mention could help around selecting the asic instance (FCFS or mirror).
you will need to abstract out the asic instance for switchdev api to call on, but I thought you
already have that in some form in your devlink infrastructure.

  reply	other threads:[~2016-09-18 23:16 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-06 12:01 [patch net-next RFC 0/2] fib4 offload: notifier to let hw to be aware of all prefixes Jiri Pirko
2016-09-06 12:01 ` [patch net-next RFC 1/2] fib: introduce fib notification infrastructure Jiri Pirko
2016-09-06 14:32   ` David Ahern
2016-09-06 14:44     ` Jiri Pirko
2016-09-06 15:11       ` David Ahern
2016-09-06 15:49         ` Jiri Pirko
2016-09-06 16:14           ` Hannes Frederic Sowa
2016-09-06 15:13   ` David Ahern
2016-09-07  8:03     ` Jiri Pirko
2016-09-15 14:41   ` [net-next,RFC,1/2] " Andy Gospodarek
2016-09-15 14:45     ` Jiri Pirko
2016-09-15 14:47       ` Andy Gospodarek
2016-09-18 23:23   ` [patch net-next RFC 1/2] " Roopa Prabhu
2016-09-19  6:06     ` Jiri Pirko
2016-09-19 14:53       ` Roopa Prabhu
2016-09-19 15:08         ` Jiri Pirko
2016-09-06 12:01 ` [patch net-next RFC 2/2] mlxsw: spectrum_router: Use FIB notifications instead of switchdev calls Jiri Pirko
2016-09-18 20:00 ` [patch net-next RFC 0/2] fib4 offload: notifier to let hw to be aware of all prefixes Florian Fainelli
2016-09-18 23:16   ` Roopa Prabhu [this message]
2016-09-19  6:14     ` Jiri Pirko
2016-09-19 14:59       ` Roopa Prabhu
2016-09-19 15:15         ` Jiri Pirko
2016-09-20  5:49           ` Roopa Prabhu
2016-09-20  6:02             ` Jiri Pirko
2016-09-20  6:18               ` Roopa Prabhu
2016-09-19  6:08   ` Jiri Pirko
2016-09-19 16:44     ` Florian Fainelli

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=57DF2041.3040509@cumulusnetworks.com \
    --to=roopa@cumulusnetworks.com \
    --cc=andrew@lunn.ch \
    --cc=ast@plumgrid.com \
    --cc=davem@davemloft.net \
    --cc=dsa@cumulusnetworks.com \
    --cc=edumazet@google.com \
    --cc=eladr@mellanox.com \
    --cc=f.fainelli@gmail.com \
    --cc=gospo@cumulusnetworks.com \
    --cc=hannes@stressinduktion.org \
    --cc=idosch@mellanox.com \
    --cc=ivecera@redhat.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=john.fastabend@intel.com \
    --cc=linville@tuxdriver.com \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@cumulusnetworks.com \
    --cc=nogahf@mellanox.com \
    --cc=ogerlitz@mellanox.com \
    --cc=sfeldma@gmail.com \
    --cc=tgraf@suug.ch \
    --cc=vivien.didelot@savoirfairelinux.com \
    --cc=yotamg@mellanox.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.