tcp_output.cc: added tracepoints allowing to debug the Tx flow

   - Follow after socket buffer life.
   - Follow after the cwin, offset of unacknowledged data, current TCP sequence.
   - Follow after the sending/not-sending reason.

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

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
TSO: descrease the maximum aggregation size

Take headers into an account.

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
virtio::kick(): fix missed notification #2

This is a follow up patch for a 053bcf8e18539d commit.
It handles the same issue when EVENT_IDX_CAP is not supported
by HV (e.g. GCE currently doesn't support this feature).

When EVENT_IDX_CAP is not negotiated there is a possible race:
     1) Guest reads the _used->flags before updating the _avail->idx and
        before HV cleared the VRING_USED_F_NO_NOTIFY.
     2) HV clears the VRING_USED_F_NO_NOTIFY flag and goes to sleep since
        _avail->idx hasn't been updated yet.
     3) Guest updates the _avail->idx but doesn't wakes the HV since it has
        read the old _used->_flags value in (1).

As a result the pending work will not be handled.

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
virtio::net::xmit_one_locked(): call the kick_pending() only once before staring to poll

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
virtio::net::try_xmit_one_locked(): call vring::add_buf() instead of vring::avail_ring_has_room()

Try to actually send the frame instead of checking if it's going to succeed.
This achieves a few goals:
  1) It optimizes the succeesfull sending flow in terms of branching, because the
     current code would check virtually the same twice in this case:
        - First, it calls vring::avail_ring_has_room() from try_xmit_one_locked().
        - Second, it'll check for the available buffers in vring::add_buf().
  2) vring::add_buf() kick()s the HV if there are no available buffers, which
     is going to improve the latency of buffers freeing. The current code won't
     kick the HV right until it's going to poll in xmit_one_locked() in the worker
     thread, which is a long time after it.

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