From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0048.outbound.protection.outlook.com [104.47.33.48]) by dpdk.org (Postfix) with ESMTP id 31FF3FA4B for ; Fri, 3 Mar 2017 18:29:36 +0100 (CET) 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=20lkLo19/ihScOdMWLRwT0McMkl5Ftj9Fh/NJ9eYHDs=; b=R4eOSOuw86iuNKZP8299mjSDSGAfB9LKSRyNHuvEg/+isL10DGx/pbanr5HiW0H2f7OvSSCv2DzjX2At2UzVvK1wtstCYvyiOGyFVpT5zSnsObDrlnCZaTDQTXYMQRd+3JK9LfZyHEaXG1OXaUHiOOV1kGkSsARARILTOwZAZQg= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost.localdomain.localdomain (14.140.2.178) by BN3PR0701MB1719.namprd07.prod.outlook.com (10.163.39.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.933.12; Fri, 3 Mar 2017 17:29:32 +0000 From: Jerin Jacob To: dev@dpdk.org Cc: thomas.monjalon@6wind.com, bruce.richardson@intel.com, harry.van.haaren@intel.com, hemant.agrawal@nxp.com, gage.eads@intel.com, nipun.gupta@nxp.com, santosh.shukla@caviumnetworks.com, Jerin Jacob Date: Fri, 3 Mar 2017 22:57:52 +0530 Message-Id: <1488562101-6658-11-git-send-email-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1488562101-6658-1-git-send-email-jerin.jacob@caviumnetworks.com> References: <1488562101-6658-1-git-send-email-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.140.2.178] X-ClientProxiedBy: BMXPR01CA0021.INDPRD01.PROD.OUTLOOK.COM (10.174.214.159) To BN3PR0701MB1719.namprd07.prod.outlook.com (10.163.39.18) X-MS-Office365-Filtering-Correlation-Id: 5f1a008b-c0d7-477c-c3e0-08d4625adcd9 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BN3PR0701MB1719; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 3:kXU+r9rLWEabJLV7ccrT2ynwPTD+FbxTjYQJlJLYJIcVF+4yv4/BK04vnVc/UEQF5KmrvpfFvptikVduDoN0rYFQt87krUx9yOc8Sah5a2NbBr6w3HIJX11OOqwuC4QQiH5wBH7OLAOmAaCeeCPslH2WvBJ5+N6OLixQ/memyvV2UTvoRXNzChZHVOTuB9U8sRPmwvHsFmXXYr24MWDxqyucjtujNj6qNgd9xHC9myVdxpmxqaQaVr5VshZ+5wTjfXN7X7J9+u0j+il+WpoWHw==; 25:9W12LYvaRnYZxdyBZf9zUXRTheqBInBuoQ4klhKt6lpL+/t3hmFE8xegX0pXQEFNG1xsQGRwPBGHzz4VhaEspWcLQD9GtF4I3ATwVC1gQaClKvz6OMFibYEV9qqq2GUeXO971hwUD5+kVKKIhuEEB2QzXdf10Gk7hBu3uzGhXgCGu2GVB3VqWYEly91uh4ePqhS97AnlLXAdBnYNjl/6TW6iveYC/VZ1URvuvlZI3ZA/zXADMJ8mfZSp9UIpvNn5G8AM+zzW24wSSxS6bWkcWJlazoZBoleUy3UCnxYRPP4sFfEQESWwWcgKrdcWXyrmOPhtldBwAOjIQb7ZNz/XYA2yoB3I4pZ1ZClH9RP1I1tOEx65KRk+hyN2qlXJSjYrErYDvA2T7tS92oHrkn6DQhSPCxES1IWnWpYGANAkP98ceglMg6j1Ot1BBqMVD6z9CgVR2BVYVAToLuCWTepUSg== X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 31:/XwSlxGcD09HuG1+MCEb3v5d6Kr6/yPr7vstBhv17UbHiKMvtXorNag06wssOBCKTSlqUVsSimWWFxsX9Zs/IKQs15Ve1hLSy3EjHVEuEhT0Q/m9DJlNfPST1uK/1MhLHwb/9MUN7X2sGiKn9Peg+FkZZncL1lhasWew3d5iicJkE6m2g9lyETFX6cBV6O8UX8q9oKLvOMJHGPCH6lt41oMQ4u+Z0x7tfjGczexdOug=; 20:zNuVKePk1ykA2EvELyciPJs+xd2TiNevol5G7Fwf2G2eVmLhtiOSez+Z/Ub4F+mecbQYXIjOWRUIv/ysB0IrpCj7/E96aqO8KVEPl7FeMLM0d71nruIBJUrsHS+jwng9e4LwRiXqZpwj+F9T0AOlqGrdQ2mRPOyVh1HnQ7WahbPw50hUbEO8QDcC1LBQktMxT/6jQwpKynzjX5sanS5ZKIp/VutS0K9TUrHWFJZpgrLz59uJ3JwkjUbtURikDNsDQ7hUmbuiUU6pQblXA21RyzvCpwldh+tlnD/XBR+sJ2o5RVp2MOh+5lHk2t2JWlSsKcjB9i+MJeCq6GjCZyviAqPy3YFwYqef+26c5odmA93k9oKbdHiZudF+sIzbmQKGeKgocT4aHrGdSLJJE1MKvEvqzHUszLwB7rzGjqoPoZE2tG2Kr6SfEUz4jG/+3iqhxkYne18eg/eA4sV3JkBfqZHBrZwbwI4amCTZfkSgSdLoMxGy8++ZVKC1VI5xrJAeie9iGMC007jjgUfzGyIPFR9HWx8FlE1dlhD54QUR6rH5PtHWA7dajHvVMLz0UUouJSpBVXYiMaUaUQZoSxzRSVcHhqla4qF1Ru0Mf17HUpM= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6041248)(20161123555025)(20161123560025)(20161123562025)(20161123558025)(20161123564025)(6072148); SRVR:BN3PR0701MB1719; BCL:0; PCL:0; RULEID:; SRVR:BN3PR0701MB1719; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 4:QrhX8hn5NRXqOYHeDx6TuipxG/EfxLsRXwLsDsYW4Dyu2/Lt1IPTHp2WeE3gYytirCt7socf899JSvN3RNDV2x4YuuyZ+x3T+3JBlsnG3qDCA8QHp5umyl3cAz0Ka+DaBbb6/3KvkIr+yjlklTfXsxBJEQZKq4EqfMlUqUz85USkaxT2Xhppta1lhdMYJtBTaB4B0XFzFQ1UrRAoQF2TpCghrQ6keLP9V7cTpR4RaTjtwHEn4X9rx6CbUfOuHMPUHWjk2XqOz4CUDeN9FV8kW4+GmcPSHUw4aBcu+2LM62OOB2/RpSirwKUz/9c9VKtShNkyeR/9f+tq/lnZ7Ni+n4hhJucvN3l8U0KtUTNR5LfMOtimfFjPb9oTV89Yl93ScdjN8SOFUz90KtkXX71LNrM3SUCX0Gg0DTGUzMrVbTsFNAnHA3bb5XZz2gKmK3B0OVmaFSSdi+Pl8pncfHiqFjQ1Y5S/NW6zeMqMmm5Vki5vw8ZZdKGy1qiylFTzWA3LfOdlG94ZKSxO1Adrgam0P7ZvdNar0klNyJ3ayoN12RwpqpdcAHhSTB32/1BZSR2JIoeekuZLfs8vudKuwgzNkx6tZaP5Bs/r7rdWMeJDDMA= X-Forefront-PRVS: 0235CBE7D0 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(7916002)(39450400003)(3846002)(50986999)(6116002)(36756003)(81166006)(6512007)(97736004)(2361001)(2351001)(6506006)(5660300001)(42186005)(50226002)(8676002)(6666003)(106356001)(8656002)(2950100002)(2906002)(25786008)(47776003)(6486002)(76176999)(33646002)(7736002)(107886003)(42882006)(66066001)(110136004)(4326008)(38730400002)(6916009)(305945005)(48376002)(92566002)(5009440100003)(5003940100001)(50466002)(189998001)(53936002)(7099028)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR0701MB1719; H:localhost.localdomain.localdomain; FPR:; SPF:None; MLV:nov; PTR:InfoNoRecords; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR0701MB1719; 23:y9qk7aRsiusIpd/urQeH0Q6Dm3U6q+btS3uI0/X?= =?us-ascii?Q?IhD02f++pyla7G8RsfUmen3UN54sxVYQVwT1Dw5AfGegGwaN7OvwKvhitJcL?= =?us-ascii?Q?PiClfEhPHs4VnEzqFlbuwXPtzngJFsDTm42VsaP8xyYu0qdy2RlVaDY3pxlg?= =?us-ascii?Q?yFxZIllW/TzkQoQCVs+eqNeOR1S5TZapqhxsAU0D1JAjqQJOj12NPfKW9f4M?= =?us-ascii?Q?NSMZFwTjUwikM++mPtDZkNygix8t/HAVfica9YOJXsm1DdUxvPBMmjbSE3cc?= =?us-ascii?Q?XLRJwoZrJovFO3A+k4QBuyaH30pSq3f0x70n11pbK7hVU7JP1ZbEStecWfBG?= =?us-ascii?Q?dUKIcmQHs44KNTvSJ1D52xsTxuEVsMW1S27hX+00GRTGgzg38irUzdXu45oB?= =?us-ascii?Q?YuHqDJ8K4GeobMHPwPFp8ZaDsgJbHJOh+dhx1G6zu7GTRnAu9AkQG/Ezi821?= =?us-ascii?Q?mvtWdAJP/GCutebOCmrBL5MV1PzfffVvr8aQX3xJPg8JihApWcy7F99LMVS2?= =?us-ascii?Q?h7W9n44GwEpDR1trHj7ysa2zT+/C7IrylN6p0oUeHngJUNUot2Pm/p9LBFMA?= =?us-ascii?Q?V+zcxaOEcECsF7GAJLsNrqSb4/nzN7vsK0oPLG5Z4LYYT52RX64gYPtjXE0E?= =?us-ascii?Q?y4EZ5xRhVYje44duQBzLT7E1q8TwPkmJ54X1HhU1jI6NZTUOwwM8I8l2KFiD?= =?us-ascii?Q?VliZvJrEWdn10SfYJy511hEhW0iIhQle5nYOLzV/mJwhJOZbUil40D0/lMMV?= =?us-ascii?Q?8hKbfdIwWtesmQasIMFXm7RqjN7Iw3JYVrjAXVPd6Bm8JKiFA7STpZV7iaWA?= =?us-ascii?Q?QxVwGXqYzie5NIVkBel+TJcudIqW63p5CYP35uVNjIZF73NhhDbB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1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 7:RTSkhQHsARTamhenCkAhhlJZn6/Un99zIhEzZUR6FbeR9DUj+/Vw0XO69YCzNLUkHcO9eMjMicQ94pATeNpTgBIy6MFErNfiUESpX9Lw6KE5nOjtQcvGLZbROlUMvrHYB+tbBpRSLt9werU2R44rVbWLR/T4VCjIYsUW9xlGHp9rTwGl+xArnbh+4JUdQX/ko/Li1zGS0/+iJC17HSM3YlmKr9oFj5ucDUzppVpu9xaJQhdUP6WpEH8mLrqJo9tLmA5TG77jwsc31Ev80oolbcTBeFwzORHNBTVqt3+T0JwOSGGGLny9AJEsNBnlWmUFlEwiJczAfaUrUfWi053jsQ== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Mar 2017 17:29:32.3002 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0701MB1719 Subject: [dpdk-dev] [PATCH 10/39] event/octeontx: add device capabilities function 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: Fri, 03 Mar 2017 17:29:37 -0000 Add the info_get function to return details on the queues, flow, prioritization capabilities, etc. which this device has. Signed-off-by: Jerin Jacob Signed-off-by: Santosh Shukla --- drivers/event/octeontx/ssovf_evdev.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c index b349adc..342f404 100644 --- a/drivers/event/octeontx/ssovf_evdev.c +++ b/drivers/event/octeontx/ssovf_evdev.c @@ -65,6 +65,31 @@ ssovf_mbox_dev_info(struct ssovf_mbox_dev_info *info) return octeontx_ssovf_mbox_send(&hdr, NULL, 0, info, len); } +static void +ssovf_info_get(struct rte_eventdev *dev, struct rte_event_dev_info *dev_info) +{ + struct ssovf_evdev *edev = ssovf_pmd_priv(dev); + + dev_info->min_dequeue_timeout_ns = edev->min_deq_timeout_ns; + dev_info->max_dequeue_timeout_ns = edev->max_deq_timeout_ns; + dev_info->max_event_queues = edev->max_event_queues; + dev_info->max_event_queue_flows = (1ULL << 20); + dev_info->max_event_queue_priority_levels = 8; + dev_info->max_event_priority_levels = 1; + dev_info->max_event_ports = edev->max_event_ports; + dev_info->max_event_port_dequeue_depth = 1; + dev_info->max_event_port_enqueue_depth = 1; + dev_info->max_num_events = edev->max_num_events; + dev_info->event_dev_cap = RTE_EVENT_DEV_CAP_QUEUE_QOS | + RTE_EVENT_DEV_CAP_DISTRIBUTED_SCHED; +} + + +/* Initialize and register event driver with DPDK Application */ +static const struct rte_eventdev_ops ssovf_ops = { + .dev_infos_get = ssovf_info_get, +}; + static int ssovf_vdev_probe(const char *name, const char *params) { @@ -89,7 +114,7 @@ ssovf_vdev_probe(const char *name, const char *params) ssovf_log_err("Failed to create eventdev vdev %s", name); return -ENOMEM; } - eventdev->dev_ops = NULL; + eventdev->dev_ops = &ssovf_ops; /* For secondary processes, the primary has done all the work */ if (rte_eal_process_type() != RTE_PROC_PRIMARY) -- 2.5.5