[RFC 0/1] vhost-vdmabuf: Add virtio based Dmabuf device

Vivek Kasireddy posted 1 patch 3 years, 2 months ago
Test checkpatch failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210208233225.2084469-1-vivek.kasireddy@intel.com
configure                                   |   8 +
hw/virtio/meson.build                       |   1 +
hw/virtio/vhost-backend.c                   |  10 +
hw/virtio/vhost-vdmabuf.c                   | 526 ++++++++++++++++++++
include/hw/pci/pci.h                        |   1 +
include/hw/virtio/vhost-backend.h           |   2 +
include/hw/virtio/vhost-vdmabuf.h           |  76 +++
include/standard-headers/linux/virtio_ids.h |   1 +
include/ui/console.h                        |   1 +
linux-headers/linux/vhost.h                 |   3 +
meson.build                                 |   1 +
ui/console.c                                |   7 +
12 files changed, 637 insertions(+)
create mode 100644 hw/virtio/vhost-vdmabuf.c
create mode 100644 include/hw/virtio/vhost-vdmabuf.h
[RFC 0/1] vhost-vdmabuf: Add virtio based Dmabuf device
Posted by Vivek Kasireddy 3 years, 2 months ago
The Virtio based Dmabuf (Vdmabuf) device provides a way to transfer a
dmabuf created in the Guest to the Host. This patch is still a WIP but
is still posted to the ML to provide additional details and context for
the discussion associated with the vhost-vdmabuf and virtio-vdmabuf
kernel drivers here:

https://lists.linuxfoundation.org/pipermail/virtualization/2021-February/052233.html

Vivek Kasireddy (1):
  vhost-vdmabuf: Add virtio based Dmabuf device

 configure                                   |   8 +
 hw/virtio/meson.build                       |   1 +
 hw/virtio/vhost-backend.c                   |  10 +
 hw/virtio/vhost-vdmabuf.c                   | 526 ++++++++++++++++++++
 include/hw/pci/pci.h                        |   1 +
 include/hw/virtio/vhost-backend.h           |   2 +
 include/hw/virtio/vhost-vdmabuf.h           |  76 +++
 include/standard-headers/linux/virtio_ids.h |   1 +
 include/ui/console.h                        |   1 +
 linux-headers/linux/vhost.h                 |   3 +
 meson.build                                 |   1 +
 ui/console.c                                |   7 +
 12 files changed, 637 insertions(+)
 create mode 100644 hw/virtio/vhost-vdmabuf.c
 create mode 100644 include/hw/virtio/vhost-vdmabuf.h

-- 
2.26.2


Re: [RFC 0/1] vhost-vdmabuf: Add virtio based Dmabuf device
Posted by no-reply@patchew.org 3 years, 2 months ago
Patchew URL: https://patchew.org/QEMU/20210208233225.2084469-1-vivek.kasireddy@intel.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 20210208233225.2084469-1-vivek.kasireddy@intel.com
Subject: [RFC 0/1] vhost-vdmabuf: Add virtio based Dmabuf device

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 * [new tag]         patchew/20210208233225.2084469-1-vivek.kasireddy@intel.com -> patchew/20210208233225.2084469-1-vivek.kasireddy@intel.com
Switched to a new branch 'test'
1835e33 vhost-vdmabuf: Add virtio based Dmabuf device

=== OUTPUT BEGIN ===
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#106: 
new file mode 100644

ERROR: do not initialise statics to 0 or NULL
#155: FILE: hw/virtio/vhost-vdmabuf.c:45:
+static bool have_event = false;

ERROR: code indent should never use tabs
#287: FILE: hw/virtio/vhost-vdmabuf.c:177:
+^I    return;$

ERROR: code indent should never use tabs
#288: FILE: hw/virtio/vhost-vdmabuf.c:178:
+^I}$

ERROR: code indent should never use tabs
#397: FILE: hw/virtio/vhost-vdmabuf.c:287:
+^Ireturn NULL;$

ERROR: code indent should never use tabs
#415: FILE: hw/virtio/vhost-vdmabuf.c:305:
+^I^I^I^I^I    VDMABUFDisplay *dpy,$

ERROR: braces {} are necessary for all arms of this statement
#425: FILE: hw/virtio/vhost-vdmabuf.c:315:
+    if (ioctl(fd, VIRTIO_VDMABUF_IOCTL_RELEASE, &msg))
[...]

