From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qg0-f54.google.com (mail-qg0-f54.google.com [209.85.192.54]) by dpdk.org (Postfix) with ESMTP id 094AF5A03 for ; Thu, 1 Jan 2015 10:02:10 +0100 (CET) Received: by mail-qg0-f54.google.com with SMTP id l89so12363064qgf.27 for ; Thu, 01 Jan 2015 01:02:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=5qZrhFsCkTUxggul80RMoa/RdhveaVMSXzLlFPASbz0=; b=yhWHO5ccDP1LK8BFEj2mTQRMNcVO95hu5ZZJNfdiMMlGyWgGhR1gWgLwGBTSaSjyCS X9K2s/0s8rDsx/zQJqoqoEyRS4x3pNdXwjidqMrq9CA/RarFY1DxLM5g/H4afur51HWN Aj6TFT8YFJnvQeHJpPu9mEFQH9HMeKFNOqPYNaDHg9fgVXktQfY92fkit/xoZRD7utBP TXWFniUNJFNHQXy+wecgM6ygEdAa8R4JOGly5jrRxjULKvoMpOzU4+7cc2f9UlnzF2fR Z5uIY4k+ti8yOIzl0SCPLfLkTe5k4ogJyUi8Va0h+ZbcEQQG+5H9+G+sE5b+xJ3oQvNl 2YhQ== MIME-Version: 1.0 X-Received: by 10.229.99.134 with SMTP id u6mr115591471qcn.10.1420102929458; Thu, 01 Jan 2015 01:02:09 -0800 (PST) Received: by 10.96.135.103 with HTTP; Thu, 1 Jan 2015 01:02:09 -0800 (PST) Date: Thu, 1 Jan 2015 14:32:09 +0530 Message-ID: From: sai kiran To: dev@dpdk.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [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: Thu, 01 Jan 2015 09:02:10 -0000 Hi, We are trying to experiment with DPDK=E2=80=99s KNI application, with KNI w= orking as Kernel vHost backend. 1. After starting the KNI application, KNI application has detected link up. *[root@localhost kni]# ./build/app/kni -c 0xf0 -n 4 -- -p 0x3 -P --config=3D"(0,4,6),(1,5,7)"* APP: Initialising port 0 ... KNI: pci: 10:00:01 8086:10fb APP: Initialising port 1 ... PMD: To improve 1G driver performance, consider setting the TX WTHRESH value to 4, 8, or 16. KNI: pci: 16:00:01 8086:10e7 Checking link status .................................done Port 0 Link Up - speed 10000 Mbps - full-duplex Port 1 Link Up - speed 1000 Mbps - full-duplex APP: Lcore 5 is reading from port 1 APP: Lcore 7 is writing to port 1 APP: Lcore 6 is writing to port 0 APP: Lcore 4 is reading from port 0 2. As mentioned in Programming guide, *sock_en* variable in sysfs is enabled and a fd is generated [root@localhost dpdk-1.7.1]# cat /sys/class/net/vEth0/sock_en 1 [root@localhost dpdk-1.7.1]# cat /sys/class/net/vEth1/sock_en 1 [root@localhost dpdk-1.7.1]# cat /sys/class/net/vEth0/sock_fd 11 [root@localhost dpdk-1.7.1]# cat /sys/class/net/vEth1/sock_fd 12 3. But when a VM is launched with this file-descriptor as the vhost-backend, the qemu-kvm is throwing an ioctl-failure error. This ioctl is making the vhost-backend fallback to virtio-userspace. [root@localhost qemu-kvm-1.2.0]# /usr/bin/qemu-kvm -m 2048 -enable-kvm -cpu host -smp 2 -name VSK1 -drive file=3D/root/SAI/NSVPX-KVM-11.0-28.1_nc.raw -netdev tap,fd=3D12,id=3Dmynet_kni,vhost=3Don -device virtio-net-pci,netdev=3Dmynet_kni,bus=3Dpci.0,addr=3D0x4,ioeventfd=3Don qemu-kvm: -netdev tap,fd=3D12,id=3Dmynet_kni,vhost=3Don: TUNGETIFF ioctl() failed: Bad file descriptor TUNSETOFFLOAD ioctl() failed: Bad file descriptor qemu-kvm: unable to start vhost net: 88: falling back on userspace virtio qemu-kvm: unable to start vhost net: 88: falling back on userspace virtio qemu-kvm: unable to start vhost net: 88: falling back on userspace virtio With this failure, the traffic from VM is not flowing through KNI interface= . The above mentioned ioctl failure does NOT happen consistently. During the instances when failure is not seen, traffic flows successfully through the KNI interfaces. Can someone please shed some light as to what is happening in this case. Are we missing something here? Is there a known issue? Thanks, Kiran --=20 *Saikiran V*