All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hailiang Zhang <zhang.zhanghailiang@huawei.com>
To: Jason Wang <jasowang@redhat.com>,
	Zhang Chen <zhangchen.fnst@cn.fujitsu.com>,
	lizhijian@cn.fujitsu.com
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] colo-compare: fix find_and_check_chardev()
Date: Thu, 20 Oct 2016 12:53:42 +0800	[thread overview]
Message-ID: <58084DD6.1030800@huawei.com> (raw)
In-Reply-To: <221bf531-e488-6412-8c7b-12d54f9ff8be@redhat.com>

On 2016/10/20 11:53, Jason Wang wrote:
>
>
> On 2016年10月10日 11:49, Zhang Chen wrote:
>>
>>
>> On 10/10/2016 11:13 AM, Hailiang Zhang wrote:
>>> Hi,
>>>
>>> On 2016/10/10 10:52, Zhang Chen wrote:
>>>>
>>>>
>>>> On 09/30/2016 12:06 PM, zhanghailiang wrote:
>>>>> find_and_check_chardev() uses 'opts' member of CharDriverState to
>>>>> check if the chardev is 'socket' chardev or not, which the opts
>>>>> will be NULL if We add the chardev by qmp 'chardev-add' command.
>>>>>
>>>>> All the related info can be found in 'filename' member of
>>>>> CharDriverState,
>>>>> For tcp socket device, it will be like
>>>>> 'disconnected:tcp:9.61.1.8:9004,server'
>>>>> or 'tcp:9.61.1.8:9001,server <-> 9.61.1.8:50256', we can simply
>>>>> check it to
>>>>> identify if it is a tcp socket char device.
>>>>>
>>>>> Besides, fix this helper function to return -1 while some errors
>>>>> happen.
>>>>>
>>>>> Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
>>>>
>>>> This patch looks fine to me.
>>>>
>>>
>>> Sorry, I found there are still some problems with this modification,
>>> For some local connection between filter objects, I think we can use
>>> unix socket
>>> instead of tcp socket. (Or even other char device, for example file
>>> or pipe, but
>>> Let's make things simple, we limit it to socket now)
>>>
>>> So the below check is insufficient, It should be
>>>
>>> +    if (!strstr((*chr)->filename, "tcp:") &&
>>> !strstr((*chr)->filename, "unix:")) {
>>>           error_setg(errp, "chardev \"%s\" is not a tcp socket,
>>> filename '%s'",
>>>                      chr_name, (*chr)->filename);
>>>
>>> If you and Jason agree with this, i will send V2.
>>>
>>
>> I find part of codes in this patch has same with another patch:
>>
>> net: don't poke at chardev internal QemuOpts
>>
>> I think you can fix and rebase your patch,
>> then we need jason's comments for this.
>
> I think we don't support unix domain socket?
>

No, we support it, actually, by using unix socket,
we can reduce the number of ports used in COLO process.

> .
>

  reply	other threads:[~2016-10-20  4:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-30  4:06 [Qemu-devel] [PATCH] colo-compare: fix find_and_check_chardev() zhanghailiang
2016-10-10  2:52 ` Zhang Chen
2016-10-10  3:13   ` Hailiang Zhang
2016-10-10  3:49     ` Zhang Chen
2016-10-10  6:06       ` Hailiang Zhang
2016-10-20  3:53       ` Jason Wang
2016-10-20  4:53         ` Hailiang Zhang [this message]
2016-10-21  2:13           ` Jason Wang
2016-10-20  2:12 ` Jason Wang
2016-10-20  4:52   ` Hailiang Zhang

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=58084DD6.1030800@huawei.com \
    --to=zhang.zhanghailiang@huawei.com \
    --cc=jasowang@redhat.com \
    --cc=lizhijian@cn.fujitsu.com \
    --cc=qemu-devel@nongnu.org \
    --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 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.