Thread (15 messages) 15 messages, 5 authors, 2022-12-08

Re: [PATCH V2] vdpa: allow provisioning device features

From: Jason Wang <hidden>
Date: 2022-11-23 05:51:23
Also in: virtualization

On Wed, Nov 23, 2022 at 3:53 AM David Ahern [off-list ref] wrote:
On 11/16/22 8:33 PM, Jason Wang wrote:
quoted
diff --git a/vdpa/include/uapi/linux/vdpa.h b/vdpa/include/uapi/linux/vdpa.h
index 94e4dad1..7c961991 100644
--- a/vdpa/include/uapi/linux/vdpa.h
+++ b/vdpa/include/uapi/linux/vdpa.h
@@ -51,6 +51,7 @@ enum vdpa_attr {
      VDPA_ATTR_DEV_QUEUE_INDEX,              /* u32 */
      VDPA_ATTR_DEV_VENDOR_ATTR_NAME,         /* string */
      VDPA_ATTR_DEV_VENDOR_ATTR_VALUE,        /* u64 */
+     VDPA_ATTR_DEV_FEATURES,                 /* u64 */

      /* new attributes must be added above here */
      VDPA_ATTR_MAX,
this header file already has:
        ...
        VDPA_ATTR_DEV_QUEUE_INDEX,              /* u32 */
        VDPA_ATTR_DEV_VENDOR_ATTR_NAME,         /* string */
        VDPA_ATTR_DEV_VENDOR_ATTR_VALUE,        /* u64 */

        VDPA_ATTR_DEV_FEATURES,                 /* u64 */

        /* virtio features that are supported by the vDPA device */
        VDPA_ATTR_VDPA_DEV_SUPPORTED_FEATURES,  /* u64 */

        /* new attributes must be added above here */
        VDPA_ATTR_MAX,

in which case your diff is not needed. More importantly it raises
questions about the status of the uapi file (is it correct as is or is
an update needed) and which tree you are creating patches against?
I'm using git://git.kernel.org/pub/scm/network/iproute2/iproute2 main.
But I don't pull the new codes before sending the patches. Will fix
this.
quoted
@@ -615,8 +640,9 @@ static int cmd_mgmtdev(struct vdpa *vdpa, int argc, char **argv)
 static void cmd_dev_help(void)
 {
      fprintf(stderr, "Usage: vdpa dev show [ DEV ]\n");
-     fprintf(stderr, "       vdpa dev add name NAME mgmtdev MANAGEMENTDEV [ mac MACADDR ] [ mtu MTU ]\n");
-     fprintf(stderr, "                                                    [ max_vqp MAX_VQ_PAIRS ]\n");
+     fprintf(stderr, "       vdpa dev add name NAME mgmtdevMANAGEMENTDEV [ device_features DEVICE_FEATURES]\n");
lost the space between mgmtdev and MANAGEMENTDEV
Will fix it.

Thanks
quoted
+     fprintf(stderr, "                                                   [ mac MACADDR ] [ mtu MTU ]\n");
+     fprintf(stderr, "                                                   [ max_vqp MAX_VQ_PAIRS ]\n");
      fprintf(stderr, "       vdpa dev del DEV\n");
      fprintf(stderr, "Usage: vdpa dev config COMMAND [ OPTIONS ]\n");
      fprintf(stderr, "Usage: vdpa dev vstats COMMAND\n");
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help