From patchwork Fri May 8 13:02:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 186335 Delivered-To: patch@linaro.org Received: by 2002:a92:8d81:0:0:0:0:0 with SMTP id w1csp4157722ill; Fri, 8 May 2020 06:04:32 -0700 (PDT) X-Google-Smtp-Source: APiQypLtFA4k5gAQC2Jzyor2kfJStYk8jeLWVR1Rpdj64mXs1c1KBthxBT/a34PFFMzudF+HaOiM X-Received: by 2002:a50:9e2a:: with SMTP id z39mr2122764ede.371.1588943072007; Fri, 08 May 2020 06:04:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588943072; cv=none; d=google.com; s=arc-20160816; b=nuwkZ4VnQobZr89zkUbrDkBHgJXnJB1CzWHzpH5WdpBIqd6aASZcqBQG+6/KIYzOQM EEFd1NqLLbxl7CbMagoKzfU6PWYbWObVvh855Pu1FXrEVtee7jDpuqjN9pjHyibsSYPD cWRBxZsngW16GDXlf+rV/BfiRFsvAZRzUTibZkc/vwTUpiPNu8axf/WwvPfKnkfpGlJF 76ZbhCkYHjCvbAsA79OKfPF7o/WlHQjRVi5hTluCYcMmQ0YesuqPnI5q31xxCz2hUhRQ FtujB0D0eoI+OjiTXMP1ePAVTSJrQOysk5NYoui8XNPvLNFKCmLDOupnGId1t+1vb4Yo 3N/Q== 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=xY3ZcVZIgBmdzoJjRdbHo1+OckiHIRSWTELE2xyC+RQjATmdVQTFaBr+rPfHUOoqDC BbI6A4EgAbTW0xmsd30YPESd2tqeywkw9rIEjyNLSYQwKPZlz9xFqPCQGMKy4BbHhQ2W 7IWfeA1z0knbuKcyMHioqShJY5M2KKE8caZvjAB86uDxkvHCt0HOm7VFlwAouXnjFngH YhbIU8qYx3NKKa0b9Asa0QDfOeV4tXah0rlMaOhgOkfw4J/5ux2ShxGrzvkxch/WLPls qCXR9jKpCHya+ANGh9FBlce0cI2M/bmmXXGfM+6cSyXQYMsJ0zNuDwlHtG0h7JooPsLC BpRA== 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 ce21si994078edb.297.2020.05.08.06.04.31; Fri, 08 May 2020 06:04: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 98F511DB2A; Fri, 8 May 2020 15:04:27 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id 7A6B81DB11; Fri, 8 May 2020 15:04:25 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 5B2302013A1; Fri, 8 May 2020 15:04:25 +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 5740420100F; Fri, 8 May 2020 15:04: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 59E1540302; Fri, 8 May 2020 21:04:20 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, ferruh.yigit@intel.com Cc: stable@dpdk.org, Apeksha Gupta Date: Fri, 8 May 2020 18:32:02 +0530 Message-Id: <20200508130211.14334-2-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200508130211.14334-1-hemant.agrawal@nxp.com> References: <20200507104645.31990-1-hemant.agrawal@nxp.com> <20200508130211.14334-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v6 01/10] 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 Fri May 8 13:02:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 186344 Delivered-To: patch@linaro.org Received: by 2002:a92:8d81:0:0:0:0:0 with SMTP id w1csp4157904ill; Fri, 8 May 2020 06:04:43 -0700 (PDT) X-Google-Smtp-Source: APiQypIlEB1uddKWcX0FQiDGhuctQiAKmOw+401nd1uxfy1Br1nu4HTDLW0Uym4/4tBDi0nrrodW X-Received: by 2002:a17:906:3e44:: with SMTP id t4mr1805446eji.337.1588943083570; Fri, 08 May 2020 06:04:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588943083; cv=none; d=google.com; s=arc-20160816; b=BslvpTLIGdAQkXsYuCJo0/97z4mLuTdNNx2SCqmLr2UBbc7S8MTl3C9p/LszeHtyC3 gN7g4sdKbvvIOJ+XBCsnccNeWxJ+2F7KRFpgp8gbwpV6pPXiYbPQKnj0ksZ5BkFOsjsL YyM8lRn0LmE2aTAe61sPiBt/e5Gi5mzG1X5wz8Ytk7LTX8HiQR9u0yvMFDQKcTOsF8LX P1STAn3wviN/NY8/lXQtL3/PM8N5Ioof0EH2pjjZbg29XwHRwbF0SmiIrv/uHXYylxi8 1+18ihvD+DNgXJq2Si3VSIzJmXIwzIuosimOjuOdKSzlykEyUKycn5QCsOuGADHvXv97 rw0g== 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=xYdBpebDXG5p7OatYIKDc5NMhbUi7AJTu3fyxRc/ras=; b=udbqTNjpubfJtdoubCEAaTMcKZvf/7pJ3RBHzeGgh3bz0yjzPcuUL1y1sSv49PVzSA PAq0PQNolphu+WumJtRdknCsrIZDuIBgnEWLNy5iE7v54Tb61JsuwhCNynTQyBwEg6Hh pKcZBJnT8rQXL0u8wOfRsp4pv0P6WbqBKSSOVxVwibjZuJ61fhIJCIfiCynDYhlOhu0s QcL6Ms2WNDQmp3WDm5ie9CXZRmpfF9nH0vI7lcIL/e+ENqy4qDsBXABE7G6EQkbLFTmT 9Ijqr9pSDcERcylTeWOmfzoCX+D90m/rzi/s2PhyS35Tspfcyr/yILgmTYU/v6bvfDdL +HFg== 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 pv20si909719ejb.295.2020.05.08.06.04.43; Fri, 08 May 2020 06:04: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 754E31DB80; Fri, 8 May 2020 15:04:29 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id 3095A1DB11; Fri, 8 May 2020 15:04:26 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 1032320100F; Fri, 8 May 2020 15:04: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 0C6EA201389; Fri, 8 May 2020 15:04: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 19DAF4030E; Fri, 8 May 2020 21:04:21 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, ferruh.yigit@intel.com Cc: stable@dpdk.org, Rohit Raj Date: Fri, 8 May 2020 18:32:03 +0530 Message-Id: <20200508130211.14334-3-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200508130211.14334-1-hemant.agrawal@nxp.com> References: <20200507104645.31990-1-hemant.agrawal@nxp.com> <20200508130211.14334-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v6 02/10] 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. When running testpmd with 10G interfaces on 10BaseT interface on LS2088ARDB, the ports were showing link as down. This was identified to be caused by the setting of link as down during config. Also, the line rate was not being updated in device link params, thus having the incorrect link speed in status (as 0). 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 Fri May 8 13:02:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 186336 Delivered-To: patch@linaro.org Received: by 2002:a92:8d81:0:0:0:0:0 with SMTP id w1csp4158111ill; Fri, 8 May 2020 06:04:54 -0700 (PDT) X-Google-Smtp-Source: APiQypIdJ5ft7creBjdN4Ye6q40oKzSnAXWekDwqWsjtE3LpgUnF9teuRq3GYkc6hqbQNdB+SUbv X-Received: by 2002:a50:c01a:: with SMTP id r26mr2074883edb.361.1588943094057; Fri, 08 May 2020 06:04:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588943094; cv=none; d=google.com; s=arc-20160816; b=fiMBJnr+XEK8qf2avCuHAMtHKhCLlDGk6d9s23aCyyEFj6MZWYGL/ZAeDPn6lGvYBU flhp+WFEMZSvP0XQ4eWj0kyHZg19X3xMF0j5rdt/JIuLKq76vIAWhLWEEb+OXMtRzsct /SeQ77pP0MjehTu/q/W1EMj4oKt3TyfWohtHa5MYWWIa6SDNwgJhQPkdY92bi8api6gm P6999S0A7usFzJdyv9Apr5xmoLbH4thgeDFtBunS68ANyaYPqYPEZOUYEQNqRkaoMAFd EhsuMQyCZbT2HQLzJZlLicS7AYI1xUnP0z9LLt2pnasZaNjn3YVdfMfH9t6zorjM9fl+ 14zQ== 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=CEWKNvm/uCGqdLpoOWzyYgWbVBRpxIn8Tzo1lkH3PUWb43YbpIPez4PvMjABNj20wA GSFt2D1JNCyn3UJbUG0wZOyAwFqHoJ98cL08HVu/Vw0KX138S49ZsWiv7nCEHDVOnn5u 10BEpZYo2KX+1C27TGbS5qVmSqQfHX5nVwrUC7I3Bkc/3ByujmoHqQWLpPMifDMyM28c pR4UkQRxHIxCdA+mTdNkWTmqcj461zs2sQHC8v9kqLwSiv7hSqAfZXSwXY29NazIfbWG RbnelWz7B4YAJP85xNEUErs/SM5WC500/61fncurmF0LEgVEQW2FRfiZpW2usEB/hQng MK4w== 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 g15si1003016eds.159.2020.05.08.06.04.53; Fri, 08 May 2020 06:04:54 -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 40F7C1DB97; Fri, 8 May 2020 15:04:31 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id 470F21DB16 for ; Fri, 8 May 2020 15:04:26 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 226A5201389; Fri, 8 May 2020 15:04: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 49F75201392; Fri, 8 May 2020 15:04: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 C3F0440310; Fri, 8 May 2020 21:04:21 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, ferruh.yigit@intel.com Cc: Nipun Gupta Date: Fri, 8 May 2020 18:32:04 +0530 Message-Id: <20200508130211.14334-4-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200508130211.14334-1-hemant.agrawal@nxp.com> References: <20200507104645.31990-1-hemant.agrawal@nxp.com> <20200508130211.14334-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v6 03/10] 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 Fri May 8 13:02:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 186343 Delivered-To: patch@linaro.org Received: by 2002:a92:8d81:0:0:0:0:0 with SMTP id w1csp4158329ill; Fri, 8 May 2020 06:05:07 -0700 (PDT) X-Google-Smtp-Source: APiQypLX/FSn2A6he2HeYxMFX45K0x1Re8k0KPtKWyTkwNLTpW23iMszlUyKAF3UTIseVnN2ifJX X-Received: by 2002:a05:6402:17ef:: with SMTP id t15mr2086114edy.10.1588943107000; Fri, 08 May 2020 06:05:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588943106; cv=none; d=google.com; s=arc-20160816; b=dbJMtjTxN23b1qtlyjZczAlihgCnJ1tnzKIRevSduYDwCh2QoshqVYXUOUCbOk0FTq Xjen3LZYhAHLLcWWXjRG4cNeW7+17hsLMZp+E0vjdiO7Mn3s8++KAmlOeoPu+98gqIuZ IO5bjpuSABVMbaLCHRBx5lG+CSrW+AcoEZ9kbfO+4T673LbsgJGoWJ9MZun7KY5quu6j QdvDLnvqi+YBVn1pUS6ACVjeCV6KI5l418RFF/1SdLD8ZbDD3+sRRcK/4GdKU/zZXSji hoeaaoa7vsolHm+xllR9rWYRZ04Me2uqSOonAxjQa5E9QGjGui3s2XmL1qVFwQq9NwkK SKWw== 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=qBTBmvmcPgaDURcghQVURG1yAMIg8BYUjpYvMjuFXhE=; b=VKhJZnmbBkyKZoU0SI6PAPV3nTthUS4fUb2F1lO6o5Vou4nqMhkCplDcJPxUMmNXbp l1w1xF+hrbhMYps3oDf4AsPvXSsGX8UXZ2CzyHwcrODtxeNzPc/6u3KT8Wi4pV8FoTm+ z1jOHnYs5RyHKRz+7qVlp6wUJonk2uRzYkdwCrIoEs3oHwBQotBCOXaWhI+dWNjgR0ay HInqlM6JRM6DN88R0LzG2ViaK/BW8A118Z9aKFdpeJ68E6UmCs4j/DG8d/K5AgMy7MiO dXjATyep03qXLtoQP6E8LquekbrWBG92fIT5Kqu19rVPdbYITt+B20LwDuxsc0Ncn8Xw A2NQ== 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 h22si910731ejq.363.2020.05.08.06.05.06; Fri, 08 May 2020 06:05: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 E730E1DBBE; Fri, 8 May 2020 15:04:32 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id AC45C1D6FC for ; Fri, 8 May 2020 15:04:26 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 8CC31201392; Fri, 8 May 2020 15:04: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 E010020139C; Fri, 8 May 2020 15:04: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 64DB540288; Fri, 8 May 2020 21:04:22 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, ferruh.yigit@intel.com Cc: Hemant Agrawal Date: Fri, 8 May 2020 18:32:05 +0530 Message-Id: <20200508130211.14334-5-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200508130211.14334-1-hemant.agrawal@nxp.com> References: <20200507104645.31990-1-hemant.agrawal@nxp.com> <20200508130211.14334-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v6 04/10] 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 --- drivers/net/dpaa/dpaa_ethdev.c | 4 ++++ drivers/net/dpaa/dpaa_ethdev.h | 1 + drivers/net/dpaa2/dpaa2_ethdev.c | 9 +++++++++ drivers/net/dpaa2/dpaa2_ethdev.h | 2 ++ 4 files changed, 16 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..9817c9324b 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -275,6 +275,15 @@ 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; + 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 Fri May 8 13:02:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 186337 Delivered-To: patch@linaro.org Received: by 2002:a92:8d81:0:0:0:0:0 with SMTP id w1csp4158496ill; Fri, 8 May 2020 06:05:18 -0700 (PDT) X-Google-Smtp-Source: APiQypJFkAOeVqscnHf8a+/9qugz3bUlDMYW9GFE8BdSvThzqdxqm65HNIKV+1B6bA6IMl4LU9EU X-Received: by 2002:a17:906:829a:: with SMTP id h26mr1742411ejx.133.1588943118247; Fri, 08 May 2020 06:05:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588943118; cv=none; d=google.com; s=arc-20160816; b=kXG5NltNsm4Su6DmswUBunZXWr2SV3ZYRtlAercpPHQzb25wlYkaVP43NnNE6DzF1e gRO8G3kulid29U6+sA9FsUEwoJjBDG7ZsEgunUUW2OrizLNYsKq5qFNPbtwTBOrJF9DK J7ixF+D3PCo/n0bHPnzQJPRvRrNHbLtt2sx3Zs3QsF5m8L6Wa+WtBDOKT+C5ZgTcQlwT zgvTsHxyjwTuApckxXdyaEr8TIwjvNxkPDKL2HQm3szGTX2Prz5V0nqhHzpv5k6lHzcQ ydLpOtg9i/7NIRMZX4M5+RL+rAtkMoiaumOExIjHNcQqS8moObfem7e4KOw6Az/Ib1kk 74yQ== 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=ypjC4mTFhOxz7PE/sxGB96KbniQ7L3RoK/JywjXamvs=; b=wWQyX5yqdESHgMFkYdXfiWtc2WYRqe9UxX6VND7xFARxDDh6Q8+H2mOHL7pL5jkwlR L4BQgMMpQsaNaAdSGXWetVDI6bCgUZGplCIj+7rXBJrUj3Kw4SwKUWIHTe2wisa0YjdV nkB3EHx1tQ5JmDy31XekmeUcycZo6DYcOzgP1PshISvi0j2sKJ460LcSEQhl6qcENyzI 3qLGzlSY9inXdPDtVsKjz7eGrHaMk5WaLOi8GZYTkUPbrd1heu6Ed/EU8/680GKCUK0S zdiyVTNsy2lhKHQpY5SqtDmsoc2f5l+7aMEhd6OirD1fqBsrpyKl1FxlYiwQCrYCvNup GUQg== 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 62si1020936edc.448.2020.05.08.06.05.18; Fri, 08 May 2020 06:05:18 -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 4A8AF1DBC7; Fri, 8 May 2020 15:04:34 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id 249B41D6FC for ; Fri, 8 May 2020 15:04:27 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 02D0E1A1524; Fri, 8 May 2020 15:04: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 29A7E1A02F9; Fri, 8 May 2020 15:04: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 064BC40314; Fri, 8 May 2020 21:04:22 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, ferruh.yigit@intel.com Cc: Nipun Gupta Date: Fri, 8 May 2020 18:32:06 +0530 Message-Id: <20200508130211.14334-6-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200508130211.14334-1-hemant.agrawal@nxp.com> References: <20200507104645.31990-1-hemant.agrawal@nxp.com> <20200508130211.14334-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v6 05/10] 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 Update the portal allocation failure log to print the thread id as well. 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 9817c9324b..0be61cda04 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -896,7 +896,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 Fri May 8 13:02:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 186338 Delivered-To: patch@linaro.org Received: by 2002:a92:8d81:0:0:0:0:0 with SMTP id w1csp4158652ill; Fri, 8 May 2020 06:05:28 -0700 (PDT) X-Google-Smtp-Source: APiQypKJBzbyKrSzupFlX86g4KvTu5IaZpldxkSAaRV7av+1qESM01y4oxaomD9Z06unNFERvNZA X-Received: by 2002:aa7:c795:: with SMTP id n21mr2193209eds.6.1588943128467; Fri, 08 May 2020 06:05:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588943128; cv=none; d=google.com; s=arc-20160816; b=b/0q4nDwpiiHoEsnuUvumoLUGgBA+zAHoea61F4ARoZ1CVaf+5PfnV295RnU0a9evP lGdepT8bKfVF02mLyOGT+hS92HpoRasr2xlI6yoa7W72ZPZ2MFSnJcn250o532xDehFy 88NoHIi0JJDjI53zdDlE/SXVZdGeCqzPsx63Pkj1J8l+lj+a8hiZoS/n/slgXH91v1j/ 0RCbqgFQaphHvv5cchak8kOuaJxGhHpWwDSpNgoJRtgNvkNvuT0ObecmJazDlD+yyQGt u1GDibfyPQ22W6+2CR0p4f3WJt49STibk99iOu9t37MbNzP0gShk1h7C6Gvx392V62I0 rmEQ== 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=t//Nqw6cHm2z2MXlLzTMKx9vwxwJIpbs0KFuFNaxa3/ElXQKigkgYd8z2nVxAYKmKw c+63jGXAqLs+ucBTyzdmFUZXrMQY4/V3OjJ5pxP6ZgwBillA12ViA6TmmT9xR697nG9N 9/z8RLodb59dlaUTEMNSbW6CeYrLMEygipD29YCt4QpsAgnj0anLfSkezhx6EXp4riyJ mp4SxmU1t4z5kF0yM4C9ICsqqDbcw+snk/S/ezGbLWQRCvPMhRRNVhKfq9BJ+A3LLa93 2SA6F36EYGvxAIpaYH6Sn/I8idSTrpy0FjSam/shx2hxTj24KmpHcrUro4xK6T/8H+Tw Claw== 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 s18si908187ejr.449.2020.05.08.06.05.28; Fri, 08 May 2020 06:05:28 -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 B035B1DBB9; Fri, 8 May 2020 15:04:35 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id EC98F1DB44 for ; Fri, 8 May 2020 15:04:27 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id C254B1A1532; Fri, 8 May 2020 15:04: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 215631A00E9; Fri, 8 May 2020 15:04: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 99AC5402DB; Fri, 8 May 2020 21:04:23 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, ferruh.yigit@intel.com Cc: Nipun Gupta Date: Fri, 8 May 2020 18:32:07 +0530 Message-Id: <20200508130211.14334-7-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200508130211.14334-1-hemant.agrawal@nxp.com> References: <20200507104645.31990-1-hemant.agrawal@nxp.com> <20200508130211.14334-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v6 06/10] 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 Fri May 8 13:02:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 186339 Delivered-To: patch@linaro.org Received: by 2002:a92:8d81:0:0:0:0:0 with SMTP id w1csp4158806ill; Fri, 8 May 2020 06:05:36 -0700 (PDT) X-Google-Smtp-Source: APiQypKnJkdUtluQWnj3l3iIiWLS0vdgDmcPWBmhZ4YzQa3E8egevbJ/Tn0Opu7L8nJcV1xQtE6H X-Received: by 2002:a17:906:5e50:: with SMTP id b16mr1833522eju.331.1588943136675; Fri, 08 May 2020 06:05:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588943136; cv=none; d=google.com; s=arc-20160816; b=QYNAKsvp4vootfDFY0qgdesBd7+H1UJflVbgkFgLJQ4qFviSVMnhZMIUPYqF/x2w9C R5zaXJPwpFfOBI8uVHMtiRTJ7DzOd3MElMnXJUhzVvHC6YW76nTOcmMf+9Bk1iHGM5NS yoeI67Hi6Gb3VOgdzP/l5HOj3eSAuJmTDzc9d6FHCDDAgxnj4Y95y5LK8cxwzFZtpRQw mPKlL72tUYoAcnDQZ4MuB0ZCPbQNrYfwOcVEBRmAUeqbA13czJRqtAg8yRi/dBIyscuJ dS5zTUMbLlLdGG5l7m0UguEhYUpZBQztZF3M7e8Cb+0kgmCpZ3tlcwCsIzo75DtKCYK7 qbjw== 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=l4BiCP5F1hRsnVykmAd7z2SJScjczKaBaIqzhQ1R1V0=; b=bCeI7mz1S/1BwnXgaTDtOlNDt85MDI+A+iHkFedT70WqRAhu8tp/m+klbiwUngFVns 8FBYaiRLYsoEKRfIZKoBIniEJWkzSB2UBUATUmWP65+DDQ2cKddG0141eq5OGe0S4Bi5 lV38VBb9bFqRtxCzKz9y/sLPzThQywRoG0ZWEPYS/zqxDIJjTT11wyRjOeXGVQ7P80MP tDsQitASLLYQKqdbzH5VOFVCVIVkDQkrHDicCJ9IsvLRikQelRXEOBMn8JcfBXe/DhYr iHbBRLlumpIh/doD2h3XV5pKJJtVUDpKPhyLnbrdScouILMMaHOYAlKUSWKOrJURgu1h yAMQ== 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 z25si943767edq.323.2020.05.08.06.05.36; Fri, 08 May 2020 06:05:36 -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 0EB371DBE6; Fri, 8 May 2020 15:04:37 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id 32FBF1DB47 for ; Fri, 8 May 2020 15:04:28 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 1392B1A00E9; Fri, 8 May 2020 15:04:28 +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 6729B1A152E; Fri, 8 May 2020 15:04: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 3A67F40318; Fri, 8 May 2020 21:04:24 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, ferruh.yigit@intel.com Cc: Hemant Agrawal Date: Fri, 8 May 2020 18:32:08 +0530 Message-Id: <20200508130211.14334-8-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200508130211.14334-1-hemant.agrawal@nxp.com> References: <20200507104645.31990-1-hemant.agrawal@nxp.com> <20200508130211.14334-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v6 07/10] 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 0be61cda04..08f9832eb8 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -891,8 +891,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) { @@ -908,7 +906,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 Fri May 8 13:02:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 186340 Delivered-To: patch@linaro.org Received: by 2002:a92:8d81:0:0:0:0:0 with SMTP id w1csp4159030ill; Fri, 8 May 2020 06:05:49 -0700 (PDT) X-Google-Smtp-Source: APiQypKCLZIfxoc5MRobx1oAQsAfCOiGOVLiQemcsI558iPAgriw/2kyyJk1PkUi8/Wq6L0zXghm X-Received: by 2002:a17:906:5fcb:: with SMTP id k11mr1012164ejv.213.1588943148983; Fri, 08 May 2020 06:05:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588943148; cv=none; d=google.com; s=arc-20160816; b=D1f2vGjH7+hKA1eUcseYEsu7eYL2BV5rcbmiWYU3N6eFB1vSVavrLv0A+vn9gJBDb8 VUKkTpIAcs/FRRNl7RpE3BpQPYO+KH52PGpUo98EZtULqt1OkFWjbN0zzaSrwNL+gdFq 62v9Q4zwuliTyuLNNsuF4fvtZdWp54jiIj11EfmRxZ0Wc1WBmIO23D66qsL0J23OyV0p 2JWMZgTOesYKhHsxAjepLv8bsjGfZk6dig1Xub1kIdnG/qAIW8esllJP9lxaXFc65I5z SwfUFLIP5bqFUaBrreX/MR8yCw2ns0Rmohb72rHsDqlUhLk7MbrDkI3Uriu+GAKrtnN0 Hsug== 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=Wp9mw918ZDl9OF4v0eHnAEEFrwfbjbkRtOO7s4djvKU=; b=FDwgFdnNPDOJ8SwcrMenPhgQ3esFkIoy2e1uz/1vinQ4UHeGQmH0gBj/srIt4pXdFd 6cxttj6hSyTjEZTW70PgwPep9Wv4mQLxekhiup9DrdV1V6JaM8tDKxVntcaQxbdKQU3/ asG284NyZO6w5VkW6M0C9IBOf+0VY7If6HjQ8C0vuAnAvAkudjAsX6ZMnY7YYkIaVFcv +8UPlluDB4PyxPo2I4myc1tHM/H/S3Hj9J5U1bE04BaZDOkDs2mS0SRn4ZPgztKY2BXm s+nqjK/zLSkWupak2QjtNxV4HSXS62UAcAt8B4Qu/KKb4FrndCLadAjm2y8F33GQ2y4b oq8w== 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 u26si1005776edb.4.2020.05.08.06.05.48; Fri, 08 May 2020 06:05:48 -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 62DDE1DBFB; Fri, 8 May 2020 15:04:38 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by dpdk.org (Postfix) with ESMTP id 99CAB1DB8A; Fri, 8 May 2020 15:04:29 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 799C71A152F; Fri, 8 May 2020 15:04:29 +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 74C921A02F9; Fri, 8 May 2020 15:04: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 D8C694028B; Fri, 8 May 2020 21:04:24 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, ferruh.yigit@intel.com Cc: stable@dpdk.org, Jun Yang Date: Fri, 8 May 2020 18:32:09 +0530 Message-Id: <20200508130211.14334-9-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200508130211.14334-1-hemant.agrawal@nxp.com> References: <20200507104645.31990-1-hemant.agrawal@nxp.com> <20200508130211.14334-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v6 08/10] 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 When using a single TC, flow id is same as congestion group id. However in case of multiple traffic classes, same flow id values are used within each traffc classs, which causes incorrect traffic behavior e.g. halting of traffic. This patches changes to use the cgid as the index which works for single as well as multiple traffic classes. 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 08f9832eb8..d9960b01f7 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -669,7 +669,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; @@ -696,7 +696,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 Fri May 8 13:02:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 186341 Delivered-To: patch@linaro.org Received: by 2002:a92:8d81:0:0:0:0:0 with SMTP id w1csp4159219ill; Fri, 8 May 2020 06:05:59 -0700 (PDT) X-Google-Smtp-Source: APiQypJ4zTmuHwBP4IAi3fnW7nziOr3gghcN54egvgYNjJ+uhYuFBFfomVVSr+7KIu+fayvF7Bnp X-Received: by 2002:a50:f98c:: with SMTP id q12mr2191551edn.172.1588943159742; Fri, 08 May 2020 06:05:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588943159; cv=none; d=google.com; s=arc-20160816; b=Espj6iNz0CKgmlhFNT3z4e+Y9xmfGy+zlosv/10xqRoVgoR6reRNLYvWzhghULR9M/ 3AVc/VJqSauMOtEy8xFZZNtl0hGmJavOJwmiz0Glg4mhLlSWRfH6p2tVpeiHkqa4CRUx NIpPFE3XbIm0AuYOhf4tMdTr2blvbXNj93myI6HS459mZFgQRYjNrZRsyRrsbqf3jSte 1iwsH9k+l0QJ5e4IrlqUVrcj11/dzw78R7FqExPkfWyS7Rk96sss5TrdVBqZblXLCQQO lCsYy3TFm/ZW4QynxDtfmyM6XqOWNlM2dBsXBJABZrOhI7kw3S3RyTPdnjni7rE3l4hi 2Azw== 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=J+YzltJyNZQcJjQuaM52kwx52C6+WDP+aEEr7l5hvcwMZmbobOYXxXf/NIrWdiwzF+ SyQzJOwPWPxQt6QeM1PqcDmZSboyNzPLtCtnqEvihZL5iBG8yvieHhrDZBwMrZAEm57x w8fhA+1HHD3E99PPYLFDdxB+R5UOHqZbeyazRylwIoI3VPoqYAM7zl4bNWU3kF9jynDt TwXhEMBduxCc4t6wcK+/CwbHUHiQ4piVzVIMSFhpJ5weWPNY46/E/3A2ej0l/Ps7vALi EHHnlOZd6G4q4GjCKcyVLCEUcscNkjXx4jRLMuM9ogDfl8FBRFziOQZwqaAmuP1SCRoG jBZg== 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 n1si975460ejr.104.2020.05.08.06.05.59; Fri, 08 May 2020 06:05:59 -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 D21241DC0F; Fri, 8 May 2020 15:04:39 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id 56EE71DB97; Fri, 8 May 2020 15:04:30 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 3820B2013A1; Fri, 8 May 2020 15:04:30 +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 3488D20100F; Fri, 8 May 2020 15:04:28 +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 8EBB440297; Fri, 8 May 2020 21:04:25 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, ferruh.yigit@intel.com Cc: stable@dpdk.org, Hemant Agrawal Date: Fri, 8 May 2020 18:32:10 +0530 Message-Id: <20200508130211.14334-10-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200508130211.14334-1-hemant.agrawal@nxp.com> References: <20200507104645.31990-1-hemant.agrawal@nxp.com> <20200508130211.14334-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v6 09/10] 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, From patchwork Fri May 8 13:02: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: 186342 Delivered-To: patch@linaro.org Received: by 2002:a92:8d81:0:0:0:0:0 with SMTP id w1csp4159362ill; Fri, 8 May 2020 06:06:09 -0700 (PDT) X-Google-Smtp-Source: APiQypKOIMvOehFKJ1NrpuXGqJ5hCIMt0ytenoc9u/U+jBchAFEaW4/DFCzCHCV3LsykGClMs0Ue X-Received: by 2002:a05:6402:17ef:: with SMTP id t15mr2092022edy.10.1588943169641; Fri, 08 May 2020 06:06:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588943169; cv=none; d=google.com; s=arc-20160816; b=HM6V+gu3E3/FIY2Y6WAq+ijEsYsJVIuhaCcBINUdUeq2+BCWyU9K2tI2+rSoWST4Li vBQyj9/yT1WOCVFO+O4JSKwsEmwVC70CStkcQuBmROQC60iSQXHpbckRXPiNx2rYQF5u 6JI7nHe4+l78D7kCFeu/fvOs0/VqljvZm2Nbz3SbKJ/dhtzX7+TnMI1wzk1EmDzhRHdl iaSOQ3gaQNPIWTxul5xpzsUMHrOrOC217agiQpCsuZzK5/FMoZNyOC3oV9ZKZl9rR3pj sxKqt5eO5a8JnVUgMaRO+n/wXz6f/DuQwJXWdDtuojC4QICwTW9fPvyZJ+NA1i2duj1v FVRA== 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=d4QnVCbeH9g1gCqreS1y3EcSlxcazAD7CCPnhsive2Y=; b=0Rq4Zh3h7ecaribK1V2ssBg/YSa/Na1XFip5zipBvUhrN1PcGoqy4Q3eaQgTHtgAK7 FeiisxWdmHYfNWzHH5/FYr3ZCBb0oWnl/3cipQ2Ah6DRm1MG+rcvAPtV/ldTGszhP56Z Q8O+mCwUgoqzKACZvk/l/tgWJyK3FgKix0kCDUjM8e7GIyN1FeLIaabSW9B3PJ9VzygK 4jhw6bPu2vDxcpZRl+sFILGwRNQnvTwMAk2msnxekO7mFZxBLTtxGb3FIvfhwaW1kO7f GU3Y7L00L8a0/jKTaAOH5bLpuOAhZLsieo6le7AOw+O1GririztZ2EstDkhj2x5c9q4u eSHA== 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 nh5si987587ejb.352.2020.05.08.06.06.09; Fri, 08 May 2020 06:06:09 -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 198BC1DC24; Fri, 8 May 2020 15:04:41 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id 5098A1DB8F for ; Fri, 8 May 2020 15:04:30 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 31F122013A0; Fri, 8 May 2020 15:04:30 +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 74048201389; Fri, 8 May 2020 15:04:28 +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 4F0654030E; Fri, 8 May 2020 21:04:26 +0800 (SGT) From: Hemant Agrawal To: dev@dpdk.org, ferruh.yigit@intel.com Cc: Hemant Agrawal Date: Fri, 8 May 2020 18:32:11 +0530 Message-Id: <20200508130211.14334-11-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200508130211.14334-1-hemant.agrawal@nxp.com> References: <20200507104645.31990-1-hemant.agrawal@nxp.com> <20200508130211.14334-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v6 10/10] net/dpaa2: add the support for additional link speeds 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 the support for additional link speed supported by LX2160A platforms. Signed-off-by: Hemant Agrawal --- doc/guides/nics/features/dpaa2.ini | 2 +- drivers/net/dpaa2/dpaa2_ethdev.c | 7 +++++++ 2 files changed, 8 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/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index d9960b01f7..1bab3b064c 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -284,6 +284,13 @@ dpaa2_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) 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; }