From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pekka Enberg Subject: Re: [PATCH 0/2] kvm tools: fix vhost-net broken since fa7226f88012713a73d0cba4955444ea109e9458 Date: Mon, 04 Nov 2013 10:41:20 +0200 Message-ID: <52775DB0.1040309@iki.fi> References: <1383274260-26739-1-git-send-email-yingshiuan.pan@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: yspan@itri.org.tw, penberg@kernel.org, levinsasha928@gmail.com, asias.hejun@gmail.com To: Ying-Shiuan Pan , kvm@vger.kernel.org Return-path: Received: from out4-smtp.messagingengine.com ([66.111.4.28]:60475 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752797Ab3KDIlY (ORCPT ); Mon, 4 Nov 2013 03:41:24 -0500 In-Reply-To: <1383274260-26739-1-git-send-email-yingshiuan.pan@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: On 11/01/2013 04:50 AM, Ying-Shiuan Pan wrote: > These patch series fix 2 vhost-net problems. There were 2 problems after > commit fa7226f88012713a73d0cba4955444ea109e9458. > (1) vhost-net requires tap_fd for VHOST_SET_BACKEND, but opening tap device > was postponed to VIRTIO_CONFIG_S_DRIVER_OK. The wrong order of initialization > caused vhost-net used a invalid tap_fd for ioctl. > (2) virtio-net of kvm tool started to support mergeable rx buffers since > commit 8c2684de6fb1afc95321e7e0f30550acdcc08186, but kvm tool did not tell > vhost-net that he is using mergeable rx buffers. > > test script: > $ sudo ./lkvm run --kernel ../../arch/x86/boot/bzImage --no-dhcp --net mode=tap,vhost=1 > > Ying-Shiuan Pan (2): > kvm tools: virtio-net has to open tap device before vhost-net init. > kvm tools: vhost-net: setup mergeable rx buffers feature > > tools/kvm/virtio/net.c | 54 +++++++++++++++++++++++++++----------------------- > 1 file changed, 29 insertions(+), 25 deletions(-) > Asias, Sasha?