From: Jakub Kicinski <kubakici@wp.pl>
To: Arkadi Sharshevsky <arkadis@mellanox.com>
Cc: netdev@vger.kernel.org, David Miller <davem@davemloft.net>,
ivecera@redhat.com, roopa@cumulusnetworks.com,
Florian Fainelli <f.fainelli@gmail.com>,
Vivien Didelot <vivien.didelot@savoirfairelinux.com>,
john.fastabend@gmail.com, Andrew Lunn <andrew@lunn.ch>,
Jiri Pirko <jiri@resnulli.us>, mlxsw <mlxsw@mellanox.com>
Subject: Re: Driver profiles RFC
Date: Fri, 11 Aug 2017 14:57:38 -0700 [thread overview]
Message-ID: <20170811145738.6f92e451@cakuba.netronome.com> (raw)
In-Reply-To: <6d8560fa-8346-0c43-272d-d39be65ea82f@mellanox.com>
On Tue, 8 Aug 2017 16:15:41 +0300, Arkadi Sharshevsky wrote:
> Driver <--> Devlink API
> =======================
> Each driver will register his resources with default values at init in
> a similar way to DPIPE table registration. In case those resources already
> exist the default values are discarded. The user will be able to dump and
> update the resources. In order for the changes to take place the user will
> need to re-initiate the driver by a specific devlink knob.
What seems missing from the examples is the ability to dump the
different states - the "pending" configuration and the currently
applied one.
> The above described procedure will require extra reload of the driver.
> This can be improved as a future optimization.
I'm a bit lost, this says driver reload is required...
> UAPI
> ====
> The user will be able to update the resources on a per resource basis:
>
> $devlink dpipe resource set pci/0000:03:00.0 Mem_Linear 2M
>
> For some resources the size is fixed, for example the size of the internal
> memory cannot be changed. It is provided merely in order to reflect the
> nested structure of the resource and to imply the user that Mem = Linear +
> Hash, thus a set operation on it will fail.
>
> The user can dump the current resource configuration:
>
> #devlink dpipe resource dump tree pci/0000:03:00.0 Mem
>
> The user can specify 'tree' in order to show all the nested resources under
> the specified one. In case no 'resource name' is specified the TOP hierarchy
> will be dumped.
>
> After successful resource update the drivers hould be re-instantiated in
> order for the changes to take place:
>
> $devlink reload pci/0000:03:00.0
... but this shows a devlink reload tigger, so no driver reload? Were
you describing two possible solutions? One with persistent kernel
database of configs (persistent across driver reloads) and one with no
persistence and the driver is managing reinit internally when triggered
via devlink?
Another thing that comes to mind is - in case HW/FW reinit takes long
would it make sense to incorporate some form of pre-population of those
defaults somehow? If user knows exactly the config they want upon
boot, it would seem cleaner if the reconfig did not have to happen and
devices started out in the right mode.
next prev parent reply other threads:[~2017-08-11 21:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-08 13:15 Driver profiles RFC Arkadi Sharshevsky
2017-08-08 13:24 ` Jiri Pirko
2017-08-08 13:54 ` Andrew Lunn
2017-08-08 15:44 ` Arkadi Sharshevsky
2017-08-08 16:08 ` Roopa Prabhu
2017-08-09 11:43 ` Arkadi Sharshevsky
2017-08-11 14:34 ` Roopa Prabhu
2017-08-11 21:57 ` Jakub Kicinski [this message]
2017-08-13 6:32 ` Jiri Pirko
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=20170811145738.6f92e451@cakuba.netronome.com \
--to=kubakici@wp.pl \
--cc=andrew@lunn.ch \
--cc=arkadis@mellanox.com \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=ivecera@redhat.com \
--cc=jiri@resnulli.us \
--cc=john.fastabend@gmail.com \
--cc=mlxsw@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=roopa@cumulusnetworks.com \
--cc=vivien.didelot@savoirfairelinux.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).