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 877B7A054A for ; Tue, 25 Oct 2022 17:09:41 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8281042C3F; Tue, 25 Oct 2022 17:09:41 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id E76BF42C3C for ; Tue, 25 Oct 2022 17:09:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666710578; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=S9j4ToQYK+82QjG2cMrmdIiQD9skxgZmjo6f+FDdh9Q=; b=Pd5tCD54IBymAsqQ4ZaQXdaNjD0GQDCK/Dx/+H2NDC0a2YwyoryL66tJgLiIIZEMyq6/mg B1NT8Ni22XdJ15xSHz5OK7vPn8t1lhMMkGGpVzVO3t0DBBlSHaHPx1ftaW5CNcz8mdBBcF fpeRDB+/9fTBn746DBIKQ4+Jd07A3OI= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-641-KZ623FuFNb-vyZPI57coAw-1; Tue, 25 Oct 2022 11:09:35 -0400 X-MC-Unique: KZ623FuFNb-vyZPI57coAw-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 531DE80A0AE; Tue, 25 Oct 2022 15:09:33 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.192.13]) by smtp.corp.redhat.com (Postfix) with ESMTP id 30A7047505E; Tue, 25 Oct 2022 15:09:31 +0000 (UTC) From: Kevin Traynor To: Viacheslav Ovsiienko Cc: Dmitry Kozlyuk , dpdk stable Subject: patch 'net/mlx5: fix inline length exceeding descriptor limit' has been queued to stable release 21.11.3 Date: Tue, 25 Oct 2022 16:07:03 +0100 Message-Id: <20221025150734.142189-68-ktraynor@redhat.com> In-Reply-To: <20221025150734.142189-1-ktraynor@redhat.com> References: <20221025150734.142189-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 21.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 11/01/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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/6986b5af9cc02c5f1e2e9390ed1c7d44123bd30f Thanks. Kevin --- >From 6986b5af9cc02c5f1e2e9390ed1c7d44123bd30f Mon Sep 17 00:00:00 2001 From: Viacheslav Ovsiienko Date: Wed, 17 Aug 2022 17:13:57 +0300 Subject: [PATCH] net/mlx5: fix inline length exceeding descriptor limit [ upstream commit d15bfd2930f343baf3f9e3a20b6d5f948f783394 ] The hardware descriptor (WQE) length field is 6 bits wide and we have the native limitation for the overall descriptor length. To improve the PCIe bandwidth the packet data can be inline into descriptor. If PMD was configured to inline large amount of data it happened there was no enough space remaining in the descriptor to specify all the packet data segments and PMD rejected problematic packets. The patch tries to adjust the inline data length conservatively and allows to avoid error occurring. Fixes: 18a1c20044c0 ("net/mlx5: implement Tx burst template") Fixes: e2259f93ef45 ("net/mlx5: fix Tx when inlining is impossible") Signed-off-by: Viacheslav Ovsiienko Reviewed-by: Dmitry Kozlyuk --- drivers/net/mlx5/mlx5_tx.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx5/mlx5_tx.h b/drivers/net/mlx5/mlx5_tx.h index 7bebe8f9ab..ba37dc9b66 100644 --- a/drivers/net/mlx5/mlx5_tx.h +++ b/drivers/net/mlx5/mlx5_tx.h @@ -2027,6 +2027,22 @@ do_build: return MLX5_TXCMP_CODE_EXIT; /* Check for maximal WQE size. */ - if (unlikely((MLX5_WQE_SIZE_MAX / MLX5_WSEG_SIZE) < ds)) - return MLX5_TXCMP_CODE_ERROR; + if (unlikely((MLX5_WQE_SIZE_MAX / MLX5_WSEG_SIZE) < ds)) { + /* Check if we can adjust the inline length. */ + if (unlikely(txq->inlen_mode)) { + ds = NB_SEGS(loc->mbuf) + 2 + + (txq->inlen_mode - + MLX5_ESEG_MIN_INLINE_SIZE + + MLX5_WSEG_SIZE + + MLX5_WSEG_SIZE - 1) / MLX5_WSEG_SIZE; + if (unlikely((MLX5_WQE_SIZE_MAX / MLX5_WSEG_SIZE) < ds)) + return MLX5_TXCMP_CODE_ERROR; + } + /* We have lucky opportunity to adjust. */ + inlen = RTE_MIN(inlen, MLX5_WQE_SIZE_MAX - + MLX5_WSEG_SIZE * 2 - + MLX5_WSEG_SIZE * NB_SEGS(loc->mbuf) - + MLX5_WSEG_SIZE + + MLX5_ESEG_MIN_INLINE_SIZE); + } #ifdef MLX5_PMD_SOFT_COUNTERS /* Update sent data bytes/packets counters. */ -- 2.37.3 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-10-25 14:19:00.085737104 +0100 +++ 0068-net-mlx5-fix-inline-length-exceeding-descriptor-limi.patch 2022-10-25 14:18:58.478798331 +0100 @@ -1 +1 @@ -From d15bfd2930f343baf3f9e3a20b6d5f948f783394 Mon Sep 17 00:00:00 2001 +From 6986b5af9cc02c5f1e2e9390ed1c7d44123bd30f Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit d15bfd2930f343baf3f9e3a20b6d5f948f783394 ] + @@ -19 +20,0 @@ -Cc: stable@dpdk.org @@ -28 +29 @@ -index 8e113e3778..59ebe95032 100644 +index 7bebe8f9ab..ba37dc9b66 100644 @@ -31 +32 @@ -@@ -2079,6 +2079,22 @@ do_build: +@@ -2027,6 +2027,22 @@ do_build: