public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Cc: netdev@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>,
	 Tony Nguyen <anthony.l.nguyen@intel.com>,
	intel-wired-lan@lists.osuosl.org,
	 Aleksandr Loktionov <aleksandr.loktionov@intel.com>,
	edumazet@google.com, horms@kernel.org, pabeni@redhat.com,
	 davem@davemloft.net, Michal Schmidt <mschmidt@redhat.com>
Subject: Re: [PATCH net-next 1/2] devlink: unify devlink_shd_get_priv() into devlink_priv()
Date: Thu, 26 Mar 2026 06:21:32 +0100	[thread overview]
Message-ID: <npyzzb7a5rvpy3sb6tewabivvje2cqvr625y7tdgfctvqoeagj@42h6ru4dqwak> (raw)
In-Reply-To: <20260325063143.261806-2-przemyslaw.kitszel@intel.com>

Wed, Mar 25, 2026 at 07:26:52AM +0100, przemyslaw.kitszel@intel.com wrote:
>Unify access API to shared devlink priv data with normal devlink.
>
>Thanks to Jiri Pirko, we now have ability to create shared devlink
>instances [1]. Introduction series have added usage of those for mlx, but
>without priv data attached to the shared devlink.
>
>Current API makes it possible to access shared devlink instance's priv
>data:
>
>	void *devlink_shd_get_priv(struct devlink *devlink);
>
>but it is easy to forget (especially during rebase from "before shared
>devlinks" era) and call:
>
>	void *devlink_priv(struct devlink *devlink);
>
>which even has the same signature, so it's hard to catch the error.
>
>New proposed API unifies both calls into one, without any increase in the
>observed struct size. (Alternative could be to store additional pointer,
>set during devlink_alloc).
>
>Unexport the less convenient API call.
>
>[1] commit 411ad0605875 ("Merge branch 'devlink-introduce-shared-devlink-instance-for-pfs-on-same-chip'")
>[1] https://lore.kernel.org/all/20260312100407.551173-1-jiri@resnulli.us
>
>Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>

Reviewed-by: Jiri Pirko <jiri@nvidia.com>

  parent reply	other threads:[~2026-03-26  5:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-25  6:26 [PATCH net-next 0/2] devlink: shared devlink improvements Przemek Kitszel
2026-03-25  6:26 ` [PATCH net-next 1/2] devlink: unify devlink_shd_get_priv() into devlink_priv() Przemek Kitszel
2026-03-25  7:46   ` Loktionov, Aleksandr
2026-03-25 23:36     ` [Intel-wired-lan] " Jacob Keller
2026-03-26  5:47       ` Przemek Kitszel
2026-03-26  5:21   ` Jiri Pirko [this message]
2026-03-26 21:38   ` Jakub Kicinski
2026-03-25  6:26 ` [PATCH net-next 2/2] devlink: unregister shared devlink resources on destroy Przemek Kitszel
2026-03-25  7:39   ` Loktionov, Aleksandr
2026-03-26  5:20   ` Jiri Pirko
2026-03-26  5:44     ` Przemek Kitszel

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=npyzzb7a5rvpy3sb6tewabivvje2cqvr625y7tdgfctvqoeagj@42h6ru4dqwak \
    --to=jiri@resnulli.us \
    --cc=aleksandr.loktionov@intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=kuba@kernel.org \
    --cc=mschmidt@redhat.com \
    --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