From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: Tap initialization Date: Sun, 12 Jul 2009 12:03:25 +0300 Message-ID: <4A59A6DD.6080203@redhat.com> References: <4A542743.8010502@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Stephane Bakhos Return-path: Received: from mx2.redhat.com ([66.187.237.31]:51915 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751602AbZGLJAs (ORCPT ); Sun, 12 Jul 2009 05:00:48 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 07/08/2009 08:17 AM, Stephane Bakhos wrote: >>> I've been having some problem with recent releases when it comes to >>> tap >>> initialization. It seems that the script is ran after the tap is >>> opened. I >>> think this is a bit weird and useless as I want the script to setup >>> the >>> tap by itself. >>> >>> In net.c, the initialization (I assume) happen in >>> static int net_tap_init >>> >>> setup_script is called after tap_open with the fd from tap_open as a >>> parameter. >>> >>> However in setup_script, the fd is basically not used. >>> >>> Would there be any reason not to remove the fd parameter to >>> setup_script, >>> and then call setup_script before tap_open ? >>> >>> I've tried it with kvm-86 and it seems to work >> >> You can get the same effect by setting up tap before launching qemu, >> and using qemu -net tap,ifname=...,script=no. > > I thought that the point of the scripts was to have qemu create/delete > taps as needed. No, the scripts just configure the taps. > > Most examples on the internet are based on that. > > Another improvement would be to run the down script after qemu stops > using the taps so that they can be deleted. > > How do I create a patch and submit it? See http://www.linux-kvm.org/page/Code and the numerous git tutorials. -- error compiling committee.c: too many arguments to function