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 <v.maffi...@gmail.com>
> ---
>

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