From: Junji Wei <weijunji@bytedance.com> To: dledford@redhat.com, jgg@ziepe.ca, mst@redhat.com, jasowang@redhat.com, yuval.shaia.ml@gmail.com, marcel.apfelbaum@gmail.com, cohuck@redhat.com, hare@suse.de Cc: xieyongji@bytedance.com, chaiwen.cc@bytedance.com, weijunji@bytedance.com, linux-rdma@vger.kernel.org, virtualization@lists.linux-foundation.org, qemu-devel@nongnu.org Subject: [RFC 4/5] virtio-net: Move some virtio-net-pci decl to include/hw/virtio Date: Thu, 2 Sep 2021 21:06:24 +0800 [thread overview] Message-ID: <20210902130625.25277-5-weijunji@bytedance.com> (raw) In-Reply-To: <20210902130625.25277-1-weijunji@bytedance.com> From: Yuval Shaia <yuval.shaia.ml@gmail.com> This patch is from Yuval Shaia's [RFC 1/3] Signed-off-by: Yuval Shaia <yuval.shaia.ml@gmail.com> --- hw/virtio/virtio-net-pci.c | 18 ++---------------- include/hw/virtio/virtio-net-pci.h | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 16 deletions(-) create mode 100644 include/hw/virtio/virtio-net-pci.h diff --git a/hw/virtio/virtio-net-pci.c b/hw/virtio/virtio-net-pci.c index 292d13d278..6cea7e0441 100644 --- a/hw/virtio/virtio-net-pci.c +++ b/hw/virtio/virtio-net-pci.c @@ -18,26 +18,12 @@ #include "qemu/osdep.h" #include "hw/qdev-properties.h" -#include "hw/virtio/virtio-net.h" +#include "hw/virtio/virtio-net-pci.h" #include "virtio-pci.h" #include "qapi/error.h" #include "qemu/module.h" #include "qom/object.h" -typedef struct VirtIONetPCI VirtIONetPCI; - -/* - * virtio-net-pci: This extends VirtioPCIProxy. - */ -#define TYPE_VIRTIO_NET_PCI "virtio-net-pci-base" -DECLARE_INSTANCE_CHECKER(VirtIONetPCI, VIRTIO_NET_PCI, - TYPE_VIRTIO_NET_PCI) - -struct VirtIONetPCI { - VirtIOPCIProxy parent_obj; - VirtIONet vdev; -}; - static Property virtio_net_properties[] = { DEFINE_PROP_BIT("ioeventfd", VirtIOPCIProxy, flags, VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true), @@ -84,7 +70,7 @@ static void virtio_net_pci_instance_init(Object *obj) static const VirtioPCIDeviceTypeInfo virtio_net_pci_info = { .base_name = TYPE_VIRTIO_NET_PCI, - .generic_name = "virtio-net-pci", + .generic_name = TYPE_VIRTIO_NET_PCI_GENERIC, .transitional_name = "virtio-net-pci-transitional", .non_transitional_name = "virtio-net-pci-non-transitional", .instance_size = sizeof(VirtIONetPCI), diff --git a/include/hw/virtio/virtio-net-pci.h b/include/hw/virtio/virtio-net-pci.h new file mode 100644 index 0000000000..c1915cd54f --- /dev/null +++ b/include/hw/virtio/virtio-net-pci.h @@ -0,0 +1,35 @@ +/* + * PCI Virtio Network Device + * + * Copyright IBM, Corp. 2007 + * + * Authors: + * Anthony Liguori <aliguori@us.ibm.com> + * + * This work is licensed under the terms of the GNU GPL, version 2. See + * the COPYING file in the top-level directory. + * + */ + +#ifndef QEMU_VIRTIO_NET_PCI_H +#define QEMU_VIRTIO_NET_PCI_H + +#include "hw/virtio/virtio-net.h" +#include "hw/virtio/virtio-pci.h" + +typedef struct VirtIONetPCI VirtIONetPCI; + +/* + * virtio-net-pci: This extends VirtioPCIProxy. + */ +#define TYPE_VIRTIO_NET_PCI_GENERIC "virtio-net-pci" +#define TYPE_VIRTIO_NET_PCI "virtio-net-pci-base" +#define VIRTIO_NET_PCI(obj) \ + OBJECT_CHECK(VirtIONetPCI, (obj), TYPE_VIRTIO_NET_PCI) + +struct VirtIONetPCI { + VirtIOPCIProxy parent_obj; + VirtIONet vdev; +}; + +#endif -- 2.11.0
WARNING: multiple messages have this Message-ID (diff)
From: Junji Wei <weijunji@bytedance.com> To: dledford@redhat.com, jgg@ziepe.ca, mst@redhat.com, jasowang@redhat.com, yuval.shaia.ml@gmail.com, marcel.apfelbaum@gmail.com, cohuck@redhat.com, hare@suse.de Cc: linux-rdma@vger.kernel.org, qemu-devel@nongnu.org, virtualization@lists.linux-foundation.org, xieyongji@bytedance.com, chaiwen.cc@bytedance.com, weijunji@bytedance.com Subject: [RFC 4/5] virtio-net: Move some virtio-net-pci decl to include/hw/virtio Date: Thu, 2 Sep 2021 21:06:24 +0800 [thread overview] Message-ID: <20210902130625.25277-5-weijunji@bytedance.com> (raw) In-Reply-To: <20210902130625.25277-1-weijunji@bytedance.com> From: Yuval Shaia <yuval.shaia.ml@gmail.com> This patch is from Yuval Shaia's [RFC 1/3] Signed-off-by: Yuval Shaia <yuval.shaia.ml@gmail.com> --- hw/virtio/virtio-net-pci.c | 18 ++---------------- include/hw/virtio/virtio-net-pci.h | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 16 deletions(-) create mode 100644 include/hw/virtio/virtio-net-pci.h diff --git a/hw/virtio/virtio-net-pci.c b/hw/virtio/virtio-net-pci.c index 292d13d278..6cea7e0441 100644 --- a/hw/virtio/virtio-net-pci.c +++ b/hw/virtio/virtio-net-pci.c @@ -18,26 +18,12 @@ #include "qemu/osdep.h" #include "hw/qdev-properties.h" -#include "hw/virtio/virtio-net.h" +#include "hw/virtio/virtio-net-pci.h" #include "virtio-pci.h" #include "qapi/error.h" #include "qemu/module.h" #include "qom/object.h" -typedef struct VirtIONetPCI VirtIONetPCI; - -/* - * virtio-net-pci: This extends VirtioPCIProxy. - */ -#define TYPE_VIRTIO_NET_PCI "virtio-net-pci-base" -DECLARE_INSTANCE_CHECKER(VirtIONetPCI, VIRTIO_NET_PCI, - TYPE_VIRTIO_NET_PCI) - -struct VirtIONetPCI { - VirtIOPCIProxy parent_obj; - VirtIONet vdev; -}; - static Property virtio_net_properties[] = { DEFINE_PROP_BIT("ioeventfd", VirtIOPCIProxy, flags, VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true), @@ -84,7 +70,7 @@ static void virtio_net_pci_instance_init(Object *obj) static const VirtioPCIDeviceTypeInfo virtio_net_pci_info = { .base_name = TYPE_VIRTIO_NET_PCI, - .generic_name = "virtio-net-pci", + .generic_name = TYPE_VIRTIO_NET_PCI_GENERIC, .transitional_name = "virtio-net-pci-transitional", .non_transitional_name = "virtio-net-pci-non-transitional", .instance_size = sizeof(VirtIONetPCI), diff --git a/include/hw/virtio/virtio-net-pci.h b/include/hw/virtio/virtio-net-pci.h new file mode 100644 index 0000000000..c1915cd54f --- /dev/null +++ b/include/hw/virtio/virtio-net-pci.h @@ -0,0 +1,35 @@ +/* + * PCI Virtio Network Device + * + * Copyright IBM, Corp. 2007 + * + * Authors: + * Anthony Liguori <aliguori@us.ibm.com> + * + * This work is licensed under the terms of the GNU GPL, version 2. See + * the COPYING file in the top-level directory. + * + */ + +#ifndef QEMU_VIRTIO_NET_PCI_H +#define QEMU_VIRTIO_NET_PCI_H + +#include "hw/virtio/virtio-net.h" +#include "hw/virtio/virtio-pci.h" + +typedef struct VirtIONetPCI VirtIONetPCI; + +/* + * virtio-net-pci: This extends VirtioPCIProxy. + */ +#define TYPE_VIRTIO_NET_PCI_GENERIC "virtio-net-pci" +#define TYPE_VIRTIO_NET_PCI "virtio-net-pci-base" +#define VIRTIO_NET_PCI(obj) \ + OBJECT_CHECK(VirtIONetPCI, (obj), TYPE_VIRTIO_NET_PCI) + +struct VirtIONetPCI { + VirtIOPCIProxy parent_obj; + VirtIONet vdev; +}; + +#endif -- 2.11.0
next prev parent reply other threads:[~2021-09-02 13:08 UTC|newest] Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-09-02 13:06 [RFC 0/5] VirtIO RDMA Junji Wei 2021-09-02 13:06 ` Junji Wei 2021-09-02 13:06 ` [RFC 1/5] RDMA/virtio-rdma Introduce a new core cap prot Junji Wei 2021-09-02 13:06 ` Junji Wei 2021-09-02 13:06 ` [RFC 2/5] RDMA/virtio-rdma: VirtIO RDMA driver Junji Wei 2021-09-02 13:06 ` Junji Wei 2021-09-02 13:06 ` [RFC 3/5] RDMA/virtio-rdma: VirtIO RDMA test module Junji Wei 2021-09-02 13:06 ` Junji Wei 2021-09-02 13:06 ` Junji Wei [this message] 2021-09-02 13:06 ` [RFC 4/5] virtio-net: Move some virtio-net-pci decl to include/hw/virtio Junji Wei 2021-09-02 13:06 ` [RFC 5/5] hw/virtio-rdma: VirtIO rdma device Junji Wei 2021-09-02 13:06 ` Junji Wei 2021-09-02 15:16 ` Michael S. Tsirkin 2021-09-02 15:16 ` Michael S. Tsirkin 2021-09-02 15:16 ` Michael S. Tsirkin 2021-09-03 0:57 ` [RFC 0/5] VirtIO RDMA Jason Wang 2021-09-03 0:57 ` Jason Wang 2021-09-03 0:57 ` Jason Wang 2021-09-03 7:41 ` 魏俊吉 2021-09-03 7:41 ` 魏俊吉 2021-09-15 13:43 ` Jason Gunthorpe 2021-09-22 12:08 ` Junji Wei 2021-09-22 12:08 ` Junji Wei 2021-09-22 13:06 ` Leon Romanovsky 2021-09-22 13:06 ` Leon Romanovsky 2021-09-22 13:06 ` Leon Romanovsky 2021-09-22 13:37 ` 魏俊吉 2021-09-22 13:37 ` 魏俊吉 2021-09-22 13:59 ` Leon Romanovsky 2021-09-22 13:59 ` Leon Romanovsky 2021-09-22 13:59 ` Leon Romanovsky
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=20210902130625.25277-5-weijunji@bytedance.com \ --to=weijunji@bytedance.com \ --cc=chaiwen.cc@bytedance.com \ --cc=cohuck@redhat.com \ --cc=dledford@redhat.com \ --cc=hare@suse.de \ --cc=jasowang@redhat.com \ --cc=jgg@ziepe.ca \ --cc=linux-rdma@vger.kernel.org \ --cc=marcel.apfelbaum@gmail.com \ --cc=mst@redhat.com \ --cc=qemu-devel@nongnu.org \ --cc=virtualization@lists.linux-foundation.org \ --cc=xieyongji@bytedance.com \ --cc=yuval.shaia.ml@gmail.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: 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.