From patchwork Fri Jul 6 08:10:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 141269 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2835762ljj; Fri, 6 Jul 2018 01:13:34 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdD9AzUgOuFvMlN4Qer+G31DQGW5TI1duIwFHqasPZM4MrgG+yhK4bXXlOdHomNWpDVnDFg X-Received: by 2002:adf:b2f4:: with SMTP id g107-v6mr7110075wrd.53.1530864814515; Fri, 06 Jul 2018 01:13:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530864814; cv=none; d=google.com; s=arc-20160816; b=FJ9l71LZUpI91nZaPZyPOYfJkF293vJp25BCgdurYWH4zir1BAxKsH4A58IF1lzMH1 8gew2Zn4DrlDjvOvzBwPl/IrVYp9Ie6UZcHhaopG0inbBOPLjXo7jT/dChcauqkvIslc UMauiMgTli5cpVDQYs3VjNrrm5xUuScQts1pWU1hV6T2C2n2kLOpFN0g7Jy9t30nTRtl 4GqbM1KPIUo1sRKOZPkZU29BIcb/RcUxQCyQmk49XCYsxvbanW3fQYoVGB5POeS1phcX tx0pMK1kXaPfO+GydeQogY/k1zlp2ZlKQEagangTnLPD0gHxLZ+NA4SKCofuxm+Wi4Vr 5Bow== 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:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:cc:to:from:dkim-signature:arc-authentication-results; bh=ZG6LswLLtx70OrfyDRkohE/IJwOnrFxZZfjbW7EQKiQ=; b=tngbe89soHQZEs9VjJDsNG3He9E8y9dKMMP/+pOyDYvwNbGI6ueftNSoLqF+OCKnlZ 6llyO6eV1uhaYZ2SM5DRS7Qnviys5SS71Sj6cZWA9v+kEKEP74iysWBEyG5MBxk3Ihiw ivyoUEfGkUfLpBfiqUfxqYo/PxRsefFLuA4quzgE4N1NiaDGy199wiw++0YJfgbM5fjk aUiB8ITCZp9cVh3gjJS/prnnnmAeKT+5pPhqKw6FXKWtCCdyLrr4B/T1AzerP3UAtNWD 7PqXkvXWl34Uex24TWyOx9chgTYnLbaRIQa1eHxPW8MOiiDtK7vgV40/J2ToOAHA9fZK MpGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=LLRX78g8; 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 o9-v6si6192306wrm.397.2018.07.06.01.13.34; Fri, 06 Jul 2018 01:13:34 -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; dkim=fail header.i=@nxp.com header.s=selector1 header.b=LLRX78g8; 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 0CEFB1C496; Fri, 6 Jul 2018 10:12:17 +0200 (CEST) Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00055.outbound.protection.outlook.com [40.107.0.55]) by dpdk.org (Postfix) with ESMTP id AD8F11C45C for ; Fri, 6 Jul 2018 10:12:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZG6LswLLtx70OrfyDRkohE/IJwOnrFxZZfjbW7EQKiQ=; b=LLRX78g81XFmRBO0hJ91fONBqwYuwL4RgtZ7nLClDATr/qN9oypsahvgLNtccB6Pwn79YM0uWp2LcrrbyIPyIYiIVKkva9KmhIwNUtoASDO8ZLOu9TC67SJziA0OhXa2nqR9oRrOXBCFaRC/DiGxvklEMqyjpgI1rvLddqxoNA0= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; Received: from bf-netperf1.ap.freescale.net (14.142.187.166) by AM2PR04MB0755.eurprd04.prod.outlook.com (2a01:111:e400:8411::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.906.23; Fri, 6 Jul 2018 08:12:06 +0000 From: Hemant Agrawal To: dev@dpdk.org Cc: shreyansh.jain@nxp.com Date: Fri, 6 Jul 2018 13:40:06 +0530 Message-Id: <1530864613-11754-9-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1530864613-11754-1-git-send-email-hemant.agrawal@nxp.com> References: <1530697431-1244-1-git-send-email-hemant.agrawal@nxp.com> <1530864613-11754-1-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: PN1PR01CA0076.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:1::16) To AM2PR04MB0755.eurprd04.prod.outlook.com (2a01:111:e400:8411::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1c114f32-747e-4fec-3d15-08d5e3182a76 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(48565401081)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:AM2PR04MB0755; X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0755; 3:Of2FubuoyQZIh1A+W1hoLRCqBqRZH7N63/4QPSBLoyXoZ9XZODD+Omz1VW6RTexKEcbXsyeVHTX+HlgiNkeL4swwGbUy1cnG9CVkL7J+pZopmo0mODTQ/vF79TPZdVy8d0+GLEpvlM6c28lN3GRSfnxCJ+9HxmjtSBOEUDIMLh2cOppjF724gv9SltT/LaRbyzYwz03XFwwLy0LQdcoOAaEdRqZLv8i7C1QX0pqSU0mQ46mmDJwDi2hm30txUkWF; 25:apQHDjmSdct0RhXsQZTQ4GDdHRmwjIc0HZa3dkhxVGCuKhK/swqsgnKlUD66P8mRGdQ1dwByLjtlOOD0oWwKX9TCwNNXNr2WUD4xN5wCBPviKbAwqdfyVtinnZzxFhYY6pjmEB9RSKUEexRo8sQxsdPrcYAI9BwbTZNeLrAyFfL9Lw5G73w8gC1dFAZVJGF+9xVF6OJ535R1wPIkL+peo+iZmKPxjloAD8S0mInJ5O70J6VlH7FTmcXxU8q8zSsdvkbVW9HqDV6aU6K5dKsCYBwvFicuaETETCYghRLFimOjHHmUG/vC4QbGpPTPdEXMtAu8GYpUwlaqQjSePINzJA==; 31:zdGd0TO155ij+ZcvJ3jvg/GLWCxbevgSRmUUHR2PhgguH2hUI+lbjdX0fDpWLExh4vVMVXP1MyroSTq7CkwrfO3l65JOIyeGteUpbCdIPwmaqteb1Y7BCh5Qw55YED+lhzlwtYIfb2jhHIhXzrXOOvKBq6OwVSB8im+/b5QI0Lt0R0W4SARWIXH/XTBHzVWkxfhOlXyJ8yNeArIyNVchHcGGnDSb9/i601zJLhBUYIA= X-MS-TrafficTypeDiagnostic: AM2PR04MB0755: X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0755; 20:ezljIwyn6q+KTeexrtCDXAu75DCkVMZIXi9C1LgQL+L2oYqHxzOgv7RArv6BJs8YdFru83aBczSrkM0czilqhItESs+TATK4HB42h2u0aotjFK2WOAClCKMdWwrXHKg4cgIpKOkwgE4EIHs7hbIkKdJzZ9Zd8NIiCEmZrY1EmOvewMCYE43u4xJqIUtQCDkci/4s0+3Ae19qq89EOXwR7uhsms8GYIaQTSf/O07ImYwsgYo/b7A+rpD57YvVbqViOF9emqhCOrUT0VOWMfqTUcGDOLMbNjbARw9oDSLKkfFQJvVhGhMU+cTJB3iyvp+1u/qVNjPI11h0lJR/VMJsQ8NQBYX26Qij0PnC0fIyNPQgJlmN1/sYh6kGsnbcb5pioj1WRwK6ZetuIgbZcSozSBFhtTDz3hUOtDeyp4N/atnmt6JtTONDrQuXENUm8tf4wHaInUlIjBAhgeE3Uq//yD7gcO4vFsBZ8Y0QtQ1JjsE44h1d6y/tb5nrsKA2q/2R; 4:VLUxurZ04D6mIQyE4jBdZNettIsrvLLBIJ5uPls0LCkUcTLISqaCzgXedP6BJJLLbjyQKHEl16WweoblXmJKfpltRoSABIOTjCcGR6uDcapUSrFOGG6DZvBzS4uU56wUlU4AjxolC9hK7xBxLxpmLvF27JyhTAF6u5bOBlr1a2RpwOrQcfQUVEjb8i0SSVtEzZPSfrTNXEZPyiiUeW4u2F+KHkbp7ISJurON+h6b3jgNxsrkIXe25ARz3VHJB885OEDZGqrMmYKsSfHMWEgsoja0hVfCAx2o9vqTpWej11+5TOiQELf+CD5SsXByX+IbV8f3b2o14ja15dYXde5v/7/4iK4jDYeh5BcSR3ORffg= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(3231254)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123564045)(20161123560045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:AM2PR04MB0755; BCL:0; PCL:0; RULEID:; SRVR:AM2PR04MB0755; X-Forefront-PRVS: 0725D9E8D0 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(396003)(136003)(366004)(346002)(376002)(199004)(189003)(956004)(66066001)(446003)(6116002)(2616005)(476003)(5009440100003)(6916009)(76176011)(186003)(16586007)(14444005)(16526019)(105586002)(478600001)(86362001)(44832011)(106356001)(3846002)(4326008)(486006)(11346002)(6486002)(2906002)(25786009)(305945005)(47776003)(50466002)(2361001)(7736002)(5660300001)(6512007)(48376002)(8936002)(68736007)(36756003)(97736004)(55236004)(6506007)(53936002)(26005)(51416003)(50226002)(8676002)(2351001)(81156014)(81166006)(386003)(52116002)(316002)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:AM2PR04MB0755; H:bf-netperf1.ap.freescale.net; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM2PR04MB0755; 23:50n4HeyE8NS0tu4xk+BXz/ThGRTY6baBE6Do/X5KT?= MAj8Gr7+vr3MtPXhIvyJdkgjSISbnZQ+xN7XbW5ID8duixjwTAueA8UNh/CvTUfVvWo0xcJXEkw/OCHkDys9xV8w5XeZapCwZuhfEwEhGzyJiXZoUj8wP+HW2q2x5vON5etQbSEberLoT93QHwWr2yjo7MebEeb55oJX/D+6zZtJGDk4RwrTA10FEO+xexzeeF8bE6bO/GJe7/D/mrU9OLUTF47rD6TyaKalqmInccff8fcaPfACXjXVv1RuFKUW0zZWarAGktWZmAHle3s7g1iQuW2pOjgWo3iraq7K14VnQMkjmvk1HfAZo947tRHo65aZ1kpmztsWwOR+g2latKqbVNxKhno/ImhznIWtMCVXah1HqxctG2xPvpPk3SNSmzkTkR8tgCFkAlL5NmC0A7u3YB6gQFUZ1WsGQWhril3fqzchKLWKh8dXktn3+QGkshRynFnV/p/vbPIo6ZtIXWjV6Z2H6T3HsiHqfXzTTUbB69FwdLfcy9zKqx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GUxJOuDRnJ58aOWLB8vz3ve5nTbi0TcfeniSuPaGpMpgLXgiWBdquiR3/Qmie131oMPZwBe4SXi8RcGVVY1lfMtODm6EL8w9wywgY+DAuyN6Z+GjgKpWn6M5FDPIQdik6elNrA8cor06AB X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2018 08:12:06.6609 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1c114f32-747e-4fec-3d15-08d5e3182a76 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR04MB0755 Subject: [dpdk-dev] [PATCH v3 09/16] net/dpaa: support default queue 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" In case DPAA FMAN configuration tool (FMC) is not available, the system can still work with default queue(1 queue per port). This patch also fixes some logs related to FQ ids, which were idetified while testing this support. Signed-off-by: Hemant Agrawal --- drivers/net/dpaa/dpaa_ethdev.c | 37 ++++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) -- 2.7.4 diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index 79ba6bd..def9483 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -74,6 +74,7 @@ static uint64_t dev_tx_offloads_nodis = /* Keep track of whether QMAN and BMAN have been globally initialized */ static int is_global_init; +static int default_q; /* use default queue - FMC is not executed*/ /* At present we only allow up to 4 push mode queues as default - as each of * this queue need dedicated portal and we are short of portals. */ @@ -1026,12 +1027,12 @@ static int dpaa_rx_queue_init(struct qman_fq *fq, struct qman_cgr *cgr_rx, ret = qman_reserve_fqid(fqid); if (ret) { - DPAA_PMD_ERR("reserve rx fqid %d failed with ret: %d", + DPAA_PMD_ERR("reserve rx fqid 0x%x failed with ret: %d", fqid, ret); return -EINVAL; } - DPAA_PMD_DEBUG("creating rx fq %p, fqid %d", fq, fqid); + DPAA_PMD_DEBUG("creating rx fq %p, fqid 0x%x", fq, fqid); ret = qman_create_fq(fqid, QMAN_FQ_FLAG_NO_ENQUEUE, fq); if (ret) { DPAA_PMD_ERR("create rx fqid 0x%x failed with ret: %d", @@ -1050,7 +1051,7 @@ static int dpaa_rx_queue_init(struct qman_fq *fq, struct qman_cgr *cgr_rx, &cgr_opts); if (ret) { DPAA_PMD_WARN( - "rx taildrop init fail on rx fqid %d (ret=%d)", + "rx taildrop init fail on rx fqid 0x%x(ret=%d)", fqid, ret); goto without_cgr; } @@ -1061,7 +1062,7 @@ static int dpaa_rx_queue_init(struct qman_fq *fq, struct qman_cgr *cgr_rx, without_cgr: ret = qman_init_fq(fq, flags, &opts); if (ret) - DPAA_PMD_ERR("init rx fqid %d failed with ret: %d", fqid, ret); + DPAA_PMD_ERR("init rx fqid 0x%x failed with ret:%d", fqid, ret); return ret; } @@ -1089,10 +1090,10 @@ static int dpaa_tx_queue_init(struct qman_fq *fq, /* no tx-confirmation */ opts.fqd.context_a.hi = 0x80000000 | fman_dealloc_bufs_mask_hi; opts.fqd.context_a.lo = 0 | fman_dealloc_bufs_mask_lo; - DPAA_PMD_DEBUG("init tx fq %p, fqid %d", fq, fq->fqid); + DPAA_PMD_DEBUG("init tx fq %p, fqid 0x%x", fq, fq->fqid); ret = qman_init_fq(fq, QMAN_INITFQ_FLAG_SCHED, &opts); if (ret) - DPAA_PMD_ERR("init tx fqid %d failed %d", fq->fqid, ret); + DPAA_PMD_ERR("init tx fqid 0x%x failed %d", fq->fqid, ret); return ret; } @@ -1163,10 +1164,15 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev) dpaa_intf->cfg = cfg; /* Initialize Rx FQ's */ - if (getenv("DPAA_NUM_RX_QUEUES")) - num_rx_fqs = atoi(getenv("DPAA_NUM_RX_QUEUES")); - else + if (default_q) { num_rx_fqs = DPAA_DEFAULT_NUM_PCD_QUEUES; + } else { + if (getenv("DPAA_NUM_RX_QUEUES")) + num_rx_fqs = atoi(getenv("DPAA_NUM_RX_QUEUES")); + else + num_rx_fqs = DPAA_DEFAULT_NUM_PCD_QUEUES; + } + /* if push mode queues to be enabled. Currenly we are allowing only * one queue per thread. @@ -1214,8 +1220,11 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev) } for (loop = 0; loop < num_rx_fqs; loop++) { - fqid = DPAA_PCD_FQID_START + dpaa_intf->ifid * - DPAA_PCD_FQID_MULTIPLIER + loop; + if (default_q) + fqid = cfg->rx_def; + else + fqid = DPAA_PCD_FQID_START + dpaa_intf->ifid * + DPAA_PCD_FQID_MULTIPLIER + loop; if (dpaa_intf->cgr_rx) dpaa_intf->cgr_rx[loop].cgrid = cgrid[loop]; @@ -1409,6 +1418,12 @@ rte_dpaa_probe(struct rte_dpaa_driver *dpaa_drv, return ret; } + if (access("/tmp/fmc.bin", F_OK) == -1) { + RTE_LOG(INFO, PMD, + "* FMC not configured.Enabling default mode\n"); + default_q = 1; + } + is_global_init = 1; }