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 AA988A034E for ; Mon, 21 Feb 2022 16:38:23 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A602740E5A; Mon, 21 Feb 2022 16:38:23 +0100 (CET) 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 DBA7941143 for ; Mon, 21 Feb 2022 16:38:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645457902; 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=pl2YMgIkKSk/2o3GDqqmJ20WzB1LSCC1YQlHHUcAziA=; b=OoseojSobpVgDzLtgyJbLhKOOhPUpkhmGUYoERjyKhAm/MsiETZEgsBJL2ZN/+7MNrG3Ai Nyqjf4/OXBt3h9a51/xSKrrICq1nEhQu6QfV5pBemNxV51w69wnoYgRcb+DaqTVUHFX2Ny CHaw6zE/it2cxswxpNhBAxtMSOaCZyQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-489-pg4vx7-8MS2r4_FQypIOFg-1; Mon, 21 Feb 2022 10:38:16 -0500 X-MC-Unique: pg4vx7-8MS2r4_FQypIOFg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A4658801AC5; Mon, 21 Feb 2022 15:38:15 +0000 (UTC) Received: from rh.Home (unknown [10.39.195.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 986267E2FA; Mon, 21 Feb 2022 15:38:14 +0000 (UTC) From: Kevin Traynor To: Dmitry Kozlyuk Cc: Matan Azrad , dpdk stable Subject: patch 'net/mlx5: relax headroom assertion' has been queued to stable release 21.11.1 Date: Mon, 21 Feb 2022 15:33:57 +0000 Message-Id: <20220221153625.152324-48-ktraynor@redhat.com> In-Reply-To: <20220221153625.152324-1-ktraynor@redhat.com> References: <20220221153625.152324-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" 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.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/26/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/9d1da3652a0e5469caf154e15f7fb3ecd027c830 Thanks. Kevin --- >From 9d1da3652a0e5469caf154e15f7fb3ecd027c830 Mon Sep 17 00:00:00 2001 From: Dmitry Kozlyuk Date: Tue, 28 Dec 2021 11:20:43 +0200 Subject: [PATCH] net/mlx5: relax headroom assertion [ upstream commit 637582afcc886fc53c1dc7a3686cc771abad2cfd ] A debug assertion in Single-Packet Receive Queue (SPRQ) mode required all Rx mbufs to have a 128 byte headroom, based on the assumption that rte_pktmbuf_init() sets it. However, rte_pktmbuf_init() may set a smaller headroom if the dataroom is insufficient, e.g. this is a natural case for split buffer segments. The headroom can also be larger. Only check the headroom size when vectored Rx routines are used because they rely on it. Relax the assertion to require sufficient headroom size, not an exact one. Fixes: a0a45e8af723 ("net/mlx5: configure Rx queue for buffer split") Signed-off-by: Dmitry Kozlyuk Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_rxq.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c index eda609dd78..ee07c610b9 100644 --- a/drivers/net/mlx5/mlx5_rxq.c +++ b/drivers/net/mlx5/mlx5_rxq.c @@ -141,4 +141,5 @@ rxq_alloc_elts_sprq(struct mlx5_rxq_ctrl *rxq_ctrl) RTE_BIT32(rxq_ctrl->rxq.log_strd_num) : RTE_BIT32(rxq_ctrl->rxq.elts_n); + bool has_vec_support = mlx5_rxq_check_vec_support(&rxq_ctrl->rxq) > 0; unsigned int i; int err; @@ -162,6 +163,7 @@ rxq_alloc_elts_sprq(struct mlx5_rxq_ctrl *rxq_ctrl) goto error; } - /* Headroom is reserved by rte_pktmbuf_alloc(). */ - MLX5_ASSERT(DATA_OFF(buf) == RTE_PKTMBUF_HEADROOM); + /* Only vectored Rx routines rely on headroom size. */ + MLX5_ASSERT(!has_vec_support || + DATA_OFF(buf) >= RTE_PKTMBUF_HEADROOM); /* Buffer is supposed to be empty. */ MLX5_ASSERT(rte_pktmbuf_data_len(buf) == 0); @@ -176,5 +178,5 @@ rxq_alloc_elts_sprq(struct mlx5_rxq_ctrl *rxq_ctrl) } /* If Rx vector is activated. */ - if (mlx5_rxq_check_vec_support(&rxq_ctrl->rxq) > 0) { + if (has_vec_support) { struct mlx5_rxq_data *rxq = &rxq_ctrl->rxq; struct rte_mbuf *mbuf_init = &rxq->fake_mbuf; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-02-21 15:22:45.693622761 +0000 +++ 0048-net-mlx5-relax-headroom-assertion.patch 2022-02-21 15:22:44.106704159 +0000 @@ -1 +1 @@ -From 637582afcc886fc53c1dc7a3686cc771abad2cfd Mon Sep 17 00:00:00 2001 +From 9d1da3652a0e5469caf154e15f7fb3ecd027c830 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 637582afcc886fc53c1dc7a3686cc771abad2cfd ] + @@ -17 +18,0 @@ -Cc: stable@dpdk.org