All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: Wen Congyang <wency@cn.fujitsu.com>,
	Zhang Chen <zhangchen.fnst@cn.fujitsu.com>,
	qemu devel <qemu-devel@nongnu.org>
Cc: zhanghailiang <zhang.zhanghailiang@huawei.com>,
	Li Zhijian <lizhijian@cn.fujitsu.com>,
	Gui jianfeng <guijianfeng@cn.fujitsu.com>,
	"eddie.dong" <eddie.dong@intel.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	Yang Hongyang <hongyang.yang@easystack.cn>
Subject: Re: [Qemu-devel] [PATCH V4 1/2] net/filter-mirror: implement filter-redirector
Date: Thu, 17 Mar 2016 14:28:30 +0800	[thread overview]
Message-ID: <56EA4E8E.2070100@redhat.com> (raw)
In-Reply-To: <56EA4C21.9000205@cn.fujitsu.com>



On 03/17/2016 02:18 PM, Wen Congyang wrote:
>>>>>>> >>>>>> +                s->state = 0;
>>>>>>> >>>>>> +                /* FIXME: do something ? */
>>>>> >>>>
>>>>> >>>> This needs some thought, but at least reset the fd handler and state is
>>>>> >>>> needed.
>>> >> Maybe we can read the data from the chardev, and drop it?
>>> >>
>>> >> Thanks
>>> >> Wen Congyang
>>> >>
>> > 
>> > No function difference, but reading and dropping will cost extra cpu
>> > which seems not good.
> If we reset and receive it again, the unread data will be auto dropped?

If socket receive queue is not full, the data will be buffered there
(but the queue will be purged after qemu process exits). Otherwise it
will be dropped.

> If so, I think reset the fd handler is better choice.
>
> Thanks
> Wen Congyang
>

  reply	other threads:[~2016-03-17  6:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-15 10:03 [Qemu-devel] [PATCH V4 0/2] Introduce filter-redirector Zhang Chen
2016-03-15 10:03 ` [Qemu-devel] [PATCH V4 1/2] net/filter-mirror: implement filter-redirector Zhang Chen
2016-03-16  8:18   ` Jason Wang
2016-03-16  9:11     ` Li Zhijian
2016-03-16  9:34     ` Wen Congyang
2016-03-16 10:07       ` Li Zhijian
2016-03-17  6:10       ` Jason Wang
2016-03-17  6:18         ` Wen Congyang
2016-03-17  6:28           ` Jason Wang [this message]
2016-03-15 10:03 ` [Qemu-devel] [PATCH V4 2/2] tests/test-filter-redirector: Add unit test for filter-redirector Zhang Chen
2016-03-16  8:18 ` [Qemu-devel] [PATCH V4 0/2] Introduce filter-redirector Jason Wang

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=56EA4E8E.2070100@redhat.com \
    --to=jasowang@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=eddie.dong@intel.com \
    --cc=guijianfeng@cn.fujitsu.com \
    --cc=hongyang.yang@easystack.cn \
    --cc=lizhijian@cn.fujitsu.com \
    --cc=qemu-devel@nongnu.org \
    --cc=wency@cn.fujitsu.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 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.