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 1C2C248B69 for ; Fri, 21 Nov 2025 12:23:37 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 16CBB4026F; Fri, 21 Nov 2025 12:23:37 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 48A2E402E5 for ; Fri, 21 Nov 2025 12:23:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1763724214; 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=1g0IxxY44bfI2MATWsPxHSCzYRAgcjvguzDRQuB9QUA=; b=O6sYWLLVok5VZtgG/2/tIaCtvhUWGBRWsvV85hVnYtmTSMLmQz+sQSv4cX/sQhGM6xle/d MmI1jT2BCvYgVCo4GWlUakJx8eDLHgc8E4yfo30OaY7HRG/O4YL2/Kt1tsYeBXEhA7LrjD OeOTex9RWT2PuPK+2YXCFoTrNTrbIkU= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-449-4EJQkoDDO6Coi0c2IMtRxw-1; Fri, 21 Nov 2025 06:23:33 -0500 X-MC-Unique: 4EJQkoDDO6Coi0c2IMtRxw-1 X-Mimecast-MFC-AGG-ID: 4EJQkoDDO6Coi0c2IMtRxw_1763724212 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C24E1180034F for ; Fri, 21 Nov 2025 11:23:32 +0000 (UTC) Received: from rh.redhat.com (unknown [10.42.28.165]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 5B01C30044DB; Fri, 21 Nov 2025 11:23:31 +0000 (UTC) From: Kevin Traynor To: David Marchand Cc: Maxime Coquelin , dpdk stable Subject: patch 'vhost: fix external buffer in VDUSE' has been queued to stable release 24.11.4 Date: Fri, 21 Nov 2025 11:20:38 +0000 Message-ID: <20251121112128.485623-54-ktraynor@redhat.com> In-Reply-To: <20251121112128.485623-1-ktraynor@redhat.com> References: <20251121112128.485623-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: XNaYpusgky3NIBrH9LNlzxHuAK6JDBstsjHvuEdzcsI_1763724212 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true 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 24.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 11/26/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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/0ea4b51e84ced4fdf9a68ec17e7fe73fa4dc49f6 Thanks. Kevin --- >From 0ea4b51e84ced4fdf9a68ec17e7fe73fa4dc49f6 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 8ae4f1d511226fd65a979e9f8a1e51835281a59b ] 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 799c6b0590..52199d02f7 100644 --- a/lib/vhost/socket.c +++ b/lib/vhost/socket.c @@ -1193,5 +1193,6 @@ rte_vhost_driver_start(const char *path) 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 (vhost_user.fdset == NULL) { diff --git a/lib/vhost/vduse.c b/lib/vhost/vduse.c index 5d78f01126..8dada7b841 100644 --- a/lib/vhost/vduse.c +++ b/lib/vhost/vduse.c @@ -672,5 +672,5 @@ out_err: 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; @@ -817,4 +817,10 @@ vduse_device_create(const char *path, bool compliant_ol_flags) 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 0d8f3f1205..353f297d5a 100644 --- a/lib/vhost/vduse.h +++ b/lib/vhost/vduse.h @@ -12,5 +12,5 @@ #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); @@ -18,7 +18,9 @@ int vduse_device_destroy(const char *path); 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_CONFIG_LOG(path, ERR, "VDUSE support disabled at build time"); -- 2.51.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-11-21 11:05:11.311282928 +0000 +++ 0054-vhost-fix-external-buffer-in-VDUSE.patch 2025-11-21 11:05:09.521201417 +0000 @@ -1 +1 @@ -From 8ae4f1d511226fd65a979e9f8a1e51835281a59b Mon Sep 17 00:00:00 2001 +From 0ea4b51e84ced4fdf9a68ec17e7fe73fa4dc49f6 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 8ae4f1d511226fd65a979e9f8a1e51835281a59b ] + @@ -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 799c6b0590..52199d02f7 100644 @@ -30 +31 @@ -@@ -1195,5 +1195,6 @@ rte_vhost_driver_start(const char *path) +@@ -1193,5 +1193,6 @@ rte_vhost_driver_start(const char *path) @@ -39 +40 @@ -index 68e56843fd..897dee9f1b 100644 +index 5d78f01126..8dada7b841 100644 @@ -42 +43 @@ -@@ -673,5 +673,5 @@ out_err: +@@ -672,5 +672,5 @@ out_err: @@ -49 +50 @@ -@@ -818,4 +818,10 @@ vduse_device_create(const char *path, bool compliant_ol_flags) +@@ -817,4 +817,10 @@ vduse_device_create(const char *path, bool compliant_ol_flags) @@ -61 +62 @@ -index 47ca97a064..b2515bb9df 100644 +index 0d8f3f1205..353f297d5a 100644 @@ -64,2 +65,2 @@ -@@ -10,5 +10,5 @@ - #define VDUSE_NET_SUPPORTED_FEATURES VIRTIO_NET_SUPPORTED_FEATURES +@@ -12,5 +12,5 @@ + #ifdef VHOST_HAS_VDUSE @@ -70,0 +72,11 @@ +@@ -18,7 +18,9 @@ int vduse_device_destroy(const char *path); + + 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_CONFIG_LOG(path, ERR, "VDUSE support disabled at build time");