From patchwork Wed Jan 20 14:27:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 367040 Delivered-To: patch@linaro.org Received: by 2002:a17:906:24d5:0:0:0:0 with SMTP id f21csp227237ejb; Wed, 20 Jan 2021 06:38:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJwXdpmAOocWoFthJwItGKSSkojjom+0bE6/5vhzZbTqFPCaXRTJ1iCwmIilDmNSipPqqHI+ X-Received: by 2002:a17:906:6b91:: with SMTP id l17mr5994074ejr.171.1611153514537; Wed, 20 Jan 2021 06:38:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611153514; cv=none; d=google.com; s=arc-20160816; b=xWw6xuS8zD/tNghxY6O86TK1KNyu8GJ156BD5D6mghIoFDOF1Ci4yFETuVMbNi4Wwo 9JCLytqIrFaN1jFYkcBeAEcMrjqJCst1Z8VeIQ0aGDjg5uk1YZRVB9Nn/XMwQBU7Za2P eG5phZJdT1YD+B33rAiY6nTmacJ63dngZP/DhcovQnFXOQW3b+l9vjY4MgpcGKWBNGCD 36oCBVSBafbkGLNDlQXQhiizpxswbucgt+iVcULX0Xyr+m4/nywKSl3jgY3P3svxq8KF hc8g6WmX0ZW6BHOcNvqrqpJtzGwhwPAah2M5+e9jG4PiLTM3UyZEkYIW5ShySyxdAdVc nzbA== 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=3EzmxqJVEY3CQmD7YYoXeyyrffKDg45JAag+9CC96Tg=; b=DdHp2vGQgY2coausHRYPF3VsYoUbnDhC1IklZcfzEGL+ry9jQTZe3oJ21l3+O6hPjY DdGLxJZk/36eU98PQp6P0uXZB3tmxoDOQXbPby6dZy9wIKL6DxKEaCFCZUHBawglYr0N kjyTYCWe4k/sByeJdL2sNnMepDyzOBAwsJwtX8LHxaFcTPOgUqQeJuXPH7i34AFnJUSQ i4M1maRu7CBXjzRMJ5gDoh485/h0ViqRVqy29Aszr4DrFab+VLTLeS1XoimbRz/EmCQc oSHuYn42tzRhRzVZaBrfxVs9JjG4UCrFDYaXTU2wiUnAVu3inoGIzZYx176ANIbJ+8Q0 NmFQ== 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 t5si887960edw.52.2021.01.20.06.38.34; Wed, 20 Jan 2021 06:38:34 -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 5B783140D98; Wed, 20 Jan 2021 15:38:23 +0100 (CET) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by mails.dpdk.org (Postfix) with ESMTP id C88B3140D20 for ; Wed, 20 Jan 2021 15:38:19 +0100 (CET) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id D20951A0A5A; Wed, 20 Jan 2021 15:38:18 +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 8E2D41A1499; Wed, 20 Jan 2021 15:38:17 +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 8AD694031C; Wed, 20 Jan 2021 15:38:15 +0100 (CET) From: Hemant Agrawal To: dev@dpdk.org, ferruh.yigit@intel.com Date: Wed, 20 Jan 2021 19:57:16 +0530 Message-Id: <20210120142723.14090-2-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210120142723.14090-1-hemant.agrawal@nxp.com> References: <20210120142723.14090-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH 1/7] 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 since for qbman 5.0 generally, pi == ci, no need for extra checks. They are causing issue. This fixes few random packet hang issues in event mode. 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;