From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00076.outbound.protection.outlook.com [40.107.0.76]) by dpdk.org (Postfix) with ESMTP id 871584C74 for ; Wed, 29 Aug 2018 12:49:44 +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=yJegQVA4mrpennmub0h3FxIE2isfh25gInCoui/lB84=; b=UhgL4DvVrzvyHxXfB2FOfz7abpfq6CRktVFDqg0f5Xp0lcQxZWFbN44vh0HLGBimGO/RfECVHk2ozkPREs78lQc89hBiUKGqJ3y4cBCO9sKul5KFdDJ6o2KneZN0s9AFzzr+z5VPf/QL/o2WxypNNtNcYol27mfqkF3CswQVFO0= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; Received: from bf-netperf1.ap.freescale.net (14.143.30.134) by VI1PR0401MB2543.eurprd04.prod.outlook.com (2603:10a6:800:56::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1080.17; Wed, 29 Aug 2018 10:49:42 +0000 From: Hemant Agrawal To: dev@dpdk.org, ferruh.yigit@intel.com Cc: dpdk-up@NXP1.onmicrosoft.com Date: Wed, 29 Aug 2018 16:17:28 +0530 Message-Id: <1535539660-20228-2-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1535539660-20228-1-git-send-email-hemant.agrawal@nxp.com> References: <1535539660-20228-1-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.143.30.134] X-ClientProxiedBy: BM1PR0101CA0071.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:19::33) To VI1PR0401MB2543.eurprd04.prod.outlook.com (2603:10a6:800:56::21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8631d76a-46a4-49a8-bd93-08d60d9d2117 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989137)(5600074)(711020)(4618075)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:VI1PR0401MB2543; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0401MB2543; 3:tRPhAxJdzPsbaBG2f6RN/+UiLDCOXmbzSwTnRsC7EqIbkvB8/Cpxoefn7b2D6TcnfADqMjtbZgbeza1fNFuVg9lC7a6uXIJ8Mcl50vvn7/QwQhsVI43RMPAqxOVp7+j/jimkXvlyBW/m6XhuQr/x9yfUeL8Igx5srfVagetSKzXBMRI9Qugnl/0SV3nAuE/UNXyAdj2gXQkGO8OryptjSOXS/4kXbq5AGVjPkY3U1Q3B1XA6rs3KjNwzvt+a0Tpo; 25:Q7o9E5mN0gygzjC4WJc1sdhVo5fuUga8A9vDhahuSrBMVhjrC+zoBvoZRkiwQFeD1/bz+MtYbC4bY8PAASK6Vk/376I9aG23AVktBiHQOw6HzP86ocBQe5qa8aXh++6uhcPKLyFSosDS5tJF3znnUtu66slutTv2dxW8FzVwLUBXg3zjPRF0nSvB+7GywFBKwUkTuRrDYWpg84uMGOcQv7q7j9vA7bnnZZGwaHQwwh97Hq4DPna1IJlZUn7ywVCuuWy2zAMKLySQB+Nq4smJv498lMqHXrpdrpuzYxffQEY/RQXjLnRIGMFy1MgehLb3pZz+I0ldxe8xY6S+X9/LnA==; 31:hiNYs/Os+HGEU/3gorA7cvdl97wby9MQ3iGRBqJV6wCgVkY/CrXFpuvYbsLWzSxcIG/WHhPZr6aA8nJZsH+tYwzjjNvF7WiMxP32vZdtLf+kxPuj31UYL5L8nxh5aFPxkx4lZea2IYzbH02LAkq4u7OR1hO/1OglfcRlBaztmSVihmc+Zkczv1/T1f+H5SyF1hnemghaSUrLUsXgEXEeOlFgwH25HNVkHouHe1RAdKI= X-MS-TrafficTypeDiagnostic: VI1PR0401MB2543: X-Microsoft-Exchange-Diagnostics: 1; VI1PR0401MB2543; 20:XlNVTF71dzEsYVmNGNou9Oy7dZf0qU3Y6bAI1LrGjR8SUdYk4dAor2bc6QQQSthmNj1JT9QTp64FpnKXvVzCXlXbIrqhjgk1l56ABLVkCa0Mdz4ajUivvcaanUuToL/oTdN6XPbc/240MIEhvsLsvZyYVLkLOZCk8CJSqMRLydNgjF+fRO40bhHZKqVztmgFGaV7DqP/6gddi/6Hq/H3dWpBWlRCUCQK9XY8snoSB/hwVvjT8nkHTIkaxyuLEEYcSl2nYocKpMvC5oclQrqjwexiGsmL6QTFQDy5O3w0n/4iwuKox55EhXNyafywJNs+PSwFDKOZ35NldFH1pr7YrsPy9RUi0S3r0z0iNPM/MoP9tySP4SF4ON4GDoxcFMV8Y+mhrAudgqpccUECZ8vhzZm94E0Zy0+s99k387EhZSGAyxhtG6CKKVx7G4A53FzQKBJWIJKbUisQ3qLGl1oRHyUP7bDezE+dJr41ksD9b2rS7WMpuprN47wvs/O8rk7N; 4:qiWfPPPGdtiBrNvl1Qrc29gYsbowfpL3SQq5q5B2EIXjJ/JCtmhXIh3effonbA+JV7KNoqzCfmfYHIzHYI0Ww+LwAWPEgwmcw2xFYHI3B6IfM4Pqp671Bxr0bSnf8gQYrLqcdaBiyxCepeOuVGSH8u6K8JxGI3FpdaxVO10MHFLQw0kRQOOFt2xAgc19gB2hLr1paBMs1yAhzdgsL9Q/NDV7I7S5aldCEv063901ALMzt25hjPQlyEBa8aPX8UvhGNflyt41QUFkanQAS3Ycv/A9TsEKghaP4LykztA35JjHnlWvFg1WbQQQFsIsztiQ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(823301075)(3002001)(10201501046)(3231311)(944501410)(52105095)(93006095)(93001095)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123564045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(201708071742011)(7699016); SRVR:VI1PR0401MB2543; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0401MB2543; X-Forefront-PRVS: 077929D941 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(136003)(366004)(396003)(39860400002)(376002)(189003)(199004)(6512007)(6486002)(16526019)(53936002)(486006)(186003)(11346002)(105586002)(6116002)(106356001)(5660300001)(50466002)(68736007)(5009440100003)(2616005)(25786009)(48376002)(386003)(4326008)(55236004)(6666003)(73566003)(86362001)(956004)(107886003)(446003)(3846002)(26005)(6506007)(476003)(316002)(52116002)(50226002)(478600001)(47776003)(66066001)(8936002)(16586007)(76176011)(51416003)(97736004)(44832011)(81166006)(8676002)(7736002)(305945005)(36756003)(81156014)(2906002)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0401MB2543; H:bf-netperf1.ap.freescale.net; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0401MB2543; 23:qD+7UnaHgj5Il0Yrqgj3ncXgS16gunEgt6hNQn+?= =?us-ascii?Q?P2SbggA4dGfz7/V/mktGQOqbjL0/FE6rbKJZv96nwoibeXWPb3U87r8gION5?= =?us-ascii?Q?4LMaXtHm3BW0nvOvhViF3cJUpI4MW+IZ1h2XkJYd5q2DOvX47Ea0X+AGXluk?= =?us-ascii?Q?S//ZoyXTu7UQYW8Ch6trqigieWRnCVN+LfMX1bjio0Jy5i+Kxcc0Nf7QRN/s?= =?us-ascii?Q?rhyjLe6hjZkJhATVJ6Wsrcg3nJuW9TdNquzhDg6wtmerwnB1dikjC1WztsYU?= =?us-ascii?Q?euO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5:6YpgaH7AXplyKDxJb+QRbJYaZhplfnSsYa36Dj53HHuipcMQ5nFowUzkiGve35BJ35lZ7pCH3Ykm8KED/ILR1PtnVyJgHdI3x8jY01H0cjY3NZL92+95A+XcPlar778pt8I0SaGwxajrPs/wyv8OJXorWx4lVqd6AFBq560muU0=; 7:+q6U6AOOv3RdI/OWus0dhzrvCJ/Ql9aSCvD7axMhoKUghay5+IsIaE/3L7nJHBuDOwO6j0fpM2ALJ9xeJPSqpHD7+4RVXLWp0bDA3sfm9wCa5iPtEcUDLNBbNGIfGRZc8hzgYg8ngdr4AAz4AF3fLnoZSmqQmWMvcfMz0a23du9O8By1YvKZrRiqA2USVeG/bV19v+9q7U6KmNofPe9y+BozkveifWmDcU5ZU17d/aaQsrG1neQ1oox856Y2I+gF SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2018 10:49:42.7837 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8631d76a-46a4-49a8-bd93-08d60d9d2117 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2543 Subject: [dpdk-dev] [PATCH 01/13] net/dpaa: configure frame queue on MAC ID basis 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, 29 Aug 2018 10:49:44 -0000 Signed-off-by: Hemant Agrawal --- drivers/net/dpaa/dpaa_ethdev.c | 25 ++++++++++++++----------- drivers/net/dpaa/dpaa_ethdev.h | 2 +- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index 7a950ac..009ef84 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -1012,7 +1012,7 @@ static int dpaa_rx_queue_init(struct qman_fq *fq, struct qman_cgr *cgr_rx, { struct qm_mcc_initfq opts = {0}; int ret; - u32 flags = 0; + u32 flags = QMAN_FQ_FLAG_NO_ENQUEUE; struct qm_mcc_initcgr cgr_opts = { .we_mask = QM_CGR_WE_CS_THRES | QM_CGR_WE_CSTD_EN | @@ -1025,15 +1025,18 @@ static int dpaa_rx_queue_init(struct qman_fq *fq, struct qman_cgr *cgr_rx, PMD_INIT_FUNC_TRACE(); - ret = qman_reserve_fqid(fqid); - if (ret) { - DPAA_PMD_ERR("reserve rx fqid 0x%x failed with ret: %d", - fqid, ret); - return -EINVAL; + if (fqid) { + ret = qman_reserve_fqid(fqid); + if (ret) { + DPAA_PMD_ERR("reserve rx fqid 0x%x failed with ret: %d", + fqid, ret); + return -EINVAL; + } + } else { + flags |= QMAN_FQ_FLAG_DYNAMIC_FQID; } - DPAA_PMD_DEBUG("creating rx fq %p, fqid 0x%x", fq, fqid); - ret = qman_create_fq(fqid, QMAN_FQ_FLAG_NO_ENQUEUE, fq); + ret = qman_create_fq(fqid, flags, fq); if (ret) { DPAA_PMD_ERR("create rx fqid 0x%x failed with ret: %d", fqid, ret); @@ -1052,7 +1055,7 @@ static int dpaa_rx_queue_init(struct qman_fq *fq, struct qman_cgr *cgr_rx, if (ret) { DPAA_PMD_WARN( "rx taildrop init fail on rx fqid 0x%x(ret=%d)", - fqid, ret); + fq->fqid, ret); goto without_cgr; } opts.we_mask |= QM_INITFQ_WE_CGID; @@ -1060,7 +1063,7 @@ static int dpaa_rx_queue_init(struct qman_fq *fq, struct qman_cgr *cgr_rx, opts.fqd.fq_ctrl |= QM_FQCTRL_CGE; } without_cgr: - ret = qman_init_fq(fq, flags, &opts); + ret = qman_init_fq(fq, 0, &opts); if (ret) DPAA_PMD_ERR("init rx fqid 0x%x failed with ret:%d", fqid, ret); return ret; @@ -1213,7 +1216,7 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev) if (default_q) fqid = cfg->rx_def; else - fqid = DPAA_PCD_FQID_START + dpaa_intf->ifid * + fqid = DPAA_PCD_FQID_START + dpaa_intf->fif->mac_idx * DPAA_PCD_FQID_MULTIPLIER + loop; if (dpaa_intf->cgr_rx) diff --git a/drivers/net/dpaa/dpaa_ethdev.h b/drivers/net/dpaa/dpaa_ethdev.h index c79b9f8..2c38c34 100644 --- a/drivers/net/dpaa/dpaa_ethdev.h +++ b/drivers/net/dpaa/dpaa_ethdev.h @@ -63,7 +63,7 @@ #define DPAA_PCD_FQID_START 0x400 #define DPAA_PCD_FQID_MULTIPLIER 0x100 #define DPAA_DEFAULT_NUM_PCD_QUEUES 1 -#define DPAA_MAX_NUM_PCD_QUEUES 32 +#define DPAA_MAX_NUM_PCD_QUEUES 4 #define DPAA_IF_TX_PRIORITY 3 #define DPAA_IF_RX_PRIORITY 0 -- 2.7.4