[dpdk-dev] vhost: support Explicit Congestion Notification

Message ID 1511320782-72744-1-git-send-email-jiayu.hu@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Yuanhan Liu
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Hu, Jiayu Nov. 22, 2017, 3:19 a.m. UTC
  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>
---
 lib/librte_vhost/vhost.h | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Yuanhan Liu Jan. 11, 2018, 2:27 p.m. UTC | #1
On Wed, Nov 22, 2017 at 11:19:42AM +0800, Jiayu Hu wrote:
> 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>

Applied to dpdk-next-virtio.

Thanks.

	--yliu
  

Patch

diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h
index 1cc81c1..5d0ed88 100644
--- a/lib/librte_vhost/vhost.h
+++ b/lib/librte_vhost/vhost.h
@@ -206,10 +206,12 @@  struct vhost_msg {
 				(1ULL << VHOST_USER_F_PROTOCOL_FEATURES) | \
 				(1ULL << VIRTIO_NET_F_HOST_TSO4) | \
 				(1ULL << VIRTIO_NET_F_HOST_TSO6) | \
+				(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_ECN) | \
 				(1ULL << VIRTIO_RING_F_INDIRECT_DESC) | \
 				(1ULL << VIRTIO_NET_F_MTU) | \
 				(1ULL << VIRTIO_F_IOMMU_PLATFORM))