* Tap initialization
@ 2009-07-07 18:48 Stephane Bakhos
2009-07-08 4:57 ` Avi Kivity
0 siblings, 1 reply; 4+ messages in thread
From: Stephane Bakhos @ 2009-07-07 18:48 UTC (permalink / raw)
To: kvm
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Tap initialization
2009-07-07 18:48 Tap initialization Stephane Bakhos
@ 2009-07-08 4:57 ` Avi Kivity
2009-07-08 5:17 ` Stephane Bakhos
0 siblings, 1 reply; 4+ messages in thread
From: Avi Kivity @ 2009-07-08 4:57 UTC (permalink / raw)
To: Stephane Bakhos; +Cc: kvm
On 07/07/2009 09:48 PM, 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 have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Tap initialization
2009-07-08 4:57 ` Avi Kivity
@ 2009-07-08 5:17 ` Stephane Bakhos
2009-07-12 9:03 ` Avi Kivity
0 siblings, 1 reply; 4+ messages in thread
From: Stephane Bakhos @ 2009-07-08 5:17 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm
>> 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.
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?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Tap initialization
2009-07-08 5:17 ` Stephane Bakhos
@ 2009-07-12 9:03 ` Avi Kivity
0 siblings, 0 replies; 4+ messages in thread
From: Avi Kivity @ 2009-07-12 9:03 UTC (permalink / raw)
To: Stephane Bakhos; +Cc: kvm
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-07-12 9:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-07 18:48 Tap initialization Stephane Bakhos
2009-07-08 4:57 ` Avi Kivity
2009-07-08 5:17 ` Stephane Bakhos
2009-07-12 9:03 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox