From patchwork Wed Dec 13 12:05:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 121752 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp5385376qgn; Wed, 13 Dec 2017 04:09:45 -0800 (PST) X-Google-Smtp-Source: ACJfBotqafGfdbZir6+m9E1OWCqB9lRHbtAZirCxTs9/anBJkPXiAIria+1hLlGYCuo6wGPhEg13 X-Received: by 10.223.171.202 with SMTP id s68mr2128317wrc.13.1513166985637; Wed, 13 Dec 2017 04:09:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513166985; cv=none; d=google.com; s=arc-20160816; b=elsvURudg6Tf4sgqgJMRZm6rZ3lDTe1oL4MbYGVpiOGl4A3pTfDeRl88L+zmiEL5mv dgaDKCpl15NCLQLMTL7OzFqmsrYKy3LQiN2qUHg1MFrux5jQDXUe4h6c344APvTpjBTI Jr+sTaTtuOOTab2WsA1OISvr8XpYsXr/vwiyR39/ixy9aooSq/MBLUxE7RkazSdqp7yc +58jcWl+SOt5k8t3a3NtE1QKf93UKecOOBjZtDPZIfT+ahI6V896uuGFWB9f9ajdcJxJ Dx9uGyOK03iPr627FXVoFKSByPgP3sHM9CyO/DF6+vrE6Z50VF/13nieHHAbj5aw0cIk Ta7w== 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:arc-authentication-results; bh=jKFOezgXJguVsasfFy1vYYI4KOXxHBPUz0FhxznFAeU=; b=MXFr3fCSfzpNYHZvO3amV5rFPVe9TGikN1mg8SK3HzUrI487KK0jIh9SzO5EtbohFm qBHJKPuThynGQ2GLS71BzefJf+dU36i/qGmsEmHn1ug6KhWRekrPqFbvIt7y+tYaA3ev o/DYtoXBU90z7PpPQDTWAicLvek/tQ2J7XITsAVcLQBz5mToqxsSVP60+J6n2ADGqcQu nq5bVyInQJtNU1C1LbIdGPzzGwfQOpr12ewgRRgySki62Amiu8a3Lp+vyRnj8Jhc8HWS b680NCwEgNsvaRnGEDS2PW3cdH+UqOXUDNf5bwJ5JYOt1ReDmSXo+O4Kh2DI9S3j9L97 7Biw== 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 89si1211539wri.18.2017.12.13.04.09.45; Wed, 13 Dec 2017 04:09:45 -0800 (PST) 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 10B691B1F2; Wed, 13 Dec 2017 13:07:29 +0100 (CET) Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0070.outbound.protection.outlook.com [104.47.41.70]) by dpdk.org (Postfix) with ESMTP id EDFC61B1C1 for ; Wed, 13 Dec 2017 13:07:23 +0100 (CET) Received: from CY4PR03CA0100.namprd03.prod.outlook.com (10.171.242.169) by BN3PR03MB2354.namprd03.prod.outlook.com (10.166.74.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.302.9; Wed, 13 Dec 2017 12:07:22 +0000 Received: from BL2FFO11FD056.protection.gbl (2a01:111:f400:7c09::100) by CY4PR03CA0100.outlook.office365.com (2603:10b6:910:4d::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.302.9 via Frontend Transport; Wed, 13 Dec 2017 12:07:22 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; intel.com; dkim=none (message not signed) header.d=none; intel.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BL2FFO11FD056.mail.protection.outlook.com (10.173.161.184) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.282.5 via Frontend Transport; Wed, 13 Dec 2017 12:07:15 +0000 Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id vBDC6t9Y008652; Wed, 13 Dec 2017 05:07:20 -0700 From: Hemant Agrawal To: CC: Date: Wed, 13 Dec 2017 17:35:55 +0530 Message-ID: <1513166759-13466-15-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513166759-13466-1-git-send-email-hemant.agrawal@nxp.com> References: <1513166759-13466-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131576404355099437; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(336005)(39380400002)(39860400002)(346002)(376002)(2980300002)(1109001)(1110001)(339900001)(3190300001)(189003)(199004)(2906002)(86362001)(76176011)(316002)(2351001)(106466001)(105606002)(16586007)(50226002)(47776003)(8936002)(77096006)(85426001)(51416003)(81166006)(48376002)(50466002)(68736007)(36756003)(104016004)(5660300001)(498600001)(6666003)(81156014)(97736004)(305945005)(53936002)(4326008)(356003)(2950100002)(6916009)(8676002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR03MB2354; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD056; 1:GiZ+4adqmFbaSa6EZWLRus2rJyYAjZJOZflrwCqjMR87tmBSenKblJQ5Urq1ky5zIrPRz5/I/CVHWC9BFZXta50QYj+pfxXbS6FhZi6cKANWR3rPHC33y7x5F56fz2gQ MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a8cbe870-f068-457b-ab2d-08d542220cdf X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4628075)(201703131517081)(5600026)(4604075)(2017052603307); SRVR:BN3PR03MB2354; X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2354; 3:+3UIOMYnFj4q9XHA3bskYMxWPo2LzgZwrBJUTKBwcamyS2xAJX+0HW6OkBndetqlo5v5+zn5bIDE4dDy1eYdeDL6Ld4v4wq5NS9CjRnmpiAXTm7yoN3GIdVAfTWnAxxwncAuuHn9n3nHFBWlRochIzgW0IByhjhAsnoQcwTEn+KlCC8nN+S42l7r6aNexSkXOhCueVez7SglS7hzF3SZIcPsCH1UH5TN3gvXWcQH0yidFawN77kHV9F+oPSouRBpPFd2ffB7VfXDblrZyCxHubS093GiRzpPD3vyuxg20IwTn2W2k4tR1LWml110AEwLbqpgGz+fWGt87frs+lPBPTwmRXiXLOzdxPPf03uaxgE=; 25:9JCGtJT9N6F3k2FMQholkovCARVr5z/Fqp2MHEY+43VTOucZrPJcGJEq8duivt7qxmQZbnNY6LlUUMFgfB/TS86+eEWXg0z+UxpxwGfPDxqA0773opWLm9SdmMJTzaswFaSm5ANIWAJqHpnjdbpog/enBdbbWOB/hCaljIyYaNXW2S4xFbv2AYvH7MWkT7WB95TS5MxxCZv+Jk86xHcr0o7QfeQrRB8qIniY8+uLUwrRGJCbN5pQPQ2NG/s1bH2/Xgcb3hCanu6wPYsAJXzSfJe4aKWnchQL2r/r7qL7sIvIQHvrn63PIa/noeUfw4gSeu+nzdxqWkUxLrgAG7nhWQ== X-MS-TrafficTypeDiagnostic: BN3PR03MB2354: X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2354; 31:cR7dNBg0rbK8mbeGp9CBJ4O0mEq5aPWLWLz3hZDvjsYGTOyKO4uo+KTn3/v+DXMwfwgH2C4h6HQ6VAWuquxdeI9ueoun6fyLqTRUtgoJKmjptWIAoAtHGwzFOwlHP+S3Ug4SRlAGMGxrUas96TJBJBeFayN+WiYHCZpHSplT/xlLzw/A+DCWFpzGs63L1uokXNm5cwLRtF7phKdWVxdTcausZqLn3c+MRCzvOPfcVdY=; 4:etUCH1QGj2Q7FbdrLjDqTGfK3WqYjR8qqI+By9vhbABvRFyXq9sQnNWlYeeqXOizxxblnIyFFJ34tTfOpg0HZ7xmylkLZk4E2oNcAqzEXbYFphw8iFYy5rR7LZJU9X3MORCBuWxKJkoVrs1GT92pU3fAWSylBaerDlxAXTZKzMrHtMK4mDXzdqp8jCbe5bMovmv/7r+5OAC8dTyRcYZ60dwhJyWxjE81WmbKDW5SFDp9nhf/wYM8+dxVOI+E6q6G+soDSATUjdse7QxAz/jUmA+l0N6l23VlX+OqcKawrVRCIbWZtU4I+H1iyjyiHN8y X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(5005006)(8121501046)(10201501046)(3002001)(3231023)(93006095)(93001095)(6055026)(6096035)(201703131430075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(20161123559100)(20161123556025)(20161123563025)(20161123565025)(20161123561025)(201708071742011); SRVR:BN3PR03MB2354; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:BN3PR03MB2354; X-Forefront-PRVS: 052017CAF1 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR03MB2354; 23:NHMmzSvM5tf3yYurUjgfXXvJyZKd3ttr1czYiQz5x?= NJS79CpDMubQacvFtp4GAR/HNJpSri9a2PqI6LIAy6WK+SQuphG9ypWwust08EeeAGbsMvr/VilZ5lNocZQHHT+OAqvUqtAW0q3mngdvjRRBAnndqgdxIkJI87R55OBuf5HNCxWtftkY2UL6FOLW1AbNzbDC2yTK6Q/rv6Qy+TjKjEOIPUd3upzOwuAERAO+9oKI7qBdrjmD+mcxM9Nis+Gee9vktRK39iwfjJFRqHSnIbiNq+VYOwYMYyQRMfjWFof+iUkkPptxciK/LL3N/ZOcpB2IHHkSEM24cRdWuec/eFbuBcfZvU1HKYjhzoFJ3vNQLeJbcvspHdQMhfsAJJHkvk/x70riAPv2dYD083UosJ11zTYg/JHE4IKi4d4r+FESJMceX2zurrmoon7WG+lHbb3hVTl/NbR6s7vsaDkKNdcBh069M/O4slUQMsa7WsAp+/WwPU0pbu07K3TROVHE4fuqYbnqqQAFb5nCmrnQzxwFQOKuLb3q9mNM3S/ThdczLcd+hY6GBK3yXs+gPgseF8XQdn96dXsBVgaB5h7fmN/gdmMnx+Ecr6DqnX/IOhmigug8i1BlGch+dCtoMmP9L/reNDJqp0ZcZgVBfpFZ4RC4xuF2nBN4p3FLDpg0ep+2t/NBgImQSlHkZ/5hDzxBFMvEeAmrDF7y1PkzPlN3RmI4GRQgFqkQNeI2FRpCKwsCFXk6MJVjVKTiTdJOFyfiTSi+s7JMugrKmWnFh13FjBfJdC2P0jTfT/llRm991X0fhCU26DJIiyGCtJxgf6r05h7oRaFMUgOcHz/Vc1X95eswNcwx5bAipRJGf9ISNnblONxqD/+8waFlutny8i/w/441+z338fJLwGX8m116QYBgywowE0M2RPHpZhREKpG63trV3EFj4kZAbaf+h5Oyb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ticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Dec 2017 12:07:15.3539 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a8cbe870-f068-457b-ab2d-08d542220cdf X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR03MB2354 Subject: [dpdk-dev] [PATCH 14/18] net/dpaa: add Rx queue count support 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" Signed-off-by: Hemant Agrawal --- drivers/net/dpaa/dpaa_ethdev.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) -- 2.7.4 diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index 6482998..53b8c87 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -539,6 +539,22 @@ static void dpaa_eth_tx_queue_release(void *txq __rte_unused) PMD_INIT_FUNC_TRACE(); } +static uint32_t +dpaa_dev_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id) +{ + struct dpaa_if *dpaa_intf = dev->data->dev_private; + struct qman_fq *rxq = &dpaa_intf->rx_queues[rx_queue_id]; + u32 frm_cnt = 0; + + PMD_INIT_FUNC_TRACE(); + + if (qman_query_fq_frm_cnt(rxq, &frm_cnt) == 0) { + RTE_LOG(DEBUG, PMD, "RX frame count for q(%d) is %u\n", + rx_queue_id, frm_cnt); + } + return frm_cnt; +} + static int dpaa_link_down(struct rte_eth_dev *dev) { PMD_INIT_FUNC_TRACE(); @@ -690,6 +706,7 @@ static struct eth_dev_ops dpaa_devops = { .tx_queue_setup = dpaa_eth_tx_queue_setup, .rx_queue_release = dpaa_eth_rx_queue_release, .tx_queue_release = dpaa_eth_tx_queue_release, + .rx_queue_count = dpaa_dev_rx_queue_count, .flow_ctrl_get = dpaa_flow_ctrl_get, .flow_ctrl_set = dpaa_flow_ctrl_set,