All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: Shannon Zhao <shannon.zhao@linaro.org>
Cc: peter.maydell@linaro.org, hangaohuai@huawei.com, mst@redhat.com,
	peter.huangpeng@huawei.com, qemu-devel@nongnu.org,
	zhaoshenglong@huawei.com, pbonzini@redhat.com,
	christoffer.dall@linaro.org
Subject: Re: [Qemu-devel] [PATCH 1/7] virtio-net: move qdev properties into virtio-net.c
Date: Thu, 30 Apr 2015 15:49:40 +0200	[thread overview]
Message-ID: <20150430154940.2efe0ccb.cornelia.huck@de.ibm.com> (raw)
In-Reply-To: <1430321049-11859-2-git-send-email-shannon.zhao@linaro.org>

On Wed, 29 Apr 2015 23:24:03 +0800
Shannon Zhao <shannon.zhao@linaro.org> wrote:

> As only one place in virtio-net.c uses DEFINE_VIRTIO_NET_FEATURES,
> there is no need to expose it. Inline it into virtio-net.c to avoid
> wrongly use.
> 
> Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com>
> Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
> ---
>  hw/net/virtio-net.c            | 42 +++++++++++++++++++++++++++++++++++++++++-
>  include/hw/virtio/virtio-net.h | 24 ------------------------
>  2 files changed, 41 insertions(+), 25 deletions(-)
> 
> diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
> index 5c38ac2..6ed2e78 100644
> --- a/hw/net/virtio-net.c
> +++ b/hw/net/virtio-net.c
> @@ -1725,7 +1725,47 @@ static void virtio_net_instance_init(Object *obj)
>  }
> 
>  static Property virtio_net_properties[] = {
> -    DEFINE_VIRTIO_NET_FEATURES(VirtIONet, host_features),
> +    DEFINE_PROP_BIT("any_layout", VirtIONet, host_features, VIRTIO_F_ANY_LAYOUT,
> +                                                            true),

Hm, the indentation after the line break looks a bit off here (same for
some of the feature bits further down).

> +    DEFINE_PROP_BIT("csum", VirtIONet, host_features, VIRTIO_NET_F_CSUM, true),
> +    DEFINE_PROP_BIT("guest_csum", VirtIONet, host_features,
> +                                             VIRTIO_NET_F_GUEST_CSUM, true),
> +    DEFINE_PROP_BIT("gso", VirtIONet, host_features, VIRTIO_NET_F_GSO, true),
> +    DEFINE_PROP_BIT("guest_tso4", VirtIONet, host_features,
> +                                             VIRTIO_NET_F_GUEST_TSO4, true),
> +    DEFINE_PROP_BIT("guest_tso6", VirtIONet, host_features,
> +                                             VIRTIO_NET_F_GUEST_TSO6, true),
> +    DEFINE_PROP_BIT("guest_ecn", VirtIONet, host_features,
> +                                            VIRTIO_NET_F_GUEST_ECN, true),
> +    DEFINE_PROP_BIT("guest_ufo", VirtIONet, host_features,
> +                                            VIRTIO_NET_F_GUEST_UFO, true),
> +    DEFINE_PROP_BIT("guest_announce", VirtIONet, host_features,
> +                                      VIRTIO_NET_F_GUEST_ANNOUNCE, true),
> +    DEFINE_PROP_BIT("host_tso4", VirtIONet, host_features,
> +                                            VIRTIO_NET_F_HOST_TSO4, true),
> +    DEFINE_PROP_BIT("host_tso6", VirtIONet, host_features,
> +                                            VIRTIO_NET_F_HOST_TSO6, true),
> +    DEFINE_PROP_BIT("host_ecn", VirtIONet, host_features, VIRTIO_NET_F_HOST_ECN,
> +                                                          true),
> +    DEFINE_PROP_BIT("host_ufo", VirtIONet, host_features, VIRTIO_NET_F_HOST_UFO,
> +                                                          true),
> +    DEFINE_PROP_BIT("mrg_rxbuf", VirtIONet, host_features,
> +                                            VIRTIO_NET_F_MRG_RXBUF, true),
> +    DEFINE_PROP_BIT("status", VirtIONet, host_features, VIRTIO_NET_F_STATUS,
> +                                                        true),
> +    DEFINE_PROP_BIT("ctrl_vq", VirtIONet, host_features, VIRTIO_NET_F_CTRL_VQ,
> +                                                         true),
> +    DEFINE_PROP_BIT("ctrl_rx", VirtIONet, host_features, VIRTIO_NET_F_CTRL_RX,
> +                                                         true),
> +    DEFINE_PROP_BIT("ctrl_vlan", VirtIONet, host_features,
> +                                            VIRTIO_NET_F_CTRL_VLAN, true),
> +    DEFINE_PROP_BIT("ctrl_rx_extra", VirtIONet, host_features,
> +                                     VIRTIO_NET_F_CTRL_RX_EXTRA, true),
> +    DEFINE_PROP_BIT("ctrl_mac_addr", VirtIONet, host_features,
> +                                     VIRTIO_NET_F_CTRL_MAC_ADDR, true),
> +    DEFINE_PROP_BIT("ctrl_guest_offloads", VirtIONet, host_features,
> +                    VIRTIO_NET_F_CTRL_GUEST_OFFLOADS, true),
> +    DEFINE_PROP_BIT("mq", VirtIONet, host_features, VIRTIO_NET_F_MQ, false),
>      DEFINE_NIC_PROPERTIES(VirtIONet, nic_conf),
>      DEFINE_PROP_UINT32("x-txtimer", VirtIONet, net_conf.txtimer,
>                                                 TX_TIMER_INTERVAL),

  reply	other threads:[~2015-04-30 13:49 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-29 15:24 [Qemu-devel] [PATCH 0/7] virtio: inline private qdev properties into virtio devices Shannon Zhao
2015-04-29 15:24 ` [Qemu-devel] [PATCH 1/7] virtio-net: move qdev properties into virtio-net.c Shannon Zhao
2015-04-30 13:49   ` Cornelia Huck [this message]
2015-04-29 15:24 ` [Qemu-devel] [PATCH 2/7] virtio-net.h: Remove unsed DEFINE_VIRTIO_NET_PROPERTIES Shannon Zhao
2015-04-29 15:24 ` [Qemu-devel] [PATCH 3/7] virtio-scsi: move qdev properties into virtio-scsi.c Shannon Zhao
2015-04-29 15:24 ` [Qemu-devel] [PATCH 4/7] virtio-rng: move qdev properties into virtio-rng.c Shannon Zhao
2015-04-29 15:24 ` [Qemu-devel] [PATCH 5/7] virtio-serial-bus: move qdev properties into virtio-serial-bus.c Shannon Zhao
2015-04-29 15:24 ` [Qemu-devel] [PATCH 6/7] virtio-9p-device: move qdev properties into virtio-9p-device.c Shannon Zhao
2015-04-29 15:24 ` [Qemu-devel] [PATCH 7/7] vhost-scsi: move qdev properties into vhost-scsi.c Shannon Zhao
2015-04-29 16:42 ` [Qemu-devel] [PATCH 0/7] virtio: inline private qdev properties into virtio devices Paolo Bonzini
2015-04-30 13:50 ` Cornelia Huck
2015-05-03 12:33   ` Shannon Zhao
2015-05-08  1:23 ` Shannon Zhao
2015-05-08  6:53   ` Paolo Bonzini
2015-05-08 12:29     ` Shannon Zhao
2015-06-10 13:18 ` [Qemu-trivial] " Shannon Zhao
2015-06-10 13:18   ` [Qemu-devel] " Shannon Zhao
2015-06-10 13:21   ` [Qemu-trivial] " Michael S. Tsirkin
2015-06-10 13:21     ` [Qemu-devel] " Michael S. Tsirkin
2015-06-10 13:38     ` [Qemu-trivial] " Shannon Zhao
2015-06-10 13:38       ` [Qemu-devel] " Shannon Zhao
2015-06-10 14:01       ` [Qemu-trivial] " Michael S. Tsirkin
2015-06-10 14:01         ` [Qemu-devel] " Michael S. Tsirkin
2015-06-10 14:28         ` [Qemu-trivial] " Shannon Zhao
2015-06-10 14:28           ` [Qemu-devel] " Shannon Zhao
2015-06-10 14:36           ` [Qemu-trivial] " Michael S. Tsirkin
2015-06-10 14:36             ` [Qemu-devel] " Michael S. Tsirkin
2015-06-10 14:38             ` [Qemu-trivial] " Shannon Zhao
2015-06-10 14:38               ` [Qemu-devel] " Shannon Zhao

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=20150430154940.2efe0ccb.cornelia.huck@de.ibm.com \
    --to=cornelia.huck@de.ibm.com \
    --cc=christoffer.dall@linaro.org \
    --cc=hangaohuai@huawei.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.huangpeng@huawei.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=shannon.zhao@linaro.org \
    --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 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.