All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sudarsana Reddy Kalluru <skalluru@marvell.com>
To: Jiri Pirko <jiri@resnulli.us>
Cc: Jakub Kicinski <jakub.kicinski@netronome.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Michal Kalderon <mkalderon@marvell.com>,
	Ariel Elior <aelior@marvell.com>
Subject: RE: [EXT] Re: [PATCH net-next 4/4] qed: Add devlink support for configuration attributes.
Date: Wed, 26 Jun 2019 06:46:56 +0000	[thread overview]
Message-ID: <MN2PR18MB25289C051D88D59DF844E667D3E20@MN2PR18MB2528.namprd18.prod.outlook.com> (raw)
In-Reply-To: <20190620133748.GD2504@nanopsycho>


> -----Original Message-----
> From: Jiri Pirko <jiri@resnulli.us>
> Sent: Thursday, June 20, 2019 7:08 PM
> To: Sudarsana Reddy Kalluru <skalluru@marvell.com>
> Cc: Jakub Kicinski <jakub.kicinski@netronome.com>; davem@davemloft.net;
> netdev@vger.kernel.org; Michal Kalderon <mkalderon@marvell.com>; Ariel
> Elior <aelior@marvell.com>
> 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, skalluru@marvell.com wrote:
> >> -----Original Message-----
> >> From: Jakub Kicinski <jakub.kicinski@netronome.com>
> >> Sent: Tuesday, June 18, 2019 4:24 AM
> >> To: Sudarsana Reddy Kalluru <skalluru@marvell.com>
> >> Cc: davem@davemloft.net; netdev@vger.kernel.org; Michal Kalderon
> >> <mkalderon@marvell.com>; Ariel Elior <aelior@marvell.com>; Jiri Pirko
> >> <jiri@resnulli.us>
> >> 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 <skalluru@marvell.com>
> >> > Signed-off-by: Ariel Elior <aelior@marvell.com>
> >>
> >> 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 jiri@mellanox.com (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

  reply	other threads:[~2019-06-26  6:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-17 11:45 [PATCH net-next 0/4] qed: Devlink support for config attributes management Sudarsana Reddy Kalluru
2019-06-17 11:45 ` [PATCH net-next 1/4] qed: Add APIs for device attributes configuration Sudarsana Reddy Kalluru
2019-06-17 11:45 ` [PATCH net-next 2/4] qed: Perform devlink registration after the hardware init Sudarsana Reddy Kalluru
2019-06-17 11:45 ` [PATCH net-next 3/4] qed: Add new file for devlink implementation Sudarsana Reddy Kalluru
2019-06-17 11:45 ` [PATCH net-next 4/4] qed: Add devlink support for configuration attributes Sudarsana Reddy Kalluru
2019-06-17 22:54   ` Jakub Kicinski
2019-06-20 12:09     ` [EXT] " Sudarsana Reddy Kalluru
2019-06-20 13:37       ` Jiri Pirko
2019-06-26  6:46         ` Sudarsana Reddy Kalluru [this message]
2019-07-03 12:56         ` Sudarsana Reddy Kalluru
2019-07-03 17:42           ` Jakub Kicinski
2019-07-04  5:49             ` Sudarsana Reddy Kalluru

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=MN2PR18MB25289C051D88D59DF844E667D3E20@MN2PR18MB2528.namprd18.prod.outlook.com \
    --to=skalluru@marvell.com \
    --cc=aelior@marvell.com \
    --cc=davem@davemloft.net \
    --cc=jakub.kicinski@netronome.com \
    --cc=jiri@resnulli.us \
    --cc=mkalderon@marvell.com \
    --cc=netdev@vger.kernel.org \
    /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.