qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>,
	qemu devel <qemu-devel@nongnu.org>
Cc: zhanghailiang <zhang.zhanghailiang@huawei.com>,
	weifuqiang <weifuqiang@huawei.com>,
	"eddie . dong" <eddie.dong@intel.com>,
	bian naimeng <biannm@cn.fujitsu.com>,
	Li Zhijian <lizhijian@cn.fujitsu.com>
Subject: Re: [Qemu-devel] [PATCH V5 3/9] net/filter-mirror.c: Add new option to enable vnet support for filter-redirector
Date: Fri, 26 May 2017 13:30:29 +0800	[thread overview]
Message-ID: <c3a29be5-1000-7dc8-f50a-fe75068d057c@redhat.com> (raw)
In-Reply-To: <20c9a93a-de80-68d7-9838-38f5a5444250@cn.fujitsu.com>



On 2017年05月25日 20:58, Zhang Chen wrote:
>>>     static void filter_redirector_init(Object *obj)
>>>   {
>>> +    MirrorState *s = FILTER_REDIRECTOR(obj);
>>> +
>>>       object_property_add_str(obj, "indev", 
>>> filter_redirector_get_indev,
>>>                               filter_redirector_set_indev, NULL);
>>>       object_property_add_str(obj, "outdev", 
>>> filter_redirector_get_outdev,
>>>                               filter_redirector_set_outdev, NULL);
>>> +
>>> +    /*
>>> +     * The vnet_hdr is disabled by default, if you want to enable
>>> +     * this option, you must enable all the option on related modules
>>> +     * (like other filter or colo-compare).
>>> +     */
>>> +    s->vnet_hdr = false;
>>> +    object_property_add_str(obj, "vnet_hdr", 
>>> filter_redirector_get_vnet_hdr,
>>> +                            filter_redirector_set_vnet_hdr, NULL);
>>
>> Why not using object_property_add_bool()?
>
> Because use object_property_add_bool() we should change the option from
> "vnet_hdr=on/off" to "vnet_hdr", it seems hard to read for user.
>
> Thanks
> Zhang Chen 

Looks like there's no exist use case for using str as boolean. And you 
can probably change the name to "vnet-hdr-support" to make it more readable.

Thanks

  reply	other threads:[~2017-05-26  5:30 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-23 14:20 [Qemu-devel] [PATCH V5 0/9] Add COLO-proxy virtio-net support Zhang Chen
2017-05-23 14:20 ` [Qemu-devel] [PATCH V5 1/9] net: Add vnet_hdr_len related arguments in NetClientState Zhang Chen
2017-05-23 14:24   ` Zhang Chen
2017-05-23 14:20 ` [Qemu-devel] [PATCH V5 2/9] net/filter-mirror.c: Make filter mirror support vnet support Zhang Chen
2017-05-25  6:04   ` Jason Wang
2017-05-25 12:55     ` Zhang Chen
2017-05-26  5:25       ` Jason Wang
2017-05-23 14:20 ` [Qemu-devel] [PATCH V5 3/9] net/filter-mirror.c: Add new option to enable vnet support for filter-redirector Zhang Chen
2017-05-25  6:10   ` Jason Wang
2017-05-25 12:58     ` Zhang Chen
2017-05-26  5:30       ` Jason Wang [this message]
2017-06-01  7:18         ` Zhang Chen
2017-05-23 14:20 ` [Qemu-devel] [PATCH V5 4/9] net/net.c: Add vnet_hdr support in SocketReadState Zhang Chen
2017-05-23 14:20 ` [Qemu-devel] [PATCH V5 5/9] net/colo.c: Make vnet_hdr_len as packet property Zhang Chen
2017-05-23 14:20 ` [Qemu-devel] [PATCH V5 6/9] net/colo-compare.c: Make colo-compare support vnet_hdr_len Zhang Chen
2017-05-25  6:22   ` Jason Wang
2017-05-25 13:18     ` Zhang Chen
2017-05-26  5:35       ` Jason Wang
2017-05-26  5:36         ` Jason Wang
2017-06-01 14:11           ` Zhang Chen
2017-05-23 14:20 ` [Qemu-devel] [PATCH V5 7/9] net/colo.c: Add vnet packet parse feature in colo-proxy Zhang Chen
2017-05-23 14:20 ` [Qemu-devel] [PATCH V5 8/9] net/colo-compare.c: Add vnet packet's tcp/udp/icmp compare Zhang Chen
2017-05-23 14:20 ` [Qemu-devel] [PATCH V5 9/9] net/filter-rewriter.c: Make filter-rewriter support vnet_hdr_len Zhang Chen

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=c3a29be5-1000-7dc8-f50a-fe75068d057c@redhat.com \
    --to=jasowang@redhat.com \
    --cc=biannm@cn.fujitsu.com \
    --cc=eddie.dong@intel.com \
    --cc=lizhijian@cn.fujitsu.com \
    --cc=qemu-devel@nongnu.org \
    --cc=weifuqiang@huawei.com \
    --cc=zhang.zhanghailiang@huawei.com \
    --cc=zhangchen.fnst@cn.fujitsu.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).