All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH iproute2] uapi: add vdpa.h
@ 2022-07-18 16:31 Stephen Hemminger
  2022-07-18 16:40 ` patchwork-bot+netdevbpf
  2022-07-18 16:40 ` Parav Pandit
  0 siblings, 2 replies; 8+ messages in thread
From: Stephen Hemminger @ 2022-07-18 16:31 UTC (permalink / raw)
  To: parav; +Cc: netdev, Stephen Hemminger

Iproute2 depends on kernel headers and all necessary kernel headers
should be in iproute tree. When vdpa was added the kernel header
file was not.

Fixes: c2ecc82b9d4c ("vdpa: Add vdpa tool")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 include/uapi/linux/vdpa.h | 59 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 59 insertions(+)
 create mode 100644 include/uapi/linux/vdpa.h

diff --git a/include/uapi/linux/vdpa.h b/include/uapi/linux/vdpa.h
new file mode 100644
index 000000000000..94e4dad1d86c
--- /dev/null
+++ b/include/uapi/linux/vdpa.h
@@ -0,0 +1,59 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
+/*
+ * vdpa device management interface
+ * Copyright (c) 2020 Mellanox Technologies Ltd. All rights reserved.
+ */
+
+#ifndef _LINUX_VDPA_H_
+#define _LINUX_VDPA_H_
+
+#define VDPA_GENL_NAME "vdpa"
+#define VDPA_GENL_VERSION 0x1
+
+enum vdpa_command {
+	VDPA_CMD_UNSPEC,
+	VDPA_CMD_MGMTDEV_NEW,
+	VDPA_CMD_MGMTDEV_GET,		/* can dump */
+	VDPA_CMD_DEV_NEW,
+	VDPA_CMD_DEV_DEL,
+	VDPA_CMD_DEV_GET,		/* can dump */
+	VDPA_CMD_DEV_CONFIG_GET,	/* can dump */
+	VDPA_CMD_DEV_VSTATS_GET,
+};
+
+enum vdpa_attr {
+	VDPA_ATTR_UNSPEC,
+
+	/* Pad attribute for 64b alignment */
+	VDPA_ATTR_PAD = VDPA_ATTR_UNSPEC,
+
+	/* bus name (optional) + dev name together make the parent device handle */
+	VDPA_ATTR_MGMTDEV_BUS_NAME,		/* string */
+	VDPA_ATTR_MGMTDEV_DEV_NAME,		/* string */
+	VDPA_ATTR_MGMTDEV_SUPPORTED_CLASSES,	/* u64 */
+
+	VDPA_ATTR_DEV_NAME,			/* string */
+	VDPA_ATTR_DEV_ID,			/* u32 */
+	VDPA_ATTR_DEV_VENDOR_ID,		/* u32 */
+	VDPA_ATTR_DEV_MAX_VQS,			/* u32 */
+	VDPA_ATTR_DEV_MAX_VQ_SIZE,		/* u16 */
+	VDPA_ATTR_DEV_MIN_VQ_SIZE,		/* u16 */
+
+	VDPA_ATTR_DEV_NET_CFG_MACADDR,		/* binary */
+	VDPA_ATTR_DEV_NET_STATUS,		/* u8 */
+	VDPA_ATTR_DEV_NET_CFG_MAX_VQP,		/* u16 */
+	VDPA_ATTR_DEV_NET_CFG_MTU,		/* u16 */
+
+	VDPA_ATTR_DEV_NEGOTIATED_FEATURES,	/* u64 */
+	VDPA_ATTR_DEV_MGMTDEV_MAX_VQS,		/* u32 */
+	VDPA_ATTR_DEV_SUPPORTED_FEATURES,	/* u64 */
+
+	VDPA_ATTR_DEV_QUEUE_INDEX,              /* u32 */
+	VDPA_ATTR_DEV_VENDOR_ATTR_NAME,		/* string */
+	VDPA_ATTR_DEV_VENDOR_ATTR_VALUE,        /* u64 */
+
+	/* new attributes must be added above here */
+	VDPA_ATTR_MAX,
+};
+
+#endif
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH iproute2] uapi: add vdpa.h
  2022-07-18 16:31 [PATCH iproute2] uapi: add vdpa.h Stephen Hemminger
