From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2B961A053D for ; Fri, 17 Jul 2020 18:33:05 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 241281BEB4; Fri, 17 Jul 2020 18:33:05 +0200 (CEST) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by dpdk.org (Postfix) with ESMTP id B4B251BED6 for ; Fri, 17 Jul 2020 18:33:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595003583; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tBSJPxS8jJfdNQtkcDebx2nYSbGwpaEWwFr/9dfr1Nw=; b=hWe2BKhCwOxpQx58prWcI557OeJP+9P70cK1u4wlCplttZ0kwTp03kf/V0k5rfDbXPTNdr h6bfbxLyongNZLPIioILcPRAahP7PCULKEK+UzP/KxKSmM4+C58jgDp1p4nKBQOfI+iSPx r/sil2IsrH0iczkBtHynZjRhLq5q6s4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-357-rc48BlKaNSG13xS9ms4pbA-1; Fri, 17 Jul 2020 12:32:52 -0400 X-MC-Unique: rc48BlKaNSG13xS9ms4pbA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5DBF4100526A; Fri, 17 Jul 2020 16:32:51 +0000 (UTC) Received: from rh.redhat.com (unknown [10.33.36.168]) by smtp.corp.redhat.com (Postfix) with ESMTP id 519A072E48; Fri, 17 Jul 2020 16:32:47 +0000 (UTC) From: Kevin Traynor To: Matan Azrad Cc: Chenbo Xia , Maxime Coquelin , dpdk stable Date: Fri, 17 Jul 2020 17:32:05 +0100 Message-Id: <20200717163214.4839-17-ktraynor@redhat.com> In-Reply-To: <20200717163214.4839-1-ktraynor@redhat.com> References: <20200717163214.4839-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'vhost: fix features definition location' has been queued to LTS release 18.11.10 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to LTS release 18.11.10 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/23/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/31ec292e0ec18f90380a5360adac7cc597d210e8 Thanks. Kevin. --- >From 31ec292e0ec18f90380a5360adac7cc597d210e8 Mon Sep 17 00:00:00 2001 From: Matan Azrad Date: Thu, 18 Jun 2020 19:08:20 +0000 Subject: [PATCH] vhost: fix features definition location [ upstream commit da2b788041d2becb6ffa44b16456bd2041119269 ] The vhost library provide an infrastructure in order to help the DPDK users to manage vhost devices. One of the infrastructure parts is the features enablement APIs. Some features bits may be defined only in the internal file vhost.h in case the kernel version doesn't include them. Hence, user running on old kernel may not be able to manage thus features. Move all the feature bits definitions to the API file rte_vhost.h. Fixes: db69be54b6ff ("vhost: hide internal code") Fixes: 8d286dbeb8d7 ("vhost: fix multiple queue not enabled for old kernels") Fixes: 3d3c6590b58c ("vhost: enable virtio MTU feature") Fixes: 704098fc478c ("vhost: fix build with old kernels") Signed-off-by: Matan Azrad Reviewed-by: Chenbo Xia Reviewed-by: Maxime Coquelin --- lib/librte_vhost/rte_vhost.h | 17 +++++++++++++++++ lib/librte_vhost/vhost.h | 17 ----------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/lib/librte_vhost/rte_vhost.h b/lib/librte_vhost/rte_vhost.h index 6f1b4eabeb..0b5db0d8ad 100644 --- a/lib/librte_vhost/rte_vhost.h +++ b/lib/librte_vhost/rte_vhost.h @@ -32,4 +32,21 @@ extern "C" { #define RTE_VHOST_USER_POSTCOPY_SUPPORT (1ULL << 4) +/* Features. */ +#ifndef VIRTIO_NET_F_GUEST_ANNOUNCE + #define VIRTIO_NET_F_GUEST_ANNOUNCE 21 +#endif + +#ifndef VIRTIO_NET_F_MQ + #define VIRTIO_NET_F_MQ 22 +#endif + +#ifndef VIRTIO_NET_F_MTU + #define VIRTIO_NET_F_MTU 3 +#endif + +#ifndef VIRTIO_F_ANY_LAYOUT + #define VIRTIO_F_ANY_LAYOUT 27 +#endif + /** Protocol features. */ #ifndef VHOST_USER_PROTOCOL_F_MQ diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h index e75afcce20..932f4e35c4 100644 --- a/lib/librte_vhost/vhost.h +++ b/lib/librte_vhost/vhost.h @@ -157,24 +157,7 @@ struct vhost_virtqueue { } __rte_cache_aligned; -/* Old kernels have no such macros defined */ -#ifndef VIRTIO_NET_F_GUEST_ANNOUNCE - #define VIRTIO_NET_F_GUEST_ANNOUNCE 21 -#endif - -#ifndef VIRTIO_NET_F_MQ - #define VIRTIO_NET_F_MQ 22 -#endif - #define VHOST_MAX_VRING 0x100 #define VHOST_MAX_QUEUE_PAIRS 0x80 -#ifndef VIRTIO_NET_F_MTU - #define VIRTIO_NET_F_MTU 3 -#endif - -#ifndef VIRTIO_F_ANY_LAYOUT - #define VIRTIO_F_ANY_LAYOUT 27 -#endif - /* Declare IOMMU related bits for older kernels */ #ifndef VIRTIO_F_IOMMU_PLATFORM -- 2.21.3 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-07-17 17:17:00.950977073 +0100 +++ 0017-vhost-fix-features-definition-location.patch 2020-07-17 17:16:59.992771167 +0100 @@ -1 +1 @@ -From da2b788041d2becb6ffa44b16456bd2041119269 Mon Sep 17 00:00:00 2001 +From 31ec292e0ec18f90380a5360adac7cc597d210e8 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit da2b788041d2becb6ffa44b16456bd2041119269 ] + @@ -23 +24,0 @@ -Cc: stable@dpdk.org @@ -34 +35 @@ -index 2fbc364643..8a5c332c83 100644 +index 6f1b4eabeb..0b5db0d8ad 100644 @@ -37,2 +38,2 @@ -@@ -37,4 +37,21 @@ extern "C" { - #define RTE_VHOST_USER_LINEARBUF_SUPPORT (1ULL << 6) +@@ -32,4 +32,21 @@ extern "C" { + #define RTE_VHOST_USER_POSTCOPY_SUPPORT (1ULL << 4) @@ -60 +61 @@ -index a0fe703eec..0344636997 100644 +index e75afcce20..932f4e35c4 100644 @@ -63 +64 @@ -@@ -205,24 +205,7 @@ struct vhost_virtqueue { +@@ -157,24 +157,7 @@ struct vhost_virtqueue {