[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200110104719.2035572d@cakuba.netronome.com>
Date: Fri, 10 Jan 2020 10:47:19 -0800
From: Jakub Kicinski <jakub.kicinski@...ronome.com>
To: Jacob Keller <jacob.e.keller@...el.com>
Cc: Jiri Pirko <jiri@...nulli.us>, netdev@...r.kernel.org,
valex@...lanox.com
Subject: Re: [PATCH v2 0/3] devlink region trigger support
On Fri, 10 Jan 2020 09:54:20 -0800, Jacob Keller wrote:
> On 1/10/2020 1:40 AM, Jiri Pirko wrote:
> > Thu, Jan 09, 2020 at 08:33:07PM CET, jacob.e.keller@...el.com wrote:
> >> This series consists of patches to enable devlink to request a snapshot via
> >> a new DEVLINK_CMD_REGION_TRIGGER_SNAPSHOT.
> >>
> >> A reviewer might notice that the devlink health API already has such support
> >> for handling a similar case. However, the health API does not make sense in
> >> cases where the data is not related to an error condition.
> >>
> >> In this case, using the health API only for the dumping feels incorrect.
> >> Regions make sense when the addressable content is not captured
> >> automatically on error conditions, but only upon request by the devlink API.
> >>
> >> The netdevsim driver is modified to support the new trigger_snapshot
> >> callback as an example of how this can be used.
> >
> > I don't think that the netdevsim usecase is enough to merge this in. You
> > need a real-driver user as well.
> >
> Sure. But this direction and implementation seems reasonable?
>
> I am making progress on a driver implementation for this, and I am fine
> holding onto these patches until I am ready to submit the full series to
> the list with the driver..
>
> Mostly I wanted to make sure the direction was looking good earlier than
> the time frame for completing that work.
As Jiri said, quite hard to tell without seeing the real user.
I presume you take some lock to ensure the contents of the snapshot are
atomic? Otherwise I wonder if you wouldn't be better served by just
allowing region read to operate directly on the data rather then going
through the snapshot create -> read -> snapshot remove cycle. Not sure
Jiri would agree, it require more code.
For the patches themselves we may want to move the callbacks into some
ops structure in the region. And I don't think you need to make the
trigger command NO_LOCK.
Powered by blists - more mailing lists