@ 2022-07-18 16:40 ` patchwork-bot+netdevbpf
  2022-07-18 16:42   ` Parav Pandit
  2022-07-18 16:40 ` Parav Pandit
  1 sibling, 1 reply; 8+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-07-18 16:40 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: parav, netdev

Hello:

This patch was applied to iproute2/iproute2.git (main)
by Stephen Hemminger <stephen@networkplumber.org>:

On Mon, 18 Jul 2022 09:31:13 -0700 you wrote:
> Iproute2 depends on kernel headers and all necessary kernel headers
> should be in iproute tree. When vdpa was added the kernel header
> file was not.
> 
> Fixes: c2ecc82b9d4c ("vdpa: Add vdpa tool")
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> 
> [...]

Here is the summary with links:
  - [iproute2] uapi: add vdpa.h
    https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=291898c5ff88

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH iproute2] uapi: add vdpa.h
  2022-07-18 16:31 [PATCH iproute2] uapi: add vdpa.h Stephen Hemminger
  2022-07-18 16:40 ` patchwork-bot+netdevbpf
@ 2022-07-18 16:40 ` Parav Pandit
  2022-07-18 16:50   ` Stephen Hemminger
  2022-07-18 16:55   ` Stephen Hemminger
  1 sibling, 2 replies; 8+ messages in thread
From: Parav Pandit @ 2022-07-18 16:40 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev, David Ahern

+ David

Hi Stephen,

> From: Stephen Hemminger <stephen@networkplumber.org>
> Sent: Monday, July 18, 2022 12:31 PM
> 
> Iproute2 depends on kernel headers and all necessary kernel headers should
> be in iproute tree. When vdpa was added the kernel header file was not.
> 
> Fixes: c2ecc82b9d4c ("vdpa: Add vdpa tool")
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

> ---
>  include/uapi/linux/vdpa.h | 59
> +++++++++++++++++++++++++++++++++++++++
>  1 file changed, 59 insertions(+)
>  create mode 100644 include/uapi/linux/vdpa.h
> 
> diff --git a/include/uapi/linux/vdpa.h b/include/uapi/linux/vdpa.h new file
> mode 100644 index 000000000000..94e4dad1d86c
> --- /dev/null
> +++ b/include/uapi/linux/vdpa.h

We kept this in vdpa/include/uapi/linux/vdpa.h after inputs from David.
This is because vdpa was following rdma style sync with the kernel headers.
Rdma subsystem kernel header is in rdma/include/uapi/rdma/rdma_netlink.h.

Any reason to take different route for vdpa?
If so, duplicate file from vdpa/include/uapi/linux/vdpa.h should be removed.
So that there is only one vdpa.h file.

If so, should we move rdma files also similarly?

Similar discussion came up in the past. (don't have ready reference to the discussion).
And David's input was to keep the way it is like rdma.

Added him for his inputs if something changed lately.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH iproute2] uapi: add vdpa.h
  2022-07-18 16:40 ` patchwork-bot+netdevbpf
