port.lua: Remove verbose printouts in echo() test.
virtio.lua: Fixes and optimizations.

Fixed ring array indexing out-of-bounds error.

Set flags so the kernel doesn't send us interrupts that we don't need.

Synchronization now checks that we really have new state to push
before executing memory barriers etc.
virtio_vring.h: Fixed error in vring_used structure definition.
virtio_vhost.h: Matched memory alignment more closely to the spec.

Added a (commented out) padding structure that is possibly useful for
chasing a heap corruption bug.
virtio.lua: Removed an unneeded update_vhost_memory_map() call.
buffer.lua: Added missing require() for memory module.
port.lua: Updated spam() function to work again.
virtio.lua: Optimize kick() to use VRING_F_NO_NOTIFY.

That is: don't kick the kernel's eventfd if it advertises that this
isn't needed. This should mean that we only kick the eventfd when the
kernel doesn't know there is any data available for processing i.e.
coalesce kicks during bursts of transfers.
virtio.lua: Test with spam() instead of echo().

That way something interesting happens without requiring you to
manually run processes on the Linux side e.g. ifconfig/arp/ping/etc.
virtio_vring.h: Added VRING_F_NO_NOTIFY constant.
vhost: Map a unified memory region with VHOST_SET_MEM_TABLE ioctl.

Previously we registered each chunk of DMA memory as its own region in
this ioctl. However, this hit a Linux/vhost limitation of 64 max
regions. So now we coalesce them all together and nevermind if that
ends up including some other memory too.
port.lua, pci.lua: Print Intel10G-specific statistics.
Merge pull request #72 from SnabbCo/virtio_edit

Rewrite virtio/vhost for clarity.
memory.use_hugetlb = true|false

Configuration option to disable the use of real HugeTLB. This is
useful if you are running in an environment that has trouble getting
HugeTLB's (e.g. Xen guest) and you don't really need physically
contiguous memory (e.g. to control a real NIC).

For example, to test virtio without using HugeTLBs you could run:

  snabbswitch -e 'require("memory").use_hugetlb = false' -t virtio
virtio.lua: selftest now runs for 10s instead of 60s by default.

Can be annoying when default selftests run for too long.
packet.h: New file describing packet data structure.

Just a sketch for now.
Created freelist.lua: general purpose freelist data structure.
packet.h: Extended and updated.

Added "fuel" field to packets. This is like the IPv4 TTL and will be
used to drop packets that are looping within Snabb Switch, i.e.
prevent switching loops within a snabbswitch from becoming
catastrophic.

Renamed packet_header to packet_info and packet.buffers to packet.iovecs.
Wrote packet.lua and rewrote buffer.lua. Not tested yet.

Packets and buffers are both allocated from freelists. Packets are
reference counted and buffers are not. Freeing a packet automatically
frees all of its buffers, so the only way to ref() a buffer is to
ref() the packet that owns it.
Added 'length' field to struct packet.
Contains the total length of all iovecs. For easy reference.