From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30058.outbound.protection.outlook.com [40.107.3.58]) by dpdk.org (Postfix) with ESMTP id 56FE61BDD7 for ; Wed, 4 Jul 2018 11:45:37 +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=zMq647567BOstz1c7ZxNVZCrBPoyob+QhdpuSnTD66M=; b=Tr5DsToqEf3iN5yR1ctDyh19pJnaoAJZf9CtC3M5jh0uUMow/isPO6/i7owR81cuFVSQoFJDBJfhViyjnDyZIxI75e6iPwcFvm9jcFrlh6SyqXx+geuolfEApkkGJAu0ZTRmOZU0DFYNIz5nnKrLW3GpfTRzOpz3qdx52Jhn6AM= 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 DB4PR04MB0765.eurprd04.prod.outlook.com (2a01:111:e400:984d::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.906.25; Wed, 4 Jul 2018 09:45:35 +0000 From: Hemant Agrawal To: dev@dpdk.org Date: Wed, 4 Jul 2018 15:13:44 +0530 Message-Id: <1530697431-1244-9-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1530697431-1244-1-git-send-email-hemant.agrawal@nxp.com> References: <1529574244-18997-1-git-send-email-hemant.agrawal@nxp.com> <1530697431-1244-1-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: BM1PR0101CA0008.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:18::18) To DB4PR04MB0765.eurprd04.prod.outlook.com (2a01:111:e400:984d::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 38542f6d-8b12-4350-9115-08d5e192e4aa 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:DB4PR04MB0765; X-Microsoft-Exchange-Diagnostics: 1; DB4PR04MB0765; 3:M3o8DdmMJQmclh6Hvlfb4ZM33LKrqrktX1lyyCaMXoRp0TjWYxPBSbfU74p2+YUxgeMbzAbTYSNu4fN1tcr64jVbbNzrBy34+JvFBPFKmsSWxuz/cT7xzDJDKZ+7ErEHhukfn/GZLBFxA78atCmzk2jEBoDBF2XU/2fuggWtwtXDRptFH0rr+ALLyOVf0OdyxG/rkWS0sIWuXEZ0NSg5KA7ct/tWr+VyHPwMGJ/8Mduvu0dQkw/yYeh2kn+yngfj; 25:YjYWdPVphdFpRa7vosWXRr3E5GmLQEIXUG7t9M/c/Fo1LxmMfnCY5yUbISkSilIx8KS4zBl/qYd134W1CWWsBEiTxoAyIiW8CHtqzqNanKaE3EO3cydd6avxoG2sJWcA5RVWUwfYp6RwKfjsQGqql1xGEWBsO01XkrQspupF+Y6fCTxCDxAZhnO8x8ATEiRrzgn9Wffl7H/s8T8kNinqJazXKDjmFzpmgxPy/0iRl4MS+VQklGKtG42gjbVJvIoz46yykbaiDeu+SF7Zl2x6gfz/rs94/JCMcvOhxsPNPGEJcmEWyeMT5FeOJK3vf1EqGI0V1AEXCHIcenoXilxvbw==; 31:Bx14vjFSx87p/1hSWapGPcnW8KaQia04fsv6Le7iIdxRieZIj9ZQGceRR4GqAuWPTAe6eraOuFWLN4bjm7rYBjAnz9vzpNoANWI+mZX5mln6Bxa2gLNUfJlTpKNaiHOfNIqVdw7md3SBz+U966o5sr7ySz+AEQLX4yhAPhhOs6br1YcDChg9103LOa0VLiUAad9d/M71cwRBe8JeQJ+QefBkFdxTaTu42RtXrG+Apkg= X-MS-TrafficTypeDiagnostic: DB4PR04MB0765: X-Microsoft-Exchange-Diagnostics: 1; DB4PR04MB0765; 20:o0V90ZP45W+lEkq4j60F/ybk65hVLRifsL7zLif4vf6KumC/cU3iB6vNPF1Wuvb+634F0EMmNMM+7DOpVPA71NdVz3EEXCzpekL5HRknBHSmfjumMbYS6qmFb1gCLCTEv2PI82ygixicTPlKodWTSjtyECj/nSpjEnwxJ6iRKYaVPy6MWn4au9b0VoFCckVG4tssS70mi/s3Ux3VjVKsKqf3acUSWsQEldGs8q+6adBHyWJMapStJSagOWSbjH5+UFFbsuI+4X4mlzkZYnwApcUlKkAXmQA+7/diYjZwriBzE9hiXvYZB1P5lw5bAEoW9rmCUHCqJAb8H+1B2sYhh0XM+9qryg7mZJ63Yg8gfqbI8CMvMnXwJ4m16PBBBlfry3jW91wb4lds8ohZp9m4FG1pj+Y0UWszT376VWFjvh+ntX6MpkDz17jbhXgIBntfgp7RN5MMxTFLXcGRuZxO1uU3Upcrb4yK19ksGYVLDBK3usrKCDbyuc7e8f494mVG; 4:fGBZTqfL8oC3cv5nzf3bFxZ+DUCweh9jspDKWoL+4FAyRSPl5edZ8dLhJ2akj8vSMFMHreLyrrygXD7Y4jsN+w8dJoVKSvoRFLDDgdZXNl9IVfwxdIhR5o9eIr1fBIeiTvlm/0NoY1zUZTIhDtfMyz3TZr+GfmkgnlIJObOrofWmRqs8Ru5eh2vobR/ktBRu3dFT4g3jUylWgYSG8YdSqIunkgD1x9V1QeJEAg6JRUJdOJqXwMJVXMk8k/KYRZLGD7l0w6alz+Wf/wpGSQZrf8l2lWncBxkfcw9YvT27uenyDUzzBOAC1dNCFAXKVTuWu84rohWY6NvUt7vmvkWVHKWOgIjdVr5PpMCOYLAnPYQ= 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)(3231254)(944501410)(52105095)(93006095)(93001095)(3002001)(10201501046)(6055026)(149027)(150027)(6041310)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123562045)(6072148)(201708071742011)(7699016); SRVR:DB4PR04MB0765; BCL:0; PCL:0; RULEID:; SRVR:DB4PR04MB0765; X-Forefront-PRVS: 0723A02764 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(39860400002)(376002)(136003)(346002)(366004)(199004)(189003)(6512007)(11346002)(476003)(386003)(6506007)(55236004)(956004)(2616005)(5660300001)(44832011)(105586002)(68736007)(16526019)(53936002)(446003)(50226002)(316002)(6666003)(5009440100003)(36756003)(16586007)(2351001)(6916009)(106356001)(14444005)(186003)(86362001)(26005)(6486002)(97736004)(305945005)(81166006)(7736002)(8936002)(66066001)(8676002)(478600001)(25786009)(51416003)(486006)(76176011)(3846002)(6116002)(81156014)(48376002)(50466002)(52116002)(2906002)(47776003)(2361001)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:DB4PR04MB0765; 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; DB4PR04MB0765; 23:3EfkW8gKdcq7SKThImVQLkv2tCkAzJb8dnGmVu4Ax?= =?us-ascii?Q?g477H0loA6+Zv/an/bpPnlfWxwZstKBGV5hLHBV/3K3KWuN3iE4pLJDmmRsi?= =?us-ascii?Q?wiInwLFGkc/BZ+imcWJzitos8/6r/Fov9e2B0w7bC+kZhO2kogRLRKlKxT1R?= =?us-ascii?Q?23jrIYEd/lefOraPeWAlhTjivm/kJK1n0PyvWZD5LpSJkcSlth5CTHUovDhj?= =?us-ascii?Q?OuChwn6Rc48apPkm5FctK+Q+kWw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tP/gVKvE/XwVedAG8abuFiXbMib5ClgtpoyLoikdgZtwBZNogbMwN/6c9vyi?= =?us-ascii?Q?cZwCKouoW9WdWNc3MphGBHN6MCF7PU3cwAh7hRjUekGzMIf72lTA3mtfSx0U?= =?us-ascii?Q?oCjiOD3sH84LLxDYDly5yAeQcpRJto9Q8BQootjYluA6Jc/bylMQDIQhRozb?= =?us-ascii?Q?0tJLADN8f+1rFSwhBPZ+kI=3D?= X-Microsoft-Antispam-Message-Info: eQeu87xbEnJzW1xsoqYQyCgYKsObbew39Pq/vCsPcDOL8mS53G1UTm0oWZu8qtTZJGLv/5YRicte7G76AG7OfGOZIRfx7gaJsOiV6hFJ8PnWyg6DnP896TGEtbeKpftndUtSMo906NsXBv5OCnM0l5ykxZe/UfT3N3AcOf6yq1ZXEFM+5cQTJZxGqGh6dMuqHzssAltlMzP8Tz/n6QltaIIgsnJkza+FWyVv26UE0hwzDzAL7OnuY4aRE6xXKhQwjoHw1vBezj4B6oWCCH+OXTChtlipwbrEoj7qVkLVG2Gji1bXSk1HFQURxJ9/bkxBGxl8t1TeaxIZiJxbdr+SYU2mHYiKSKF8cmVKC0MI3Tw= X-Microsoft-Exchange-Diagnostics: 1; DB4PR04MB0765; 6:YX3imTF2acaHXFknxs5uAk8AiFt3VfuvCC8D28izujqbyG0p4LWb78halfms8lSXSHTh9pYGS8mhoBg9RPsQzyqT748ICnP8GEpDaw+TXnkiqEv46C3uE6XxUnmH/QdMS+dv2x+9JrAw4hLAPdv+TUJw+W2aUJhmauZzPx20ePLTS7fBJdqaV8wNuOOPIgDz8NYjrRsgZvp3fhyL4Mt3Ushxc1RSZWssCn3e13k31yT8OrYnfXJc6MoJBVyRZmU8sObqYOPAn1pM6lq9Ghdzzd1x7B7o3finYrWeTwTdu8YvyM6KU0YkTV+Aw9vHPYwacmYMpcgsAqyZWDVFYzy9g/9R81VjTa8sqJNmicJM20p3M0SIyZYYey8+IDQC70h1MBlUj+OV76hruTEmGECiAG5bXadwjfGrCh6wb4jaNSdxjnwq2+kP2dmv/73jCaqYah1CJbsCPuvvcRWDZfCKSQ==; 5:SCZGgg0Wg+colvsjR+5GOWkQPfE9gk2IqYZdEaUEk07cB3naGuFTp1mmtOu06iFf8t2MjILzq13VquSyj8FY+z/6bcdP+aN7rGZ9XmlJtzYlwGgc6y1WZysOuOhj7kUyrqsLyyJKwGmhHccrN/qjYvXaEs/RfbGc03apPmdHD+U=; 24:fxVb255BJBaK0Za5tx83rut+74yyEoujNbDR0vOhvm9/rD5df/336tLPXDl7FXyg60PTxNNl+aJ5p6pe/vnLX5ilN7sdnZ/3N5TNxSNb5Z4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB4PR04MB0765; 7:dRHF5GaUXO+Ze1OoPIESZgBXk0yZ0He16ik9LAEx83L+uIKm0GVqx5sOfx2ctO65iSxWT4dNZmZFCHRRNDTS8dZ/fx72VmMeAl5hyL5RUPCdXddgVmApFH4tOuzBqSQHVMMIWExekJ/tqsJkzCGXoNT7ksm002Tf1Cw43MRmPVRKh42LpecoxDgXiR1wZJKG65gaVZQKXeO5ZarE12uUSEFAor4TpY+4urp4ABDlyWWvs1LyiEpO45tNeCs7YTun X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jul 2018 09:45:35.6138 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 38542f6d-8b12-4350-9115-08d5e192e4aa X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB4PR04MB0765 Subject: [dpdk-dev] [PATCH v2 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: , X-List-Received-Date: Wed, 04 Jul 2018 09:45:37 -0000 In case DPAA FMAN configuration tool (FMC) is not available. System can still work with default queue. (1 queue per port). Signed-off-by: Hemant Agrawal --- drivers/net/dpaa/dpaa_ethdev.c | 37 ++++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) 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; } -- 2.7.4