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 07F05A04F3 for ; Thu, 19 Dec 2019 15:37:43 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F14EB1BFAA; Thu, 19 Dec 2019 15:37:42 +0100 (CET) Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by dpdk.org (Postfix) with ESMTP id 3518B1BFAA for ; Thu, 19 Dec 2019 15:37:42 +0100 (CET) Received: by mail-wm1-f68.google.com with SMTP id p17so5877272wmb.0 for ; Thu, 19 Dec 2019 06:37:42 -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=g/V8Jxm2cWP3WyJ46B2HYpq9nWtODtkrJxYFKEqDiKQ=; b=FotUtnz+lxi3spqVILu/WNXtnSRzhmfNQNO2LG3p+HvQaT8eFNZXRCqsaZFMxtiKGp wxuW273ZrwJOaC4wW78/c9v48KQORr7B8s4RDUZMluYK2JtZwEkvnbujkYGTygCRpwEA bBkcSUvbotJvND1IH6ezhMj2fJOr6RvBdjDuuCc/ya223tN5uq9kDu3Znkvu5b1j1ZIg 6kr6sTJp0nrPcsiqcR//du7mQxLxgal09kW5Adxq26dIwj7jN+KOEKC70dUY7FzBDD21 7AKtAx4gcu/kCrZZ43RQOXROe5b++FVH5chU9KKNZwsApL9ko+8NhvhZCx+D3rnW9+SP +BGQ== 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=g/V8Jxm2cWP3WyJ46B2HYpq9nWtODtkrJxYFKEqDiKQ=; b=Szrih0+Kev0cv4tvCJyWgZU4JO//CT84T4pKlJiXdL6fnWZ1+SELKfMYJ1FmN/Dem9 7jDjBkYucJwHJO3V0zLOKzc9wr3twNLuxuczKfHGjxvK1eQRSqcyo+xmvtLa9a+p2sT5 7lDswDjSX7+DYTYUJE4Npu2BFKtWLwznN+xV/tdxqK1pg3TP2eVFMVtK33Os98vE0FJ9 ujv9gv5vwqiJ1IYn1lwiuenW1MMpxFL9yJE6EK1u3I98ztMwXlfag0Ww9IPEtM0+uogF fnYyXyjB7/tE4yG8i6uCGHTjVpUy1klD6yiU5cZ4zFLOe18O1oRMrq4YPq1MaHTqv/66 krKQ== X-Gm-Message-State: APjAAAVGk49wdhXrJWcC8XREaL6NgSa7fulcorhPkHTp277H4v3kF4Sa H1nxhxgCIaE669IB+1GvC3k= X-Google-Smtp-Source: APXvYqysCLUaCjccsKip/dAelek+hwGYjjruSvJz9HOTmNQ/2reeSpOIED1gEm/N2/SRzrcZN7fEcg== X-Received: by 2002:a7b:c0ce:: with SMTP id s14mr10249715wmh.117.1576766261952; Thu, 19 Dec 2019 06:37:41 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id i16sm6557746wmb.36.2019.12.19.06.37.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Dec 2019 06:37:41 -0800 (PST) From: luca.boccassi@gmail.com To: Andrew Rybchenko Cc: Tiwei Bie , dpdk stable Date: Thu, 19 Dec 2019 14:33:39 +0000 Message-Id: <20191219143447.21506-72-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191219143447.21506-1-luca.boccassi@gmail.com> References: <20191219143447.21506-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/virtio: fix descriptor addressed in Tx' has been queued to LTS release 17.11.10 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 LTS release 17.11.10 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/21/19. 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 87a984b6db89dce652464e660e0fe643654619ae Mon Sep 17 00:00:00 2001 From: Andrew Rybchenko Date: Tue, 15 Oct 2019 09:11:27 +0100 Subject: [PATCH] net/virtio: fix descriptor addressed in Tx [ upstream commit be048a1aaa7276cc99a5a6a30e7825cfcb523112 ] Previous fix removes usage of rte_pktmbuf_prepend() to get pointer to virtio net header which changes mbuf data_off and data_len. Size of virtio net header is added to segment length when Tx descriptor is composed, but segment address (calculated using data_off) is not adjusted to take size of virtio net header into account. Fixes: 1ae55ad38e5e ("net/virtio: fix mbuf data and packet length mismatch") Signed-off-by: Andrew Rybchenko Reviewed-by: Tiwei Bie --- drivers/net/virtio/virtio_rxtx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c index 40255eee4e..c608575722 100644 --- a/drivers/net/virtio/virtio_rxtx.c +++ b/drivers/net/virtio/virtio_rxtx.c @@ -388,6 +388,7 @@ virtqueue_enqueue_xmit(struct virtnet_tx *txvq, struct rte_mbuf *cookie, start_dp[idx].addr = VIRTIO_MBUF_DATA_DMA_ADDR(cookie, vq); start_dp[idx].len = cookie->data_len; if (prepend_header) { + start_dp[idx].addr -= head_size; start_dp[idx].len += head_size; prepend_header = false; } -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-12-19 14:32:29.184711742 +0000 +++ 0072-net-virtio-fix-descriptor-addressed-in-Tx.patch 2019-12-19 14:32:26.165299015 +0000 @@ -1,8 +1,10 @@ -From be048a1aaa7276cc99a5a6a30e7825cfcb523112 Mon Sep 17 00:00:00 2001 +From 87a984b6db89dce652464e660e0fe643654619ae Mon Sep 17 00:00:00 2001 From: Andrew Rybchenko Date: Tue, 15 Oct 2019 09:11:27 +0100 Subject: [PATCH] net/virtio: fix descriptor addressed in Tx +[ upstream commit be048a1aaa7276cc99a5a6a30e7825cfcb523112 ] + Previous fix removes usage of rte_pktmbuf_prepend() to get pointer to virtio net header which changes mbuf data_off and data_len. Size of virtio net header is added to segment length when Tx descriptor @@ -10,46 +12,18 @@ adjusted to take size of virtio net header into account. Fixes: 1ae55ad38e5e ("net/virtio: fix mbuf data and packet length mismatch") -Cc: stable@dpdk.org Signed-off-by: Andrew Rybchenko Reviewed-by: Tiwei Bie --- - drivers/net/virtio/virtio_rxtx.c | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) + drivers/net/virtio/virtio_rxtx.c | 1 + + 1 file changed, 1 insertion(+) diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c -index 701c1cf47b..b5fc4ecbe1 100644 +index 40255eee4e..c608575722 100644 --- a/drivers/net/virtio/virtio_rxtx.c +++ b/drivers/net/virtio/virtio_rxtx.c -@@ -657,7 +657,8 @@ virtqueue_enqueue_xmit_inorder(struct virtnet_tx *txvq, - else - virtqueue_xmit_offload(hdr, cookies[i], true); - -- start_dp[idx].addr = VIRTIO_MBUF_DATA_DMA_ADDR(cookies[i], vq); -+ start_dp[idx].addr = -+ VIRTIO_MBUF_DATA_DMA_ADDR(cookies[i], vq) - head_size; - start_dp[idx].len = cookies[i]->data_len + head_size; - start_dp[idx].flags = 0; - -@@ -704,7 +705,7 @@ virtqueue_enqueue_xmit_packed_fast(struct virtnet_tx *txvq, - else - virtqueue_xmit_offload(hdr, cookie, true); - -- dp->addr = VIRTIO_MBUF_DATA_DMA_ADDR(cookie, vq); -+ dp->addr = VIRTIO_MBUF_DATA_DMA_ADDR(cookie, vq) - head_size; - dp->len = cookie->data_len + head_size; - dp->id = id; - -@@ -786,6 +787,7 @@ virtqueue_enqueue_xmit_packed(struct virtnet_tx *txvq, struct rte_mbuf *cookie, - start_dp[idx].addr = VIRTIO_MBUF_DATA_DMA_ADDR(cookie, vq); - start_dp[idx].len = cookie->data_len; - if (prepend_header) { -+ start_dp[idx].addr -= head_size; - start_dp[idx].len += head_size; - prepend_header = false; - } -@@ -889,6 +891,7 @@ virtqueue_enqueue_xmit(struct virtnet_tx *txvq, struct rte_mbuf *cookie, +@@ -388,6 +388,7 @@ virtqueue_enqueue_xmit(struct virtnet_tx *txvq, struct rte_mbuf *cookie, start_dp[idx].addr = VIRTIO_MBUF_DATA_DMA_ADDR(cookie, vq); start_dp[idx].len = cookie->data_len; if (prepend_header) {