From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id DC7A65691 for ; Wed, 25 Feb 2015 11:36:02 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP; 25 Feb 2015 02:30:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,643,1418112000"; d="scan'208";a="532572646" Received: from pgsmsx105.gar.corp.intel.com ([10.221.44.96]) by orsmga003.jf.intel.com with ESMTP; 25 Feb 2015 02:26:54 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by PGSMSX105.gar.corp.intel.com (10.221.44.96) with Microsoft SMTP Server (TLS) id 14.3.195.1; Wed, 25 Feb 2015 18:35:59 +0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.192]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.197]) with mapi id 14.03.0195.001; Wed, 25 Feb 2015 18:35:57 +0800 From: "Xie, Huawei" To: sai kiran Thread-Topic: [dpdk-dev] KNI as kernel vHost backend failing Thread-Index: AdBQ5tas935aI1XyT3mdB8MWW1kyVA== Date: Wed, 25 Feb 2015 10:35:57 +0000 Message-ID: References: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] KNI as kernel vHost backend failing X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Feb 2015 10:36:03 -0000 On 1/1/2015 5:02 PM, sai kiran wrote:=0A= > Hi,=0A= >=0A= >=0A= >=0A= > We are trying to experiment with DPDK=92s KNI application, with KNI worki= ng=0A= > as Kernel vHost backend.=0A= >=0A= >=0A= > 1. After starting the KNI application, KNI application has detected link= =0A= > up.=0A= >=0A= >=0A= > *[root@localhost kni]# ./build/app/kni -c 0xf0 -n 4 -- -p 0x3 -P=0A= > --config=3D"(0,4,6),(1,5,7)"*=0A= >=0A= >=0A= > APP: Initialising port 0 ...=0A= >=0A= > KNI: pci: 10:00:01 8086:10fb=0A= >=0A= > APP: Initialising port 1 ...=0A= >=0A= > PMD: To improve 1G driver performance, consider setting the TX WTHRESH=0A= > value to 4, 8, or 16.=0A= >=0A= > KNI: pci: 16:00:01 8086:10e7=0A= >=0A= > Checking link status=0A= >=0A= > .................................done=0A= >=0A= > Port 0 Link Up - speed 10000 Mbps - full-duplex=0A= >=0A= > Port 1 Link Up - speed 1000 Mbps - full-duplex=0A= >=0A= > APP: Lcore 5 is reading from port 1=0A= >=0A= > APP: Lcore 7 is writing to port 1=0A= >=0A= > APP: Lcore 6 is writing to port 0=0A= >=0A= > APP: Lcore 4 is reading from port 0=0A= >=0A= >=0A= > 2. As mentioned in Programming guide, *sock_en* variable in sysfs is=0A= > enabled and a fd is generated=0A= >=0A= > [root@localhost dpdk-1.7.1]# cat /sys/class/net/vEth0/sock_en=0A= > 1=0A= > [root@localhost dpdk-1.7.1]# cat /sys/class/net/vEth1/sock_en=0A= > 1=0A= > [root@localhost dpdk-1.7.1]# cat /sys/class/net/vEth0/sock_fd=0A= > 11=0A= > [root@localhost dpdk-1.7.1]# cat /sys/class/net/vEth1/sock_fd=0A= > 12=0A= >=0A= > 3. But when a VM is launched with this file-descriptor as the=0A= > vhost-backend, the qemu-kvm is throwing an ioctl-failure error. This=0A= > ioctl=0A= > is making the vhost-backend fallback to virtio-userspace.=0A= >=0A= >=0A= >=0A= > [root@localhost qemu-kvm-1.2.0]# /usr/bin/qemu-kvm -m 2048 -enable-kvm=0A= > -cpu=0A= > host -smp 2 -name VSK1 -drive file=3D/root/SAI/NSVPX-KVM-11.0-28.1_nc.raw= =0A= > -netdev tap,fd=3D12,id=3Dmynet_kni,vhost=3Don -device=0A= > virtio-net-pci,netdev=3Dmynet_kni,bus=3Dpci.0,addr=3D0x4,ioeventfd=3Don= =0A= >=0A= > qemu-kvm: -netdev tap,fd=3D12,id=3Dmynet_kni,vhost=3Don: TUNGETIFF ioctl(= )=0A= > failed: Bad file descriptor=0A= >=0A= > TUNSETOFFLOAD ioctl() failed: Bad file descriptor=0A= >=0A= > qemu-kvm: unable to start vhost net: 88: falling back on userspace virtio= =0A= >=0A= > qemu-kvm: unable to start vhost net: 88: falling back on userspace virtio= =0A= >=0A= > qemu-kvm: unable to start vhost net: 88: falling back on userspace virtio= =0A= >=0A= > With this failure, the traffic from VM is not flowing through KNI=0A= > interface.=0A= >=0A= >=0A= >=0A= > The above mentioned ioctl failure does NOT happen consistently. During=0A= > the=0A= > instances when failure is not seen, traffic flows successfully through=0A= > the=0A= > KNI interfaces.=0A= >=0A= >=0A= >=0A= > Can someone please shed some light as to what is happening in this case.= =0A= > Are we missing something here? Is there a known issue?=0A= >=0A= >=0A= Hi Kiran:=0A= Is it possible you switch to user space vhost?=0A= >=0A= > Thanks,=0A= >=0A= > Kiran=0A= >=0A= >=0A= >=0A= =0A=