net: moved struct if_data into a separate file

This allows to clean that ugly code duplication in network_interface.hh.

Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
net: Added wakeup statistics counters to if_data struct

Count the number of wakeups when more than X packets were handled.

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
virtio::net: added wakeup statistics

 - Added collecting of wakeup statistics to virtio::net driver.
 - Modified vmxnet3 in order to prevent compilation breakage.

These new statistics count the number of wakeups that handled more than X packets.

Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
netfront: Added the missing statistics counters

 - intr_cnt - number of times xn_intr() has been called
 - rx_wakeup_stats - counters of numbers of times there has been
   handled X packets in a single xn_intr() call.

Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
netfront: added ifnet->if_getinfo callback

This callback packs the internally collected statistics into
the standard structure known to ifconfig interface.

Without this callback the ifconfig interface can't properly function
since netfront do collects the statistics counters into the internal
structure net_device_stats.

By default this callback is initialized to the function that copies the
ifnet internal statistics structure into the output buffer. Since netfront
doesn't update this structure the outcome will most probably be far from
correct.

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
vmxnet3: Collect wakeup statistics

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
vmxnet3: Added an rx_bh_wakeups statistics counter

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
httpserver: added wakeup statistics to ifconfig interface

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>