ERROR: braces {} are necessary for all arms of this statement
#456: FILE: hw/virtio/vhost-vdmabuf.c:346:
+    if (!have_event)
[...]

ERROR: trailing whitespace
#531: FILE: hw/virtio/vhost-vdmabuf.c:421:
+    $

ERROR: code indent should never use tabs
#705: FILE: include/hw/virtio/vhost-vdmabuf.h:31:
+^I__u64 id;$

ERROR: code indent should never use tabs
#706: FILE: include/hw/virtio/vhost-vdmabuf.h:32:
+^I/* 8B long Random number */$

ERROR: code indent should never use tabs
#707: FILE: include/hw/virtio/vhost-vdmabuf.h:33:
+^Iint rng_key[2];$

ERROR: code indent should never use tabs
#711: FILE: include/hw/virtio/vhost-vdmabuf.h:37:
+^I/* buf_id of new buf */$

ERROR: code indent should never use tabs
#712: FILE: include/hw/virtio/vhost-vdmabuf.h:38:
+^Ivirtio_vdmabuf_buf_id_t buf_id;$

ERROR: code indent should never use tabs
#713: FILE: include/hw/virtio/vhost-vdmabuf.h:39:
+^I/* size of private data */$

ERROR: code indent should never use tabs
#714: FILE: include/hw/virtio/vhost-vdmabuf.h:40:
+^Iint size;$

ERROR: code indent should never use tabs
#718: FILE: include/hw/virtio/vhost-vdmabuf.h:44:
+^Istruct virtio_vdmabuf_e_hdr hdr;$

ERROR: code indent should never use tabs
#719: FILE: include/hw/virtio/vhost-vdmabuf.h:45:
+^I/* ptr to private data */$

ERROR: code indent should never use tabs
#720: FILE: include/hw/virtio/vhost-vdmabuf.h:46:
+^Ivoid *data;$

ERROR: code indent should never use tabs
#728: FILE: include/hw/virtio/vhost-vdmabuf.h:54:
+^I/* IN parameters */$

ERROR: code indent should never use tabs
#729: FILE: include/hw/virtio/vhost-vdmabuf.h:55:
+^I/* vdmabuf id to be imported */$

ERROR: code indent should never use tabs
#730: FILE: include/hw/virtio/vhost-vdmabuf.h:56:
+^Ivirtio_vdmabuf_buf_id_t buf_id;$

ERROR: code indent should never use tabs
#731: FILE: include/hw/virtio/vhost-vdmabuf.h:57:
+^I/* flags */$

ERROR: code indent should never use tabs
#732: FILE: include/hw/virtio/vhost-vdmabuf.h:58:
+^Iint flags;$

ERROR: code indent should never use tabs
#733: FILE: include/hw/virtio/vhost-vdmabuf.h:59:
+^I/* OUT parameters */$

ERROR: code indent should never use tabs
#734: FILE: include/hw/virtio/vhost-vdmabuf.h:60:
+^I/* exported dma buf fd */$

ERROR: code indent should never use tabs
#735: FILE: include/hw/virtio/vhost-vdmabuf.h:61:
+^Iint fd;$

ERROR: code indent should never use tabs
#741: FILE: include/hw/virtio/vhost-vdmabuf.h:67:
+^I/* IN parameters */$

ERROR: code indent should never use tabs
#742: FILE: include/hw/virtio/vhost-vdmabuf.h:68:
+^I/* DMA buf fd to be exported */$

ERROR: code indent should never use tabs
#743: FILE: include/hw/virtio/vhost-vdmabuf.h:69:
+^Iint fd;$

ERROR: code indent should never use tabs
#744: FILE: include/hw/virtio/vhost-vdmabuf.h:70:
+^I/* exported dma buf id */$

ERROR: code indent should never use tabs
#745: FILE: include/hw/virtio/vhost-vdmabuf.h:71:
+^Ivirtio_vdmabuf_buf_id_t buf_id;$

ERROR: code indent should never use tabs
#746: FILE: include/hw/virtio/vhost-vdmabuf.h:72:
+^Iint sz_priv;$

ERROR: code indent should never use tabs
#747: FILE: include/hw/virtio/vhost-vdmabuf.h:73:
+^Ichar *priv;$

total: 33 errors, 1 warnings, 718 lines checked

Commit 1835e330d677 (vhost-vdmabuf: Add virtio based Dmabuf device) has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20210208233225.2084469-1-vivek.kasireddy@intel.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com