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 C53E5A0350 for ; Mon, 21 Feb 2022 16:43:29 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BD77F410E0; Mon, 21 Feb 2022 16:43:29 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 0BD2F40E5A for ; Mon, 21 Feb 2022 16:43:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645458207; 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=yURnQZDgJ439oUeQwAManL2jo06xC0MKVyMrKZsMZGY=; b=f52WPui4y/AFLlUCz38kvUH/qluV2uLA6LT3+horit39kHHK0uY0sj6FvSFoGDCkcIUen8 4kpGaxFLKrcq/g7U6U0sMA3ZLYVeTikRKN8CxaGTlq7E07SsC+ilb68i+qj1jry+NZgWTE uAq4cq3QlbRvfl0axokGy5VFO9RrcDg= 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-252-47Z1X2grMoG_EWbL7oxmiA-1; Mon, 21 Feb 2022 10:43:24 -0500 X-MC-Unique: 47Z1X2grMoG_EWbL7oxmiA-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 5D4E3801ADB; Mon, 21 Feb 2022 15:43:23 +0000 (UTC) Received: from rh.Home (unknown [10.39.195.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 53B427E131; Mon, 21 Feb 2022 15:43:22 +0000 (UTC) From: Kevin Traynor To: Anoob Joseph Cc: Akhil Goyal , dpdk stable Subject: patch 'crypto/cnxk: fix update of number of descriptors' has been queued to stable release 21.11.1 Date: Mon, 21 Feb 2022 15:36:20 +0000 Message-Id: <20220221153625.152324-191-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/0fd24703c6d04c8a465ca5e41c7c0e48cb8d2cf2 Thanks. Kevin --- >From 0fd24703c6d04c8a465ca5e41c7c0e48cb8d2cf2 Mon Sep 17 00:00:00 2001 From: Anoob Joseph Date: Mon, 31 Jan 2022 18:00:29 +0530 Subject: [PATCH] crypto/cnxk: fix update of number of descriptors [ upstream commit a45f37334b8db6b1f2678e84d6529663e7252219 ] Pending queue also need to be adjusted while updating the number of descriptors. Fixes: a455fd869cd7 ("common/cnxk: align CPT queue depth to power of 2") Signed-off-by: Anoob Joseph Acked-by: Akhil Goyal --- drivers/common/cnxk/roc_cpt.c | 3 --- drivers/crypto/cnxk/cnxk_cryptodev_ops.c | 8 ++++++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/common/cnxk/roc_cpt.c b/drivers/common/cnxk/roc_cpt.c index 0e2dc45ad8..6179df2f1f 100644 --- a/drivers/common/cnxk/roc_cpt.c +++ b/drivers/common/cnxk/roc_cpt.c @@ -572,7 +572,4 @@ cpt_lf_init(struct roc_cpt_lf *lf) lf->nb_desc = CPT_LF_DEFAULT_NB_DESC; - /* Update nb_desc to next power of 2 to aid in pending queue checks */ - lf->nb_desc = plt_align32pow2(lf->nb_desc); - /* Allocate memory for instruction queue for CPT LF. */ iq_mem = plt_zmalloc(cpt_lf_iq_mem_calc(lf->nb_desc), ROC_ALIGN); diff --git a/drivers/crypto/cnxk/cnxk_cryptodev_ops.c b/drivers/crypto/cnxk/cnxk_cryptodev_ops.c index 21ee09f962..0d99c891d9 100644 --- a/drivers/crypto/cnxk/cnxk_cryptodev_ops.c +++ b/drivers/crypto/cnxk/cnxk_cryptodev_ops.c @@ -362,4 +362,5 @@ cnxk_cpt_queue_pair_setup(struct rte_cryptodev *dev, uint16_t qp_id, struct rte_pci_device *pci_dev; struct cnxk_cpt_qp *qp; + uint32_t nb_desc; int ret; @@ -374,5 +375,8 @@ cnxk_cpt_queue_pair_setup(struct rte_cryptodev *dev, uint16_t qp_id, } - qp = cnxk_cpt_qp_create(dev, qp_id, conf->nb_descriptors); + /* Update nb_desc to next power of 2 to aid in pending queue checks */ + nb_desc = plt_align32pow2(conf->nb_descriptors); + + qp = cnxk_cpt_qp_create(dev, qp_id, nb_desc); if (qp == NULL) { plt_err("Could not create queue pair %d", qp_id); @@ -381,5 +385,5 @@ cnxk_cpt_queue_pair_setup(struct rte_cryptodev *dev, uint16_t qp_id, qp->lf.lf_id = qp_id; - qp->lf.nb_desc = conf->nb_descriptors; + qp->lf.nb_desc = nb_desc; ret = roc_cpt_lf_init(roc_cpt, &qp->lf); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-02-21 15:22:48.666331963 +0000 +++ 0191-crypto-cnxk-fix-update-of-number-of-descriptors.patch 2022-02-21 15:22:44.376704768 +0000 @@ -1 +1 @@ -From a45f37334b8db6b1f2678e84d6529663e7252219 Mon Sep 17 00:00:00 2001 +From 0fd24703c6d04c8a465ca5e41c7c0e48cb8d2cf2 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit a45f37334b8db6b1f2678e84d6529663e7252219 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index 89877d1b28..b3a3649fff 100644 +index 0e2dc45ad8..6179df2f1f 100644 @@ -32 +33 @@ -index 67a2d9b08e..a5fb68da02 100644 +index 21ee09f962..0d99c891d9 100644