> -----Original Message-----
> From: Jiri Pirko <[email protected]>
> Sent: Thursday, June 20, 2019 7:08 PM
> To: Sudarsana Reddy Kalluru <[email protected]>
> Cc: Jakub Kicinski <[email protected]>; [email protected];
> [email protected]; Michal Kalderon <[email protected]>; Ariel
> Elior <[email protected]>
> Subject: Re: [EXT] Re: [PATCH net-next 4/4] qed: Add devlink support for
> configuration attributes.
>
> Thu, Jun 20, 2019 at 02:09:29PM CEST, [email protected] wrote:
> >> -----Original Message-----
> >> From: Jakub Kicinski <[email protected]>
> >> Sent: Tuesday, June 18, 2019 4:24 AM
> >> To: Sudarsana Reddy Kalluru <[email protected]>
> >> Cc: [email protected]; [email protected]; Michal Kalderon
> >> <[email protected]>; Ariel Elior <[email protected]>; Jiri Pirko
> >> <[email protected]>
> >> Subject: [EXT] Re: [PATCH net-next 4/4] qed: Add devlink support for
> >> configuration attributes.
> >>
> >> External Email
> >>
> >> ---------------------------------------------------------------------
> >> - On Mon, 17 Jun 2019 04:45:28 -0700, Sudarsana Reddy Kalluru wrote:
> >> > This patch adds implementation for devlink callbacks for reading/
> >> > configuring the device attributes.
> >> >
> >> > Signed-off-by: Sudarsana Reddy Kalluru <[email protected]>
> >> > Signed-off-by: Ariel Elior <[email protected]>
> >>
> >> You need to provide documentation for your parameters, plus some of
> >> them look like they should potentially be port params, not device params.
> >
> >Thanks a lot for your review. Will add the required documentation. In case
> of Marvell adapter, any of the device/adapter/port parameters can be
> read/configurable via any PF (ethdev) on the port. Hence adding the
> commands at device level. Hope this is fine.
>
> No it is not. Port param should be port param.
>
> Also please be careful not to add any generic param as driver specific.
>
> Thanks!
Hi,
Could you please with my query on the devlink-port-params implementation.
[had sent the same query earlier to [email protected] (based on the copyright
info)].
Kernel seem to be invoking the driver devlink callbacks (registered via
DEVLINK_PARAM_DRIVER) only when the associated parameter is published via
devlink_params_publish(). callnback invocation path,
devlink_nl_param_fill()
{
if (!param_item->published)
continue;
ctx.cmode = i;
err = devlink_param_get(devlink, param, &ctx);
}
The API devlink_params_publish() publishes only the devlink-dev parameters
(i.e., registered via devlink_params_register()), not the devlink-port params
which are registered via devlink_port_params_register(). I couldn't find any
other interface for publishing the devlink-port-params.
I have manually verified setting the published flag for port-params (as in
below) and, observed that kernel correctly invokes the callbacks of
devlink-port-params.
list_for_each_entry(param_item, &dl_port.param_list, list) {
param_item->published = true;
}
Please let me know if I'm missing something here or, it's a missing
functionality in the kernel.
Thanks,
Sudarsana