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 7D05CA0093 for ; Fri, 22 May 2020 11:42:39 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6F83D1D97B; Fri, 22 May 2020 11:42:39 +0200 (CEST) Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by dpdk.org (Postfix) with ESMTP id 1B7191D974 for ; Fri, 22 May 2020 11:42:38 +0200 (CEST) Received: by mail-wr1-f66.google.com with SMTP id y17so1121702wrn.11 for ; Fri, 22 May 2020 02:42:38 -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=uI+CgwwBoEmyy/Dow8HzVI0cn3JqOUxwCoVtoNFqpiY=; b=IU26V2ZyOYsQO1TB786JYBTZPsQRXYLKFdYMWPfrWe1n75rSaZNB6OffWsFYGQSXS3 Je/iUzgeu9hk3TNlXnfUPSlToFMt6/77h34w7viVL1i2cWrOiLbn5Hbf+OxfOumQ5iYD 9QFHGTc2MLV9Ng48BdC46ZiHdQ/0eEC7D0njfd2iEzk+sJUNCJmbjwB2hcbhR+eicYIF lHaeG8wuFR/Znbhvc26MteyYBaTXco3gwxkWtiq/iS8z8q9b5iQI4RdqWJevdCDQkPnd R6JgCjfsKmm7DaEGx98m809Ek/JlFAfpchCp6jV0gJkbicTsj5U5mUlTw1Z5ChcF/KXB W1iQ== 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=uI+CgwwBoEmyy/Dow8HzVI0cn3JqOUxwCoVtoNFqpiY=; b=o1uCT+1NshdIaXfbwA4zbirqn3+QiVNBbFugq+3xby0D6T9z88Ph8DMmzqPQ8i17IR esRBfzqs47XzNVF0aBrfJs3orbY4E9XCXt8t1An91vVrNxdMExC+24QkiiMCYyw8fuQA RiR4dHTlPjIB13hXETZMKhbEzc+FWcx7JvAB9pKlOHiyqxklrKG9+/s3sfqRFk6G7MyX JwPNLEp23T3H1zKeY/mq/ZUIrKUH6qx/ogjfdihSvcr4gFD+husvPeQO70wRC3rIhZFR w5MLYTh5WG0bmRsD1MrjX3Howz7u3SsbvhUWkU+haQltlshtzJ8LaIff72QsraSV+7SK voHg== X-Gm-Message-State: AOAM5308ra6vFwWZZomE3gkluBy9G6/0NmRsKmWa9X5qziXiK9PmdQEl VcCirMqTmsSuu2yhgQe8Lck= X-Google-Smtp-Source: ABdhPJzMwwQhew4ix+HVGzTjDPyHQk0ND5JitVt1B69t0QiGyMankupLu2uvtMQeHJOEhg/lGXCIgg== X-Received: by 2002:adf:f205:: with SMTP id p5mr2904362wro.302.1590140557799; Fri, 22 May 2020 02:42:37 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id 62sm8049698wrm.1.2020.05.22.02.42.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 May 2020 02:42:37 -0700 (PDT) From: luca.boccassi@gmail.com To: Xuan Ding Cc: Xiaolong Ye , Yinan Wang , dpdk stable Date: Fri, 22 May 2020 10:40:22 +0100 Message-Id: <20200522094022.1025696-43-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200522094022.1025696-1-luca.boccassi@gmail.com> References: <20200519130549.112823-214-luca.boccassi@gmail.com> <20200522094022.1025696-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'vhost: fix zero-copy server mode' has been queued to stable release 19.11.3 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.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/24/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 1c2eaf9a985203f5c3b35a7f4d72f2e60db5e85d Mon Sep 17 00:00:00 2001 From: Xuan Ding Date: Tue, 19 May 2020 10:15:46 +0000 Subject: [PATCH] vhost: fix zero-copy server mode [ upstream commit 22fa1bcbcbc7489304a711c39aea9a1593a873a5 ] This patch fixes the situation where vhost-user cannot start as server with dequeue_zero_copy enabled. Using flag instead of vsocket->is_server to determine whether vhost-user is in client mode. Because vsocket->is_server is not ready at this time. Fixes: 715070ea10e6 ("vhost: prevent zero-copy with incompatible client mode") Signed-off-by: Xuan Ding Acked-by: Xiaolong Ye Tested-by: Yinan Wang --- lib/librte_vhost/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c index 8a87c38c4e..2461549fea 100644 --- a/lib/librte_vhost/socket.c +++ b/lib/librte_vhost/socket.c @@ -926,7 +926,7 @@ rte_vhost_driver_register(const char *path, uint64_t flags) ret = -1; goto out_mutex; } - if (!vsocket->is_server) { + if ((flags & RTE_VHOST_USER_CLIENT) != 0) { RTE_LOG(ERR, VHOST_CONFIG, "error: zero copy is incompatible with vhost client mode\n"); ret = -1; -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-05-22 10:37:40.905462964 +0100 +++ 0043-vhost-fix-zero-copy-server-mode.patch 2020-05-22 10:37:39.276415366 +0100 @@ -1,8 +1,10 @@ -From 22fa1bcbcbc7489304a711c39aea9a1593a873a5 Mon Sep 17 00:00:00 2001 +From 1c2eaf9a985203f5c3b35a7f4d72f2e60db5e85d Mon Sep 17 00:00:00 2001 From: Xuan Ding Date: Tue, 19 May 2020 10:15:46 +0000 Subject: [PATCH] vhost: fix zero-copy server mode +[ upstream commit 22fa1bcbcbc7489304a711c39aea9a1593a873a5 ] + This patch fixes the situation where vhost-user cannot start as server with dequeue_zero_copy enabled. @@ -10,7 +12,6 @@ is in client mode. Because vsocket->is_server is not ready at this time. Fixes: 715070ea10e6 ("vhost: prevent zero-copy with incompatible client mode") -Cc: stable@dpdk.org Signed-off-by: Xuan Ding Acked-by: Xiaolong Ye @@ -20,7 +21,7 @@ 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c -index bb8d0d7801..0a66ef9767 100644 +index 8a87c38c4e..2461549fea 100644 --- a/lib/librte_vhost/socket.c +++ b/lib/librte_vhost/socket.c @@ -926,7 +926,7 @@ rte_vhost_driver_register(const char *path, uint64_t flags) @@ -29,7 +30,7 @@ } - if (!vsocket->is_server) { + if ((flags & RTE_VHOST_USER_CLIENT) != 0) { - VHOST_LOG_CONFIG(ERR, + RTE_LOG(ERR, VHOST_CONFIG, "error: zero copy is incompatible with vhost client mode\n"); ret = -1; --