@ 2022-07-18 16:42   ` Parav Pandit
  0 siblings, 0 replies; 8+ messages in thread
From: Parav Pandit @ 2022-07-18 16:42 UTC (permalink / raw)
  To: patchwork-bot+netdevbpf, Stephen Hemminger; +Cc: netdev, David Ahern


> From: patchwork-bot+netdevbpf@kernel.org <patchwork-
> bot+netdevbpf@kernel.org>
> Sent: Monday, July 18, 2022 12:40 PM
> To: Stephen Hemminger <stephen@networkplumber.org>
> Cc: Parav Pandit <parav@nvidia.com>; netdev@vger.kernel.org
> Subject: Re: [PATCH iproute2] uapi: add vdpa.h
> 
> Hello:
> 
> This patch was applied to iproute2/iproute2.git (main) by Stephen
> Hemminger <stephen@networkplumber.org>:
> 
> On Mon, 18 Jul 2022 09:31:13 -0700 you wrote:
> > Iproute2 depends on kernel headers and all necessary kernel headers
> > should be in iproute tree. When vdpa was added the kernel header file
> > was not.
> >
> > Fixes: c2ecc82b9d4c ("vdpa: Add vdpa tool")
> > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> >
> > [...]
> 
> Here is the summary with links:
>   - [iproute2] uapi: add vdpa.h
> 
> https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=
> 291898c5ff88
> 
> You are awesome, thank you!
> --
> Deet-doot-dot, I am a bot.
> https://korg.docs.kernel.org/patchwork/pwbot.html
> 
Wait, this is applied too quickly, and it is not correct/complete patch.

Patch doesn’t remove existing vdpa.h located in vdpa/include/uapi/linux/vdpa.h.

I replied in patch email to seek David's input.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH iproute2] uapi: add vdpa.h
  2022-07-18 16:40 ` Parav Pandit
@ 2022-07-18 16:50   ` Stephen Hemminger
  2022-07-18 16:55   ` Stephen Hemminger
  1 sibling, 0 replies; 8+ messages in thread
From: Stephen Hemminger @ 2022-07-18 16:50 UTC (permalink / raw)
  To: Parav Pandit; +Cc: netdev, David Ahern

On Mon, 18 Jul 2022 16:40:30 +0000
Parav Pandit <parav@nvidia.com> wrote:

> + David
> 
> Hi Stephen,
> 
> > From: Stephen Hemminger <stephen@networkplumber.org>
> > Sent: Monday, July 18, 2022 12:31 PM
> > 
> > Iproute2 depends on kernel headers and all necessary kernel headers should
> > be in iproute tree. When vdpa was added the kernel header file was not.
> > 
> > Fixes: c2ecc82b9d4c ("vdpa: Add vdpa tool")
> > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>  
> 
> > ---
> >  include/uapi/linux/vdpa.h | 59
> > +++++++++++++++++++++++++++++++++++++++
> >  1 file changed, 59 insertions(+)
> >  create mode 100644 include/uapi/linux/vdpa.h
> > 
> > diff --git a/include/uapi/linux/vdpa.h b/include/uapi/linux/vdpa.h new file
> > mode 100644 index 000000000000..94e4dad1d86c
> > --- /dev/null
> > +++ b/include/uapi/linux/vdpa.h  
> 
> We kept this in vdpa/include/uapi/linux/vdpa.h after inputs from David.
> This is because vdpa was following rdma style sync with the kernel headers.
> Rdma subsystem kernel header is in rdma/include/uapi/rdma/rdma_netlink.h.
> 
> Any reason to take different route for vdpa?
> If so, duplicate file from vdpa/include/uapi/linux/vdpa.h should be removed.
> So that there is only one vdpa.h file.

Ok, sorry the semi-automated scan script didn't find the other one.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH iproute2] uapi: add vdpa.h
  2022-07-18 16:40 ` Parav Pandit
  2022-07-18 16:50   ` Stephen Hemminger
@ 2022-07-18 16:55   ` Stephen Hemminger
  2022-07-18 17:51     ` David Ahern
  1 sibling, 1 reply; 8+ messages in thread
From: Stephen Hemminger @ 2022-07-18 16:55 UTC (permalink / raw)
  To: Parav Pandit; +Cc: netdev, David Ahern

On Mon, 18 Jul 2022 16:40:30 +0000
Parav Pandit <parav@nvidia.com> wrote:

