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 166A4A0518 for ; Fri, 24 Jul 2020 14:05:30 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 07A2E1C039; Fri, 24 Jul 2020 14:05:30 +0200 (CEST) Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by dpdk.org (Postfix) with ESMTP id 6C14D1C0C6 for ; Fri, 24 Jul 2020 14:05:28 +0200 (CEST) Received: by mail-wm1-f66.google.com with SMTP id k20so394823wmi.5 for ; Fri, 24 Jul 2020 05:05:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/BHiIsbZtlAfkP2XvYooeco4OAE5nn48gf8rQNj8nPg=; b=a9gsTARNADJyvEy4Y4nIrfXw5x0DFU/p4Em9M9JaHhWY+vkv5KrGWOCv5bk1XerEpe 9gORs1lqjIZZr8wKay106ejoqoHJYMmGpn983H6WJQfv08gWUwP0Oe64ZrILk9mPHgPt kX33DGXYM3j/BB/TZr1SEnWZwtJb+LEbHcQmcpuV7GEK6Wd+nn0LbVp7/590OG/oYkg+ UuBk3umEShfgo6iOcPilxTBd0ztDIPbL+ISn/OhjEz0V0sNM2A4WSeQSKutfcsBeCNCl UuB6OhelRoZTFre+TOyJDk2o2XNYxv+DHHjf5up/yimPLiHbnIY3ty0dYcoGWD0lB/1h snqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/BHiIsbZtlAfkP2XvYooeco4OAE5nn48gf8rQNj8nPg=; b=nmO6Xgo8hRYVazlsA1MLwcf6wqlp4eDuiNz/OxwE6VUrDtez3LeTbsR3omdBqst9rR 3ZSGm9ybhLJMhNJhAy9+rF6LLRrzkiy0imElaGYeAmbt/X43+W8VzQk0PplapM3TVS+n G2nq7uFphG7wmxfGMbkGjbSJxOzZBlNbwHeHOzgLCpAz7lRHVyrLgOFIfa1ARtR40B6g PdGzEm+ucIJ4Diapmgo/xnpUqK9TJJFPvMErvfEiHsabLCxEH4s7k/dIKXUxbTF0tJXJ QnBz2+l00RiPzUWLKC+kn8wVN0u7sfCFU8oqsqhmBrMDvl52+XxscD0LDMLv27lqqdiB hOiA== X-Gm-Message-State: AOAM530YTqEAeop+tlJ5VScWyU7TGHBi7NxWJrHGEKYKMeQWeThyoEEf VJi53Pt5ZPgXvEOaUNMbwUI= X-Google-Smtp-Source: ABdhPJz9DLGEgDR9AXqYO/wzt5JngA/zYv4iEIjJsWhvhYw5o2tnAING/KLJd4fq3Qh9kik6YMUOIA== X-Received: by 2002:a1c:7ecb:: with SMTP id z194mr7972782wmc.12.1595592327209; Fri, 24 Jul 2020 05:05:27 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id f16sm521640wro.34.2020.07.24.05.05.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jul 2020 05:05:26 -0700 (PDT) From: luca.boccassi@gmail.com To: Matan Azrad Cc: Chenbo Xia , Maxime Coquelin , dpdk stable Date: Fri, 24 Jul 2020 12:58:28 +0100 Message-Id: <20200724120030.1863487-70-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200724120030.1863487-1-luca.boccassi@gmail.com> References: <20200724120030.1863487-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'vhost: fix features definition location' has been queued to stable release 19.11.4 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 stable release 19.11.4 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/26/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. Thanks. Luca Boccassi --- >From 4727f70f066486f5a749a73637216067f9c73dc1 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 532ee0dec..53a30a062 100644 --- a/lib/librte_vhost/rte_vhost.h +++ b/lib/librte_vhost/rte_vhost.h @@ -35,6 +35,23 @@ extern "C" { /* support only linear buffers (no chained mbufs) */ #define RTE_VHOST_USER_LINEARBUF_SUPPORT (1ULL << 6) +/* 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 #define VHOST_USER_PROTOCOL_F_MQ 0 diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h index 844904ca3..deeca18f8 100644 --- a/lib/librte_vhost/vhost.h +++ b/lib/librte_vhost/vhost.h @@ -202,26 +202,9 @@ struct vhost_virtqueue { TAILQ_HEAD(, vhost_iotlb_entry) iotlb_pending_list; } __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.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-07-24 12:53:51.283017658 +0100 +++ 0070-vhost-fix-features-definition-location.patch 2020-07-24 12:53:48.295006608 +0100 @@ -1,8 +1,10 @@ -From da2b788041d2becb6ffa44b16456bd2041119269 Mon Sep 17 00:00:00 2001 +From 4727f70f066486f5a749a73637216067f9c73dc1 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. @@ -20,7 +22,6 @@ 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") -Cc: stable@dpdk.org Signed-off-by: Matan Azrad Reviewed-by: Chenbo Xia @@ -31,10 +32,10 @@ 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/lib/librte_vhost/rte_vhost.h b/lib/librte_vhost/rte_vhost.h -index 2fbc36464..8a5c332c8 100644 +index 532ee0dec..53a30a062 100644 --- a/lib/librte_vhost/rte_vhost.h +++ b/lib/librte_vhost/rte_vhost.h -@@ -36,6 +36,23 @@ extern "C" { +@@ -35,6 +35,23 @@ extern "C" { /* support only linear buffers (no chained mbufs) */ #define RTE_VHOST_USER_LINEARBUF_SUPPORT (1ULL << 6) @@ -59,10 +60,10 @@ #ifndef VHOST_USER_PROTOCOL_F_MQ #define VHOST_USER_PROTOCOL_F_MQ 0 diff --git a/lib/librte_vhost/vhost.h b/lib/librte_vhost/vhost.h -index a0fe703ee..034463699 100644 +index 844904ca3..deeca18f8 100644 --- a/lib/librte_vhost/vhost.h +++ b/lib/librte_vhost/vhost.h -@@ -204,26 +204,9 @@ struct vhost_virtqueue { +@@ -202,26 +202,9 @@ struct vhost_virtqueue { TAILQ_HEAD(, vhost_iotlb_entry) iotlb_pending_list; } __rte_cache_aligned;