From patchwork Thu May 7 10:46:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 186289 Delivered-To: patch@linaro.org Received: by 2002:a92:8d81:0:0:0:0:0 with SMTP id w1csp3041000ill; Thu, 7 May 2020 03:49:08 -0700 (PDT) X-Google-Smtp-Source: APiQypL/fIL+8NT+vwzkml1V1J6MBQ5kGUYLyUZM7VBHOYSDTUa13vA66az1OpA7NJK0lpqHc+EM X-Received: by 2002:a05:6402:6cb:: with SMTP id n11mr11456292edy.210.1588848546861; Thu, 07 May 2020 03:49:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588848546; cv=none; d=google.com; s=arc-20160816; b=NBQRNQ5C5KEhRvpqo8BUVmM43GovzyeLsO0VvaWnIJL+rtSCh9kMeYzIljf8/TfvJu Ehk1gj5DCREBHBDp1RV8rJxGKYWQCKM+HfvG3FQyZpAETfbkoNqkOsOqbxbn7MXHSEQ0 RtP3kmEZmXuTrJrqW4T53linXbBPR5Wie7PgGgzR8mQJCaVKz5DeoAJ7L5rdUrJv1wk/ ysirQaXy1sVyr4N5wTFLp5B7uE1OPiI0V7FfNq3RTEfmPEOnyRGpLj4qbeBdyRaaTU+/ NITcbQJGiKMoK438h2kKQ7IOnD1QgQYlfunXB4NW+ZWyQoiXCud5TH98lxHUboFMvbWd xVFg== 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:cc:to:from; bh=/to1Eu13YE64aeh92+9eSUIk7gyZjhEoYDVwpYa7Vhk=; b=fcR/mAvhO7DhZLiTgE/FoBur0uZE2cKgEdxOsZKbaGOKeOUqXG8XqetQ8iDt/nYb6c eqlxdP+KWQRntif+uppoRoI94pqrpknlcNkcnqu5uQaaMwy8Hb21h7eztcYsFBi3kO/H booQ7rFi0t8JLUzjlscOWtm/vCupLk9SCDEdEVw3CWESJSyG1GhZnV3Tu9T8pGVq2HL5 wYjJG/6ZTrc4aLeJf2tN5yuvagoh+R7eas5VO7FSC+0m8KspGOW5u69Kf06g69Gehk9P Uzyk/djZTkKm8vhQcjpuGyxF/1aZbWw3n5gjwqrCZsZjQW1+GuKTSyMDbmI3+LUkPQWA 4kjA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.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 dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id m10si2825579edr.459.2020.05.07.03.49.06; Thu, 07 May 2020 03:49:06 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 23C021DBEC; Thu, 7 May 2020 12:49:03 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id 37CF81DBE1; Thu, 7 May 2020 12:49:00 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id F0D7E2017F7; Thu, 7 May 2020 12:48:59 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id ED0B5200386; Thu, 7 May 2020 12:48:57 +0200 (CEST) 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 0B92740310; Thu, 7 May 2020 18:48:54 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, ferruh.yigit@intel.com Cc: stable@dpdk.org, Apeksha Gupta Date: Thu, 7 May 2020 16:16:37 +0530 Message-Id: <20200507104645.31990-2-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200507104645.31990-1-hemant.agrawal@nxp.com> References: <20200504124118.22877-1-hemant.agrawal@nxp.com> <20200507104645.31990-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v4 1/9] bus/fslmc: fix dereferencing null pointer X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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: Apeksha Gupta This patch fixees the nxp internal coverity reported null pointer dereferncing issue. Fixes: 6fef517e17cf ("bus/fslmc: add qman HW fq query count API") Cc: stable@dpdk.org Signed-off-by: Apeksha Gupta --- drivers/bus/fslmc/qbman/qbman_debug.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) -- 2.17.1 diff --git a/drivers/bus/fslmc/qbman/qbman_debug.c b/drivers/bus/fslmc/qbman/qbman_debug.c index 0bb2ce880f..4cd0923acb 100644 --- a/drivers/bus/fslmc/qbman/qbman_debug.c +++ b/drivers/bus/fslmc/qbman/qbman_debug.c @@ -27,19 +27,20 @@ int qbman_fq_query_state(struct qbman_swp *s, uint32_t fqid, struct qbman_fq_query_np_rslt *r) { struct qbman_fq_query_desc *p; + struct qbman_fq_query_np_rslt *var; p = (struct qbman_fq_query_desc *)qbman_swp_mc_start(s); if (!p) return -EBUSY; p->fqid = fqid; - *r = *(struct qbman_fq_query_np_rslt *)qbman_swp_mc_complete(s, p, - QBMAN_FQ_QUERY_NP); - if (!r) { + var = qbman_swp_mc_complete(s, p, QBMAN_FQ_QUERY_NP); + if (!var) { pr_err("qbman: Query FQID %d NP fields failed, no response\n", fqid); return -EIO; } + *r = *var; /* Decode the outcome */ QBMAN_BUG_ON((r->verb & QBMAN_RESPONSE_VERB_MASK) != QBMAN_FQ_QUERY_NP); From patchwork Thu May 7 10:46:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 186290 Delivered-To: patch@linaro.org Received: by 2002:a92:8d81:0:0:0:0:0 with SMTP id w1csp3041076ill; Thu, 7 May 2020 03:49:17 -0700 (PDT) X-Google-Smtp-Source: APiQypKEaKRKlcnS8OI9ioChAbsDEK+qT2cGOM51qrI1C2s421T3Gh7wCxfhWlxRleBcOpCS5CHR X-Received: by 2002:aa7:d5d5:: with SMTP id d21mr11542208eds.160.1588848557247; Thu, 07 May 2020 03:49:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588848557; cv=none; d=google.com; s=arc-20160816; b=MaOMBisDSVwKfIu2KE1xXP3JDn350IeTW6mXxbs25MhL6tr7FWftSpvX6GYJwuVppb 4iKkm748iEPLrRVtgsLkCnMvq6qGjQ8/fxGxATxoZRo4OEOxJB5byiPN3HhPRcQHYvP/ SnJWBTmhy44SOlKadE4HRLMyhDqOvB5X74BRK4f6+vA82SqUFLkYh/A+/KBp/zRhEgNa u5vI/0fqyDRv9AgSLToZLl0QPmlkhYfbXHslI4yopqfR+NKfbcBpIBHPBWqQcjaiTvl2 oRn+sWIFpHdJDQTVuy+zA/C9fZub8WA59KHpaH/2D0Zdb5cvYXS7f2Ds/oTqDryVWKnz YRYg== 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:cc:to:from; bh=IP7eZ63YM95a07586LlX/HoI5SdiHfGbNSCFEuEvE9Y=; b=ol6SFrqd93+0s73BGbHu+ni8nHd7pO1l1VkByeIM5pskouF+MrcmLwLQVz/YL9w5RE O2osRLmTRDKxctBXQyBzSFa9EQBtOKoZcWhBAEy/LNxTgMvOPqnUlSkV+ODzt1Iv7rga F7DHxhJ8jizb0nTwiurLy6nWbQ+YlC4QCIvzgnsOQ5q1bpNGRqK8QzNVHvxWDgr+diRY EYNiFWnbgqwttq/anJMw0KEn3HA29R+7GGBVmNwsBC8mN4CLtRPGhSx0UHQnra1eFACA vOLUPhDAKk9z0LRKuiSZXmuQyJ07TbrUcM5FosCEYdqJFVdwH2Sdb0QM4QWmitA2nmhX uPzw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.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 dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id v3si3008401edf.513.2020.05.07.03.49.17; Thu, 07 May 2020 03:49:17 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 06A2A1DBFD; Thu, 7 May 2020 12:49:05 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id EFB151DBE1; Thu, 7 May 2020 12:49:00 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id AA3E5200386; Thu, 7 May 2020 12:49:00 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id A67D02017FB; Thu, 7 May 2020 12:48:58 +0200 (CEST) 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 0FFFA402D2; Thu, 7 May 2020 18:48:55 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, ferruh.yigit@intel.com Cc: stable@dpdk.org, Rohit Raj Date: Thu, 7 May 2020 16:16:38 +0530 Message-Id: <20200507104645.31990-3-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200507104645.31990-1-hemant.agrawal@nxp.com> References: <20200504124118.22877-1-hemant.agrawal@nxp.com> <20200507104645.31990-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v4 2/9] net/dpaa2: fix 10g port negotiation issue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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: Rohit Raj Fixed 10g port negotiation issue with another 10G/non 10G port. Initialize the port link speed. Fixes: c5acbb5ea20e ("net/dpaa2: support link status event") Cc: stable@dpdk.org Signed-off-by: Rohit Raj --- drivers/net/dpaa2/dpaa2_ethdev.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.17.1 diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index 2cde55e7cc..4fc550a885 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -553,9 +553,6 @@ dpaa2_eth_dev_configure(struct rte_eth_dev *dev) if (rx_offloads & DEV_RX_OFFLOAD_VLAN_FILTER) dpaa2_vlan_offload_set(dev, ETH_VLAN_FILTER_MASK); - /* update the current status */ - dpaa2_dev_link_update(dev, 0); - return 0; } @@ -1757,6 +1754,7 @@ dpaa2_dev_set_link_up(struct rte_eth_dev *dev) /* changing tx burst function to start enqueues */ dev->tx_pkt_burst = dpaa2_dev_tx; dev->data->dev_link.link_status = state.up; + dev->data->dev_link.link_speed = state.rate; if (state.up) DPAA2_PMD_INFO("Port %d Link is Up", dev->data->port_id); From patchwork Thu May 7 10:46:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 186291 Delivered-To: patch@linaro.org Received: by 2002:a92:8d81:0:0:0:0:0 with SMTP id w1csp3041141ill; Thu, 7 May 2020 03:49:24 -0700 (PDT) X-Google-Smtp-Source: APiQypIAHowbBUBJ3TmXsrgWiD7UB8sg+bywFWcRpN7tiAzbJ0nT/vZNlFUyFHol6vXPsblDRGZ/ X-Received: by 2002:a17:906:9706:: with SMTP id k6mr11842346ejx.103.1588848563992; Thu, 07 May 2020 03:49:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588848563; cv=none; d=google.com; s=arc-20160816; b=j1/WSnDKlDyPXfKRzjhFCL7yXzNnRInMdafVuiapo0mYO+xSa7p4Xr7zfJigO3tTjB K5QxYTl8t0TPk2TRB1IhWQWyb+JqBHW40BROcuVCvvfy9CsKZhOtevyOlNA0cOS9ycsF ZfduAQoZN4001a7yAnZegrWhAFD7QPNtx+Rh6FqINGbPcBnEdsVIL2rTgrkkYazeIjmo mHBDtibRbKC1Xs0gLYdfxxIMXNhK123ClzXaRIJ2bEF/DF5M+HJOmtDaiFPVmA5nKwRf J0Yh2cqrWzjsX9iOdpL3JFw6HKOkfVaBnBsxjeIv0KAookF9WbtD12GUP4ONU+BqBWZF lihw== 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:cc:to:from; bh=u23Kdd/Xe3zsIu55M/OBIAvx3fWFeNM+FBLo+mpKd1w=; b=t/eYvl8Ibjx7/i+LBA8W1yeFeYcnVr2b2tV/8UKdhcCRHN7LwHarzQ7nbQ2zVBxnis LnCcoJWuORk6lWkWrI8BwoHbiNWfqeDLxKyGkmnVlGxCuj1YKkPOhONpHcc32ToErfE9 G7gOaFkeEWz+u2IzfBir0E9WT+kgVYjB7tX0VwsnHruOlscVUVyAQ5v1rcYWvh70dwaA fd7N4NiMb+Q2sJAUnTlSCiMjYNQR+L4wDkh3SYmbA2QHmpbqwqdPDWIUECmZyUsiRBbd 5V4QToWGNnJMLNRajwDrHBsH/UgwG/3UZJvNkeVL/u9ezwbdyfnFRVx36fD1QTJMSE0x bKgg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.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 dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id t27si2927910edt.42.2020.05.07.03.49.23; Thu, 07 May 2020 03:49:23 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 43ACE1DC03; Thu, 7 May 2020 12:49:06 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id 3C5E41DBEC for ; Thu, 7 May 2020 12:49:01 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id BCC7F1A1076; Thu, 7 May 2020 12:49:00 +0200 (CEST) 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 E19A01A1090; Thu, 7 May 2020 12:48:58 +0200 (CEST) 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 BFE0A40288; Thu, 7 May 2020 18:48:56 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, ferruh.yigit@intel.com Cc: Nipun Gupta Date: Thu, 7 May 2020 16:16:39 +0530 Message-Id: <20200507104645.31990-4-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200507104645.31990-1-hemant.agrawal@nxp.com> References: <20200504124118.22877-1-hemant.agrawal@nxp.com> <20200507104645.31990-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v4 3/9] net/dpaa2: do not prefetch annotaion for physical mode X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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: Nipun Gupta When IOVA is physical address do not prefetch the annotation of the next frame, as there is a cost involved there to convert the physical address to virtual address. Signed-off-by: Nipun Gupta --- drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 6 ++-- drivers/net/dpaa2/dpaa2_rxtx.c | 40 +++++++++++++++---------- 2 files changed, 28 insertions(+), 18 deletions(-) -- 2.17.1 diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h index 44d3d49c7a..368fe7c688 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h +++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 2016 Freescale Semiconductor, Inc. All rights reserved. - * Copyright 2016-2019 NXP + * Copyright 2016-2020 NXP * */ @@ -395,8 +395,8 @@ static phys_addr_t dpaa2_mem_vtop(uint64_t vaddr) #else /* RTE_LIBRTE_DPAA2_USE_PHYS_IOVA */ #define DPAA2_MBUF_VADDR_TO_IOVA(mbuf) ((mbuf)->buf_addr) -#define DPAA2_VADDR_TO_IOVA(_vaddr) (_vaddr) -#define DPAA2_IOVA_TO_VADDR(_iova) (_iova) +#define DPAA2_VADDR_TO_IOVA(_vaddr) (phys_addr_t)(_vaddr) +#define DPAA2_IOVA_TO_VADDR(_iova) (void *)(_iova) #define DPAA2_MODIFY_IOVA_TO_VADDR(_mem, _type) #endif /* RTE_LIBRTE_DPAA2_USE_PHYS_IOVA */ diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c index 703f0549ad..89a8221cb8 100644 --- a/drivers/net/dpaa2/dpaa2_rxtx.c +++ b/drivers/net/dpaa2/dpaa2_rxtx.c @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: BSD-3-Clause * * Copyright (c) 2016 Freescale Semiconductor, Inc. All rights reserved. - * Copyright 2016-2019 NXP + * Copyright 2016-2020 NXP * */ @@ -324,8 +324,8 @@ static inline struct rte_mbuf *__rte_hot eth_fd_to_mbuf(const struct qbman_fd *fd, int port_id) { - struct rte_mbuf *mbuf = DPAA2_INLINE_MBUF_FROM_BUF( - DPAA2_IOVA_TO_VADDR(DPAA2_GET_FD_ADDR(fd)), + void *iova_addr = DPAA2_IOVA_TO_VADDR(DPAA2_GET_FD_ADDR(fd)); + struct rte_mbuf *mbuf = DPAA2_INLINE_MBUF_FROM_BUF(iova_addr, rte_dpaa2_bpid_info[DPAA2_GET_FD_BPID(fd)].meta_data_size); /* need to repopulated some of the fields, @@ -350,8 +350,7 @@ eth_fd_to_mbuf(const struct qbman_fd *fd, dpaa2_dev_rx_parse_new(mbuf, fd); else mbuf->packet_type = dpaa2_dev_rx_parse(mbuf, - (void *)((size_t)DPAA2_IOVA_TO_VADDR(DPAA2_GET_FD_ADDR(fd)) - + DPAA2_FD_PTA_SIZE)); + (void *)((size_t)iova_addr + DPAA2_FD_PTA_SIZE)); DPAA2_PMD_DP_DEBUG("to mbuf - mbuf =%p, mbuf->buf_addr =%p, off = %d," "fd_off=%d fd =%" PRIx64 ", meta = %d bpid =%d, len=%d\n", @@ -518,7 +517,7 @@ dpaa2_dev_prefetch_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) int ret, num_rx = 0, pull_size; uint8_t pending, status; struct qbman_swp *swp; - const struct qbman_fd *fd, *next_fd; + const struct qbman_fd *fd; struct qbman_pull_desc pulldesc; struct queue_storage_info_t *q_storage = dpaa2_q->q_storage; struct rte_eth_dev_data *eth_data = dpaa2_q->eth_data; @@ -617,12 +616,15 @@ dpaa2_dev_prefetch_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) } fd = qbman_result_DQ_fd(dq_storage); +#ifndef RTE_LIBRTE_DPAA2_USE_PHYS_IOVA if (dpaa2_svr_family != SVR_LX2160A) { - next_fd = qbman_result_DQ_fd(dq_storage + 1); + const struct qbman_fd *next_fd = + qbman_result_DQ_fd(dq_storage + 1); /* Prefetch Annotation address for the parse results */ - rte_prefetch0((void *)(size_t)(DPAA2_GET_FD_ADDR( - next_fd) + DPAA2_FD_PTA_SIZE + 16)); + rte_prefetch0(DPAA2_IOVA_TO_VADDR((DPAA2_GET_FD_ADDR( + next_fd) + DPAA2_FD_PTA_SIZE + 16))); } +#endif if (unlikely(DPAA2_FD_GET_FORMAT(fd) == qbman_fd_sg)) bufs[num_rx] = eth_sg_fd_to_mbuf(fd, eth_data->port_id); @@ -753,7 +755,7 @@ dpaa2_dev_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) int ret, num_rx = 0, next_pull = nb_pkts, num_pulled; uint8_t pending, status; struct qbman_swp *swp; - const struct qbman_fd *fd, *next_fd; + const struct qbman_fd *fd; struct qbman_pull_desc pulldesc; struct rte_eth_dev_data *eth_data = dpaa2_q->eth_data; @@ -819,11 +821,19 @@ dpaa2_dev_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) } fd = qbman_result_DQ_fd(dq_storage); - next_fd = qbman_result_DQ_fd(dq_storage + 1); - /* Prefetch Annotation address for the parse results */ - rte_prefetch0( - (void *)(size_t)(DPAA2_GET_FD_ADDR(next_fd) - + DPAA2_FD_PTA_SIZE + 16)); +#ifndef RTE_LIBRTE_DPAA2_USE_PHYS_IOVA + if (dpaa2_svr_family != SVR_LX2160A) { + const struct qbman_fd *next_fd = + qbman_result_DQ_fd(dq_storage + 1); + + /* Prefetch Annotation address for the parse + * results. + */ + rte_prefetch0((DPAA2_IOVA_TO_VADDR( + DPAA2_GET_FD_ADDR(next_fd) + + DPAA2_FD_PTA_SIZE + 16))); + } +#endif if (unlikely(DPAA2_FD_GET_FORMAT(fd) == qbman_fd_sg)) bufs[num_rx] = eth_sg_fd_to_mbuf(fd, From patchwork Thu May 7 10:46:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 186292 Delivered-To: patch@linaro.org Received: by 2002:a92:8d81:0:0:0:0:0 with SMTP id w1csp3041262ill; Thu, 7 May 2020 03:49:35 -0700 (PDT) X-Google-Smtp-Source: APiQypJjDHm/dPmYSkcX+MLGZfanZcHGx4J2UDNz1pai9mfFHPLXdUR8b+9v0RzNwvYRjoSR71v1 X-Received: by 2002:a05:6402:3125:: with SMTP id dd5mr11698099edb.208.1588848575024; Thu, 07 May 2020 03:49:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588848575; cv=none; d=google.com; s=arc-20160816; b=VpKVBr6m5EHJxOe/4nkQD8LafgVy1t4JdXxoRDVxZrxtgKogTxj1jENpft4TJKLosB J7L8odGCLeRkdA+rJjovNkQP4Du6kTNLCoMgI4ThYA8bBnqjnMDVmrxD3bZkFCCMDpXD 3mbFCW+IBxsJgJhtZwuPs8ZhwmCf87BwSkXfrzyPsovgHik+B7dxDYErrH3x+ogzheIu C1PPxgqE8BQ5FTCV2Lwg94MoSHc4prVV94pGT7457gaF3TBmqH9zKu4OyhC92lFjRGV6 jer7YhkqKyS9ALma3zb6+Ibmd4e2oX36frX8rAZ1j2102VLX3Ai/YxK4iApDeILrJijk Uukw== 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:cc:to:from; bh=UsrQKj9UBCi+3m44IiuE1molm0kaebga8UjHfpu3AKo=; b=ZF8AweWr59d6CIvjaO+tm0YX9DFtnTi/vCbYiTo8iqggX8m160IOUfPul2wTFypGE7 6OcUtqfB/3jkFLGR6xCeSHFjjVfOTWtjBuHlUpdfkPdJ00py42Q0mKUgBrMdvRYFUO34 3DveHFu3eFHrZJk0bpYmJJEX/HWjCzl/YTvL941M0Aa/WLfDBdWNEYMYwMrrRTr/WMb5 5NmKwqmXftfjDCxajs5NKWmP/qZmK0REZ0bq4k+wvquBh+wwI7ITMpywDnGuvlv4bIak 0APGhZN/Z4mBIfu2GnPds4csIFmH5z2Gdc7d8ATexzg3qGfTTQ1RXl+9Q8Fw20DNVjv/ MCzA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.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 dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id b8si2913918edw.411.2020.05.07.03.49.34; Thu, 07 May 2020 03:49:35 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 83A591DC0A; Thu, 7 May 2020 12:49:07 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id CA9E01DBE1 for ; Thu, 7 May 2020 12:49:01 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id AFA85201801; Thu, 7 May 2020 12:49:01 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id D782A200FC2; Thu, 7 May 2020 12:48:59 +0200 (CEST) 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 5E1CC40302; Thu, 7 May 2020 18:48:57 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, ferruh.yigit@intel.com Cc: Hemant Agrawal Date: Thu, 7 May 2020 16:16:40 +0530 Message-Id: <20200507104645.31990-5-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200507104645.31990-1-hemant.agrawal@nxp.com> References: <20200504124118.22877-1-hemant.agrawal@nxp.com> <20200507104645.31990-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v4 4/9] net/dpaa2: add default values for Rx params in info X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" This patch adds default/preferred rx/tx params in dev info, specially the advertised burst size. Signed-off-by: Hemant Agrawal --- doc/guides/nics/features/dpaa2.ini | 2 +- drivers/net/dpaa/dpaa_ethdev.c | 4 ++++ drivers/net/dpaa/dpaa_ethdev.h | 1 + drivers/net/dpaa2/dpaa2_ethdev.c | 16 ++++++++++++++++ drivers/net/dpaa2/dpaa2_ethdev.h | 2 ++ 5 files changed, 24 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/doc/guides/nics/features/dpaa2.ini b/doc/guides/nics/features/dpaa2.ini index 6ebbab4b80..c2214fbd50 100644 --- a/doc/guides/nics/features/dpaa2.ini +++ b/doc/guides/nics/features/dpaa2.ini @@ -4,7 +4,7 @@ ; Refer to default.ini for the full list of available PMD features. ; [Features] -Speed capabilities = P +Speed capabilities = Y Link status = Y Link status event = Y Queue start/stop = Y diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index 5f81968d80..56eb5ec47c 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -363,6 +363,10 @@ static int dpaa_eth_dev_info(struct rte_eth_dev *dev, dev_tx_offloads_nodis; dev_info->default_rxportconf.burst_size = DPAA_DEF_RX_BURST_SIZE; dev_info->default_txportconf.burst_size = DPAA_DEF_TX_BURST_SIZE; + dev_info->default_rxportconf.nb_queues = 1; + dev_info->default_txportconf.nb_queues = 1; + dev_info->default_txportconf.ring_size = CGR_TX_CGR_THRESH; + dev_info->default_rxportconf.ring_size = CGR_RX_PERFQ_THRESH; return 0; } diff --git a/drivers/net/dpaa/dpaa_ethdev.h b/drivers/net/dpaa/dpaa_ethdev.h index da06f1faa1..af9fc2105d 100644 --- a/drivers/net/dpaa/dpaa_ethdev.h +++ b/drivers/net/dpaa/dpaa_ethdev.h @@ -42,6 +42,7 @@ /* RX queue tail drop threshold (CGR Based) in frame count */ #define CGR_RX_PERFQ_THRESH 256 +#define CGR_TX_CGR_THRESH 512 /*max mac filter for memac(8) including primary mac addr*/ #define DPAA_MAX_MAC_FILTER (MEMAC_NUM_OF_PADDRS + 1) diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index 4fc550a885..b70a2ac01c 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -275,6 +275,22 @@ dpaa2_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) dev_info->max_vmdq_pools = ETH_16_POOLS; dev_info->flow_type_rss_offloads = DPAA2_RSS_OFFLOAD_ALL; + dev_info->default_rxportconf.burst_size = dpaa2_dqrr_size; + /* same is rx size for best perf */ + dev_info->default_txportconf.burst_size = dpaa2_dqrr_size; + + dev_info->default_rxportconf.nb_queues = 1; + dev_info->default_txportconf.nb_queues = 1; + dev_info->default_txportconf.ring_size = CONG_ENTER_TX_THRESHOLD; + dev_info->default_rxportconf.ring_size = DPAA2_RX_DEFAULT_NBDESC; + + if (dpaa2_svr_family == SVR_LX2160A) { + dev_info->speed_capa |= ETH_LINK_SPEED_25G | + ETH_LINK_SPEED_40G | + ETH_LINK_SPEED_50G | + ETH_LINK_SPEED_100G; + } + return 0; } diff --git a/drivers/net/dpaa2/dpaa2_ethdev.h b/drivers/net/dpaa2/dpaa2_ethdev.h index 31dca8c7b6..2c49a7f01f 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.h +++ b/drivers/net/dpaa2/dpaa2_ethdev.h @@ -24,6 +24,8 @@ #define MAX_TX_QUEUES 16 #define MAX_DPNI 8 +#define DPAA2_RX_DEFAULT_NBDESC 512 + /*default tc to be used for ,congestion, distribution etc configuration. */ #define DPAA2_DEF_TC 0 From patchwork Thu May 7 10:46:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 186293 Delivered-To: patch@linaro.org Received: by 2002:a92:8d81:0:0:0:0:0 with SMTP id w1csp3041399ill; Thu, 7 May 2020 03:49:44 -0700 (PDT) X-Google-Smtp-Source: APiQypLEL3q/Yhk/+PejP06sFr3D2mPCNYCIXgAJLWFQadcCvFUWkxDBVRo3yDHnwf5PDWMdpGb2 X-Received: by 2002:aa7:d481:: with SMTP id b1mr11521361edr.226.1588848584437; Thu, 07 May 2020 03:49:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588848584; cv=none; d=google.com; s=arc-20160816; b=IGifG8EfLLX/94GQqa92BIK22XD3duetkpmYM5dfs2+SOUG9T57z+YmtPchXrqGbSU iYdZNS8HHwF+m9WqIozJABQWxPsbQG/TPce4z+U81oCqGQD6+MLC/97pEfq7qDIkMVbw FOrzF2VZv0aiws+42aiu3XGml4Lsa9rwvcMU3ginYMYoLYtJ1sQ6eLYAIq/4sJfOWjZl jAYeA8K18iSZhmSjWp6DwhI3b9NWOz/YyB0Ep8VtQwqk2h3Xz3ZrxM2p5I/ODVnNj/rR KNbWUJ1XXy0A1o0MXW34BfXtx9iLRnuum7QV0zbLBTGnAXTCL3cKuIM9IsEewJvz0lM0 m2fA== 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:cc:to:from; bh=HQN+JUiuzoZCwkWtj6ocZNBe9Xww0vB2LpO/mnZVdf4=; b=HBbs6PxHkDHB+8+TtBxT9kCWgT2NsOI40os8+p3uS82vIzrfciIsWOQa+lDqBB7uaL jh+EmgnBHjjUPFQs5FS8AU6PBBF6+I9mWnhOPOktgvfhb0PpXQqbrXKNgf7cxzX4s70Q 6dJiC+s9Z5NopQEVVTEtZip6RrE7nPEyTf/Vtsa9UXATCue3eyuU0JP/oeiouPgFkLqF BhaTEZCtOJY3rDNepYH0pTYzmWFGdujge+xowq3fwzZXduAD3uYzvYB+0FPlNN9uNx/T PexCj1t20cqaLk2U7BHRGCXuh3XfGaxOmfXo2Al07C9Ip+kjMwb0ths35w9liVU6is2l Hb6A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.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 dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id j21si2766968ejv.161.2020.05.07.03.49.44; Thu, 07 May 2020 03:49:44 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C7E991DC10; Thu, 7 May 2020 12:49:08 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id 6D8651DBE1 for ; Thu, 7 May 2020 12:49:02 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 4D377200FC5; Thu, 7 May 2020 12:49:02 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 73FB9200FBB; Thu, 7 May 2020 12:49:00 +0200 (CEST) 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 F018E4030E; Thu, 7 May 2020 18:48:57 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, ferruh.yigit@intel.com Cc: Nipun Gupta Date: Thu, 7 May 2020 16:16:41 +0530 Message-Id: <20200507104645.31990-6-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200507104645.31990-1-hemant.agrawal@nxp.com> References: <20200504124118.22877-1-hemant.agrawal@nxp.com> <20200507104645.31990-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v4 5/9] drivers: dpaa2 enhance portal alloc failure log X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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: Nipun Gupta The change adds printing the thread id when portal allocation failure occurs Signed-off-by: Nipun Gupta --- drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 8 ++++++-- drivers/event/dpaa2/dpaa2_eventdev.c | 8 ++++++-- drivers/mempool/dpaa2/dpaa2_hw_mempool.c | 12 +++++++++--- drivers/net/dpaa2/dpaa2_ethdev.c | 4 +++- drivers/net/dpaa2/dpaa2_rxtx.c | 16 ++++++++++++---- drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c | 8 ++++++-- drivers/raw/dpaa2_qdma/dpaa2_qdma.c | 12 +++++++++--- 7 files changed, 51 insertions(+), 17 deletions(-) -- 2.17.1 diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c index 0919f3bf47..256a9a1955 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -1459,7 +1459,9 @@ dpaa2_sec_enqueue_burst(void *qp, struct rte_crypto_op **ops, if (!DPAA2_PER_LCORE_DPIO) { ret = dpaa2_affine_qbman_swp(); if (ret) { - DPAA2_SEC_ERR("Failure in affining portal"); + DPAA2_SEC_ERR( + "Failed to allocate IO portal, tid: %d\n", + rte_gettid()); return 0; } } @@ -1641,7 +1643,9 @@ dpaa2_sec_dequeue_burst(void *qp, struct rte_crypto_op **ops, if (!DPAA2_PER_LCORE_DPIO) { ret = dpaa2_affine_qbman_swp(); if (ret) { - DPAA2_SEC_ERR("Failure in affining portal"); + DPAA2_SEC_ERR( + "Failed to allocate IO portal, tid: %d\n", + rte_gettid()); return 0; } } diff --git a/drivers/event/dpaa2/dpaa2_eventdev.c b/drivers/event/dpaa2/dpaa2_eventdev.c index 2be6e12f66..a196ad4c64 100644 --- a/drivers/event/dpaa2/dpaa2_eventdev.c +++ b/drivers/event/dpaa2/dpaa2_eventdev.c @@ -74,7 +74,9 @@ dpaa2_eventdev_enqueue_burst(void *port, const struct rte_event ev[], /* Affine current thread context to a qman portal */ ret = dpaa2_affine_qbman_swp(); if (ret < 0) { - DPAA2_EVENTDEV_ERR("Failure in affining portal"); + DPAA2_EVENTDEV_ERR( + "Failed to allocate IO portal, tid: %d\n", + rte_gettid()); return 0; } } @@ -273,7 +275,9 @@ dpaa2_eventdev_dequeue_burst(void *port, struct rte_event ev[], /* Affine current thread context to a qman portal */ ret = dpaa2_affine_qbman_swp(); if (ret < 0) { - DPAA2_EVENTDEV_ERR("Failure in affining portal"); + DPAA2_EVENTDEV_ERR( + "Failed to allocate IO portal, tid: %d\n", + rte_gettid()); return 0; } } diff --git a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c index 48887beb7e..fa9b53e64d 100644 --- a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c +++ b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c @@ -69,7 +69,9 @@ rte_hw_mbuf_create_pool(struct rte_mempool *mp) if (unlikely(!DPAA2_PER_LCORE_DPIO)) { ret = dpaa2_affine_qbman_swp(); if (ret) { - DPAA2_MEMPOOL_ERR("Failure in affining portal"); + DPAA2_MEMPOOL_ERR( + "Failed to allocate IO portal, tid: %d\n", + rte_gettid()); goto err1; } } @@ -198,7 +200,9 @@ rte_dpaa2_mbuf_release(struct rte_mempool *pool __rte_unused, if (unlikely(!DPAA2_PER_LCORE_DPIO)) { ret = dpaa2_affine_qbman_swp(); if (ret != 0) { - DPAA2_MEMPOOL_ERR("Failed to allocate IO portal"); + DPAA2_MEMPOOL_ERR( + "Failed to allocate IO portal, tid: %d\n", + rte_gettid()); return; } } @@ -317,7 +321,9 @@ rte_dpaa2_mbuf_alloc_bulk(struct rte_mempool *pool, if (unlikely(!DPAA2_PER_LCORE_DPIO)) { ret = dpaa2_affine_qbman_swp(); if (ret != 0) { - DPAA2_MEMPOOL_ERR("Failed to allocate IO portal"); + DPAA2_MEMPOOL_ERR( + "Failed to allocate IO portal, tid: %d\n", + rte_gettid()); return ret; } } diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index b70a2ac01c..817e9e0316 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -903,7 +903,9 @@ dpaa2_dev_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id) if (unlikely(!DPAA2_PER_LCORE_DPIO)) { ret = dpaa2_affine_qbman_swp(); if (ret) { - DPAA2_PMD_ERR("Failure in affining portal"); + DPAA2_PMD_ERR( + "Failed to allocate IO portal, tid: %d\n", + rte_gettid()); return -EINVAL; } } diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c index 89a8221cb8..630f8c73c7 100644 --- a/drivers/net/dpaa2/dpaa2_rxtx.c +++ b/drivers/net/dpaa2/dpaa2_rxtx.c @@ -762,7 +762,9 @@ dpaa2_dev_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) if (unlikely(!DPAA2_PER_LCORE_DPIO)) { ret = dpaa2_affine_qbman_swp(); if (ret) { - DPAA2_PMD_ERR("Failure in affining portal\n"); + DPAA2_PMD_ERR( + "Failed to allocate IO portal, tid: %d\n", + rte_gettid()); return 0; } } @@ -882,7 +884,9 @@ uint16_t dpaa2_dev_tx_conf(void *queue) if (unlikely(!DPAA2_PER_LCORE_DPIO)) { ret = dpaa2_affine_qbman_swp(); if (ret) { - DPAA2_PMD_ERR("Failure in affining portal\n"); + DPAA2_PMD_ERR( + "Failed to allocate IO portal, tid: %d\n", + rte_gettid()); return 0; } } @@ -1021,7 +1025,9 @@ dpaa2_dev_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) if (unlikely(!DPAA2_PER_LCORE_DPIO)) { ret = dpaa2_affine_qbman_swp(); if (ret) { - DPAA2_PMD_ERR("Failure in affining portal"); + DPAA2_PMD_ERR( + "Failed to allocate IO portal, tid: %d\n", + rte_gettid()); return 0; } } @@ -1282,7 +1288,9 @@ dpaa2_dev_tx_ordered(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) if (unlikely(!DPAA2_PER_LCORE_DPIO)) { ret = dpaa2_affine_qbman_swp(); if (ret) { - DPAA2_PMD_ERR("Failure in affining portal"); + DPAA2_PMD_ERR( + "Failed to allocate IO portal, tid: %d\n", + rte_gettid()); return 0; } } diff --git a/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c b/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c index 997d1c8739..7c21c6a528 100644 --- a/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c +++ b/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c @@ -70,7 +70,9 @@ dpaa2_cmdif_enqueue_bufs(struct rte_rawdev *dev, if (unlikely(!DPAA2_PER_LCORE_DPIO)) { ret = dpaa2_affine_qbman_swp(); if (ret) { - DPAA2_CMDIF_ERR("Failure in affining portal\n"); + DPAA2_CMDIF_ERR( + "Failed to allocate IO portal, tid: %d\n", + rte_gettid()); return 0; } } @@ -133,7 +135,9 @@ dpaa2_cmdif_dequeue_bufs(struct rte_rawdev *dev, if (unlikely(!DPAA2_PER_LCORE_DPIO)) { ret = dpaa2_affine_qbman_swp(); if (ret) { - DPAA2_CMDIF_ERR("Failure in affining portal\n"); + DPAA2_CMDIF_ERR( + "Failed to allocate IO portal, tid: %d\n", + rte_gettid()); return 0; } } diff --git a/drivers/raw/dpaa2_qdma/dpaa2_qdma.c b/drivers/raw/dpaa2_qdma/dpaa2_qdma.c index c905954004..d5202d6522 100644 --- a/drivers/raw/dpaa2_qdma/dpaa2_qdma.c +++ b/drivers/raw/dpaa2_qdma/dpaa2_qdma.c @@ -666,7 +666,9 @@ dpdmai_dev_enqueue_multi(struct dpaa2_dpdmai_dev *dpdmai_dev, if (unlikely(!DPAA2_PER_LCORE_DPIO)) { ret = dpaa2_affine_qbman_swp(); if (ret) { - DPAA2_QDMA_ERR("Failure in affining portal"); + DPAA2_QDMA_ERR( + "Failed to allocate IO portal, tid: %d\n", + rte_gettid()); return 0; } } @@ -788,7 +790,9 @@ dpdmai_dev_dequeue_multijob_prefetch( if (unlikely(!DPAA2_PER_LCORE_DPIO)) { ret = dpaa2_affine_qbman_swp(); if (ret) { - DPAA2_QDMA_ERR("Failure in affining portal"); + DPAA2_QDMA_ERR( + "Failed to allocate IO portal, tid: %d\n", + rte_gettid()); return 0; } } @@ -929,7 +933,9 @@ dpdmai_dev_dequeue_multijob_no_prefetch( if (unlikely(!DPAA2_PER_LCORE_DPIO)) { ret = dpaa2_affine_qbman_swp(); if (ret) { - DPAA2_QDMA_ERR("Failure in affining portal"); + DPAA2_QDMA_ERR( + "Failed to allocate IO portal, tid: %d\n", + rte_gettid()); return 0; } } From patchwork Thu May 7 10:46:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 186294 Delivered-To: patch@linaro.org Received: by 2002:a92:8d81:0:0:0:0:0 with SMTP id w1csp3041495ill; Thu, 7 May 2020 03:49:51 -0700 (PDT) X-Google-Smtp-Source: APiQypKVmxdkPeP9/Ns30APpFb6J/tBmnZ9UfKJIiQRSWNSDyiUhZGcK9GlFX27Y9+8Pbot4tXjm X-Received: by 2002:a05:6402:1b91:: with SMTP id cc17mr10889087edb.46.1588848591176; Thu, 07 May 2020 03:49:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588848591; cv=none; d=google.com; s=arc-20160816; b=acLD8HV+/6EZYREzLxAT/owFwD5JKlLGsFTNfuq1U2rX8E8pkUrY8NZ1o+aC14mtb0 bM5UmA3a6P8AYv/KEg5A3PBlHBdcfJDM/ZuoC9VYLaetXAgk+gmcmTJSQeBtd7MF7D3D 8P7x2oxCW+l70YvEHgMoWRJYpPidbqIRbsuCzllMMTq8Swh3suplseRTh1dPN59Rk7W3 exH2rVg+utb/hU3JU3k4/LOVRYIminhi8iWbhbxVB8gtVC5yBJ4IbwZ01LjSd6oxpay5 Ntz1ohuOL2QO60A8+DPvbGpv8Hu+3B28S8/c9QAwJRkCFiyl+roC3HQiaMQBkL2vP6Xt HCxg== 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:cc:to:from; bh=OTbQjgtpMPdyFi9bqeqocwgjatvRKLx/YSlE7sUyxqI=; b=M+jaTfxICO4bFs7YS1QqzjlT1smYv3gtfnY6M7wgEBaG+UVTk8xDxUBaU7XihZlBoe CdPeKBym6wyXDLqJZiOilCv301gfF5TCbRd59xk2GPrY7ucFTWYagEQRL7S/ycYzkhNS a6dTwMo/sdy3QQy8rLEGbVCV6g4wGcNHpAM0rQWFiCXpb4eM9WxOH+H1Wt9ULCQD/3ZB LSxFHXqG7pTzAi+qAR/d77aKJFQ/1Ywa4tH87A2zTEabOB02HTxflGxOlIXTrODaH7nN eKwwOS+pZ75XWzmfpqgHGrPk2YbCv2RSD4WXj4ztXPuWNP4BaplSP55wmDojbGMvEN9V 45PQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.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 dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id p9si3121201ejn.415.2020.05.07.03.49.50; Thu, 07 May 2020 03:49:51 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 043E91DC18; Thu, 7 May 2020 12:49:10 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id CFB5D1DBE1 for ; Thu, 7 May 2020 12:49:02 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id B340A200FAC; Thu, 7 May 2020 12:49:02 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 127752017FB; Thu, 7 May 2020 12:49:01 +0200 (CEST) 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 8CE7140319; Thu, 7 May 2020 18:48:58 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, ferruh.yigit@intel.com Cc: Nipun Gupta Date: Thu, 7 May 2020 16:16:42 +0530 Message-Id: <20200507104645.31990-7-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200507104645.31990-1-hemant.agrawal@nxp.com> References: <20200504124118.22877-1-hemant.agrawal@nxp.com> <20200507104645.31990-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v4 6/9] net/dpaa2: support UDP dst port based muxing X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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: Nipun Gupta This change adds DPDMUX support to bifurcate traffic on the basis of UDP destination port. Signed-off-by: Nipun Gupta --- drivers/net/dpaa2/dpaa2_mux.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/net/dpaa2/dpaa2_mux.c b/drivers/net/dpaa2/dpaa2_mux.c index af90adb828..9ac8806faf 100644 --- a/drivers/net/dpaa2/dpaa2_mux.c +++ b/drivers/net/dpaa2/dpaa2_mux.c @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause - * Copyright 2018-2019 NXP + * Copyright 2018-2020 NXP */ #include @@ -99,6 +99,7 @@ rte_pmd_dpaa2_mux_flow_create(uint32_t dpdmux_id, case RTE_FLOW_ITEM_TYPE_IPV4: { const struct rte_flow_item_ipv4 *spec; + kg_cfg.extracts[0].extract.from_hdr.prot = NET_PROT_IP; kg_cfg.extracts[0].extract.from_hdr.field = NH_FLD_IP_PROTO; kg_cfg.extracts[0].type = DPKG_EXTRACT_FROM_HDR; @@ -113,10 +114,31 @@ rte_pmd_dpaa2_mux_flow_create(uint32_t dpdmux_id, } break; + case RTE_FLOW_ITEM_TYPE_UDP: + { + const struct rte_flow_item_udp *spec; + uint16_t udp_dst_port; + + kg_cfg.extracts[0].extract.from_hdr.prot = NET_PROT_UDP; + kg_cfg.extracts[0].extract.from_hdr.field = NH_FLD_UDP_PORT_DST; + kg_cfg.extracts[0].type = DPKG_EXTRACT_FROM_HDR; + kg_cfg.extracts[0].extract.from_hdr.type = DPKG_FULL_FIELD; + kg_cfg.num_extracts = 1; + + spec = (const struct rte_flow_item_udp *)pattern[0]->spec; + udp_dst_port = rte_constant_bswap16(spec->hdr.dst_port); + memcpy((void *)key_iova, (const void *)&udp_dst_port, + sizeof(rte_be16_t)); + memcpy(mask_iova, pattern[0]->mask, sizeof(uint16_t)); + key_size = sizeof(uint16_t); + } + break; + case RTE_FLOW_ITEM_TYPE_ETH: { const struct rte_flow_item_eth *spec; uint16_t eth_type; + kg_cfg.extracts[0].extract.from_hdr.prot = NET_PROT_ETH; kg_cfg.extracts[0].extract.from_hdr.field = NH_FLD_ETH_TYPE; kg_cfg.extracts[0].type = DPKG_EXTRACT_FROM_HDR; From patchwork Thu May 7 10:46:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 186295 Delivered-To: patch@linaro.org Received: by 2002:a92:8d81:0:0:0:0:0 with SMTP id w1csp3041666ill; Thu, 7 May 2020 03:50:04 -0700 (PDT) X-Google-Smtp-Source: APiQypI0dke/afBaeaL6nendjpdBPGtVgeTIsHyZEzuIhGBkSKw/LqVa2rA0Kxte+YU0CLnv0jFE X-Received: by 2002:a17:906:5004:: with SMTP id s4mr11753852ejj.13.1588848604659; Thu, 07 May 2020 03:50:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588848604; cv=none; d=google.com; s=arc-20160816; b=fLYokz4C0GT/UTrMATPr0Zk3Gk2wNcURnr/lvoYRUzm8hbZeOfFsFABk790VJ1jH43 jZ4FBpntAkkVr+PqQIscFGd829zGStouBfvxF5UzchiWULHexA6c4/tuTwBZPbOIlMHV ihlESsZDOBYihNWMMi1pcapHBzu096LbMhX2HZ9M8wudL/dNh9RlG7hHWTfL+XD6tQlb /FeD1sBDzLCKDWnTqKAHBg+UoqQ1OtN0hz/erldinuqZvNK8SHbGdAD1WUF7KoJOgfL8 JJjwvCf4/b03wL4c2jmrGchBwz53mlWkXFC/R44Bh6bfJgg6v+jwhXiKJ4Df60Afg2XA BTJg== 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:cc:to:from; bh=a+Opfwdter0fFnpwKLTLbKsWZ4ZisOn+ARcjXSUDvqs=; b=s3kZ9/p7il0qv0Km4E+KgzI0SGNicTULHrrF+A3NG8bavi78muCR4/VE0ElVzSZGhv zY/gCg4sKwh59QJw2cYs2hMBJvIDmAaXy4poUCL+laAfVxFyOT8xFag7KV7cnQ+FOeaC Ak3dIvDJNluLfwGQAtGW3yZ9baBqS5VXVRDSFvOv2gw53wrkyxFST/TBYRXHmxEOVvmO N/6/WbX0C9RyVqbTWfU2E0qFgmmcq0u491+QWluXwcfPfRpYI25OFwoUxQA4j4MAkKtZ T15NpONbe+3C0RdFCwskQcKpAPG88iosBaEayPZJUG+67tPTRnh2g9PezULMog+ABDpw IH0Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.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 dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id a5si3084797ejv.381.2020.05.07.03.50.04; Thu, 07 May 2020 03:50:04 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5B7AC1DC29; Thu, 7 May 2020 12:49:11 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id A3A4A1DBF0 for ; Thu, 7 May 2020 12:49:03 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 85E7C200FC8; Thu, 7 May 2020 12:49:03 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id D9C34201802; Thu, 7 May 2020 12:49:01 +0200 (CEST) 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 2ACEE4031B; Thu, 7 May 2020 18:48:59 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, ferruh.yigit@intel.com Cc: Hemant Agrawal Date: Thu, 7 May 2020 16:16:43 +0530 Message-Id: <20200507104645.31990-8-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200507104645.31990-1-hemant.agrawal@nxp.com> References: <20200504124118.22877-1-hemant.agrawal@nxp.com> <20200507104645.31990-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v4 7/9] net/dpaa2: reduce prints in queue count functions X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" changing them to DP as it is impacting l3fwd-power apps Signed-off-by: Hemant Agrawal --- drivers/net/dpaa2/dpaa2_ethdev.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.17.1 diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index 817e9e0316..fd766a2184 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -898,8 +898,6 @@ dpaa2_dev_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id) struct qbman_fq_query_np_rslt state; uint32_t frame_cnt = 0; - PMD_INIT_FUNC_TRACE(); - if (unlikely(!DPAA2_PER_LCORE_DPIO)) { ret = dpaa2_affine_qbman_swp(); if (ret) { @@ -915,7 +913,7 @@ dpaa2_dev_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id) if (qbman_fq_query_state(swp, dpaa2_q->fqid, &state) == 0) { frame_cnt = qbman_fq_state_frame_count(&state); - DPAA2_PMD_DEBUG("RX frame count for q(%d) is %u", + DPAA2_PMD_DP_DEBUG("RX frame count for q(%d) is %u", rx_queue_id, frame_cnt); } return frame_cnt; From patchwork Thu May 7 10:46:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 186296 Delivered-To: patch@linaro.org Received: by 2002:a92:8d81:0:0:0:0:0 with SMTP id w1csp3041782ill; Thu, 7 May 2020 03:50:13 -0700 (PDT) X-Google-Smtp-Source: APiQypL0xqwFK3ompBAdTf2+EcZQGb8Zqy+yrtgC5eGke1GIaLlRDOshac+Q6Tp5Y+IeI6nwBf/L X-Received: by 2002:a05:6402:2032:: with SMTP id ay18mr10826127edb.16.1588848612875; Thu, 07 May 2020 03:50:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588848612; cv=none; d=google.com; s=arc-20160816; b=d4fX7prVI+lBrkrZmdaaKJv56vsCWhFBVuvcfKTFf4l/mkZ6SXIoiJJHF2Yh43nQkF yR15hzDs1kbdnDow3y8Lu4g2L3QV1OEGtB8r0C6/odLohPkSMT+bRECsbqEeP5woAgN+ otge6rlB1ieaSNx+2hqtw5vJad4uA6Zm6DokUeYsheqYMWMbLqUxNkANcY5sBrPSe+Wn OlltCPlO9B+yqhGJxoJmwozGxjRhBO8qOTp6d7x35P8i/xn8WebmoOgEv97SkL8QNZWb iJy0X51rQ/iYh+wKh7ZSV7bW/uJqWuYcZhyb2uLfYVFCmVY/m8wlUESmXOTBdoYfwhTP cP6Q== 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:cc:to:from; bh=TeE0jb5I4452h1qdWWIBt6ZKliK+TeCyae7H+TrFHQ4=; b=QpvgTl2UktvnFCUt2vecB6nAtzqTPIHnJCmchlTFCiAiDD3aaF2dKI1W4UcOCl8xvv /9CvB+0QMka8ywJ8K8gQuw1+9ayD9JPE6pdAfyEY/sxPFvZTe2DcRT3rqOWKUcAgeUXf nUoNkyHo38oHxDas7/QP2ULhhWK0Zbb9/fstnOpVu2twkYb73JCD8J+S4sZqQzj0r2Kp XvkT8uny0Bl6RTP19wnquNhpsmECkKKwlUMKa0LcXNSYSm1scuILnbiXeVSLpWAeKH/N GABk9iU6fgx0amd33632dGZbaO/TUyNk9iLcqDRvmucVcTyVrLeLrQYDoyTvZU5ukBsT nieA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.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 dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id v28si2787072edx.335.2020.05.07.03.50.12; Thu, 07 May 2020 03:50:12 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 68D961DC2D; Thu, 7 May 2020 12:49:12 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id 85E5B1DBF2; Thu, 7 May 2020 12:49:04 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 6BD322017FB; Thu, 7 May 2020 12:49:04 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 67AA5200FBB; Thu, 7 May 2020 12:49:02 +0200 (CEST) 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 C57E54031C; Thu, 7 May 2020 18:48:59 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, ferruh.yigit@intel.com Cc: stable@dpdk.org, Jun Yang Date: Thu, 7 May 2020 16:16:44 +0530 Message-Id: <20200507104645.31990-9-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200507104645.31990-1-hemant.agrawal@nxp.com> References: <20200504124118.22877-1-hemant.agrawal@nxp.com> <20200507104645.31990-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v4 8/9] net/dpaa2: fix cong group id for multiple tcs X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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: Jun Yang Flow id will not work when used with multiple traffic classes. The CGID shall be provided in the INDEX field. Fixes: 13b856ac02a8 ("net/dpaa2: support taildrop on frame count basis") Cc: stable@dpdk.org Signed-off-by: Jun Yang --- drivers/net/dpaa2/dpaa2_ethdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index fd766a2184..1bab3b064c 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -676,7 +676,7 @@ dpaa2_dev_rx_queue_setup(struct rte_eth_dev *dev, DPNI_CP_CONGESTION_GROUP, DPNI_QUEUE_RX, dpaa2_q->tc_index, - flow_id, &taildrop); + dpaa2_q->cgid, &taildrop); } else { /*enabling per rx queue congestion control */ taildrop.threshold = CONG_THRESHOLD_RX_BYTES_Q; @@ -703,7 +703,7 @@ dpaa2_dev_rx_queue_setup(struct rte_eth_dev *dev, ret = dpni_set_taildrop(dpni, CMD_PRI_LOW, priv->token, DPNI_CP_CONGESTION_GROUP, DPNI_QUEUE_RX, dpaa2_q->tc_index, - flow_id, &taildrop); + dpaa2_q->cgid, &taildrop); } else { ret = dpni_set_taildrop(dpni, CMD_PRI_LOW, priv->token, DPNI_CP_QUEUE, DPNI_QUEUE_RX, From patchwork Thu May 7 10:46:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 186297 Delivered-To: patch@linaro.org Received: by 2002:a92:8d81:0:0:0:0:0 with SMTP id w1csp3041950ill; Thu, 7 May 2020 03:50:24 -0700 (PDT) X-Google-Smtp-Source: APiQypJEjAaeX3MFxc+G7+WX4NAKpE5H1XtgOItdVoRfktLNT3BzVFaAj6vttznLAV9Lpr2Z6PNX X-Received: by 2002:a17:907:1119:: with SMTP id qu25mr10825864ejb.291.1588848624381; Thu, 07 May 2020 03:50:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588848624; cv=none; d=google.com; s=arc-20160816; b=Uzcr8Dpcj1rOe94xHBAC7YY2VQyUdXQhb+lwysAQooHeTbgOlsLt5za4M9y6BEm0/Z rv720S6EwQDaAM9mTa73XK14HDOJizgOIKm98u6WLH5fi2pQXSkDWmLQorgxaROLWNPr nDHJZy/zRVZG0HBX5lk2b7oFbN277/eTILRZ+7Y6LFhI6wepPqtM6ws25wfrAu148mFk XAlgnhW2mCdk3HW8hLd5BphcdaTUHKg3mS23G2bxdQvdJn+6XZFw5xLt+E3IZyG5PJcq Ua/23NZB3/IZBqlM9vPNWYAv3DZwxQPi7suUo9gBvqv6KVI8xO7tl1z0CMJlT+MC0CoA vYxg== 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:cc:to:from; bh=7hjVsm/uXH32kp4EHhsp3Z9iwyOKCN/F5IE/rCxQEtM=; b=hffpC/h7dMwnbdEgdaYM2twr+b6UpMF5UchlaNHv3Evct1LqCVpxpeE2CpAeLbmMIA ZWpnVgam+5mtBx0GPglVhQChfvLtNHbjPM8j539617z4KvzCenv4iTM7Z61/UpRDVSOW 0VBRBCefZY+Ql0G7dzkrUeCKuqBkV0KClYIh0gcZawfB0xl2Sd2qoGpB7nsHvM1wUhMx vmx5Rbv/aZP/kZXXFkG4qCmtXTHSp0mwmwYyl7sVHO4XlVi+pu83YH6Dd7qv0jaZJjIx Lt8DdBbNB0kE9z+1t8ZNnZNdTXn6/U3okt7J4dFumnxbK3Tf2TQYZbY1Zh80VfeOdn7U ynVg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.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 dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id b9si2585875edx.31.2020.05.07.03.50.24; Thu, 07 May 2020 03:50:24 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D42781DC39; Thu, 7 May 2020 12:49:13 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id 44A6F1DBFF; Thu, 7 May 2020 12:49:05 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 29896200FBB; Thu, 7 May 2020 12:49:05 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 24C28200FC2; Thu, 7 May 2020 12:49:03 +0200 (CEST) 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 80AB240310; Thu, 7 May 2020 18:49:00 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, ferruh.yigit@intel.com Cc: stable@dpdk.org, Hemant Agrawal Date: Thu, 7 May 2020 16:16:45 +0530 Message-Id: <20200507104645.31990-10-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200507104645.31990-1-hemant.agrawal@nxp.com> References: <20200504124118.22877-1-hemant.agrawal@nxp.com> <20200507104645.31990-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v4 9/9] bus/fslmc: fix the size of qman fq desc X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" correct the qman_fq_desc as per the HW defined size Fixes: 6fef517e17cf ("bus/fslmc: add qman HW fq query count API") Cc: stable@dpdk.org Signed-off-by: Hemant Agrawal --- drivers/bus/fslmc/qbman/qbman_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/bus/fslmc/qbman/qbman_debug.c b/drivers/bus/fslmc/qbman/qbman_debug.c index 4cd0923acb..34374ae4b6 100644 --- a/drivers/bus/fslmc/qbman/qbman_debug.c +++ b/drivers/bus/fslmc/qbman/qbman_debug.c @@ -20,7 +20,7 @@ struct qbman_fq_query_desc { uint8_t verb; uint8_t reserved[3]; uint32_t fqid; - uint8_t reserved2[57]; + uint8_t reserved2[56]; }; int qbman_fq_query_state(struct qbman_swp *s, uint32_t fqid,