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 AF2D2A0547 for ; Sat, 13 Feb 2021 00:40:59 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 872E21CC3B1; Sat, 13 Feb 2021 00:40:59 +0100 (CET) Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) by mails.dpdk.org (Postfix) with ESMTP id F1C151CC38D for ; Sat, 13 Feb 2021 00:40:56 +0100 (CET) Received: by mail-wr1-f51.google.com with SMTP id g6so1250260wrs.11 for ; Fri, 12 Feb 2021 15:40:56 -0800 (PST) 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=HhjoRlVEF2uJmreYbC+JJ+S1hMwAABlQ7KNIYswlX84=; b=HgZU9ua1HQatLPItJE9iy/aO/uqYyf5tzBqxAjFJgHZkWWKQU6zGCXpeUdXl6PqXxc 0D3Li6dff3UTMiSrTHujdp90m//Ioqe8G3tBeYyFZ2mv8rA7wXyUS2tqBY8yowEodQwy Gw/Vglgb5anQZ/y2VP7r/ZAXjgglThQ7+UM3sFlqmKvfisusDEKQ9Q4bwDhaup/Gfi58 q7b3LHDxCDqhv/QGJQE39KFxeXKM+ahEgcUuQOMvJqhoHHK6VrYHDRc9Eq5ju+uX+y8G nstQwm6C1aDAQjYWCrxPku8q2b9QHTBjruvUZZjWuMS3X5y6Ff6os6dm3kCq694mHWRe hnIg== 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=HhjoRlVEF2uJmreYbC+JJ+S1hMwAABlQ7KNIYswlX84=; b=HDf6A7uXRHDV2hgZpNya/ApMvcA2ruo7RtG+wQtW2qDc6Rd9v8O/KyYOzSmebYDrGa M2LO26JJlgvUJVZUtgy6pXuphNG18UpefqAMnbXvprlnANWudBHVPFDQ/86JKuUOKcDZ urQ4mPYVcOvflFtDjVRMh8apF1++TGm/niLw1kXjlTrJugSFvMF6UTW88Xl9zVtKPum0 WV3E20Sr+FcxdIJFcdHwaSLsxk+d5mibSolX9Pr6xkonDKOYcehmwZ24Yhxsna/rwAoQ nAZYbeIoEbzt4MYpLHnGEcRRQLX04UGqvrBphVxN2aqr0GXoTrM9olYOvi5PdaMdlQrL WTcg== X-Gm-Message-State: AOAM5307gxkn2B9hlCZF8u3YLBAtvJPNTuZ1PbHufRaCymoBsGW5RpGI RVlr1jB+3zuSfoQS1xeWp3MfrI5/eZzGXA== X-Google-Smtp-Source: ABdhPJzQUae+zAbYiQdTk9c/jDbXQk3eDi5UshvM1K9lSnbw4obJh/4F34pQqI5UgbPDtvr0kKd0zA== X-Received: by 2002:a05:6000:108b:: with SMTP id y11mr5912362wrw.379.1613173256798; Fri, 12 Feb 2021 15:40:56 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id h12sm15258731wru.18.2021.02.12.15.40.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Feb 2021 15:40:56 -0800 (PST) From: luca.boccassi@gmail.com To: Marvin Liu Cc: Maxime Coquelin , dpdk stable Date: Fri, 12 Feb 2021 23:40:47 +0000 Message-Id: <20210212234050.255787-3-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210212234050.255787-1-luca.boccassi@gmail.com> References: <20210205111920.1272063-1-luca.boccassi@gmail.com> <20210212234050.255787-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'vhost: fix packed ring dequeue offloading' has been queued to stable release 20.11.1 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/14/21. 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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/d4585027ca394f1848bab0d4333a7a68f0c684e9 Thanks. Luca Boccassi --- >From d4585027ca394f1848bab0d4333a7a68f0c684e9 Mon Sep 17 00:00:00 2001 From: Marvin Liu Date: Fri, 5 Feb 2021 15:47:58 +0800 Subject: [PATCH] vhost: fix packed ring dequeue offloading [ upstream commit 894028ace2c5af2506897898f407cbdf24cef0c5 ] When vhost is doing dequeue offloading, it parses ethernet and L3/L4 headers of the packet. Then vhost will set corresponding value in mbuf attributes. It means offloading action should be after packet data copy. Fixes: 75ed51697820 ("vhost: add packed ring batch dequeue") Signed-off-by: Marvin Liu Reviewed-by: Maxime Coquelin --- lib/librte_vhost/virtio_net.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c index 6c5128665e..55bfc161b5 100644 --- a/lib/librte_vhost/virtio_net.c +++ b/lib/librte_vhost/virtio_net.c @@ -2232,7 +2232,6 @@ vhost_reserve_avail_batch_packed(struct virtio_net *dev, { bool wrap = vq->avail_wrap_counter; struct vring_packed_desc *descs = vq->desc_packed; - struct virtio_net_hdr *hdr; uint64_t lens[PACKED_BATCH_SIZE]; uint64_t buf_lens[PACKED_BATCH_SIZE]; uint32_t buf_offset = sizeof(struct virtio_net_hdr_mrg_rxbuf); @@ -2289,13 +2288,6 @@ vhost_reserve_avail_batch_packed(struct virtio_net *dev, ids[i] = descs[avail_idx + i].id; } - if (virtio_net_with_host_offload(dev)) { - vhost_for_each_try_unroll(i, 0, PACKED_BATCH_SIZE) { - hdr = (struct virtio_net_hdr *)(desc_addrs[i]); - vhost_dequeue_offload(hdr, pkts[i]); - } - } - return 0; free_buf: @@ -2313,6 +2305,7 @@ virtio_dev_tx_batch_packed(struct virtio_net *dev, { uint16_t avail_idx = vq->last_avail_idx; uint32_t buf_offset = sizeof(struct virtio_net_hdr_mrg_rxbuf); + struct virtio_net_hdr *hdr; uintptr_t desc_addrs[PACKED_BATCH_SIZE]; uint16_t ids[PACKED_BATCH_SIZE]; uint16_t i; @@ -2329,6 +2322,13 @@ virtio_dev_tx_batch_packed(struct virtio_net *dev, (void *)(uintptr_t)(desc_addrs[i] + buf_offset), pkts[i]->pkt_len); + if (virtio_net_with_host_offload(dev)) { + vhost_for_each_try_unroll(i, 0, PACKED_BATCH_SIZE) { + hdr = (struct virtio_net_hdr *)(desc_addrs[i]); + vhost_dequeue_offload(hdr, pkts[i]); + } + } + if (virtio_net_is_inorder(dev)) vhost_shadow_dequeue_batch_packed_inorder(vq, ids[PACKED_BATCH_SIZE - 1]); -- 2.29.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-02-12 23:40:09.982602168 +0000 +++ 0003-vhost-fix-packed-ring-dequeue-offloading.patch 2021-02-12 23:40:09.875090578 +0000 @@ -1 +1 @@ -From 894028ace2c5af2506897898f407cbdf24cef0c5 Mon Sep 17 00:00:00 2001 +From d4585027ca394f1848bab0d4333a7a68f0c684e9 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 894028ace2c5af2506897898f407cbdf24cef0c5 ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index 6580983c82..583bf379c6 100644 +index 6c5128665e..55bfc161b5 100644 @@ -23 +24 @@ -@@ -2263,7 +2263,6 @@ vhost_reserve_avail_batch_packed(struct virtio_net *dev, +@@ -2232,7 +2232,6 @@ vhost_reserve_avail_batch_packed(struct virtio_net *dev, @@ -31 +32 @@ -@@ -2320,13 +2319,6 @@ vhost_reserve_avail_batch_packed(struct virtio_net *dev, +@@ -2289,13 +2288,6 @@ vhost_reserve_avail_batch_packed(struct virtio_net *dev, @@ -45 +46 @@ -@@ -2344,6 +2336,7 @@ virtio_dev_tx_batch_packed(struct virtio_net *dev, +@@ -2313,6 +2305,7 @@ virtio_dev_tx_batch_packed(struct virtio_net *dev, @@ -53 +54 @@ -@@ -2360,6 +2353,13 @@ virtio_dev_tx_batch_packed(struct virtio_net *dev, +@@ -2329,6 +2322,13 @@ virtio_dev_tx_batch_packed(struct virtio_net *dev,