qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] tap: set IFF_ONE_QUEUE per default


From: Peter Lieven
Subject: Re: [Qemu-devel] [PATCH] tap: set IFF_ONE_QUEUE per default
Date: Fri, 15 Feb 2013 10:25:11 +0100

Am 15.02.2013 um 10:22 schrieb Christian Borntraeger <address@hidden>:

> On 15/02/13 09:27, Peter Lieven wrote:
>> historically the kernel queues packets two times. once
>> at the device and second in qdisc. this is believed to cause
>> interface stalls if one of these queues overruns.
>> 
>> setting IFF_ONE_QUEUE is the default in kernels >= 3.8. the
>> flag is ignored since then. see kernel commit
>> 5d097109257c03a71845729f8db6b5770c4bbedc
>> 
>> Signed-off-by: Peter Lieven <address@hidden>
>> ---
>> net/tap-linux.c |    2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/net/tap-linux.c b/net/tap-linux.c
>> index a953189..2759b78 100644
>> --- a/net/tap-linux.c
>> +++ b/net/tap-linux.c
>> @@ -49,7 +49,7 @@ int tap_open(char *ifname, int ifname_size, int *vnet_hdr,
>>         return -1;
>>     }
>>     memset(&ifr, 0, sizeof(ifr));
>> -    ifr.ifr_flags = IFF_TAP | IFF_NO_PI;
>> +    ifr.ifr_flags = IFF_TAP | IFF_NO_PI | IFF_ONE_QUEUE;
>> 
>>     if (*vnet_hdr) {
>>         unsigned int features;
> 
> Wouldn't that break macvtap?
> 
> there is
> 
>        case TUNSETIFF:
>                /* ignore the name, just look at flags */
>                if (get_user(u, &ifr->ifr_flags))
>                        return -EFAULT;
> 
>                ret = 0;
>                if ((u & ~IFF_VNET_HDR) != (IFF_NO_PI | IFF_TAP))
>                        ret = -EINVAL;
> 
> 
> in drivers/net/macvtap.c
> 
> 

wasn`t aware I will modify this to only be set on linux

Peter




reply via email to

[Prev in Thread] Current Thread [Next in Thread]