> We kept this in vdpa/include/uapi/linux/vdpa.h after inputs from David.
> This is because vdpa was following rdma style sync with the kernel headers.
> Rdma subsystem kernel header is in rdma/include/uapi/rdma/rdma_netlink.h.
> 
> Any reason to take different route for vdpa?
> If so, duplicate file from vdpa/include/uapi/linux/vdpa.h should be removed.
> So that there is only one vdpa.h file.
> 
> If so, should we move rdma files also similarly?
> 
> Similar discussion came up in the past. (don't have ready reference to the discussion).
> And David's input was to keep the way it is like rdma.

RDMA is different and contained to one directory.
VDPA is picking up things from linux/.
And the current version is not kept up to date with kernel headers.
Fixing that now.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH iproute2] uapi: add vdpa.h
  2022-07-18 16:55   ` Stephen Hemminger
@ 2022-07-18 17:51     ` David Ahern
  2022-07-18 20:18       ` Stephen Hemminger
  0 siblings, 1 reply; 8+ messages in thread
From: David Ahern @ 2022-07-18 17:51 UTC (permalink / raw)
  To: Stephen Hemminger, Parav Pandit; +Cc: netdev

On 7/18/22 10:55 AM, Stephen Hemminger wrote:
> On Mon, 18 Jul 2022 16:40:30 +0000
> Parav Pandit <parav@nvidia.com> wrote:
> 
>> We kept this in vdpa/include/uapi/linux/vdpa.h after inputs from David.
>> This is because vdpa was following rdma style sync with the kernel headers.
>> Rdma subsystem kernel header is in rdma/include/uapi/rdma/rdma_netlink.h.
>>
>> Any reason to take different route for vdpa?
>> If so, duplicate file from vdpa/include/uapi/linux/vdpa.h should be removed.
>> So that there is only one vdpa.h file.
>>
>> If so, should we move rdma files also similarly?
>>
>> Similar discussion came up in the past. (don't have ready reference to the discussion).
>> And David's input was to keep the way it is like rdma.
> 
> RDMA is different and contained to one directory.
> VDPA is picking up things from linux/.
> And the current version is not kept up to date with kernel headers.
> Fixing that now.

Updates to vdpa.h do not go through net-next so moving it to
include/uapi/linux can cause problems when trying to sync headers to
net-next commits. That's why it was put under vpda, similar to the rdma
model.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH iproute2] uapi: add vdpa.h
  2022-07-18 17:51     ` David Ahern
@ 2022-07-18 20:18       ` Stephen Hemminger
  0 siblings, 0 replies; 8+ messages in thread
From: Stephen Hemminger @ 2022-07-18 20:18 UTC (permalink / raw)
  To: David Ahern; +Cc: Parav Pandit, netdev

On Mon, 18 Jul 2022 11:51:09 -0600
David Ahern <dsahern@gmail.com> wrote:

> On 7/18/22 10:55 AM, Stephen Hemminger wrote:
> > On Mon, 18 Jul 2022 16:40:30 +0000
> > Parav Pandit <parav@nvidia.com> wrote:
> >   
> >> We kept this in vdpa/include/uapi/linux/vdpa.h after inputs from David.
> >> This is because vdpa was following rdma style sync with the kernel headers.
> >> Rdma subsystem kernel header is in rdma/include/uapi/rdma/rdma_netlink.h.
> >>
> >> Any reason to take different route for vdpa?
> >> If so, duplicate file from vdpa/include/uapi/linux/vdpa.h should be removed.
> >> So that there is only one vdpa.h file.
> >>
> >> If so, should we move rdma files also similarly?
> >>
> >> Similar discussion came up in the past. (don't have ready reference to the discussion).
> >> And David's input was to keep the way it is like rdma.  
> > 
> > RDMA is different and contained to one directory.
> > VDPA is picking up things from linux/.
> > And the current version is not kept up to date with kernel headers.
> > Fixing that now.  
> 
> Updates to vdpa.h do not go through net-next so moving it to
> include/uapi/linux can cause problems when trying to sync headers to
> net-next commits. That's why it was put under vpda, similar to the rdma
> model.

Ok, will make sure the update script for current picks it up correctly.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-07-18 20:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-18 16:31 [PATCH iproute2] uapi: add vdpa.h Stephen Hemminger
2022-07-18 16:40 ` patchwork-bot+netdevbpf
2022-07-18 16:42   ` Parav Pandit
2022-07-18 16:40 ` Parav Pandit
2022-07-18 16:50   ` Stephen Hemminger
2022-07-18 16:55   ` Stephen Hemminger
2022-07-18 17:51     ` David Ahern
2022-07-18 20:18       ` Stephen Hemminger

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.