From patchwork Mon May 4 12:41:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 186107 Delivered-To: patch@linaro.org Received: by 2002:a92:8d81:0:0:0:0:0 with SMTP id w1csp83691ill; Mon, 4 May 2020 05:43:32 -0700 (PDT) X-Google-Smtp-Source: APiQypLPjwtGYq+CzRTLsCQis75ZuY2fxF+x3J9wljpYe3TvGPmObHMAAuFOQYnI/VDO1AXgqyxp X-Received: by 2002:a05:6402:14ce:: with SMTP id f14mr14307768edx.244.1588596212768; Mon, 04 May 2020 05:43:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588596212; cv=none; d=google.com; s=arc-20160816; b=rlGVnrrxmH0VAwaFo8+zWG6gzhpDjvRowRUfWOAqJTm9X9lexFzyrtyTp0ViFzBK+f ttFr4YETuFzxUSHtvSQOILIOn/WnTmFO+xYL7LFgGh94HkSCPjgsiUNof6u8YAGMesRw F+csenmN3rgOxSqhQbxxmFZNinG74RorjXl+0XbK7JaIqa57FFBIsD2OHkYJjvqwrDWB e3h0kTxv9LA2NyZdyK8aRyVM7CigPMgR8KVXN/EOoCBy2tGOBa6WSuB/slExl6cTw+Zj xQLeEnIuvMh+LWjwE2vSCcNo/i3IFrYWGl10wnbsl8t+cAS4W82veNEOxUlvDvcXLIeF K1sA== 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=kkYsygQsHSALPY4XoSMuk9OTi82wUv1X6rPLusmEtH8=; b=hrEbSbIACbJc2J7+1XJ7zKVXCFPL/bAV9qE30DBwRaVLJ10DErLRuO/jFoY/RcJQay 6CKayET4R/lhzJhTPZqvPaiqCYYWMxi++MaUjezHz3rri4SLerwXzXY/TlsltnVGYxwE AE36ziTXmhPPQa0pb0fCu47w+RI1nfjn2PNYcLnQCVL6FlM5NVsJvLL3LFbdJtnd1TCS SrdrwX6FLNdnD0Eme9Br24mnRx29H7/SpgEB5pGPxYxWnOZmrk+QAlu8hm+8U46osOhw tWQstdSi91AHudRm7vufFO8KdhYF+lhY4E5hTXbXt+MU/vHFSLvOVlJAHfLoq3NpTz9Y sw/A== 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 z5si8798756edi.111.2020.05.04.05.43.32; Mon, 04 May 2020 05:43:32 -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 E72D71D167; Mon, 4 May 2020 14:43:26 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id E5BC11D15D; Mon, 4 May 2020 14:43:25 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 6B8A01A034D; Mon, 4 May 2020 14:43:25 +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 5FA061A034C; Mon, 4 May 2020 14:43:23 +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 70373402DB; Mon, 4 May 2020 20:43:20 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, ferruh.yigit@intel.com Cc: stable@dpdk.org, Apeksha Gupta Date: Mon, 4 May 2020 18:11:11 +0530 Message-Id: <20200504124118.22877-2-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200504124118.22877-1-hemant.agrawal@nxp.com> References: <20200306095742.18080-1-hemant.agrawal@nxp.com> <20200504124118.22877-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v3 1/8] 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 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) -- 2.17.1 diff --git a/drivers/bus/fslmc/qbman/qbman_debug.c b/drivers/bus/fslmc/qbman/qbman_debug.c index 0bb2ce880f..34374ae4b6 100644 --- a/drivers/bus/fslmc/qbman/qbman_debug.c +++ b/drivers/bus/fslmc/qbman/qbman_debug.c @@ -20,26 +20,27 @@ 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, 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 Mon May 4 12:41:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 186108 Delivered-To: patch@linaro.org Received: by 2002:a92:8d81:0:0:0:0:0 with SMTP id w1csp83864ill; Mon, 4 May 2020 05:43:43 -0700 (PDT) X-Google-Smtp-Source: APiQypIV+DypF/1dSu6PstNrfrR96ECDKPLknACPI47rInyVL5UHHNnIV6My0z1tze0GrDg1+sV2 X-Received: by 2002:a17:906:1c56:: with SMTP id l22mr14902085ejg.304.1588596223482; Mon, 04 May 2020 05:43:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588596223; cv=none; d=google.com; s=arc-20160816; b=k6Pn8QKmuf0tCy9JD0iISxZIEmwTNaVWw6NRB9eqtjpGqTXGEvYoYXcNbJj1fR1ayu bOYw2BcUHlFY4QIyfMOc+e2ESgVG0borRRtvPjJNDDw5TKkzNhw7S8Ir/bJKbUdhuKSj WhB6jYGWzt6K06XxtdJ/NoP0/KAA3KIyIY8dePTy7iqn/QSU41ukPzeAhB5fNTc4ynUq vwh50JdKJJAV+slVLWdqZ1IVBm0wcvd6IqXKY+VSVWP3qVlVooENvFWI4CIdnmCKv/E5 Yxu243VlngKEv9fkJxx4qlkpClWrS0kCnrMNx7G2v86aiHckXBe3BSoqYGa4Sbo1Lj/O wNBA== 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=TU0elp2VCzC1S92nNyYz0+ArwR8IPKbKMzZ0Up3r/3xJVxpII0kB004dtM5PrtLL48 lpoGqhBWjH6Y6xFhGsw7KDxz1ZKiH1VvS8BfRMCw5rvxO/h2xnOUUKUiKFZvj5z5ytN6 3hH0B47h1/w/4qqjpgx4Pyb3Pq3vcnKaPfv/Dc+Z5si3aWKhpYxdvfHmxDtIuZqU/cCZ i4nkaCqWL8CVvOxtlY/wb/CwHIw+qkUqullhUcCJvsqCxTJurxw7w0l2JVPtejZGf0SX HJVGLkgUwXPDFJg14Tg6m3Ndc72H9EiB4t38XE5P/jj/ByStwx7vyJvSWgh7wMogAl6g 8FOw== 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 u3si6979195edo.526.2020.05.04.05.43.41; Mon, 04 May 2020 05:43:43 -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 918E61D16D; Mon, 4 May 2020 14:43:28 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id 599261D15E; Mon, 4 May 2020 14:43:26 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 20514200367; Mon, 4 May 2020 14:43:26 +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 1C840200381; Mon, 4 May 2020 14:43:24 +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 228B940302; Mon, 4 May 2020 20:43:21 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, ferruh.yigit@intel.com Cc: stable@dpdk.org, Rohit Raj Date: Mon, 4 May 2020 18:11:12 +0530 Message-Id: <20200504124118.22877-3-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200504124118.22877-1-hemant.agrawal@nxp.com> References: <20200306095742.18080-1-hemant.agrawal@nxp.com> <20200504124118.22877-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v3 2/8] 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 Mon May 4 12:41:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 186109 Delivered-To: patch@linaro.org Received: by 2002:a92:8d81:0:0:0:0:0 with SMTP id w1csp83991ill; Mon, 4 May 2020 05:43:51 -0700 (PDT) X-Google-Smtp-Source: APiQypJcF8Usunfmss5AqFFiyTsp7+kvu4lhd3TjgbjF9lrxNAuXMzqyZh6npZOg6frIU8f0WyUW X-Received: by 2002:a17:906:2b8a:: with SMTP id m10mr3559327ejg.183.1588596231876; Mon, 04 May 2020 05:43:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588596231; cv=none; d=google.com; s=arc-20160816; b=vA5s6oR1poz1w72HtiWiQ9XcyWsIuHVuxqNj8aR87aOWjmUX/ZGpWZMyD/Vqn23R07 /bXQKoiXhx7E4Cm83EspHguU9wmSFzGkBhPrYo6+lJhhsUSIB4uc8X90sjOTW3zUG4ly e+o2H70aIvsfsvptcqDKYbpklPj7kBJ8yLtDcrPaB81hh1JE7QTM4A7v6f8Gjdg8+jkz SK9d35uWJsSXGDe8yB19gxEGgQPhb8X2M411CI011mkBL8eF0RjD1wmUZHiow7IS3uYF aZBeFUKydfcITMQQz8XPWQdHms7f+ucSI7XO+3DjZEDEBDXUvSILOvte/kQN8/5+h82t yMuw== 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=vB/qQQtWn8Sk1Mve6UtOIxU6b8RSQwRvGz1nOYxZyHPnUi8pLWpA5MkzjCeWOLn806 DRI8Qzp30OabU8d04M3JI/kzFhpAxCNFTL2pBw5w4DXtjQpRJ3C93mdEShglj7sIclE4 SofbbvwtE8PxXWX17xJZUXMkPFnNDrlK7AU8DAfaLPcKbf3X1vG8vsRqDCatlK2rKFfn 2E4A9nhUpmBg5RO86UjN6iaYGTRDgvG0r5OYQmgVZQbBx4neEKe8z723utxmgvxKk89j sRDeed2q5wAN3E0EKPEQYaH5ImDvLpFcl8OHjsyC3Y5yWponk57HB/OMqsjVmLXRfIjb +wog== 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 v24si6316886eja.257.2020.05.04.05.43.51; Mon, 04 May 2020 05:43: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 0149E1D178; Mon, 4 May 2020 14:43:30 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id 5EB811D160 for ; Mon, 4 May 2020 14:43:26 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 2E8201A0369; Mon, 4 May 2020 14:43:26 +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 560731A0343; Mon, 4 May 2020 14:43:24 +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 D34F24030B; Mon, 4 May 2020 20:43:21 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, ferruh.yigit@intel.com Cc: Nipun Gupta Date: Mon, 4 May 2020 18:11:13 +0530 Message-Id: <20200504124118.22877-4-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200504124118.22877-1-hemant.agrawal@nxp.com> References: <20200306095742.18080-1-hemant.agrawal@nxp.com> <20200504124118.22877-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v3 3/8] 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 Mon May 4 12:41:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 186111 Delivered-To: patch@linaro.org Received: by 2002:a92:8d81:0:0:0:0:0 with SMTP id w1csp84153ill; Mon, 4 May 2020 05:44:03 -0700 (PDT) X-Google-Smtp-Source: APiQypLUxUoASzrL37ypdUivEcak2jg04nNAg4WJas2akl4l+dJhc4Kd/YF6yUev6vU4Kq/iCMZy X-Received: by 2002:aa7:df8d:: with SMTP id b13mr14696793edy.145.1588596242935; Mon, 04 May 2020 05:44:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588596242; cv=none; d=google.com; s=arc-20160816; b=wcOD/sduP4ntqxqN3lf/Lw0yXVl1W1EqrR6xmXVDoOkN/Bow6V1gym1DAFI4MShMP4 K1G/1xOQOEloqfEpfZIX6etiYZdW5RaMgrtNPuHeEy24PiXkat7C1YyFAJial0Z+cuEe xgGR0vEQGgzLW4UsSqN44IHZTlFYJq34qOULCwz1RTtz+VWQ+3mL25lDpKczLUXz9usp vmeY2hKhBy3gmtyfzAUzE2UxUOeGrSI8arZDrb5oGEzg0P8P6Y22eMBkNdyJIA2R0xnO jpWuCl55kvPs5o2gaxHFOkMtEXn3ZQWrLDabTjbwK3eAaxD13OebfS1PUKMz4jnyqFb2 bqwA== 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=1sGZVxIVYUexAwoaG6jpHvvFflkKSdwiGq9TowCtbaw=; b=f5jhZCortM3HXxrPX4i2296RSyjlp3LRIV1oY5ahmKUP05wpAjgirLph3pTuUi75yT QeRIGKQsE6tKaWv6IK3AFbQ9wQ371Zi0BQRy/MYwqhWKLiXYw7WPXRDcsiQkNxAe5emT YUHsuqXU3gcEoDYlO5rPMnH0xu6Ntn1qpPgduz8Ra8fGP7CcUdwYisaV5paw3M/GUtA9 VAibEwP/fyTc5IUKcZlTjnE1aU4ZpRmLs4bCsOdkpK6iKDlerMpYvipN45HYWYPs5HvF bAO6rWiiiDCJq3cclcxzehOmYRf0+GCDANDDrztw8BO4U3CamO0w8YMkNh6YrR0lWFba HWrg== 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 f21si6938079edc.246.2020.05.04.05.44.02; Mon, 04 May 2020 05:44:02 -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 A09701D407; Mon, 4 May 2020 14:43:31 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id 06F231D160 for ; Mon, 4 May 2020 14:43:27 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 943371A0387; Mon, 4 May 2020 14:43:26 +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 E80731A0349; Mon, 4 May 2020 14:43:24 +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 7080B40310; Mon, 4 May 2020 20:43:22 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, ferruh.yigit@intel.com Cc: Hemant Agrawal Date: Mon, 4 May 2020 18:11:14 +0530 Message-Id: <20200504124118.22877-5-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200504124118.22877-1-hemant.agrawal@nxp.com> References: <20200306095742.18080-1-hemant.agrawal@nxp.com> <20200504124118.22877-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v3 4/8] net/dpaa2: add default Rx params in devinfo 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 --- 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 ++ 4 files changed, 23 insertions(+) -- 2.17.1 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 Mon May 4 12:41:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 186112 Delivered-To: patch@linaro.org Received: by 2002:a92:8d81:0:0:0:0:0 with SMTP id w1csp84295ill; Mon, 4 May 2020 05:44:12 -0700 (PDT) X-Google-Smtp-Source: APiQypJq+QfIW5j+GeFX+hp6d9QGhlnnvZKyDYs+1emTq8EZYE0uvAvncQip/vx8DGEmu7+cqYKY X-Received: by 2002:a05:6402:1a33:: with SMTP id be19mr14674682edb.214.1588596252303; Mon, 04 May 2020 05:44:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588596252; cv=none; d=google.com; s=arc-20160816; b=QSQIthUCMmFKwKhQCT18Yqi0mx5we31bsm36rAJ3B4RxBkP79o53vIiquq01a5zUUa f0+iY+0uIwnqXEyu71vH5bKXj93hm8b9sh0p6fsTwjcOrw9WL1s0kABPi3UnJHANVtrC VH5q5ixFuQoz7BrwRMMvqmKwmkQ7QGnHkcDzKMpAeIZ3gSF1tOlmzqfxea+ciT6ajDeX AXMDV2k57wpuR3Q1z8z1iPRrKFlDBlRJASROxaG8ZeZqTFKauU7EWHYdVfYYSc2GTDmc iRIQjS8B9SUmuQmbQ1SP8LJ+Ordoih+SWHjmg0YB9SxJlTB7BMZR6V0xPWIjuhNxXsP7 wxmg== 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=rt9OVDCoTWH8/uQHA0Inn/h+PFvDaoxwwcKrX1pwHylximv2A754Of4bwB3eitLvqT qTM4a5EqjwaHoCCNBQhXCerudovT3y0u0Cf3/wFaziKAtjORrIJJG/bVawdZH/4eG1xZ /svp6uQh9Za7wRhi/rYL55qSEJRqH33SpogDw5X9DQW68QOoN6K362Xmsvlg+EqsR0EQ 3AzNcOn5PI8Y4Ku7s6oGSSfZacYfbR+e0bIlElKn+VUlZM+yj7Ssr7wT2p4HZKBazOuP 9OIY1+x8Ig5AJaNBy98a6uwhLy5v40tGx+IYbZdcIQ6Kkro4eoo6thBd4Jb8us7iudAJ lTjQ== 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 aq26si6178107ejc.26.2020.05.04.05.44.12; Mon, 04 May 2020 05:44: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 A247B1D446; Mon, 4 May 2020 14:43:32 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id 7E9DE1C43E for ; Mon, 4 May 2020 14:43:27 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 626B41A0343; Mon, 4 May 2020 14:43:27 +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 89DC71A02EA; Mon, 4 May 2020 14:43:25 +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 0F82E402AA; Mon, 4 May 2020 20:43:22 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, ferruh.yigit@intel.com Cc: Nipun Gupta Date: Mon, 4 May 2020 18:11:15 +0530 Message-Id: <20200504124118.22877-6-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200504124118.22877-1-hemant.agrawal@nxp.com> References: <20200306095742.18080-1-hemant.agrawal@nxp.com> <20200504124118.22877-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v3 5/8] 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 Mon May 4 12:41:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 186113 Delivered-To: patch@linaro.org Received: by 2002:a92:8d81:0:0:0:0:0 with SMTP id w1csp84430ill; Mon, 4 May 2020 05:44:21 -0700 (PDT) X-Google-Smtp-Source: APiQypKe7UjTSEtF/c6GjFRE9Rrle0+Q7OTRtyBhgBr8oty4qeEV2AGSt/mX8au+e/2Cui5AeD/s X-Received: by 2002:a17:907:43c2:: with SMTP id i2mr14785739ejs.185.1588596261464; Mon, 04 May 2020 05:44:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588596261; cv=none; d=google.com; s=arc-20160816; b=gOBdHahOb1y3+E0tdLS//AZUpgWLVYtjae5stiwFUgrjqNpJVeYcA5xaiSGNfc1UT3 nQetpyjrK8NOAH0nIpirJT/iJylpBtkFYrYOrF+WceDCi2dUCg3E0lMhZEqX3KBJiu82 nsZeHZppp8sdkmWo5eucAkrNF9Uq3PgsUYj9RESKTnk3l9gqd7WcmIUWBAcgHMxgJMPa DAqVEHOivMpu8h6d2jlR8yZk21PgU7Lycotn2uDEPCH6T5/QxpG45hJo2A6cf2n8KPBc pIXnuU9yd0sxu3Bw/THAl+ClthA+M1Zbaz1xzjPHCIEfbWRlT6i/SQQwYIhymOpK2wD1 IJtQ== 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=detf2ZShkypYpSEj1Xl+N2HVfDlP2TzVBYX1bsGOeB/2aYeaqdRmlauOkeMvqfvZKE vVjPpS9rdbHZy1a2cvMC9R1r6CiidJISu/4sbqgPoWXOLJI/VbRAtfzYXd6eQ2u7thv0 5swNlPPLoaAfsqXgvMmBEYhZz5zp/R0z2+VtKvghiCSMGmOzPiXbCjvlRmHhZEnuoFIV x3Su6zxe7TB37m0hlU8bg2NUYi0OrckVRaUCxC6LkI7+ASs90gHTgmkdKO1ueynpqhkF pdMtRuY6NVXaVuSeOI/CPn3k0EbtsUgpYqMDWehneSCBrvFpnAeRZwTemLwqkbPkcAme kopg== 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 f3si6870464edy.68.2020.05.04.05.44.21; Mon, 04 May 2020 05:44:21 -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 A774B1D502; Mon, 4 May 2020 14:43:33 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id E3B061D160 for ; Mon, 4 May 2020 14:43:27 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id C6ED61A02EA; Mon, 4 May 2020 14:43:27 +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 26AE61A0367; Mon, 4 May 2020 14:43:26 +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 A3DCE402BF; Mon, 4 May 2020 20:43:23 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, ferruh.yigit@intel.com Cc: Nipun Gupta Date: Mon, 4 May 2020 18:11:16 +0530 Message-Id: <20200504124118.22877-7-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200504124118.22877-1-hemant.agrawal@nxp.com> References: <20200306095742.18080-1-hemant.agrawal@nxp.com> <20200504124118.22877-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v3 6/8] 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 Mon May 4 12:41:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 186114 Delivered-To: patch@linaro.org Received: by 2002:a92:8d81:0:0:0:0:0 with SMTP id w1csp84595ill; Mon, 4 May 2020 05:44:31 -0700 (PDT) X-Google-Smtp-Source: APiQypIeT7hiF5lnLWv5lhxqioZoBTIXmNum2ok9a8gFllQnyHq/GHU1k51Z8HVFTZvSaZsf3Hki X-Received: by 2002:a05:6402:1597:: with SMTP id c23mr14994614edv.353.1588596271373; Mon, 04 May 2020 05:44:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588596271; cv=none; d=google.com; s=arc-20160816; b=aH9ze5Gow2sY7VKKejq7vbDX+qieVNKs5KilxsdC7HAVe0qjBNmqD/UqfD+hhaQGc+ 2W6/zuXLqy4HGkyVeuHeMnwga9RFnbcyewHcnmBa4FFPGJU3LV6hV8Q0q0HmQelYzIEl vHihaSap1XxedOtjtOFoUI3rw4Kt8sCKkwLO5mrO5oK1sIVJqYIGEmtruIIHhDBJZX4V 5NdTi0Xa0KlMQ/prWeiGWX2osiS9s/dALrQN7aB1n4nJuRYnJJzVLg/m9jufDmOYAGOE RZRecFsoJxr/FKGgBp70ZdtlTHu2tKSdHYcHkFXoF/M6RFMv5CdJr6YYK90JHWr1gcHB r7cw== 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=BfNFUwKKdmLhd0/Ako0JqMX3AF4DVeTnF3qY5GX05AB6mqY+UQn8aANGCYb/u3Hz+d Ir3KTBu8AO6delJo4zj7EbGjZoBiLlXwlQjDFLBcpPuYgvW+I4wMhHVfVI4INjM6+Nj5 /dkqZLCC4nj+w/pNFaIDnGms6ibyF4D+78svDudcinhtdAZJdVsAwTCEa+sxGnFIvBu9 hIsqhR0qMyOjZjLC1fdG996orRiTmDiVWYWdXRBs8pulYzhNPZUBxjx4ffnbZ+CH1C+z 24NqAStIOC9+OEQW5Vr4HXPC+q2P+coFV8jMKs8PaQT0eum8x5KtTmIAMUnFQ63EQFgb ZDkw== 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 c13si7001228edq.97.2020.05.04.05.44.31; Mon, 04 May 2020 05:44:31 -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 D66E11D50E; Mon, 4 May 2020 14:43:34 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id D35531D166 for ; Mon, 4 May 2020 14:43:28 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 9BAD1200395; Mon, 4 May 2020 14:43:28 +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 EF48D200383; Mon, 4 May 2020 14:43:26 +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 4134040296; Mon, 4 May 2020 20:43:24 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, ferruh.yigit@intel.com Cc: Hemant Agrawal Date: Mon, 4 May 2020 18:11:17 +0530 Message-Id: <20200504124118.22877-8-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200504124118.22877-1-hemant.agrawal@nxp.com> References: <20200306095742.18080-1-hemant.agrawal@nxp.com> <20200504124118.22877-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v3 7/8] 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 Mon May 4 12:41:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 186115 Delivered-To: patch@linaro.org Received: by 2002:a92:8d81:0:0:0:0:0 with SMTP id w1csp84729ill; Mon, 4 May 2020 05:44:40 -0700 (PDT) X-Google-Smtp-Source: APiQypKLBCI6Krb4CFzyI2Cq4dDsv2cUUnWMn7E9aal6BtW+zP6MRrpA8zAOkH+AkXyABy6UsF/k X-Received: by 2002:a17:906:72c8:: with SMTP id m8mr15213309ejl.318.1588596279936; Mon, 04 May 2020 05:44:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588596279; cv=none; d=google.com; s=arc-20160816; b=GgAUeXyGYWAx8ael9dae3XDi2c8cDOYUDKH+DvNPY9WKykwAEBZyssv+RA/EPPW1zW E8kTagghIT3f283DgLB6AXfqIj5O53WPwpbhSawSNJqCccZiWMDc7XUNWWXT6vHcPxV+ bUPUM4+wzyBMdNCl6Wwmh+v4G7vw1U3b9EiYOIW/pcpQHa93+nF+ue9uXT3YUAvnhPgo fbadp0KHUoRY+92bMXL/P68VJmLuq/JrEHna8Ikg1clip8zf6FHTyni4alwmy7+wH4FC 1jdQfdy/xP+yFnd9PIKOGqafDhWfcqONi7CfW/x+V39l11M6Kere/eqjFcdjiEYAjHTh z+WA== 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=U++5ECuh8YLw5XEm7sPB+hhGNFfi0LHGrk7wvIxsYQg=; b=XJhigHxQyzyx2pMNiihGdUlhr2yiEPebXjUg+obOx+8pPfe6P91s9EEfYzQ7h481EG rXUCufDR8HJwn/rCWiOFikp9r6HvRzmM5SBXzRLSEDsiFtYNxLaE/Z2UojK+q122g+ff M1EQk5u5bcLLAs7pkFm6EE3asYvn8yfZhXQAo0c9SOq124pqMIZkMTIsOfen5GtY2gCK SoPUwi2/XYSwLRVPnLGTHVA5j8If1Y1srremebSTpn3b3YKAt7yxCIXUrMLtPwaY8z7y 64ilMPhl+dYD/fbWgaao/jh+Fm/gXYmnZWRj1Oz5SoamDw2sZCSrZfHm6z8qQ3jknm4D qEFg== 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 x17si7330900ejn.21.2020.05.04.05.44.39; Mon, 04 May 2020 05:44:39 -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 D43B51D51A; Mon, 4 May 2020 14:43:35 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id 5BD2C1D172 for ; Mon, 4 May 2020 14:43:29 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 4110B200373; Mon, 4 May 2020 14:43:29 +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 94B09200393; Mon, 4 May 2020 14:43:27 +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 DB70C40314; Mon, 4 May 2020 20:43:24 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, ferruh.yigit@intel.com Cc: Jun Yang Date: Mon, 4 May 2020 18:11:18 +0530 Message-Id: <20200504124118.22877-9-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200504124118.22877-1-hemant.agrawal@nxp.com> References: <20200306095742.18080-1-hemant.agrawal@nxp.com> <20200504124118.22877-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v3 8/8] net/dpaa2: use 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 may not work when used with multipel tcs. The CGID will be provided in the INDEX field. 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,