From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B986B470E5 for ; Thu, 25 Dec 2025 10:24:17 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3905B40A6F; Thu, 25 Dec 2025 10:23:57 +0100 (CET) Received: from SN4PR2101CU001.outbound.protection.outlook.com (mail-southcentralusazon11012004.outbound.protection.outlook.com [40.93.195.4]) by mails.dpdk.org (Postfix) with ESMTP id 1D78940659 for ; Thu, 25 Dec 2025 10:23:55 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=fqBNcF2HCDSPKEyoF6bkhjxxr/QCtfdmhSQA+XFZu0W/or6sqzCtELVyoCF/fQ9S5+GNEInDlcg06Nb6gjze+3rYyYs+7iyl9pAwX1aFMagYWu+b4+YQKm5zveXgnJuImPN0Co3DwcRBSQXZEqdVAs0u+FjIa3MoeGudCJDxK+OcDBL3/2M74Tom2SYEzx6v/7KRWgyZKmOpM/iJmqWqmaKtEcaF2akpZMlRUaD9YDD9lGP4r9hiJoe0sbUeDoWoiLJkzZeRvJHQibN8Lg9kt7fBQGqXvydxIZ+kuSm4/Y12dFrbCULB4gPBG2FrWjbb1V/xIQJBLp9y2Zhx6NyzNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=t1CF2+0b0xNChSewHbu7CHTxhIQqfAYL2u70DJ+4LCU=; b=LdI8wN9CfO9hC84YxIpno5a155sU3NM9ecSo1EpZS0mLW+D9GjUGD/SP42CSD+Yk28yRiTueCA50yyeZR7JpJ2JoMuTyxRUACAUXe/wI70SXaNAXjdMuaFp6CKLpd3QOz8lvNHZogTvJLUzSenncsKU3ZPbnQrnUJdeWcfCcAmtsEcgLmLymVaj4SY3VZ1/KANHuWpo6RrR5lR9zt9EXPonXQDiq+LnBYcYWzx6CorabVnW2eoOYSyD/IciUhKYxZBugAYDZV1r96fswMMOgtNna8u7BbpJMsvFcf4fMjP5U8MklXeQvJbfnnD9oVeweEEq/Xi9rqRMx6ktYGNX8rw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=redhat.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=t1CF2+0b0xNChSewHbu7CHTxhIQqfAYL2u70DJ+4LCU=; b=K7Te3kL9+culitViFulgUS1tQxYqPpXd9fBtiTOfux/OTpc/XDi66BZzaapOEodNphKc/VetFATwY4o6K10V27RD7kmhPgQ+9gIt8ApUgiuhw0XojNu8kKjn6M62v8L2ms9v9u2S59O4CdT8xfJJdy2t7kZyqZzyaP1+mZg5BM1QRKB5zso5mMonio6AAdi5wtn5pWZCJUF1NoUVawFmu6Ccf9xQ3JteeecfMgbyWclofVPaEDl2Dn9OP5neKQPfiePrPaQ0nB1njIegRlBCwymSr8245o3EK8tktnCXs3XVpGELSmTK5PlCTCkyMc9+xctKQsViBO+MkM61KTSuow== Received: from CH2PR20CA0012.namprd20.prod.outlook.com (2603:10b6:610:58::22) by SA5PPFEC2853BA9.namprd12.prod.outlook.com (2603:10b6:80f:fc04::8e9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9456.11; Thu, 25 Dec 2025 09:23:50 +0000 Received: from CH2PEPF00000140.namprd02.prod.outlook.com (2603:10b6:610:58:cafe::d) by CH2PR20CA0012.outlook.office365.com (2603:10b6:610:58::22) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9456.11 via Frontend Transport; Thu, 25 Dec 2025 09:23:50 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by CH2PEPF00000140.mail.protection.outlook.com (10.167.244.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9456.9 via Frontend Transport; Thu, 25 Dec 2025 09:23:50 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 25 Dec 2025 01:23:40 -0800 Received: from rnnvmail203.nvidia.com (10.129.68.9) by rnnvmail203.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Thu, 25 Dec 2025 01:23:40 -0800 Received: from nvidia.com (10.127.8.12) by mail.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20 via Frontend Transport; Thu, 25 Dec 2025 01:23:38 -0800 From: Shani Peretz To: David Marchand CC: Maxime Coquelin , dpdk stable Subject: patch 'vhost: fix external buffer in VDUSE' has been queued to stable release 23.11.6 Date: Thu, 25 Dec 2025 11:18:21 +0200 Message-ID: <20251225091938.345892-60-shperetz@nvidia.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251225091938.345892-1-shperetz@nvidia.com> References: <20251221145746.763179-93-shperetz@nvidia.com> <20251225091938.345892-1-shperetz@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PEPF00000140:EE_|SA5PPFEC2853BA9:EE_ X-MS-Office365-Filtering-Correlation-Id: f58824e7-95b2-451a-c949-08de43975075 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|36860700013|82310400026|7053199007|13003099007; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?/bJUkiuuRcMQgA5vxu22SwaPLV+5d0ih2o92UXcs9R4O2PMUVsD6m63K51DC?= =?us-ascii?Q?fPmZ902ls9MigHu/G1n5zUwTTT8bu2FEpOYF02tTZUVFNlE+8MceIe9f6drL?= =?us-ascii?Q?T/mRXR15VQmWVlfwN2VCFIAN2P/PJProCU2QKXpUHnyE7mx2kHcUyNkTGBNx?= =?us-ascii?Q?eRE0AqInmC6cqP6q/VKKjh1xbtv8zTmKCkjz7bO8fSzPDsd4V5JPwmhb1Tn0?= =?us-ascii?Q?Aw7KOuk9Wcn/n0eEGWmy2m98nHFOqtvRr7w8FZ+7ptuFmwnltUGvTSGJGAvQ?= =?us-ascii?Q?kLkHIQUB+0kgL3Hh5u2lJ8c28jjf1FigAj5fvUClDJhgaYIZTTyJuL7y38t9?= =?us-ascii?Q?T6DKv1Dbryic46BRnmIOIHONpssSR+PIUlZGds7g5ojoPi/eVgr4jw5JZRrz?= =?us-ascii?Q?aNX0Ny2/SdR74SGdXUZe7ChUdKHV9iKy6cygqzIZjAi8K80qkHdyJx6zqzxd?= =?us-ascii?Q?y8g1UHG6hjbI/1pZPf/s1/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Q?h0unmNgpRZcFzeS8MihaqSyTSROUhAxu4sw/mKYetbcxghkpvf2mpH9GvLVN?= =?us-ascii?Q?+pPh6F6ma9pzSkmlC1SSNwITeu7/pI02ScoJmjJNwR9UgmhJaMaEfCyEdOWi?= =?us-ascii?Q?Iw2NfKr3DbvArRKwUTPQ8nKoyaKM9QZrSdg//6TY3W3xPNbOtiI8mrxm6IjG?= =?us-ascii?Q?uf9iM6FVigXVoOXBHf8x3yhvChxXxtzMf670YPql?= X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230040)(1800799024)(376014)(36860700013)(82310400026)(7053199007)(13003099007); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Dec 2025 09:23:50.0618 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f58824e7-95b2-451a-c949-08de43975075 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CH2PEPF00000140.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA5PPFEC2853BA9 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 Hi, FYI, your patch has been queued to stable release 23.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/30/25. 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/shanipr/dpdk-stable This queued commit can be viewed at: https://github.com/shanipr/dpdk-stable/commit/c05fb2b9c1b3488938635c12300b58a1bc49831c Thanks. Shani --- >From c05fb2b9c1b3488938635c12300b58a1bc49831c Mon Sep 17 00:00:00 2001 From: David Marchand Date: Tue, 28 Oct 2025 13:34:53 +0100 Subject: [PATCH] vhost: fix external buffer in VDUSE [ upstream commit 8ae4f1d511 ] extbuf and linearbuf features are required for (enhanced) TSO support in OVS. VDUSE ports were generating multi-segments mbufs in case of "TSO" buffers which resulted in OVS generating wrong packets after tunnel encapsulation. Enable the missing datapath features. Fixes: 0adb8eccc6a6 ("vhost: add VDUSE device creation and destruction") Signed-off-by: David Marchand Reviewed-by: Maxime Coquelin --- lib/vhost/socket.c | 3 ++- lib/vhost/vduse.c | 8 +++++++- lib/vhost/vduse.h | 6 ++++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/lib/vhost/socket.c b/lib/vhost/socket.c index 6cf76eb7ae..3baa204c62 100644 --- a/lib/vhost/socket.c +++ b/lib/vhost/socket.c @@ -1197,7 +1197,8 @@ rte_vhost_driver_start(const char *path) return -1; if (vsocket->is_vduse) - return vduse_device_create(path, vsocket->net_compliant_ol_flags); + return vduse_device_create(path, vsocket->net_compliant_ol_flags, + vsocket->extbuf, vsocket->linearbuf); if (fdset_tid.opaque_id == 0) { /** diff --git a/lib/vhost/vduse.c b/lib/vhost/vduse.c index 9f163de0cc..8d9486a497 100644 --- a/lib/vhost/vduse.c +++ b/lib/vhost/vduse.c @@ -479,7 +479,7 @@ vduse_events_handler(int fd, void *arg, int *remove __rte_unused) } int -vduse_device_create(const char *path, bool compliant_ol_flags) +vduse_device_create(const char *path, bool compliant_ol_flags, bool extbuf, bool linearbuf) { int control_fd, dev_fd, vid, ret; rte_thread_t fdset_tid; @@ -607,6 +607,12 @@ vduse_device_create(const char *path, bool compliant_ol_flags) dev->vduse_dev_fd = dev_fd; vhost_setup_virtio_net(dev->vid, true, compliant_ol_flags, true, true); + if (extbuf) + vhost_enable_extbuf(dev->vid); + + if (linearbuf) + vhost_enable_linearbuf(dev->vid); + for (i = 0; i < total_queues; i++) { struct vduse_vq_config vq_cfg = { 0 }; diff --git a/lib/vhost/vduse.h b/lib/vhost/vduse.h index 4879b1f900..67b8755a51 100644 --- a/lib/vhost/vduse.h +++ b/lib/vhost/vduse.h @@ -11,15 +11,17 @@ #ifdef VHOST_HAS_VDUSE -int vduse_device_create(const char *path, bool compliant_ol_flags); +int vduse_device_create(const char *path, bool compliant_ol_flags, bool extbuf, bool linearbuf); int vduse_device_destroy(const char *path); #else static inline int -vduse_device_create(const char *path, bool compliant_ol_flags) +vduse_device_create(const char *path, bool compliant_ol_flags, bool extbuf, bool linearbuf) { RTE_SET_USED(compliant_ol_flags); + RTE_SET_USED(extbuf); + RTE_SET_USED(linearbuf); VHOST_LOG_CONFIG(path, ERR, "VDUSE support disabled at build time\n"); return -1; -- 2.43.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-12-25 11:16:39.378851915 +0200 +++ 0060-vhost-fix-external-buffer-in-VDUSE.patch 2025-12-25 11:16:35.993990000 +0200 @@ -1 +1 @@ -From 8ae4f1d511226fd65a979e9f8a1e51835281a59b Mon Sep 17 00:00:00 2001 +From c05fb2b9c1b3488938635c12300b58a1bc49831c Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 8ae4f1d511 ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org @@ -23,2 +24,2 @@ - lib/vhost/vduse.h | 2 +- - 3 files changed, 10 insertions(+), 3 deletions(-) + lib/vhost/vduse.h | 6 ++++-- + 3 files changed, 13 insertions(+), 4 deletions(-) @@ -27 +28 @@ -index 9b4f332f94..ae95e7e6b0 100644 +index 6cf76eb7ae..3baa204c62 100644 @@ -30 +31 @@ -@@ -1194,7 +1194,8 @@ rte_vhost_driver_start(const char *path) +@@ -1197,7 +1197,8 @@ rte_vhost_driver_start(const char *path) @@ -38,2 +39,2 @@ - if (vhost_user.fdset == NULL) { - vhost_user.fdset = fdset_init("vhost-evt"); + if (fdset_tid.opaque_id == 0) { + /** @@ -41 +42 @@ -index 68e56843fd..897dee9f1b 100644 +index 9f163de0cc..8d9486a497 100644 @@ -44 +45 @@ -@@ -672,7 +672,7 @@ out_err: +@@ -479,7 +479,7 @@ vduse_events_handler(int fd, void *arg, int *remove __rte_unused) @@ -52,3 +53,3 @@ - uint32_t i, max_queue_pairs, total_queues; -@@ -817,6 +817,12 @@ vduse_device_create(const char *path, bool compliant_ol_flags) - + rte_thread_t fdset_tid; +@@ -607,6 +607,12 @@ vduse_device_create(const char *path, bool compliant_ol_flags) + dev->vduse_dev_fd = dev_fd; @@ -65 +66 @@ - struct vhost_virtqueue *vq; + @@ -67 +68 @@ -index 47ca97a064..b2515bb9df 100644 +index 4879b1f900..67b8755a51 100644 @@ -70 +71 @@ -@@ -9,7 +9,7 @@ +@@ -11,15 +11,17 @@ @@ -72 +73 @@ - #define VDUSE_NET_SUPPORTED_FEATURES VIRTIO_NET_SUPPORTED_FEATURES + #ifdef VHOST_HAS_VDUSE @@ -78 +79,12 @@ - #endif /* _VDUSE_H */ + #else + + static inline int +-vduse_device_create(const char *path, bool compliant_ol_flags) ++vduse_device_create(const char *path, bool compliant_ol_flags, bool extbuf, bool linearbuf) + { + RTE_SET_USED(compliant_ol_flags); ++ RTE_SET_USED(extbuf); ++ RTE_SET_USED(linearbuf); + + VHOST_LOG_CONFIG(path, ERR, "VDUSE support disabled at build time\n"); + return -1;