virtio: print feature names upon negotiation

Signed-off-by: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com>
net_device: Refactor vrings

Add a VirtioVirtq class, that will handle the generic virt queue opertions:

 - get_buffer (from available ring)
 - put buffer (to used ring)
 - signal used (that a buffer was put to used ring)

This lowers down the packets per second performance to 2Mpps.

Adds support for VIRTIO_F_ANY_LAYOUT.

Signed-off-by: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com>
virtio: supoprt indirect descirptors

On an unpatched QEMU, netperf with TCP_STREAM:

 - no indirect descriptors   - 2644.37 Mbps
 - with indirect descriptors - 4275.32 Mbps

Signed-off-by: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com>
virtio: add MQ

Signed-off-by: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com>
bench: add multi queue support

Signed-off-by: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com>
cache virtq:get_buffers, change its args

Reviewed-by: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com>
net_device+virtq: localize data; “flatten” all args and returns

The latter is ugly'ish, but with it luajit is able to preform
allocation sinking optimizations and at least this part is totally
gc-free. ~4Mpps

Reviewed-by: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com>
virtio net: support 'struct virtio_net_hdr_mrg_rxbuf'

The virtio-net header is sligltly bigger when MRG_RXBUF is negotiated.

Signed-off-by: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com>
virtio: mergeable rx buffers

Negotiate MRG_RXBUF and support multi-iovec packet transmission to VM.
This basically enables Jumbo Ethernet frames.

Signed-off-by: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com>
Merge pull request #286 from virtualopensystems/virtio_features

Virtio features
generates more than one ingress rule per port
do egress filters
install egress filter
remove 'TODO' comment line
better merge of max's work, reenable security group config
first draft of stateful filters
implement CLOCK_MONOTONIC_COARSE for fast time-checking
use simple old/new/swap expiration algorithm
named conntrack module
external tracking code runs, yet to see what it's tracking