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>
cli: Remove alt_getopt and use stdlib's OptParse

Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
cli: Override default --help handler

By default, std.OptParse handles --help which displays the help text followed
by os.exit(). This causes the entire shell to close.

If the command has a "parser", we register our own handler for --help and then
parse the arguments before executing it. In that case, since we already parse
the arguments, we also override the parse function with our own that returns
the already parsed result.

Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
apps: bump up to latest version

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Add Node to Capstan release images

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
vfs: Move __open_2() function to vfs/main.cc

Move __open_2() function to where rest of its family lives in.

Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>