From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1on0089.outbound.protection.outlook.com [157.56.110.89]) by dpdk.org (Postfix) with ESMTP id 06569D051 for ; Fri, 17 Jun 2016 15:32:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=vlIYLa+YsnQ58pW+I1TGs2GHem0XlS6N7JjS84/4gzU=; b=g7+R8Xv61/5mPSqOA3MsFUJ9tjwmJhEXWh3eRotIjigZpHLN8ZUH7Tp099G2qpoeNlksina345Q7HAld5vV3y9VlXmK2WVVDp29OueAxcElKN5vCPyoH5W3R4K/DZGOaCo29iaqGEccgIVdS7SBKQ/EeOy1fDdSR1X1MDzFVYhk= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@cavium.com; Received: from localhost.localdomain.localdomain (171.48.17.70) by BN3PR0701MB1718.namprd07.prod.outlook.com (10.163.39.17) with Microsoft SMTP Server (TLS) id 15.1.517.8; Fri, 17 Jun 2016 13:32:35 +0000 From: Jerin Jacob To: CC: , , , Jerin Jacob , Maciej Czekaj , Kamil Rytarowski , Zyta Szpak , Slawomir Rosek , Radoslaw Biernacki Date: Fri, 17 Jun 2016 18:59:49 +0530 Message-ID: <1466170194-28393-23-git-send-email-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1466170194-28393-1-git-send-email-jerin.jacob@caviumnetworks.com> References: <1465931200-23912-1-git-send-email-jerin.jacob@caviumnetworks.com> <1466170194-28393-1-git-send-email-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [171.48.17.70] X-ClientProxiedBy: BM1PR01CA0028.INDPRD01.PROD.OUTLOOK.COM (10.163.198.163) To BN3PR0701MB1718.namprd07.prod.outlook.com (10.163.39.17) X-MS-Office365-Filtering-Correlation-Id: fe2455bc-85a3-410b-41ce-08d396b3da53 X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1718; 2:0djhG9Abng7j6yNEUc1QtNwOodLau5DdGcrjkEOF1SkAslgEPi+mY+Xz4lGacHMI7G2mu+urOgpfpA1gBR6D/8J4Uxw9Tn9+L/561mo4gN6l8F2zQ4k1NdihEbq3Klx0DO8y3lmPWuzH9CKixsRLi81D92DAdXXKgZREBP9A/AeFDd0K5qXcwwqs6b5V1h/y; 3:1lWmmqngYvl3GUEK6GjwdtYIqtixreLjp/mweWeRh9vbTU7sxCDPmoZIsDO2Yolnl3UdfR7WJCPRbNO0hTQrYHmTx0mNloaCv1b+67ZVMkizd5kPtGrl6WvQJMomGHK8; 25:AItePV0V1ARyMs9Qf8DZD6TEnjIFrjB4tX7Krc5Ckqxe97vvpLqJBILq7vAi561l/BzPTnsC8Y4K1KF9t3aaACltD0V3UgUmTjbcuoj/1Ja8j0DfI4P2wAB0vpvlec+7WpWo2W2GQWLWVf1Zq8HZL2GFMP1HVU6BUYxog8nbG50nGUBctmvnA6GNc6eH/VhasM4J1eY6IZm3zGS0cLSqgwc9HZLnvGs5pmXqOzdxMEsvlyKb9uxp35TD0mSaXM/Give27DXjoPrwDSCjRNZrdMo5ZDy5k/yhEsigGyE/bYFRfyxt6YzCIX07vENwKBkX7Hj/CK2FM+5RvikR01WlF8Gjr6u+oInP/fJFTp6bptMqJjnxH3gbQ56kGUs055c2e8mPd66nWRIODtKQye14SELAIWxycFd83zwOGaOBWtY= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0701MB1718; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1718; 20:znAPudo2ltJMx3bjR1lrfb8gYr7peTe403bniV0kVlmeuXXDIoXijJ9vIBmUu+NPCSJRSz0+pQ9UvcmBh9urTO/UlsR1a2Ys1UXwtX3H32m6EOM8ypizt/vblTfj/VzCzRXaTwbU+U8ebPqGzV9LzJgmxDOz1/1+ZW/beSeBw39M3K+bftq/OR5aYA4Iql8IQEbaCTE9hAH1IrY1R2IOwnyB9Po1KsQH0tv9dYggqp5iABUj3xyJVZnFylbytftJQIKhCrTxyCZ3SLcg4z0OhBwh+YIwwDQ5vavw9zH54z/TTeobZcz8dJ6ZanognO3YgLKAyRajEYm7RP1ilIZ/FL1DJqzoHV0DVc9LZMghDRRHz0Ch5kPuQfZMG8ASV3Hcpg1ocMl4m/VPmgLF7JJ/yljOkq/89Ka9AVwB8oh7aE2Gtjo/EOIU7+8Bp7oc3k2vAHWE+96ntTLFdI+pgbcN5AbVptaj7txkC8SzldbV1v5Z1Ztco9Dc6oUdTHdi3zXsuwBKrVCmW0YiEsAHW9jt6aViXKVIRvY7+g4xZhs8Y/uwOcD+7VBatAklODtEt5xlPif6Dy4mQNDjQG9T2qfji7PSxX7nhsDJcSdb8Y6qZ68= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046); SRVR:BN3PR0701MB1718; BCL:0; PCL:0; RULEID:; SRVR:BN3PR0701MB1718; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1718; 4:z8R+RKQizTxQCwYciGYV6d9Kb/vj7smGb/7XQ+/etSoNquX5U1pvLIyS7XwBF+tQc4fJzdFcygkR3CAy1OBJOp14RyMA/KBKMbXuMT1Mv8I+FqpERrP80DnnWxswGzqroFUqjbZL/qw4yCAmspZZlUwSicbl3yhLo1P+uB2DP1hhN2JyWVRgcnDf70i/Iwy8LDQ2QK0rnHQnY7dzq074bXqEqZMymrzi5vWs39FHwsACCl0fFQl4i184VXGUhkezNbqm1paJjUdmqrlFyB9wI2gRu7VK2npRTwU17Ehqi9wvRqXSAmcx6a2g8iLb5/pnnenNQJdyGINhLMrxYdx29zavIaEern0p47CzM/a06vJbkg/Cg7138cQKnOBDjJ7/ X-Forefront-PRVS: 09760A0505 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(7916002)(199003)(189002)(48376002)(19580395003)(68736007)(2351001)(47776003)(229853001)(97736004)(19580405001)(586003)(50986999)(110136002)(36756003)(3846002)(66066001)(92566002)(105586002)(189998001)(76176999)(33646002)(42186005)(81156014)(575784001)(5004730100002)(101416001)(50466002)(2950100001)(5003940100001)(4326007)(5008740100001)(50226002)(2906002)(6116002)(77096005)(81166006)(8676002)(106356001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR0701MB1718; H:localhost.localdomain.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; CAT:NONE; LANG:en; CAT:NONE; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR0701MB1718; 23:/ZGdPWDLJH4a8a2NsJ/8xfymBEoWud6uSaF7bzg?= =?us-ascii?Q?ugItncwIszdqSztZPhjzZXvfKMHubmlUjvXh3jpm3tn2eFfMgBnID3hi5nZ+?= =?us-ascii?Q?cmVfjYItb4dfVsXX3ub0kUNsW40S0+Jt2xJps383Ck/ZPHLKz5DaXVD3M9MA?= =?us-ascii?Q?+t6zROL8Al4cD+PrAl7H9HKnC3WRiZ5vEkr4k3u+Gw/LV7C2q3sDGPDNdHl9?= =?us-ascii?Q?Jl9W082Iz+Lo+xyHnddG/CTECzlO0Majz4Fc+bG2s+01FV66N0OWKm/gj6ti?= =?us-ascii?Q?gI80KpZnF+cn5GYSFiKq7cMukigG2BhdJzWU+wDcOKUVm0hQLwdFwstZUGB5?= =?us-ascii?Q?8jDs8hQNl2zJeltUVucdfta3W6HISz9yn1ByXve+He9DK54nWOyoNxboD/M3?= =?us-ascii?Q?CGtozR2FjW2/qnL0jEQOFKg9MqlvSfZkd0DDjZdwAkyFtg9GYsTIpbCyayvY?= =?us-ascii?Q?uezM/hbhi/lEBArA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Yzm3VCnwD3Yti4mYI2DAl1hKZv13StrlbGQ6ZY=; 5:UpTjg4FDafiTrUba8b3v6BsfP2SBBbFJbbx0MT7m/0RWTEt5dz6BNkgL01/LiSr5M7f55EvxiMRl/R023Lu3Zh9a26fWUXLgLe+5/QxdvCE48WSfH1y3x5ckQpQn1smuZEgvlsvT2+PumtoD1tETCg==; 24:TAJ7iBhnXwgmUqFcUC8Ea3Sx4ul3vNSFvCidQYr35pNHtgOUabt6dOHq8j26xHQLN5POlOLkruBiozIO6szInk3yhLazDnrtW7raes4rJy8=; 7:GFbDPCwth52UUGeglczOn1/3Lsa9YvEDhucDdKud4+LndAvY4msu/qQ48ZbLb3rEWUqRw79u2JA8I9/m7NLJshTlOPVM7cLEM8jta+qm1q7sn47Ro6EyiUCM9E/APDZ+Wu+isxBmIDx1Q6N051FRKdpGvGZ1q6RbTQcVBXHgx87lAD1aViEOf6x3iLG9cP9CTn5D1JJoVBn35lwGmCR8dw== SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2016 13:32:35.6978 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0701MB1718 Subject: [dpdk-dev] [PATCH v6 22/27] net/thunderx: add Rx queue count support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jun 2016 13:32:41 -0000 Signed-off-by: Jerin Jacob Signed-off-by: Maciej Czekaj Signed-off-by: Kamil Rytarowski Signed-off-by: Zyta Szpak Signed-off-by: Slawomir Rosek Signed-off-by: Radoslaw Biernacki --- drivers/net/thunderx/nicvf_ethdev.c | 1 + drivers/net/thunderx/nicvf_rxtx.c | 9 +++++++++ drivers/net/thunderx/nicvf_rxtx.h | 2 ++ 3 files changed, 12 insertions(+) diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c index 46f0d7b..33d5fba 100644 --- a/drivers/net/thunderx/nicvf_ethdev.c +++ b/drivers/net/thunderx/nicvf_ethdev.c @@ -935,6 +935,7 @@ static const struct eth_dev_ops nicvf_eth_dev_ops = { .rss_hash_conf_get = nicvf_dev_rss_hash_conf_get, .rx_queue_setup = nicvf_dev_rx_queue_setup, .rx_queue_release = nicvf_dev_rx_queue_release, + .rx_queue_count = nicvf_dev_rx_queue_count, .tx_queue_setup = nicvf_dev_tx_queue_setup, .tx_queue_release = nicvf_dev_tx_queue_release, .get_reg_length = nicvf_dev_get_reg_length, diff --git a/drivers/net/thunderx/nicvf_rxtx.c b/drivers/net/thunderx/nicvf_rxtx.c index fed0859..1c6d6a8 100644 --- a/drivers/net/thunderx/nicvf_rxtx.c +++ b/drivers/net/thunderx/nicvf_rxtx.c @@ -570,3 +570,12 @@ nicvf_recv_pkts_multiseg(void *rx_queue, struct rte_mbuf **rx_pkts, return to_process; } + +uint32_t +nicvf_dev_rx_queue_count(struct rte_eth_dev *dev, uint16_t queue_idx) +{ + struct nicvf_rxq *rxq; + + rxq = dev->data->rx_queues[queue_idx]; + return nicvf_addr_read(rxq->cq_status) & NICVF_CQ_CQE_COUNT_MASK; +} diff --git a/drivers/net/thunderx/nicvf_rxtx.h b/drivers/net/thunderx/nicvf_rxtx.h index d2ca2c9..ded87f3 100644 --- a/drivers/net/thunderx/nicvf_rxtx.h +++ b/drivers/net/thunderx/nicvf_rxtx.h @@ -84,6 +84,8 @@ fill_sq_desc_gather(union sq_entry_t *entry, struct rte_mbuf *pkt) } #endif +uint32_t nicvf_dev_rx_queue_count(struct rte_eth_dev *dev, uint16_t queue_idx); + uint16_t nicvf_recv_pkts(void *rxq, struct rte_mbuf **rx_pkts, uint16_t pkts); uint16_t nicvf_recv_pkts_multiseg(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts); -- 2.5.5