vhost: support Explicit Congestion Notification
authorJiayu Hu <jiayu.hu@intel.com>
Wed, 22 Nov 2017 03:19:42 +0000 (11:19 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 16 Jan 2018 17:47:49 +0000 (18:47 +0100)
In virtio, Explicit Congestion Notification (ECN) includes two parts:
guest ECN and host ECN. Guest ECN means the frontend can handle TSO
packets which have ECN set, and host ECN means the backend can handle
TSO packets which have ECN set.

The ECN features are rarely used. However, virtio-net enables them by
default, and vhost-net support both. To make live migration from
vhost-net to vhost-user possible, this patch announces to support
guest and host ECN in vhost-user.

Signed-off-by: Jiayu Hu <jiayu.hu@intel.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
lib/librte_vhost/vhost.h

index f9cc7e6..b2bf0e8 100644 (file)
@@ -181,11 +181,13 @@ struct vhost_msg {
                                (1ULL << VIRTIO_NET_F_HOST_TSO4) | \
                                (1ULL << VIRTIO_NET_F_HOST_TSO6) | \
                                (1ULL << VIRTIO_NET_F_HOST_UFO) | \
+                               (1ULL << VIRTIO_NET_F_HOST_ECN) | \
                                (1ULL << VIRTIO_NET_F_CSUM)    | \
                                (1ULL << VIRTIO_NET_F_GUEST_CSUM) | \
                                (1ULL << VIRTIO_NET_F_GUEST_TSO4) | \
                                (1ULL << VIRTIO_NET_F_GUEST_TSO6) | \
                                (1ULL << VIRTIO_NET_F_GUEST_UFO) | \
+                               (1ULL << VIRTIO_NET_F_GUEST_ECN) | \
                                (1ULL << VIRTIO_RING_F_INDIRECT_DESC) | \
                                (1ULL << VIRTIO_RING_F_EVENT_IDX) | \
                                (1ULL << VIRTIO_NET_F_MTU) | \