From: Parav Pandit <parav@nvidia.com> To: <virtualization@lists.linux-foundation.org>, <netdev@vger.kernel.org>, <dsahern@gmail.com>, <stephen@networkplumber.org>, <mst@redhat.com>, <jasowang@redhat.com> Cc: Parav Pandit <parav@nvidia.com> Subject: [PATCH iproute2-next v5 0/5] Add vdpa device management tool Date: Wed, 10 Feb 2021 20:34:40 +0200 [thread overview] Message-ID: <20210210183445.1009795-1-parav@nvidia.com> (raw) Linux vdpa interface allows vdpa device management functionality. This includes adding, removing, querying vdpa devices. vdpa interface also includes showing supported management devices which support such operations. This patchset includes kernel uapi headers and a vdpa tool. examples: $ vdpa mgmtdev show vdpasim: supported_classes net $ vdpa mgmtdev show -jp { "show": { "vdpasim": { "supported_classes": [ "net" ] } } } Create a vdpa device of type networking named as "foo2" from the management device vdpasim_net: $ vdpa dev add mgmtdev vdpasim_net name foo2 Show the newly created vdpa device by its name: $ vdpa dev show foo2 foo2: type network mgmtdev vdpasim_net vendor_id 0 max_vqs 2 max_vq_size 256 $ vdpa dev show foo2 -jp { "dev": { "foo2": { "type": "network", "mgmtdev": "vdpasim_net", "vendor_id": 0, "max_vqs": 2, "max_vq_size": 256 } } } Delete the vdpa device after its use: $ vdpa dev del foo2 An example of PCI PF, VF and SF management device: pci/0000:03.00:0 supported_classes net pci/0000:03.00:4 supported_classes net auxiliary/mlx5_core.sf.8 supported_classes net Patch summary: Patch-1 adds kernel headers for vdpa subsystem Patch-2 adds library routines for indent handling Patch-3 adds library routines for generic socket communication PAtch-4 adds library routine for number to string mapping Patch-5 adds vdpa tool Kernel headers are from the linux-next [1]. [1] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git --- changelog: v4->v5: - avoided UAPI prefix in the vdpa.h header file - updated commit id to commit of linux-next tree v3->v4: - relocated vdpa headers to vdpa/include/uapi/linux - added new headers path to CFLAGS of vdpa tool v2->v3: - addressed David's comment to split patch for utils and other parts - rebased - using newly added helper routine for number to string mapping v1->v2: - addressed below comments from David - added and used library helpers for socket communication - added and used library functions for string processing helpers - added and used library functions indent processing helpers Parav Pandit (5): Add kernel headers utils: Add helper routines for indent handling utils: Add generic socket helpers utils: Add helper to map string to unsigned int vdpa: Add vdpa tool Makefile | 2 +- include/mnl_utils.h | 16 + include/utils.h | 20 +- lib/mnl_utils.c | 121 +++++ lib/utils.c | 83 +++- man/man8/vdpa-dev.8 | 96 ++++ man/man8/vdpa-mgmtdev.8 | 53 +++ man/man8/vdpa.8 | 76 +++ vdpa/Makefile | 25 + vdpa/include/uapi/linux/vdpa.h | 40 ++ vdpa/include/uapi/linux/virtio_ids.h | 58 +++ vdpa/vdpa.c | 675 +++++++++++++++++++++++++++ 12 files changed, 1261 insertions(+), 4 deletions(-) create mode 100644 man/man8/vdpa-dev.8 create mode 100644 man/man8/vdpa-mgmtdev.8 create mode 100644 man/man8/vdpa.8 create mode 100644 vdpa/Makefile create mode 100644 vdpa/include/uapi/linux/vdpa.h create mode 100644 vdpa/include/uapi/linux/virtio_ids.h create mode 100644 vdpa/vdpa.c -- 2.26.2
WARNING: multiple messages have this Message-ID (diff)
From: Parav Pandit <parav@nvidia.com> To: <virtualization@lists.linux-foundation.org>, <netdev@vger.kernel.org>, <dsahern@gmail.com>, <stephen@networkplumber.org>, <mst@redhat.com>, <jasowang@redhat.com> Subject: [PATCH iproute2-next v5 0/5] Add vdpa device management tool Date: Wed, 10 Feb 2021 20:34:40 +0200 [thread overview] Message-ID: <20210210183445.1009795-1-parav@nvidia.com> (raw) Linux vdpa interface allows vdpa device management functionality. This includes adding, removing, querying vdpa devices. vdpa interface also includes showing supported management devices which support such operations. This patchset includes kernel uapi headers and a vdpa tool. examples: $ vdpa mgmtdev show vdpasim: supported_classes net $ vdpa mgmtdev show -jp { "show": { "vdpasim": { "supported_classes": [ "net" ] } } } Create a vdpa device of type networking named as "foo2" from the management device vdpasim_net: $ vdpa dev add mgmtdev vdpasim_net name foo2 Show the newly created vdpa device by its name: $ vdpa dev show foo2 foo2: type network mgmtdev vdpasim_net vendor_id 0 max_vqs 2 max_vq_size 256 $ vdpa dev show foo2 -jp { "dev": { "foo2": { "type": "network", "mgmtdev": "vdpasim_net", "vendor_id": 0, "max_vqs": 2, "max_vq_size": 256 } } } Delete the vdpa device after its use: $ vdpa dev del foo2 An example of PCI PF, VF and SF management device: pci/0000:03.00:0 supported_classes net pci/0000:03.00:4 supported_classes net auxiliary/mlx5_core.sf.8 supported_classes net Patch summary: Patch-1 adds kernel headers for vdpa subsystem Patch-2 adds library routines for indent handling Patch-3 adds library routines for generic socket communication PAtch-4 adds library routine for number to string mapping Patch-5 adds vdpa tool Kernel headers are from the linux-next [1]. [1] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git --- changelog: v4->v5: - avoided UAPI prefix in the vdpa.h header file - updated commit id to commit of linux-next tree v3->v4: - relocated vdpa headers to vdpa/include/uapi/linux - added new headers path to CFLAGS of vdpa tool v2->v3: - addressed David's comment to split patch for utils and other parts - rebased - using newly added helper routine for number to string mapping v1->v2: - addressed below comments from David - added and used library helpers for socket communication - added and used library functions for string processing helpers - added and used library functions indent processing helpers Parav Pandit (5): Add kernel headers utils: Add helper routines for indent handling utils: Add generic socket helpers utils: Add helper to map string to unsigned int vdpa: Add vdpa tool Makefile | 2 +- include/mnl_utils.h | 16 + include/utils.h | 20 +- lib/mnl_utils.c | 121 +++++ lib/utils.c | 83 +++- man/man8/vdpa-dev.8 | 96 ++++ man/man8/vdpa-mgmtdev.8 | 53 +++ man/man8/vdpa.8 | 76 +++ vdpa/Makefile | 25 + vdpa/include/uapi/linux/vdpa.h | 40 ++ vdpa/include/uapi/linux/virtio_ids.h | 58 +++ vdpa/vdpa.c | 675 +++++++++++++++++++++++++++ 12 files changed, 1261 insertions(+), 4 deletions(-) create mode 100644 man/man8/vdpa-dev.8 create mode 100644 man/man8/vdpa-mgmtdev.8 create mode 100644 man/man8/vdpa.8 create mode 100644 vdpa/Makefile create mode 100644 vdpa/include/uapi/linux/vdpa.h create mode 100644 vdpa/include/uapi/linux/virtio_ids.h create mode 100644 vdpa/vdpa.c -- 2.26.2 _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization
next reply other threads:[~2021-02-10 18:39 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-02-10 18:34 Parav Pandit [this message] 2021-02-10 18:34 ` [PATCH iproute2-next v5 0/5] Add vdpa device management tool Parav Pandit 2021-02-10 18:34 ` [PATCH iproute2-next v5 1/5] Add kernel headers Parav Pandit 2021-02-10 18:34 ` Parav Pandit 2021-02-10 18:34 ` [PATCH iproute2-next v5 2/5] utils: Add helper routines for indent handling Parav Pandit 2021-02-10 18:34 ` Parav Pandit 2021-02-10 18:34 ` [PATCH iproute2-next v5 3/5] utils: Add generic socket helpers Parav Pandit 2021-02-10 18:34 ` Parav Pandit 2021-02-10 18:34 ` [PATCH iproute2-next v5 4/5] utils: Add helper to map string to unsigned int Parav Pandit 2021-02-10 18:34 ` Parav Pandit 2021-02-10 18:34 ` [PATCH iproute2-next v5 5/5] vdpa: Add vdpa tool Parav Pandit 2021-02-10 18:34 ` Parav Pandit 2021-02-11 16:20 ` [PATCH iproute2-next v5 0/5] Add vdpa device management tool David Ahern 2021-02-11 16:20 ` David Ahern 2021-02-11 17:24 ` Parav Pandit 2021-02-11 17:24 ` Parav Pandit
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=20210210183445.1009795-1-parav@nvidia.com \ --to=parav@nvidia.com \ --cc=dsahern@gmail.com \ --cc=jasowang@redhat.com \ --cc=mst@redhat.com \ --cc=netdev@vger.kernel.org \ --cc=stephen@networkplumber.org \ --cc=virtualization@lists.linux-foundation.org \ /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: linkBe 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.