From: akong@redhat.com To: mst@redhat.com Cc: qemu-devel@nongnu.org, stefanha@redhat.com, virtualization@lists.linux-foundation.org, rusty@rustcorp.com.au, kvm@vger.kernel.org Subject: [QEMU PATCH v4 3/3] virtio-net: rename ctrl rx commands Date: Sat, 19 Jan 2013 09:54:28 +0800 [thread overview] Message-ID: <1358560468-10865-4-git-send-email-akong@redhat.com> (raw) In-Reply-To: <1358560468-10865-1-git-send-email-akong@redhat.com> From: Amos Kong <akong@redhat.com> This patch makes rx commands consistent with specification. Signed-off-by: Amos Kong <akong@redhat.com> --- hw/virtio-net.c | 14 +++++++------- hw/virtio-net.h | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/hw/virtio-net.c b/hw/virtio-net.c index cf40ff2..5700e22 100644 --- a/hw/virtio-net.c +++ b/hw/virtio-net.c @@ -326,17 +326,17 @@ static int virtio_net_handle_rx_mode(VirtIONet *n, uint8_t cmd, return VIRTIO_NET_ERR; } - if (cmd == VIRTIO_NET_CTRL_RX_MODE_PROMISC) { + if (cmd == VIRTIO_NET_CTRL_RX_PROMISC) { n->promisc = on; - } else if (cmd == VIRTIO_NET_CTRL_RX_MODE_ALLMULTI) { + } else if (cmd == VIRTIO_NET_CTRL_RX_ALLMULTI) { n->allmulti = on; - } else if (cmd == VIRTIO_NET_CTRL_RX_MODE_ALLUNI) { + } else if (cmd == VIRTIO_NET_CTRL_RX_ALLUNI) { n->alluni = on; - } else if (cmd == VIRTIO_NET_CTRL_RX_MODE_NOMULTI) { + } else if (cmd == VIRTIO_NET_CTRL_RX_NOMULTI) { n->nomulti = on; - } else if (cmd == VIRTIO_NET_CTRL_RX_MODE_NOUNI) { + } else if (cmd == VIRTIO_NET_CTRL_RX_NOUNI) { n->nouni = on; - } else if (cmd == VIRTIO_NET_CTRL_RX_MODE_NOBCAST) { + } else if (cmd == VIRTIO_NET_CTRL_RX_NOBCAST) { n->nobcast = on; } else { return VIRTIO_NET_ERR; @@ -474,7 +474,7 @@ static void virtio_net_handle_ctrl(VirtIODevice *vdev, VirtQueue *vq) iov_discard_front(&iov, &iov_cnt, sizeof(ctrl)); if (s != sizeof(ctrl)) { status = VIRTIO_NET_ERR; - } else if (ctrl.class == VIRTIO_NET_CTRL_RX_MODE) { + } else if (ctrl.class == VIRTIO_NET_CTRL_RX) { status = virtio_net_handle_rx_mode(n, ctrl.cmd, iov, iov_cnt); } else if (ctrl.class == VIRTIO_NET_CTRL_MAC) { status = virtio_net_handle_mac(n, ctrl.cmd, iov, iov_cnt); diff --git a/hw/virtio-net.h b/hw/virtio-net.h index 1ec632f..c0bb284 100644 --- a/hw/virtio-net.h +++ b/hw/virtio-net.h @@ -99,13 +99,13 @@ typedef uint8_t virtio_net_ctrl_ack; * 0 and 1 are supported with the VIRTIO_NET_F_CTRL_RX feature. * Commands 2-5 are added with VIRTIO_NET_F_CTRL_RX_EXTRA. */ -#define VIRTIO_NET_CTRL_RX_MODE 0 - #define VIRTIO_NET_CTRL_RX_MODE_PROMISC 0 - #define VIRTIO_NET_CTRL_RX_MODE_ALLMULTI 1 - #define VIRTIO_NET_CTRL_RX_MODE_ALLUNI 2 - #define VIRTIO_NET_CTRL_RX_MODE_NOMULTI 3 - #define VIRTIO_NET_CTRL_RX_MODE_NOUNI 4 - #define VIRTIO_NET_CTRL_RX_MODE_NOBCAST 5 +#define VIRTIO_NET_CTRL_RX 0 + #define VIRTIO_NET_CTRL_RX_PROMISC 0 + #define VIRTIO_NET_CTRL_RX_ALLMULTI 1 + #define VIRTIO_NET_CTRL_RX_ALLUNI 2 + #define VIRTIO_NET_CTRL_RX_NOMULTI 3 + #define VIRTIO_NET_CTRL_RX_NOUNI 4 + #define VIRTIO_NET_CTRL_RX_NOBCAST 5 /* * Control the MAC -- 1.7.11.7
WARNING: multiple messages have this Message-ID (diff)
From: akong@redhat.com To: mst@redhat.com Cc: kvm@vger.kernel.org, rusty@rustcorp.com.au, qemu-devel@nongnu.org, stefanha@redhat.com, virtualization@lists.linux-foundation.org Subject: [Qemu-devel] [QEMU PATCH v4 3/3] virtio-net: rename ctrl rx commands Date: Sat, 19 Jan 2013 09:54:28 +0800 [thread overview] Message-ID: <1358560468-10865-4-git-send-email-akong@redhat.com> (raw) In-Reply-To: <1358560468-10865-1-git-send-email-akong@redhat.com> From: Amos Kong <akong@redhat.com> This patch makes rx commands consistent with specification. Signed-off-by: Amos Kong <akong@redhat.com> --- hw/virtio-net.c | 14 +++++++------- hw/virtio-net.h | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/hw/virtio-net.c b/hw/virtio-net.c index cf40ff2..5700e22 100644 --- a/hw/virtio-net.c +++ b/hw/virtio-net.c @@ -326,17 +326,17 @@ static int virtio_net_handle_rx_mode(VirtIONet *n, uint8_t cmd, return VIRTIO_NET_ERR; } - if (cmd == VIRTIO_NET_CTRL_RX_MODE_PROMISC) { + if (cmd == VIRTIO_NET_CTRL_RX_PROMISC) { n->promisc = on; - } else if (cmd == VIRTIO_NET_CTRL_RX_MODE_ALLMULTI) { + } else if (cmd == VIRTIO_NET_CTRL_RX_ALLMULTI) { n->allmulti = on; - } else if (cmd == VIRTIO_NET_CTRL_RX_MODE_ALLUNI) { + } else if (cmd == VIRTIO_NET_CTRL_RX_ALLUNI) { n->alluni = on; - } else if (cmd == VIRTIO_NET_CTRL_RX_MODE_NOMULTI) { + } else if (cmd == VIRTIO_NET_CTRL_RX_NOMULTI) { n->nomulti = on; - } else if (cmd == VIRTIO_NET_CTRL_RX_MODE_NOUNI) { + } else if (cmd == VIRTIO_NET_CTRL_RX_NOUNI) { n->nouni = on; - } else if (cmd == VIRTIO_NET_CTRL_RX_MODE_NOBCAST) { + } else if (cmd == VIRTIO_NET_CTRL_RX_NOBCAST) { n->nobcast = on; } else { return VIRTIO_NET_ERR; @@ -474,7 +474,7 @@ static void virtio_net_handle_ctrl(VirtIODevice *vdev, VirtQueue *vq) iov_discard_front(&iov, &iov_cnt, sizeof(ctrl)); if (s != sizeof(ctrl)) { status = VIRTIO_NET_ERR; - } else if (ctrl.class == VIRTIO_NET_CTRL_RX_MODE) { + } else if (ctrl.class == VIRTIO_NET_CTRL_RX) { status = virtio_net_handle_rx_mode(n, ctrl.cmd, iov, iov_cnt); } else if (ctrl.class == VIRTIO_NET_CTRL_MAC) { status = virtio_net_handle_mac(n, ctrl.cmd, iov, iov_cnt); diff --git a/hw/virtio-net.h b/hw/virtio-net.h index 1ec632f..c0bb284 100644 --- a/hw/virtio-net.h +++ b/hw/virtio-net.h @@ -99,13 +99,13 @@ typedef uint8_t virtio_net_ctrl_ack; * 0 and 1 are supported with the VIRTIO_NET_F_CTRL_RX feature. * Commands 2-5 are added with VIRTIO_NET_F_CTRL_RX_EXTRA. */ -#define VIRTIO_NET_CTRL_RX_MODE 0 - #define VIRTIO_NET_CTRL_RX_MODE_PROMISC 0 - #define VIRTIO_NET_CTRL_RX_MODE_ALLMULTI 1 - #define VIRTIO_NET_CTRL_RX_MODE_ALLUNI 2 - #define VIRTIO_NET_CTRL_RX_MODE_NOMULTI 3 - #define VIRTIO_NET_CTRL_RX_MODE_NOUNI 4 - #define VIRTIO_NET_CTRL_RX_MODE_NOBCAST 5 +#define VIRTIO_NET_CTRL_RX 0 + #define VIRTIO_NET_CTRL_RX_PROMISC 0 + #define VIRTIO_NET_CTRL_RX_ALLMULTI 1 + #define VIRTIO_NET_CTRL_RX_ALLUNI 2 + #define VIRTIO_NET_CTRL_RX_NOMULTI 3 + #define VIRTIO_NET_CTRL_RX_NOUNI 4 + #define VIRTIO_NET_CTRL_RX_NOBCAST 5 /* * Control the MAC -- 1.7.11.7
next prev parent reply other threads:[~2013-01-19 1:54 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-01-19 1:54 [QEMU PATCH v4 0/3] virtio-net: fix of ctrl commands akong 2013-01-19 1:54 ` [Qemu-devel] " akong 2013-01-19 1:54 ` [QEMU PATCH v4 1/3] virtio-net: remove layout assumptions for ctrl vq akong 2013-01-19 1:54 ` [Qemu-devel] " akong 2013-01-19 2:08 ` Amos Kong 2013-01-19 2:08 ` Amos Kong 2013-01-21 16:03 ` Stefan Hajnoczi 2013-01-22 14:38 ` Amos Kong 2013-01-22 14:49 ` Stefan Hajnoczi 2013-01-22 14:38 ` Amos Kong 2013-01-19 1:54 ` [QEMU PATCH v4 2/3] virtio-net: introduce a new macaddr control akong 2013-01-19 1:54 ` [Qemu-devel] " akong 2013-01-21 16:08 ` Stefan Hajnoczi 2013-01-22 11:37 ` Amos Kong 2013-01-19 1:54 ` akong 2013-01-19 1:54 ` akong [this message] 2013-01-19 1:54 ` [Qemu-devel] [QEMU PATCH v4 3/3] virtio-net: rename ctrl rx commands akong 2013-01-19 1:54 ` akong
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=1358560468-10865-4-git-send-email-akong@redhat.com \ --to=akong@redhat.com \ --cc=kvm@vger.kernel.org \ --cc=mst@redhat.com \ --cc=qemu-devel@nongnu.org \ --cc=rusty@rustcorp.com.au \ --cc=stefanha@redhat.com \ --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.