From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34524) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQAWj-0008CU-Si for qemu-devel@nongnu.org; Mon, 01 Feb 2016 04:12:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQAWg-00034n-MQ for qemu-devel@nongnu.org; Mon, 01 Feb 2016 04:12:05 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40924) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQAWg-000345-Ax for qemu-devel@nongnu.org; Mon, 01 Feb 2016 04:12:02 -0500 Date: Mon, 1 Feb 2016 09:11:57 +0000 From: "Dr. David Alan Gilbert" Message-ID: <20160201091156.GB2486@work-vm> References: <1453862428-25570-1-git-send-email-zhangchen.fnst@cn.fujitsu.com> <56A9AAC8.4010803@redhat.com> <56AAC2A2.9020204@cn.fujitsu.com> <56AEC986.2000500@redhat.com> <56AF0E35.8000905@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <56AF0E35.8000905@cn.fujitsu.com> Content-Transfer-Encoding: quoted-printable 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: Li Zhijian Cc: zhanghailiang , Zhang Chen , Gui jianfeng , Jason Wang , "eddie.dong" , qemu devel , Yang Hongyang * Li Zhijian (lizhijian@cn.fujitsu.com) wrote: >=20 >=20 > On 02/01/2016 10:57 AM, Jason Wang wrote: > > > > > >On 01/29/2016 09:38 AM, Li Zhijian wrote: > >> > >> > >>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=3Dhn0 > >>>>-chardev socket,id=3Dmirror0,host=3Dip_primary,port=3DX,server,nowa= it > >>>>-traffic-mirror,id=3Dm0,netdev=3Dhn0,queue=3Dtx/rx/all,outdev=3Dmir= ror0 > >>>> > >>>>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=3Dhn0 -device virtio-net-pci,netdev=3Dhn0 -chardev > >>>socket,id=3Dc0,host=3Dlocalhost,port=3D4444,server,nowait -object > >>>traffic-mirror,netdev=3Dhn0,outdev=3Dc0,id=3Df0 -netdev > >>>socket,id=3Ds0,connect=3D127.0.0.1:4444 -device e1000,netdev=3Ds0 > >>> >=20 > a strange thing is about "host=3Dlocalhost", connection is refused at S= USE 11.3 but > connection is connected successfully at Ubuntu 15.10 if i launch qemu w= ith the > command line above. > I try to launch qemu at three physical machines installed with SUSE 11.= 3, they all > connect failed. But when I specified "host=3D127.0.0.1", the connection= is OK. >=20 > I have comfirmed that: > - "localhost have pointed to 127.0.0.1 if I "ping localhost" at SUSE > - "telnet localhost 4444" works at SUSE My guess is that it's IPv6 related; check the /etc/hosts so see if there'= s a ::1 entry for localhost; I've seen some weird behaviour on rhel in the same way but in other uses. Dave >=20 > >>>does not works for me. > >>Hi=EF=BC=8C Jason > >> > >>I just test the mirror using the command line above, it don't work to= o. > >>I am looking to it, and find that seems because the -net socket > >>problem that > >>I have ever post a patch try to fix=EF=BC=88refer to =E2=86=93=EF=BC= =89 > >>[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 > > > >Will have a look at this. > > > >> > >>after applying this patch, the qemu monitor tell me following message= : > >>(qemu) qemu-system-x86_64: net socket is not connected Connection ref= used > > > >Maybe two issues. Have you tired to start the mirror on one VM and the= n > >using socket backend to connect it from another VM? >=20 > Yes, if i connect the mirror on VM1 using socket backend from another V= M2, the connection > is established successfully. But on VM2 guest, I can't dump any packet = using 'tcpdump' > That's because in current version code, mirror is not compatible with s= ocket backend and > we will fix it in next version. >=20 >=20 > Best regards. > Li Zhijian >=20 > > > >> > >> > >>Thanks > >>Li Zhijian > >> > >> > >> > > > > > > > >. > > >=20 >=20 -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK