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 EED2FA046B for ; Tue, 23 Jul 2019 03:02:15 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DF9C41BEFF; Tue, 23 Jul 2019 03:02:15 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id AC1381BEFE for ; Tue, 23 Jul 2019 03:02:14 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE2 (envelope-from yskoh@mellanox.com) with ESMTPS (AES256-SHA encrypted); 23 Jul 2019 04:02:10 +0300 Received: from scfae-sc-2.mti.labs.mlnx (scfae-sc-2.mti.labs.mlnx [10.101.0.96]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x6N11HfG026580; Tue, 23 Jul 2019 04:02:09 +0300 From: Yongseok Koh To: Shahaf Shuler Cc: dpdk stable Date: Mon, 22 Jul 2019 17:59:57 -0700 Message-Id: <20190723010115.6446-30-yskoh@mellanox.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190723010115.6446-1-yskoh@mellanox.com> References: <20190723010115.6446-1-yskoh@mellanox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/mlx5: fix packet inline on Tx queue wraparound' has been queued to LTS release 17.11.7 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.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objection by 07/27/19. So please shout if anyone has objection. 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. Yongseok --- >From ff8ffef0fc43b616676fe87c5aa11cfe90e3cfc9 Mon Sep 17 00:00:00 2001 From: Shahaf Shuler Date: Sun, 10 Mar 2019 10:14:10 +0200 Subject: [PATCH] net/mlx5: fix packet inline on Tx queue wraparound [ backported from upstream commit 57c0e2494c51421033771122e8972a41dddb4cb7 ] Inlining a packet to WQE that cross the WQ wraparound, i.e. the WQE starts on the end of the ring and ends on the beginning, is not supported and blocked by the data path logic. However, in case of TSO, an extra inline header is required before inlining. This inline header is not taken into account when checking if there is enough room left for the required inline size. On some corner cases were (ring_tailroom - inline header) < inline size < ring_tailroom , this can lead to WQE being written outsize of the ring buffer. Fixing it by always assuming the worse case that inline of packet will require the inline header. Fixes: 3f13f8c23a7c ("net/mlx5: support hardware TSO") Signed-off-by: Shahaf Shuler Acked-by: Yongseok Koh --- drivers/net/mlx5/mlx5_rxtx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c index d95c4bff3d..d46b31c19a 100644 --- a/drivers/net/mlx5/mlx5_rxtx.c +++ b/drivers/net/mlx5/mlx5_rxtx.c @@ -571,7 +571,8 @@ mlx5_tx_burst(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n) RTE_MIN((addr_end - addr), length) : 0; - if (copy_b && ((end - (uintptr_t)raw) > copy_b)) { + if (copy_b && ((end - (uintptr_t)raw) > + (copy_b + sizeof(inl)))) { /* * One Dseg remains in the current WQE. To * keep the computation positive, it is -- 2.21.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-07-22 17:55:08.125343192 -0700 +++ 0030-net-mlx5-fix-packet-inline-on-Tx-queue-wraparound.patch 2019-07-22 17:55:05.943469000 -0700 @@ -1,8 +1,10 @@ -From 57c0e2494c51421033771122e8972a41dddb4cb7 Mon Sep 17 00:00:00 2001 +From ff8ffef0fc43b616676fe87c5aa11cfe90e3cfc9 Mon Sep 17 00:00:00 2001 From: Shahaf Shuler Date: Sun, 10 Mar 2019 10:14:10 +0200 Subject: [PATCH] net/mlx5: fix packet inline on Tx queue wraparound +[ backported from upstream commit 57c0e2494c51421033771122e8972a41dddb4cb7 ] + Inlining a packet to WQE that cross the WQ wraparound, i.e. the WQE starts on the end of the ring and ends on the beginning, is not supported and blocked by the data path logic. @@ -18,7 +20,6 @@ require the inline header. Fixes: 3f13f8c23a7c ("net/mlx5: support hardware TSO") -Cc: stable@dpdk.org Signed-off-by: Shahaf Shuler Acked-by: Yongseok Koh @@ -27,13 +28,13 @@ 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c -index baa4079c14..38ce0e29a2 100644 +index d95c4bff3d..d46b31c19a 100644 --- a/drivers/net/mlx5/mlx5_rxtx.c +++ b/drivers/net/mlx5/mlx5_rxtx.c -@@ -693,7 +693,8 @@ pkt_inline: - RTE_CACHE_LINE_SIZE); - copy_b = (addr_end > addr) ? - RTE_MIN((addr_end - addr), length) : 0; +@@ -571,7 +571,8 @@ mlx5_tx_burst(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n) + RTE_MIN((addr_end - addr), length) : + 0; + - if (copy_b && ((end - (uintptr_t)raw) > copy_b)) { + if (copy_b && ((end - (uintptr_t)raw) > + (copy_b + sizeof(inl)))) {