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 18E06A0540 for ; Thu, 7 Jul 2022 09:55:35 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E9A754113C; Thu, 7 Jul 2022 09:55:34 +0200 (CEST) Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by mails.dpdk.org (Postfix) with ESMTP id 5403B40DDE for ; Thu, 7 Jul 2022 09:55:33 +0200 (CEST) Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (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 smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 2AF7940274 for ; Thu, 7 Jul 2022 07:55:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1657180533; bh=BvlH9Z8K/Vle2yxQmhIFsBwaJdlqjk9KgwrIKuDDD7I=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=LTIVOZAYXOMQrajOEiPP/wXAOtzW2dlkKE86qlX/qjjJNFcvJWheTi/OU4Cx2+nmr pT+LD5dUy5S7b4OeKWEDM6sMJeNyufHNOe/2YmpSsd4hgBqTVm1tbPmSGi6t+hPSFb 39/2dy/sxwzCbEl0q3lT2NzAqdOUaDR/2eK5ObSqq0EywLtrFm4R4WdRyUR3Fom0hN s6sQnnPav0N3AgeMc8rK9b7J2MxvWf+3NCE61fDNM1ehWeXvYJ7aokGQTBSSaWRXB3 E0K/ji/pwiyE2vad4qwTEVGwJWM89UiCo+Ost0Z6qJA/cPf8ToTz7zefYq9NpiDEgu EwrAzBCa63uZQ== Received: by mail-ed1-f72.google.com with SMTP id y18-20020a056402441200b0043564cdf765so13422518eda.11 for ; Thu, 07 Jul 2022 00:55:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BvlH9Z8K/Vle2yxQmhIFsBwaJdlqjk9KgwrIKuDDD7I=; b=GSgpnxWU5Y6jSY9D/87nmz8c4SqljKx1qhv6HIg7PLpb3zrkLm9JgPnWoePGNvRJd3 jR0bzKRaifRnAV0inKkDIC752MNGDZc5vc13VKt/KnDDFDOwDdc7N0nKX0INlKpfcq2Z IngLj6t4uHcM0J0KBjpWNFnjaqCxudPZL3W0S+IEwHU8SgLC+riaMQ26hLjW0M+G5acm YLVRMQvBWQ18NamYO1huL16wdMNsWdIWDnVSW56CfVzUA0R8CxdxiDHgxwx5z3JiQB4B YJ3Cq7viKsP9w/M1tKdXBNPI91dkgvj+bzbe0r7LrKXgUMl+4YAzPIuE0sDaljNayib3 QTJA== X-Gm-Message-State: AJIora9MTx6kd9d54FwA5Gq8rimilbc953nhNzJLmvq2pH1UVtMToJAQ +i3tRV9/v3hFkag7YarMPqHUH2Qul9byfLbthH30ZYTdaxUCc9RiePVHOheGZ6nRU/JseMMuzWJ 8aL2+gJtB1ISAHX3U1HaWsKK4 X-Received: by 2002:a17:907:6e01:b0:726:9a7b:59b7 with SMTP id sd1-20020a1709076e0100b007269a7b59b7mr44723031ejc.752.1657180532961; Thu, 07 Jul 2022 00:55:32 -0700 (PDT) X-Google-Smtp-Source: AGRyM1swqgkvrEiTkZlBOQHTl0HbbU/UspCUBnrhojGB3k16Es0/UedhU9x1bb5ty3SzmkT+/6xnTw== X-Received: by 2002:a17:907:6e01:b0:726:9a7b:59b7 with SMTP id sd1-20020a1709076e0100b007269a7b59b7mr44723019ejc.752.1657180532774; Thu, 07 Jul 2022 00:55:32 -0700 (PDT) Received: from Keschdeichel.fritz.box ([2a02:6d40:3a4f:7b00:c19b:938e:7c97:afe2]) by smtp.gmail.com with ESMTPSA id cq9-20020a056402220900b0043a6df72c11sm7857527edb.63.2022.07.07.00.55.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jul 2022 00:55:31 -0700 (PDT) From: christian.ehrhardt@canonical.com To: Dmitry Kozlyuk Cc: Viacheslav Ovsiienko , dpdk stable Subject: patch 'net/mlx5: fix Tx when inlining is impossible' has been queued to stable release 19.11.13 Date: Thu, 7 Jul 2022 09:53:58 +0200 Message-Id: <20220707075522.194223-3-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220707075522.194223-1-christian.ehrhardt@canonical.com> References: <20220707075522.194223-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 19.11.13 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/09/22. 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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/3901ebc4027b629f9d2c8a28fe16a5c89b7953f8 Thanks. Christian Ehrhardt --- >From 3901ebc4027b629f9d2c8a28fe16a5c89b7953f8 Mon Sep 17 00:00:00 2001 From: Dmitry Kozlyuk Date: Thu, 31 Mar 2022 17:38:41 +0300 Subject: [PATCH] net/mlx5: fix Tx when inlining is impossible [ upstream commit e2259f93ef455c75bfeda9a7349689b7e9be5981 ] When txq_inline_max is too large and an mbuf is multi-segment it may be impossible to inline data and build a valid WQE, because WQE length would be larger then HW can represent. It is impossible to detect misconfiguration at startup, because the condition depends on the mbuf composition. The check on the data path to prevent the error treated the length limit as expressed in 64B units, while the calculated length and limit are in 16B units. Fix the condition to avoid subsequent TxQ failure and recovery. Fixes: 18a1c20044c0 ("net/mlx5: implement Tx burst template") Signed-off-by: Dmitry Kozlyuk Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_rxtx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c index 87bfd832c5..a4f627e1a6 100644 --- a/drivers/net/mlx5/mlx5_rxtx.c +++ b/drivers/net/mlx5/mlx5_rxtx.c @@ -3427,7 +3427,7 @@ do_align: if (unlikely(loc->wqe_free < ((ds + 3) / 4))) return MLX5_TXCMP_CODE_EXIT; /* Check for maximal WQE size. */ - if (unlikely((MLX5_WQE_SIZE_MAX / MLX5_WSEG_SIZE) < ((ds + 3) / 4))) + if (unlikely((MLX5_WQE_SIZE_MAX / MLX5_WSEG_SIZE) < ds)) return MLX5_TXCMP_CODE_ERROR; #ifdef MLX5_PMD_SOFT_COUNTERS /* Update sent data bytes/packets counters. */ -- 2.37.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-07-07 09:54:11.313010771 +0200 +++ 0003-net-mlx5-fix-Tx-when-inlining-is-impossible.patch 2022-07-07 09:54:10.777823456 +0200 @@ -1 +1 @@ -From e2259f93ef455c75bfeda9a7349689b7e9be5981 Mon Sep 17 00:00:00 2001 +From 3901ebc4027b629f9d2c8a28fe16a5c89b7953f8 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit e2259f93ef455c75bfeda9a7349689b7e9be5981 ] + @@ -17 +18,0 @@ -Cc: stable@dpdk.org @@ -22 +23 @@ - drivers/net/mlx5/mlx5_tx.h | 2 +- + drivers/net/mlx5/mlx5_rxtx.c | 2 +- @@ -25,5 +26,5 @@ -diff --git a/drivers/net/mlx5/mlx5_tx.h b/drivers/net/mlx5/mlx5_tx.h -index 89dac0c65a..dfa04612ff 100644 ---- a/drivers/net/mlx5/mlx5_tx.h -+++ b/drivers/net/mlx5/mlx5_tx.h -@@ -2070,7 +2070,7 @@ do_build: +diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c +index 87bfd832c5..a4f627e1a6 100644 +--- a/drivers/net/mlx5/mlx5_rxtx.c ++++ b/drivers/net/mlx5/mlx5_rxtx.c +@@ -3427,7 +3427,7 @@ do_align: