From patchwork Thu Feb 11 14:16:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 380995 Delivered-To: patch@linaro.org Received: by 2002:a02:b18a:0:0:0:0:0 with SMTP id t10csp2121280jah; Thu, 11 Feb 2021 06:28:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJyhIFA4/Fxzn3D4FvLn5X9X/FZ3BuSZS+CuWx+412u41e5V2+J3S+yVceifbf6OCkkkYKS9 X-Received: by 2002:a05:6402:3514:: with SMTP id b20mr8462910edd.100.1613053688430; Thu, 11 Feb 2021 06:28:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613053688; cv=none; d=google.com; s=arc-20160816; b=PmKudesSUmZ/X4n7nyP4Zj23E9kC22HFtEUoR1pvoaJWHZDagJKZu3KmJanbGzqY2A KTJ8fcsvrUTBhWZdKgYI4pROlljWnbfRrhbVU0PEPcCxRifnKPo4AcZEmxXXGyOeJpuH yX8x+CX5zbGLNQ74fu1798dh5tIuo5ZpSY99cTDOFAOUkb/BhvYeQIqlJ3rC36ALpoyF 1IUUnX0Y54IkjORROK02x2yUGl/IiT1CoDFZU9z6FuTwIdYlP02LZ5/ieBY/6QIVeTou UlM3z62fBsqRWJmO8UZHdOW0UNA32rjjuOApz6u6IfraG67Sn7/dmA3Wb5S3pZu7u6Sr 7xVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from; bh=SUqWgksXj9NgMvjpFo03UcV/0nF4UXTkAWyxpnigHQE=; b=dkzAR7qPMY996wWeq+NH+uxI82ZMB9s3B01gYySakoLOMv3/LPVWoIG5QU9xffFqPS uH+UMLKNlPvCKMRP6HVGSDyn9kILRPKRyUiGzDv1NQIm/2iaa5atKcoQNr/AYNHEZGrG 4mjZQJA1Ln6muRtMdA9xqLecH+QOrvjdH/j9MUn5YHTgUj7QMaj5TZJFWEqErThYn1KO xn4lsVyG2yBA9ZM6KUUJz4R28PtLBtWvSRBWJkoFKCPlbE5piJUN42m/0B/xT45a/dFW A0TSLW0JglsvTvd+3M7pgrRVExxSU8Dpy3Te5YipoI/3wUbVs3NveK6Ux2VBHQ+HH7Tf 9ELA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from mails.dpdk.org (mails.dpdk.org. [217.70.189.124]) by mx.google.com with ESMTP id y25si4050709ejb.546.2021.02.11.06.28.08; Thu, 11 Feb 2021 06:28:08 -0800 (PST) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) client-ip=217.70.189.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CBC531CC4D8; Thu, 11 Feb 2021 15:28:01 +0100 (CET) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by mails.dpdk.org (Postfix) with ESMTP id A18A31CC38A for ; Thu, 11 Feb 2021 15:27:59 +0100 (CET) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id BC9F91A05F5; Thu, 11 Feb 2021 15:27:58 +0100 (CET) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 7D5401A05C7; Thu, 11 Feb 2021 15:27:57 +0100 (CET) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.133.63]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 7A22B402AD; Thu, 11 Feb 2021 15:27:55 +0100 (CET) From: Hemant Agrawal To: dev@dpdk.org, ferruh.yigit@intel.com Date: Thu, 11 Feb 2021 19:46:01 +0530 Message-Id: <20210211141620.12482-2-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210211141620.12482-1-hemant.agrawal@nxp.com> References: <20210120142723.14090-1-hemant.agrawal@nxp.com> <20210211141620.12482-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v2 01/20] bus/fslmc: fix to use ci value for qbman 5.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Youri Querry Random portal hangs observed on device with QBMAN 5.0 This fixes few random packet hang issues in event mode. Few things fixed it. 1. generally, pi == ci, no need for extra checks. 2. the proper initilizations in init with ci helped Fixes: 1b49352f41be ("bus/fslmc: rename portal pi index to consumer index") Cc: stable@dpdk.org Signed-off-by: Youri Querry Acked-by: Hemant Agrawal --- drivers/bus/fslmc/qbman/qbman_portal.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) -- 2.17.1 diff --git a/drivers/bus/fslmc/qbman/qbman_portal.c b/drivers/bus/fslmc/qbman/qbman_portal.c index 77c9d508c4..aedcad9258 100644 --- a/drivers/bus/fslmc/qbman/qbman_portal.c +++ b/drivers/bus/fslmc/qbman/qbman_portal.c @@ -339,17 +339,9 @@ struct qbman_swp *qbman_swp_init(const struct qbman_swp_desc *d) eqcr_pi = qbman_cinh_read(&p->sys, QBMAN_CINH_SWP_EQCR_PI); p->eqcr.pi = eqcr_pi & p->eqcr.pi_ci_mask; p->eqcr.pi_vb = eqcr_pi & QB_VALID_BIT; - if ((p->desc.qman_version & QMAN_REV_MASK) >= QMAN_REV_5000 - && (d->cena_access_mode == qman_cena_fastest_access)) - p->eqcr.ci = qbman_cinh_read(&p->sys, QBMAN_CINH_SWP_EQCR_PI) - & p->eqcr.pi_ci_mask; - else - p->eqcr.ci = qbman_cinh_read(&p->sys, QBMAN_CINH_SWP_EQCR_CI) - & p->eqcr.pi_ci_mask; - p->eqcr.available = p->eqcr.pi_ring_size - - qm_cyc_diff(p->eqcr.pi_ring_size, - p->eqcr.ci & (p->eqcr.pi_ci_mask<<1), - p->eqcr.pi & (p->eqcr.pi_ci_mask<<1)); + p->eqcr.ci = qbman_cinh_read(&p->sys, QBMAN_CINH_SWP_EQCR_CI) + & p->eqcr.pi_ci_mask; + p->eqcr.available = p->eqcr.pi_ring_size; portal_idx_map[p->desc.idx] = p; return p;