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 3622EA0093 for ; Tue, 19 May 2020 15:09:28 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2D5BD1D6AF; Tue, 19 May 2020 15:09:28 +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 C77DD1D174 for ; Tue, 19 May 2020 15:09:25 +0200 (CEST) Received: by mail-wm1-f66.google.com with SMTP id u1so2218478wmn.3 for ; Tue, 19 May 2020 06:09:25 -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=YsWqPac3Zx8pYOjShVW3rddLf9CoY4UF2JgSraRIQ8c=; b=K33VhMPLsXnUyNhJ1WJgxRoJaYBDb1M/gF2fkoBMUmCj9s6s3U0fK/9e29trjN1yQR I13vMWCidu0mhKwRfEfRQ2TOiLNJinO6na8YxyziVkdvCbByDs1Q3i7xLstxESYimyD1 kV3DYizAcyQ0zc+84KVDnLP59QOhG2hiZZNI3J2Cx4rCcYftk0aHtSTTj+GTTmg78jFe CGB/o728XMro4EfGEhFRNjPuY0bEUbmqJkr/GQJ2f5GGNZvBGB6w52jBjhiPDztp/Q1F IA5irWmFdCfz4mdfrbrZrN1uH9SV6Gpr57zvWRTpJ9Zxuj5wLjjWdioom79rDpB4VUnL t0Jg== 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=YsWqPac3Zx8pYOjShVW3rddLf9CoY4UF2JgSraRIQ8c=; b=i/pE/EigE/GEG8K1VBfBfM9++flZ8k+/2Wb2N0ahVoTyzUugPq2Xt9ef4DOb2PBaRz WrOUz0+sXQAQHRxDl89wg0IAPPKUMWOs+rk8QxdPwY0QmVa1Siz+no8ajLXxBLUSwyeI T0tP8hgE4eKulglm/Dr2X+ZEkbvLhpzOkVtSmlgGoCy+yelqR5cQDW6IgvWHzSBi5v87 /TD9QYozmYVHBEHZzhWMD80w5H0gmNdhBtYixSVr8wHbqm4ZYky3yow91uZVrSmeSUqr ySw+8rCYr2EfUOyrXlA7LwPDceQXZ+SwC4w7k8/+HE6lyeOZ38E6UgARVdOwrVvBKME6 VI1w== X-Gm-Message-State: AOAM532JEYzqlIkzf8d2astbrk+NlsvPPbfAExFAmlvS+CRsW/vlwHqz CE2+GIqhBy2DbKsucucsQ9DZBEf+rot947iD X-Google-Smtp-Source: ABdhPJwVi/WJN9EtqI4y/cb2vvdtk8qtanGzi68FpWytgsSWymuy2j3QV++SgJgJmrLZCX6FlJ+a1Q== X-Received: by 2002:a7b:c0d1:: with SMTP id s17mr5218446wmh.157.1589893765498; Tue, 19 May 2020 06:09:25 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id g135sm3823542wme.22.2020.05.19.06.09.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 May 2020 06:09:24 -0700 (PDT) From: luca.boccassi@gmail.com To: Marvin Liu Cc: Yinan Wang , Maxime Coquelin , dpdk stable Date: Tue, 19 May 2020 14:03:24 +0100 Message-Id: <20200519130549.112823-69-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200519130549.112823-1-luca.boccassi@gmail.com> References: <20200519125804.104349-1-luca.boccassi@gmail.com> <20200519130549.112823-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'vhost: fix packed ring zero-copy' 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/21/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 b35cbd50b952703f1d25743d865d1fa428aeaad9 Mon Sep 17 00:00:00 2001 From: Marvin Liu Date: Mon, 24 Feb 2020 23:14:19 +0800 Subject: [PATCH] vhost: fix packed ring zero-copy [ upstream commit 2a0ff4d55445988629e1a00afdf542c5e62387fa ] Available buffer ID should be stored in the zmbuf in the packed-ring dequeue path. There's no guarantee that local queue avail index is equal to buffer ID. Fixes: d1eafb532268 ("vhost: add packed ring zcopy batch and single dequeue") Signed-off-by: Marvin Liu Reported-by: Yinan Wang Reviewed-by: Maxime Coquelin --- lib/librte_vhost/virtio_net.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c index 33f10258cf..3f46f5c517 100644 --- a/lib/librte_vhost/virtio_net.c +++ b/lib/librte_vhost/virtio_net.c @@ -2008,7 +2008,7 @@ virtio_dev_tx_batch_packed_zmbuf(struct virtio_net *dev, vhost_for_each_try_unroll(i, 0, PACKED_BATCH_SIZE) { zmbufs[i]->mbuf = pkts[i]; - zmbufs[i]->desc_idx = avail_idx + i; + zmbufs[i]->desc_idx = ids[i]; zmbufs[i]->desc_count = 1; } @@ -2049,7 +2049,7 @@ virtio_dev_tx_single_packed_zmbuf(struct virtio_net *dev, return -1; } zmbuf->mbuf = *pkts; - zmbuf->desc_idx = vq->last_avail_idx; + zmbuf->desc_idx = buf_id; zmbuf->desc_count = desc_count; rte_mbuf_refcnt_update(*pkts, 1); -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-05-19 14:04:47.294164299 +0100 +++ 0069-vhost-fix-packed-ring-zero-copy.patch 2020-05-19 14:04:44.228648590 +0100 @@ -1,14 +1,15 @@ -From 2a0ff4d55445988629e1a00afdf542c5e62387fa Mon Sep 17 00:00:00 2001 +From b35cbd50b952703f1d25743d865d1fa428aeaad9 Mon Sep 17 00:00:00 2001 From: Marvin Liu Date: Mon, 24 Feb 2020 23:14:19 +0800 Subject: [PATCH] vhost: fix packed ring zero-copy +[ upstream commit 2a0ff4d55445988629e1a00afdf542c5e62387fa ] + Available buffer ID should be stored in the zmbuf in the packed-ring dequeue path. There's no guarantee that local queue avail index is equal to buffer ID. Fixes: d1eafb532268 ("vhost: add packed ring zcopy batch and single dequeue") -Cc: stable@dpdk.org Signed-off-by: Marvin Liu Reported-by: Yinan Wang @@ -18,10 +19,10 @@ 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c -index 37c47c7dc0..2104159047 100644 +index 33f10258cf..3f46f5c517 100644 --- a/lib/librte_vhost/virtio_net.c +++ b/lib/librte_vhost/virtio_net.c -@@ -2004,7 +2004,7 @@ virtio_dev_tx_batch_packed_zmbuf(struct virtio_net *dev, +@@ -2008,7 +2008,7 @@ virtio_dev_tx_batch_packed_zmbuf(struct virtio_net *dev, vhost_for_each_try_unroll(i, 0, PACKED_BATCH_SIZE) { zmbufs[i]->mbuf = pkts[i]; @@ -30,7 +31,7 @@ zmbufs[i]->desc_count = 1; } -@@ -2045,7 +2045,7 @@ virtio_dev_tx_single_packed_zmbuf(struct virtio_net *dev, +@@ -2049,7 +2049,7 @@ virtio_dev_tx_single_packed_zmbuf(struct virtio_net *dev, return -1; } zmbuf->mbuf = *pkts;