netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Jiri Pirko <jiri@resnulli.us>
Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, saeedm@nvidia.com,
	leon@kernel.org, tariqt@nvidia.com, andrew+netdev@lunn.ch,
	dakr@kernel.org, rafael@kernel.org, przemyslaw.kitszel@intel.com,
	anthony.l.nguyen@intel.com, cratiu@nvidia.com,
	jacob.e.keller@intel.com, konrad.knitter@intel.com,
	cjubran@nvidia.com
Subject: Re: [PATCH net-next RFC 1/3] faux: extend the creation function for module namespace
Date: Tue, 18 Mar 2025 17:04:37 +0100	[thread overview]
Message-ID: <2025031817-charter-respect-1483@gregkh> (raw)
In-Reply-To: <6exs3p35dz6e5mydwvchw67gymewpzp5qyikftl2mvdvhp3hqf@saz6uetgya3l>

On Tue, Mar 18, 2025 at 04:26:05PM +0100, Jiri Pirko wrote:
> Tue, Mar 18, 2025 at 03:36:34PM +0100, gregkh@linuxfoundation.org wrote:
> >On Tue, Mar 18, 2025 at 01:47:04PM +0100, Jiri Pirko wrote:
> >> From: Jiri Pirko <jiri@nvidia.com>
> >> 
> >> It is hard for the faux user to avoid potential name conflicts, as it is
> >> only in control of faux devices it creates. Therefore extend the faux
> >> device creation function by module parameter, embed the module name into
> >> the device name in format "modulename_permodulename" and allow module to
> >> control it's namespace.
> >
> >Do you have an example of how this will change the current names we have
> >in the system to this new way?  What is going to break if those names
> >change?
> 
> I was under impression, that since there are no in-tree users of faux
> yet (at least I don't see them in net-next tree), there is no breakage.

Look at linux-next please.

> >Why can't you handle this "namespace" issue yourself in the caller to
> >the api?  Why must the faux code handle it for you?  We don't do this
> >for platform devices, why is this any different?
> 
> Well, I wanted to avoid alloc&printf names in driver, since
> dev_set_name() accepts vararg and faux_device_create()/faux_device_create_with_groups()
> don't.

If you want to do something complex, do it in your driver :)

> Perhaps "const char *name" could be formatted as well for
> faux_device_create()/faux_device_create_with_groups(). My laziness
> wanted to avoid that :) Would that make sense to you?

I wouldn't object to that, making it a vararg?  How would the rust
binding handle that?

thanks,

greg k-h

  reply	other threads:[~2025-03-18 16:05 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-18 12:47 [PATCH net-next RFC 0/3] net/mlx5: Introduce shared devlink instance for PFs on same chip Jiri Pirko
2025-03-18 12:47 ` [PATCH net-next RFC 1/3] faux: extend the creation function for module namespace Jiri Pirko
2025-03-18 13:46   ` Greg KH
2025-03-18 14:19     ` Jiri Pirko
2025-03-18 14:36   ` Greg KH
2025-03-18 15:26     ` Jiri Pirko
2025-03-18 16:04       ` Greg KH [this message]
2025-03-18 16:51         ` Jiri Pirko
2025-03-18 17:27           ` Greg KH
2025-03-19 11:42             ` Jiri Pirko
2025-03-18 12:47 ` [PATCH net-next RFC 2/3] net/mlx5: Introduce shared devlink instance for PFs on same chip Jiri Pirko
2025-03-18 22:05   ` Keller, Jacob E
2025-03-19  8:21     ` Przemek Kitszel
2025-03-19 11:56       ` Jiri Pirko
2025-03-19 13:20         ` Przemek Kitszel
2025-03-19 18:42         ` Keller, Jacob E
2025-03-19 11:44     ` Jiri Pirko
2025-03-18 12:47 ` [PATCH net-next RFC 3/3] net/mlx5: Introduce enable_sriov param for shared devlink Jiri Pirko

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=2025031817-charter-respect-1483@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=anthony.l.nguyen@intel.com \
    --cc=cjubran@nvidia.com \
    --cc=cratiu@nvidia.com \
    --cc=dakr@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jacob.e.keller@intel.com \
    --cc=jiri@resnulli.us \
    --cc=konrad.knitter@intel.com \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=rafael@kernel.org \
    --cc=saeedm@nvidia.com \
    --cc=tariqt@nvidia.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).