All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@nvidia.com>
To: Vincent MAILHOL <mailhol.vincent@wanadoo.fr>
Cc: Jakub Kicinski <kuba@kernel.org>,
	netdev@vger.kernel.org, "David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] net: devlink: devlink_nl_info_fill: populate default information
Date: Thu, 24 Nov 2022 09:53:37 +0100	[thread overview]
Message-ID: <Y38xEYaUurDqesA1@nanopsycho> (raw)
In-Reply-To: <CAMZ6RqJ_rjbbwAfKzA3g2547D5vMke2KBnWCgBVmQqLcev1keg@mail.gmail.com>

Thu, Nov 24, 2022 at 06:33:58AM CET, mailhol.vincent@wanadoo.fr wrote:
>On Thu. 24 Nov. 2022 at 12:06, Jakub Kicinski <kuba@kernel.org> wrote:
>> On Wed, 23 Nov 2022 18:42:41 +0900 Vincent MAILHOL wrote:
>> > I see three solutions:
>> >
>> > 1/ Do it in the core, clean up all drivers using
>> > devlink_info_driver_name_put() and make the function static (i.e.
>> > forbid the drivers to set the driver name themselves).
>> > N.B. This first solution does not work for
>> > devlink_info_serial_number_put() because the core will not always be
>> > able to provide a default value (e.g. my code only covers USB
>> > devices).
>> >
>> > 2/ Keep track of which attribute is already set (as you suggested).
>> >
>> > 3/ Do a function devlink_nl_info_fill_default() and let the drivers
>> > choose to either call that function or set the attributes themselves.
>> >
>> > I would tend to go with a mix of 1/ and 2/.
>>
>> I think 2/ is best because it will generalize to serial numbers while
>> 1/ will likely not. 3/ is a smaller gain.
>>
>> Jiri already plumbed thru the struct devlink_info_req which is on the
>> stack of the caller, per request, so we can add the bool / bitmap for
>> already reported items there quite easily.
>
>Sorry, let me clarify the next actions. Are you meaning that Jiri is
>already working on the bitmap implementation and should I wait for his
>patches first? Or do you expect me to do it?

