From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
Thomas Huth <thuth@linux.vnet.ibm.com>,
Christian Borntraeger <borntraeger@de.ibm.com>,
Shannon Zhao <zhaoshenglong@huawei.com>,
Cornelia Huck <cornelia.huck@de.ibm.com>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: [Qemu-devel] [PULL 10/13] virtio_net: reuse constants from linux
Date: Tue, 7 Jul 2015 15:40:34 +0300 [thread overview]
Message-ID: <1436272760-29611-11-git-send-email-mst@redhat.com> (raw)
In-Reply-To: <1436272760-29611-1-git-send-email-mst@redhat.com>
VIRTIO_NET_F_CTRL_GUEST_OFFLOADS now appears in the
linux header, let's reuse it.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/hw/virtio/virtio-net.h | 12 ------------
include/standard-headers/linux/virtio_net.h | 16 ++++++++++++++++
2 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/include/hw/virtio/virtio-net.h b/include/hw/virtio/virtio-net.h
index 280dacf..60b11d5 100644
--- a/include/hw/virtio/virtio-net.h
+++ b/include/hw/virtio/virtio-net.h
@@ -21,9 +21,6 @@
#define VIRTIO_NET(obj) \
OBJECT_CHECK(VirtIONet, (obj), TYPE_VIRTIO_NET)
-#define VIRTIO_NET_F_CTRL_GUEST_OFFLOADS 2 /* Control channel offload
- * configuration support */
-
#define TX_TIMER_INTERVAL 150000 /* 150 us */
/* Limit the number of packets that can be sent via a single flush
@@ -100,15 +97,6 @@ typedef struct VirtIONet {
int announce_counter;
} VirtIONet;
-/*
- * Control network offloads
- *
- * Dynamic offloads are available with the
- * VIRTIO_NET_F_CTRL_GUEST_OFFLOADS feature bit.
- */
-#define VIRTIO_NET_CTRL_GUEST_OFFLOADS 5
-#define VIRTIO_NET_CTRL_GUEST_OFFLOADS_SET 0
-
void virtio_net_set_netclient_name(VirtIONet *n, const char *name,
const char *type);
diff --git a/include/standard-headers/linux/virtio_net.h b/include/standard-headers/linux/virtio_net.h
index 3209c90..a78f33e 100644
--- a/include/standard-headers/linux/virtio_net.h
+++ b/include/standard-headers/linux/virtio_net.h
@@ -34,6 +34,7 @@
/* The feature bitmap for virtio net */
#define VIRTIO_NET_F_CSUM 0 /* Host handles pkts w/ partial csum */
#define VIRTIO_NET_F_GUEST_CSUM 1 /* Guest handles pkts w/ partial csum */
+#define VIRTIO_NET_F_CTRL_GUEST_OFFLOADS 2 /* Dynamic offload configuration. */
#define VIRTIO_NET_F_MAC 5 /* Host has given MAC address. */
#define VIRTIO_NET_F_GUEST_TSO4 7 /* Guest can handle TSOv4 in. */
#define VIRTIO_NET_F_GUEST_TSO6 8 /* Guest can handle TSOv6 in. */
@@ -226,4 +227,19 @@ struct virtio_net_ctrl_mq {
#define VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MIN 1
#define VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MAX 0x8000
+/*
+ * Control network offloads
+ *
+ * Reconfigures the network offloads that Guest can handle.
+ *
+ * Available with the VIRTIO_NET_F_CTRL_GUEST_OFFLOADS feature bit.
+ *
+ * Command data format matches the feature bit mask exactly.
+ *
+ * See VIRTIO_NET_F_GUEST_* for the list of offloads
+ * that can be enabled/disabled.
+ */
+#define VIRTIO_NET_CTRL_GUEST_OFFLOADS 5
+#define VIRTIO_NET_CTRL_GUEST_OFFLOADS_SET 0
+
#endif /* _LINUX_VIRTIO_NET_H */
--
MST
next prev parent reply other threads:[~2015-07-07 12:40 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-07 12:40 [Qemu-devel] [PULL 00/13] pc,virtio,pci: fixes and updates Michael S. Tsirkin
2015-07-07 12:40 ` [Qemu-devel] [PULL 01/13] dataplane: fix cross-endian issues Michael S. Tsirkin
2015-07-07 12:40 ` [Qemu-devel] [PULL 02/13] Revert "dataplane: allow virtio-1 devices" Michael S. Tsirkin
2015-07-07 12:40 ` [Qemu-devel] [PULL 03/13] acpi: split out ICH ACPI support Michael S. Tsirkin
2015-07-07 12:40 ` [Qemu-devel] [PULL 04/13] ich9: add TCO interface emulation Michael S. Tsirkin
2015-07-07 12:40 ` [Qemu-devel] [PULL 05/13] tests: add testcase for TCO watchdog emulation Michael S. Tsirkin
2015-07-07 12:40 ` [Qemu-devel] [PULL 06/13] ich9: implement strap SPKR pin logic Michael S. Tsirkin
2015-07-07 12:40 ` [Qemu-devel] [PULL 07/13] hw/i386/pc: factor out pc_cmos_init_floppy() Michael S. Tsirkin
2015-07-07 12:40 ` [Qemu-devel] [PULL 08/13] hw/i386/pc: reflect any FDC @ ioport 0x3f0 in the CMOS Michael S. Tsirkin
2015-07-07 12:40 ` [Qemu-devel] [PULL 09/13] hw/i386/pc: don't carry FDC from pc_basic_device_init() to pc_cmos_init() Michael S. Tsirkin
2015-07-07 12:40 ` Michael S. Tsirkin [this message]
2015-07-07 12:40 ` [Qemu-devel] [PULL 11/13] pci_regs.h: import from linux Michael S. Tsirkin
2015-07-07 12:40 ` [Qemu-devel] [PULL 12/13] pcie: Set the "link active" in the link status register Michael S. Tsirkin
2015-07-07 12:40 ` [Qemu-devel] [PULL 13/13] virtio: define virtio_pci_cfg_cap in header Michael S. Tsirkin
2015-07-07 16:18 ` [Qemu-devel] [PULL 00/13] pc,virtio,pci: fixes and updates Peter Maydell
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=1436272760-29611-11-git-send-email-mst@redhat.com \
--to=mst@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=cornelia.huck@de.ibm.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=thuth@linux.vnet.ibm.com \
--cc=zhaoshenglong@huawei.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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).