From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52236) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOy1p-0007Ak-7t for qemu-devel@nongnu.org; Thu, 28 Jan 2016 20:39:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aOy1m-0006hl-2r for qemu-devel@nongnu.org; Thu, 28 Jan 2016 20:39:13 -0500 Received: from [59.151.112.132] (port=31564 helo=heian.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOy1l-0006gK-Mt for qemu-devel@nongnu.org; Thu, 28 Jan 2016 20:39:09 -0500 References: <1453862428-25570-1-git-send-email-zhangchen.fnst@cn.fujitsu.com> <56A9AAC8.4010803@redhat.com> From: Li Zhijian Message-ID: <56AAC2A2.9020204@cn.fujitsu.com> Date: Fri, 29 Jan 2016 09:38:42 +0800 MIME-Version: 1.0 In-Reply-To: <56A9AAC8.4010803@redhat.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH V2] net/traffic-mirror:Add traffic-mirror List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jason Wang , Zhang Chen , qemu devel Cc: zhanghailiang , Gui jianfeng , "eddie.dong" , "Dr. David Alan Gilbert" , Yang Hongyang On 01/28/2016 01:44 PM, Jason Wang wrote: > > > On 01/27/2016 10:40 AM, Zhang Chen wrote: >> From: ZhangChen >> >> Traffic-mirror is a netfilter plugin. >> It gives qemu the ability to copy and mirror guest's >> net packet. we output packet to chardev. >> >> usage: >> >> -netdev tap,id=hn0 >> -chardev socket,id=mirror0,host=ip_primary,port=X,server,nowait >> -traffic-mirror,id=m0,netdev=hn0,queue=tx/rx/all,outdev=mirror0 >> >> Signed-off-by: ZhangChen >> Signed-off-by: Wen Congyang >> Reviewed-by: Yang Hongyang > > Thanks for the patch. Several questions: > > - I'm curious about how the patch was tested? Simple setup e.g: > > -netdev tap,id=hn0 -device virtio-net-pci,netdev=hn0 -chardev > socket,id=c0,host=localhost,port=4444,server,nowait -object > traffic-mirror,netdev=hn0,outdev=c0,id=f0 -netdev > socket,id=s0,connect=127.0.0.1:4444 -device e1000,netdev=s0 > > does not works for me. Hi, Jason I just test the mirror using the command line above, it don't work too. I am looking to it, and find that seems because the -net socket problem that I have ever post a patch try to fix(refer to ↓) [Qemu-devel] [PATCH] report a error message if -net socket can not connect to server https://lists.gnu.org/archive/html/qemu-devel/2015-12/msg00758.html after applying this patch, the qemu monitor tell me following message: (qemu) qemu-system-x86_64: net socket is not connected Connection refused Thanks Li Zhijian