I'm not.

  reply	other threads:[~2022-11-24  8:53 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-22 15:49 [RFC PATCH] net: devlink: devlink_nl_info_fill: populate default information Vincent Mailhol
2022-11-23  4:12 ` Jakub Kicinski
2022-11-23  9:42   ` Vincent MAILHOL
2022-11-24  3:06     ` Jakub Kicinski
2022-11-24  5:33       ` Vincent MAILHOL
2022-11-24  8:53         ` Jiri Pirko [this message]
2022-11-28 18:43         ` Jakub Kicinski
2022-11-28 23:14           ` Vincent MAILHOL
2022-11-23  9:46 ` Jiri Pirko
2022-11-23 11:00   ` Vincent MAILHOL
2022-11-23 12:10     ` Jiri Pirko
2022-11-23 16:08       ` Vincent MAILHOL
2022-11-23 16:26         ` Jiri Pirko
2022-11-24 16:20       ` Vincent MAILHOL
2022-11-27  8:15 ` [PATCH net-next v2 0/5] net: devlink: return the driver name in devlink_nl_info_fill Vincent Mailhol
2022-11-27  8:15   ` [Intel-wired-lan] " Vincent Mailhol
2022-11-27  8:16   ` [PATCH net-next v2 1/5] mlxsw: minimal: fix mlxsw_m_module_get_drvinfo() to correctly report driver name Vincent Mailhol
2022-11-27  8:16     ` [Intel-wired-lan] " Vincent Mailhol
2022-11-27  8:16   ` [PATCH net-next v2 2/5] mlxsw: core: fix mlxsw_devlink_info_get() " Vincent Mailhol
2022-11-27  8:16     ` [Intel-wired-lan] " Vincent Mailhol
2022-11-27  8:16   ` [PATCH net-next v2 3/5] net: devlink: let the core report the driver name instead of the drivers Vincent Mailhol
2022-11-27  8:16     ` [Intel-wired-lan] " Vincent Mailhol
2022-11-27  8:16   ` [PATCH net-next v2 4/5] net: devlink: remove devlink_info_driver_name_put() Vincent Mailhol
2022-11-27  8:16     ` [Intel-wired-lan] " Vincent Mailhol
2022-11-27 12:01     ` kernel test robot
2022-11-27 12:11     ` kernel test robot
2022-11-27  8:16   ` [PATCH net-next v2 5/5] net: devlink: make the devlink_ops::info_get() callback optional Vincent Mailhol
2022-11-27  8:16     ` [Intel-wired-lan] " Vincent Mailhol
2022-11-27 13:09 ` [PATCH net-next v3 0/5] net: devlink: return the driver name in devlink_nl_info_fill Vincent Mailhol
2022-11-27 13:09   ` [Intel-wired-lan] " Vincent Mailhol
2022-11-27 13:09   ` [PATCH net-next v3 1/5] mlxsw: minimal: fix mlxsw_m_module_get_drvinfo() to correctly report driver name Vincent Mailhol
2022-11-27 13:09     ` [Intel-wired-lan] " Vincent Mailhol
2022-11-27 16:14     ` Ido Schimmel
2022-11-27 16:14       ` [Intel-wired-lan] " Ido Schimmel
2022-11-27 13:09   ` [PATCH net-next v3 2/5] mlxsw: core: fix mlxsw_devlink_info_get() " Vincent Mailhol
2022-11-27 13:09     ` [Intel-wired-lan] " Vincent Mailhol
2022-11-27 16:17     ` Ido Schimmel
2022-11-27 16:17       ` [Intel-wired-lan] " Ido Schimmel
2022-11-28  1:42       ` Vincent MAILHOL
2022-11-28  1:42         ` [Intel-wired-lan] " Vincent MAILHOL
2022-11-27 13:09   ` [PATCH net-next v3 3/5] net: devlink: let the core report the driver name instead of the drivers Vincent Mailhol
2022-11-27 13:09     ` [Intel-wired-lan] " Vincent Mailhol
2022-11-27 13:09   ` [PATCH net-next v3 4/5] net: devlink: remove devlink_info_driver_name_put() Vincent Mailhol
2022-11-27 13:09     ` [Intel-wired-lan] " Vincent Mailhol
2022-11-27 13:09   ` [PATCH net-next v3 5/5] net: devlink: make the devlink_ops::info_get() callback optional Vincent Mailhol
2022-11-27 13:09     ` [Intel-wired-lan] " Vincent Mailhol
2022-11-28  4:15 ` [PATCH net-next v4 0/3] net: devlink: return the driver name in devlink_nl_info_fill Vincent Mailhol
2022-11-28  4:15   ` [Intel-wired-lan] " Vincent Mailhol
2022-11-28  4:15   ` [PATCH net-next v4 1/3] net: devlink: let the core report the driver name instead of the drivers Vincent Mailhol
2022-11-28  4:15     ` [Intel-wired-lan] " Vincent Mailhol
2022-11-28 11:49     ` Ido Schimmel
2022-11-28 11:49       ` [Intel-wired-lan] " Ido Schimmel
2022-11-28  4:15   ` [PATCH net-next v4 2/3] net: devlink: remove devlink_info_driver_name_put() Vincent Mailhol
2022-11-28  4:15     ` [Intel-wired-lan] " Vincent Mailhol
2022-11-28  4:15   ` [PATCH net-next v4 3/3] net: devlink: make the devlink_ops::info_get() callback optional Vincent Mailhol
2022-11-28  4:15     ` [Intel-wired-lan] " Vincent Mailhol
2022-11-28 18:42     ` Jakub Kicinski
2022-11-28 18:42       ` [Intel-wired-lan] " Jakub Kicinski

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=Y38xEYaUurDqesA1@nanopsycho \
    --to=jiri@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mailhol.vincent@wanadoo.fr \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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 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.