From: Mateusz Polchlopek <mateusz.polchlopek@intel.com>
To: Alexander Lobakin <aleksander.lobakin@intel.com>,
Przemek Kitszel <przemyslaw.kitszel@intel.com>
Cc: Jiri Pirko <jiri@nvidia.com>,
Tony Nguyen <anthony.l.nguyen@intel.com>, <davem@davemloft.net>,
<kuba@kernel.org>, <pabeni@redhat.com>, <edumazet@google.com>,
<netdev@vger.kernel.org>
Subject: Re: [PATCH net-next 1/6] devlink: extend devlink_param *set pointer
Date: Wed, 24 Apr 2024 11:52:27 +0200 [thread overview]
Message-ID: <598d25c1-3361-4f01-bbaf-ab335fba3da3@intel.com> (raw)
In-Reply-To: <fc3c9135-ad5e-4f32-b852-c08cfb096492@intel.com>
On 4/24/2024 11:24 AM, Alexander Lobakin wrote:
> From: Przemek Kitszel <przemyslaw.kitszel@intel.com>
> Date: Wed, 24 Apr 2024 11:20:49 +0200
>
>> On 4/24/24 11:05, Alexander Lobakin wrote:
>>> From: Tony Nguyen <anthony.l.nguyen@intel.com>
>>> Date: Mon, 22 Apr 2024 13:39:06 -0700
>>>
>>>> From: Mateusz Polchlopek <mateusz.polchlopek@intel.com>
>>>>
>>>> Extend devlink_param *set function pointer to take extack as a param.
>>>> Sometimes it is needed to pass information to the end user from set
>>>> function. It is more proper to use for that netlink instead of passing
>>>> message to dmesg.
>>>>
>>>> Reviewed-by: Jiri Pirko <jiri@nvidia.com>
>>>> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
>>>> Signed-off-by: Mateusz Polchlopek <mateusz.polchlopek@intel.com>
>>>> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
>>>
>>> [...]
>>>
>>>> diff --git a/include/net/devlink.h b/include/net/devlink.h
>>>> index d31769a116ce..35eb0f884386 100644
>>>> --- a/include/net/devlink.h
>>>> +++ b/include/net/devlink.h
>>>> @@ -483,7 +483,8 @@ struct devlink_param {
>>>> int (*get)(struct devlink *devlink, u32 id,
>>>> struct devlink_param_gset_ctx *ctx);
>>>> int (*set)(struct devlink *devlink, u32 id,
>>>> - struct devlink_param_gset_ctx *ctx);
>>>> + struct devlink_param_gset_ctx *ctx,
>>>> + struct netlink_ext_ack *extack);
>>>
>>> Sorry for the late comment. Can't we embed extack to
>>> devlink_param_gset_ctx instead? It would take much less lines.
>>
>> But then we will want to remove the extack param from .validate() too:
>>
>>>
>>>> int (*validate)(struct devlink *devlink, u32 id,
>>>> union devlink_param_value val,
>>>> struct netlink_ext_ack *extack);
>>
>> right there.
>
> We don't have &devlink_param_gset_ctx here, only the union.
> Extending this union with the extack requires converting it to a struct
> (which would have extack + this union), which is again a conversion of
> all the drivers : >
Makes sense. I also have to take a look on docs issue reported, so
Your's suggestion I will add in the next version too.
>> This would amount to roughly the same scope for changes, but would spare
>> us yet another round when someone would like to extend .get(), so I like
>> this idea.
>
> Thanks,
> Olek
next prev parent reply other threads:[~2024-04-24 9:52 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-22 20:39 [PATCH net-next 0/6][pull request] ice: Support 5 layer Tx scheduler topology Tony Nguyen
2024-04-22 20:39 ` [PATCH net-next 1/6] devlink: extend devlink_param *set pointer Tony Nguyen
2024-04-24 9:05 ` Alexander Lobakin
2024-04-24 9:20 ` Przemek Kitszel
2024-04-24 9:24 ` Alexander Lobakin
2024-04-24 9:40 ` Przemek Kitszel
2024-04-24 9:52 ` Mateusz Polchlopek [this message]
2024-04-25 3:08 ` Jakub Kicinski
2024-04-22 20:39 ` [PATCH net-next 2/6] ice: Support 5 layer topology Tony Nguyen
2024-04-22 20:39 ` [PATCH net-next 3/6] ice: Adjust the VSI/Aggregator layers Tony Nguyen
2024-04-22 20:39 ` [PATCH net-next 4/6] ice: Enable switching default Tx scheduler topology Tony Nguyen
2024-04-22 20:39 ` [PATCH net-next 5/6] ice: Add tx_scheduling_layers devlink param Tony Nguyen
2024-04-22 20:39 ` [PATCH net-next 6/6] ice: Document tx_scheduling_layers parameter Tony Nguyen
2024-04-23 12:37 ` Bagas Sanjaya
2024-04-24 9:54 ` Mateusz Polchlopek
2024-04-24 10:47 ` Bagas Sanjaya
2024-04-25 3:10 ` [PATCH net-next 0/6][pull request] ice: Support 5 layer Tx scheduler topology patchwork-bot+netdevbpf
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=598d25c1-3361-4f01-bbaf-ab335fba3da3@intel.com \
--to=mateusz.polchlopek@intel.com \
--cc=aleksander.lobakin@intel.com \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jiri@nvidia.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.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).