net: added a few new statistics counters to if_data

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
vmxnet3: added Tx debug statistics to enable DEBUG_VIRTIO_TX compilation

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
virtio::net: Added DEBUG_VIRTIO_RX stats.

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
net: make all statistics to be collected all the time

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
httpserver::network.json API: Added new statistics counters to ifconfig interface

- ifi_ibh_wakeups;    /* number times Rx BH has been woken up */
- ifi_oworker_kicks;  /* number of kicks from Tx worker */
- ifi_oworker_wakeups;/* number times Tx worker has been woken up */
- ifi_oworker_packets;/* number of Tx packets handled by a Tx worker */
- ifi_okicks;         /* total number of Tx kicks */

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

Number of times the packet could not be sent due to a lack of
free space on a HW ring.

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

This counter will contain the number of timers the packet was unable to
be sent due to no free space on a HW ring.
This counter is incremented at most once per-packet.

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
httpserver::network.json API: Added a ifi_oqueue_is_full statistics counter to /network/ifconfig/{if} output

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
httpserver: Copy-edit operating system API documentation

Inject some sanity in the API documentation. The only functional change
is renaming "/os/manufacturer" to "/os/vendor" and adding a "/os/name"
for API completeness.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
vfs: Fix race in fdrop

There is a race window between f_count reaches 0 and we set f_count to
INT_MIN. This race would result in multiple call to fp->close() and
rcu_dispose(fp) if we call them in fdrop().

To fix, we set f_count to INT_MIN using CAS, this way, we make sure
fp->close() and rcu_dispose(fp) won't be called twice.

Fixes #293.

Signed-off-by: Asias He <asias@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>