qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] net: QEMU_NET_PACKET_FLAG_MORE introduced


From: Stefan Weil
Subject: Re: [Qemu-devel] [PATCH] net: QEMU_NET_PACKET_FLAG_MORE introduced
Date: Fri, 06 Dec 2013 17:39:59 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.1.1

Am 06.12.2013 15:44, schrieb Vincenzo Maffione:
> This patch extends the frontend-backend interface so that it is possible
> to pass a new flag (QEMU_NET_PACKET_FLAG_MORE) when sending a packet to the
> other peer. The new flag acts as a hint for the receiving peer, which can
> accumulate a batch of packets before forwarding those packets (to the host
> if the receiving peer is the backend or to the guest if the receiving peer
> is the frontend).
>
> The patch also implements a batching mechanism for the netmap backend (on the
> backend receive side) and for the e1000 and virtio frontends (on the frontend
> transmit side).
>
> Measured improvement of a guest-to-guest UDP_STREAM netperf test (64 bytes
> packets) with virtio-net frontends:
>     820 Kpps ==> 1000 Kpps (+22%).
>
> Measured improvement of a guest-to-guest UDP test (64 bytes packets) with
> e1000 frontends and netmap clients on the guests:
>     1.8 Mpps ==> 3.1 Mpps (+72%).
>
> Signed-off-by: Vincenzo Maffione <address@hidden>
> ---
>

If this patch is wanted, I suggest replacing flag value 0 by
QEMU_NET_PACKET_FLAG_NONE in all function calls.

Instead of type 'unsigned' for flag values, I'd prefer an enum type (for
QEMU_NET_PACKET_FLAG_NONE, QEMU_NET_PACKET_FLAG_RAW, and
QEMU_NET_PACKET_FLAG_MORE). This enum can then be used in the function
prototypes.

I wonder why the define statement for QEMU_NET_PACKET_FLAG_MORE uses
2<<0 instead of 1<<1 or simply 2.

Regards,
Stefan Weil




reply via email to

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