From: Jakub Kicinski <kuba@kernel.org>
To: Jiri Pirko <jiri@resnulli.us>
Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
pabeni@redhat.com, horms@kernel.org, donald.hunter@gmail.com,
corbet@lwn.net, skhan@linuxfoundation.org, saeedm@nvidia.com,
leon@kernel.org, tariqt@nvidia.com, mbloch@nvidia.com,
przemyslaw.kitszel@intel.com, mschmidt@redhat.com,
andrew+netdev@lunn.ch, rostedt@goodmis.org, mhiramat@kernel.org,
mathieu.desnoyers@efficios.com, chuck.lever@oracle.com,
matttbe@kernel.org, cjubran@nvidia.com, daniel.zahka@gmail.com,
linux-doc@vger.kernel.org, linux-rdma@vger.kernel.org,
linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v2 04/10] devlink: allow to use devlink index as a command handle
Date: Sat, 28 Feb 2026 14:48:46 -0800 [thread overview]
Message-ID: <20260228144846.40f5dfeb@kernel.org> (raw)
In-Reply-To: <20260225133422.290965-5-jiri@resnulli.us>
On Wed, 25 Feb 2026 14:34:16 +0100 Jiri Pirko wrote:
> + if (attrs[DEVLINK_ATTR_INDEX]) {
> + index = nla_get_uint(attrs[DEVLINK_ATTR_INDEX]);
> + devlink = devlinks_xa_lookup_get(net, index);
> + if (!devlink)
> + return ERR_PTR(-ENODEV);
> + goto found;
> + }
> +
> if (!attrs[DEVLINK_ATTR_BUS_NAME] || !attrs[DEVLINK_ATTR_DEV_NAME])
> return ERR_PTR(-EINVAL);
If both INDEX and BUS_NAME + DEV_NAME are provided we should check
that they point to the same device? Or reject user space passing both?
next prev parent reply other threads:[~2026-02-28 22:48 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-25 13:34 [PATCH net-next v2 00/10] devlink: introduce shared devlink instance for PFs on same chip Jiri Pirko
2026-02-25 13:34 ` [PATCH net-next v2 01/10] devlink: expose devlink instance index over netlink Jiri Pirko
2026-02-25 13:34 ` [PATCH net-next v2 02/10] devlink: store bus_name and dev_name pointers in struct devlink Jiri Pirko
2026-02-25 13:34 ` [PATCH net-next v2 03/10] devlink: avoid extra iterations when found devlink is not registered Jiri Pirko
2026-02-25 13:34 ` [PATCH net-next v2 04/10] devlink: allow to use devlink index as a command handle Jiri Pirko
2026-02-28 22:48 ` Jakub Kicinski [this message]
2026-03-02 10:23 ` Jiri Pirko
2026-02-25 13:34 ` [PATCH net-next v2 05/10] devlink: support index-based lookup via bus_name/dev_name handle Jiri Pirko
2026-02-25 13:34 ` [PATCH net-next v2 06/10] devlink: add devlink_dev_driver_name() helper and use it in trace events Jiri Pirko
2026-02-28 22:58 ` Jakub Kicinski
2026-03-02 9:44 ` Jiri Pirko
2026-02-25 13:34 ` [PATCH net-next v2 07/10] devlink: allow devlink instance allocation without a backing device Jiri Pirko
2026-02-28 23:01 ` Jakub Kicinski
2026-03-02 13:15 ` Jiri Pirko
2026-02-25 13:34 ` [PATCH net-next v2 08/10] devlink: introduce shared devlink instance for PFs on same chip Jiri Pirko
2026-02-28 23:03 ` Jakub Kicinski
2026-03-02 9:30 ` Jiri Pirko
2026-02-25 13:34 ` [PATCH net-next v2 09/10] documentation: networking: add shared devlink documentation Jiri Pirko
2026-02-28 23:05 ` Jakub Kicinski
2026-03-02 9:09 ` Jiri Pirko
2026-02-25 13:34 ` [PATCH net-next v2 10/10] net/mlx5: Add a shared devlink instance for PFs on same chip 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=20260228144846.40f5dfeb@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=chuck.lever@oracle.com \
--cc=cjubran@nvidia.com \
--cc=corbet@lwn.net \
--cc=daniel.zahka@gmail.com \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jiri@resnulli.us \
--cc=leon@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=matttbe@kernel.org \
--cc=mbloch@nvidia.com \
--cc=mhiramat@kernel.org \
--cc=mschmidt@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.com \
--cc=rostedt@goodmis.org \
--cc=saeedm@nvidia.com \
--cc=skhan@linuxfoundation.org \
--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 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.