From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0079.outbound.protection.outlook.com [104.47.32.79]) by dpdk.org (Postfix) with ESMTP id 5C86C1B89A for ; Wed, 25 Oct 2017 16:22:17 +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=23XEgvLdvOT1gqpt3JlFYokLS5Q8pafO3/WwENIHYCw=; b=ilwlq6eOqJv5cjDb/B9PlGQFFGEg71/svtZS614b9niGJu4wVSZUmqokEMEgU2tTu6FSPcMomaEfLfwWH6C8z+NID2mQArk2P3XjMQSZxiIumAv9/nxnkSIjz7dpb540acsC10bdL8HaC97Urn4bVhOoVdGNqGUH/B9MbuMJmPQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from PBHAGAVATULA-LT.caveonetworks.com (111.93.218.67) by BN6PR07MB3458.namprd07.prod.outlook.com (10.161.153.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.156.4; Wed, 25 Oct 2017 14:22:14 +0000 From: Pavan Nikhilesh To: harry.van.haaren@intel.com, hemant.agrawal@nxp.com, jerin.jacob@caviumnetworks.com Cc: dev@dpdk.org, Pavan Nikhilesh Date: Wed, 25 Oct 2017 19:51:43 +0530 Message-Id: <1508941304-11596-2-git-send-email-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1508941304-11596-1-git-send-email-pbhagavatula@caviumnetworks.com> References: <1507814147-8223-1-git-send-email-pbhagavatula@caviumnetworks.com> <1508941304-11596-1-git-send-email-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: PN1PR01CA0115.INDPRD01.PROD.OUTLOOK.COM (10.174.144.31) To BN6PR07MB3458.namprd07.prod.outlook.com (10.161.153.21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0975adfa-d8ea-41a7-1996-08d51bb3cb27 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(4627075)(201703031133081)(201702281549075)(2017052603199); SRVR:BN6PR07MB3458; X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3458; 3:z5J/LFwus9hIitWg0B6DtTBoG/yfA04cdH7V7YA7pwy9rh2hzBhKylMxqid7AAtPwLc7FqZqRj7/e0nFSdQVxvm5AU6q3RI8PfvHLPE2dhg/64LXAE2xNIq9nSh8ZJgNbwG3N8jSs91oycbQrjZmQoHqNi5sGHpzZ2XpbXotwEM30MoQ+YDgeftrV1GfCxBEbiS7i+snB4Mk4HzKK+l4UPyOUeQyTIodbUphgBQPe7CWwJNmhglqM0ZAcAgGuk+o; 25:xLz4LaJ23ppIyvIMWr8nlWT/qgtDNYlRFoYTJNwhZm8pKu6kAhnLLGXUHEbWDo+FFiKsMuwqcsQZInYbNEMwOQtenr0K5wuKALsGt9Xv6GvSHenDGrd9lLy3qMGYPzf+IGBK4zTLCBfXjByLOOaZvvHf46axiy1pGAivJ6dtCQd9LpAFxCdnWljYqYhCUH3eIFhBFvmxpsugTGtOhc4wPhJnspDji/VaTXDERd6qKJToxUdQrXoW0Q/3r+o+CEfbV8CbRbuIAzP6voWvVAUUSm5wDPQK1DWeasRdsLp+46Hbl0Dq2i3EQFfhjnQ5MVjVP0B39GTLe0p6UFItNtyZrA==; 31:jXvUeMPof0Ao7KSxV5O2TJTwDevtXNXyw20tj0Zoj4AIe8JFUncIrkVBUCKXvchSOFBXeXBi8Mp5HrylHlEMf5XgXwvrPmGGj6ReSpdrk5D9sRFGTimZhm/q5VuTQmNwdfbXqvsupxv8vizHVwqWScQ2X6lM1slJJayl1eI2UERkSD9aph8my+dO6cyL7g30MZwSxlYj239dgr/A51zL+F1oIRdoxBjUYdBtqaMvQbk= X-MS-TrafficTypeDiagnostic: BN6PR07MB3458: X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3458; 20:ThaZkLZQNZ1PR9e1191wgGcz8rGJi6sAGHjnnBbt3xkV/obTnUkfvjjik3h0mQoi64Sqy7yd7ltdft9LNScVwVqSavJCBBNt2wn8JiTxXLLlZeiHanep2939EqEfDQJ5RpfGHqQUj5U5LAFDK7QIn46E7klJUUMZXFK+q7qxA4UT84BuKSitMjbERWeTvy/D1HhJaaxvRQk6ohTN7VGhHI6cg+JGVQsleG2+LiAnguogdp092CoZr7uvM5B/GPJq8SlZ0ypnnYQ0mribVIF1ik3TGLnv25XL5b/nZH1VCFTxeh+n4O/sX1HvO8JKT58b9QqkAFOonhUkAHayPrXh0nz7Oli80+uF0LSJdE8Nd6ud06lsPDTQwUo0ZxrLp7viNanmCxE2o/jEI6wDpAE7fMwcif6xWlAmKoXLNszImV7bsyL9RKtTukW9PimPCSho9zvlTv6zouxO1mMyK5No0tj2/r3uPLLIsSu3shfKGBcWNp9uo+Xjcd6pqRP79ENU/AEtNmN0GREHCfKxuiYaFR/8DolkINtn5yjUVY1HE/katTydUUBnoiASbeWVynHsSzmZfCq+NJ4yDa/1s5K/XzTgF4YFYc1KmOJO3lUvuUc=; 4:j32QvI5pYFmICobZ2G4Q6E2OTsDEkNyMaTZIBkqPnZyRu4RTTULSL2y36J1vL8vbbq9MooCPYt1s80YxejsuhTuyf8dflQN7u5pas/YOOECIrZeJlyTfhyXiAKXWraKV5r3A8h5JsVXSKetiu99h0xpVGEla+jLilOfr6ycFAihBxvn+oE+TIdH8sh017QClUXBWWh4g1zr673FbURskkk9Cvl5UJhYXLGoGOWUqAUYS8nFPqUfm4BA/XpMn4PFqCtntpXfn2O6/dpPsog8GNYbkW/KIL3R141cHMGhPfeE= X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(3002001)(3231020)(10201501046)(100000703101)(100105400095)(93006095)(6041248)(20161123560025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123558100)(20161123564025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN6PR07MB3458; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN6PR07MB3458; X-Forefront-PRVS: 0471B73328 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(346002)(189002)(199003)(81166006)(53936002)(50986999)(7736002)(16526018)(50226002)(76176999)(4326008)(66066001)(305945005)(5003940100001)(8936002)(2906002)(25786009)(101416001)(42882006)(6666003)(6636002)(107886003)(6512007)(8676002)(5660300001)(2950100002)(68736007)(81156014)(47776003)(50466002)(36756003)(5009440100003)(316002)(16586007)(48376002)(33646002)(105586002)(106356001)(53416004)(189998001)(6116002)(97736004)(6506006)(478600001)(3846002)(6486002)(72206003)(69596002)(8656006)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR07MB3458; H:PBHAGAVATULA-LT.caveonetworks.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR07MB3458; 23:KkGAvROEwtL8sjJmGAyEE+HUYBSZPDCBruMKIxUX3?= =?us-ascii?Q?dNyeSqH18G6SW4sV30gbKmbo/hhPg5RcPH3nbQGmG5xLRNxc6ZGEnqJIj+km?= =?us-ascii?Q?UB3m2m/FWU92ECwnczQY+YT7dwJj03gLzA+FogHqRa4ecys0iLrYXTmu30Qo?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FDj6wC+UjnUTQoW+00nh74VY9sGHUypexKwLIKODV7nLqCmWUDaS6Vy/4gpu6Y++5JMAW8HQ3pZB7Y= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Oct 2017 14:22:14.7644 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0975adfa-d8ea-41a7-1996-08d51bb3cb27 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR07MB3458 Subject: [dpdk-dev] [PATCH v4 2/3] eventdev: extend queue attribute get 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: Wed, 25 Oct 2017 14:22:18 -0000 Add schedule type queue attribute so that it can be queried along with the queue config structure. Signed-off-by: Pavan Nikhilesh Acked-by: Harry van Haaren --- v4 changes: - fix incorrect conditional check while returning queue schedule attribute. v2 changes: - return EOVERFLOW when schedule_type is requested and event_queue_cfg is set to *ALL_TYPES*. lib/librte_eventdev/rte_eventdev.c | 6 ++++++ lib/librte_eventdev/rte_eventdev.h | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/lib/librte_eventdev/rte_eventdev.c b/lib/librte_eventdev/rte_eventdev.c index db96552..250bfc8 100644 --- a/lib/librte_eventdev/rte_eventdev.c +++ b/lib/librte_eventdev/rte_eventdev.c @@ -809,6 +809,12 @@ rte_event_queue_attr_get(uint8_t dev_id, uint8_t queue_id, uint32_t attr_id, case RTE_EVENT_QUEUE_ATTR_EVENT_QUEUE_CFG: *attr_value = conf->event_queue_cfg; break; + case RTE_EVENT_QUEUE_ATTR_SCHEDULE_TYPE: + if (conf->event_queue_cfg & RTE_EVENT_QUEUE_CFG_ALL_TYPES) + return -EOVERFLOW; + + *attr_value = conf->schedule_type; + break; default: return -EINVAL; }; diff --git a/lib/librte_eventdev/rte_eventdev.h b/lib/librte_eventdev/rte_eventdev.h index fa16f82..b9d1b98 100644 --- a/lib/librte_eventdev/rte_eventdev.h +++ b/lib/librte_eventdev/rte_eventdev.h @@ -632,6 +632,10 @@ rte_event_queue_setup(uint8_t dev_id, uint8_t queue_id, * The cfg flags for the queue. */ #define RTE_EVENT_QUEUE_ATTR_EVENT_QUEUE_CFG 3 +/** + * The schedule type of the queue. + */ +#define RTE_EVENT_QUEUE_ATTR_SCHEDULE_TYPE 4 /** * Get an attribute from a queue. @@ -645,6 +649,9 @@ rte_event_queue_setup(uint8_t dev_id, uint8_t queue_id, * @retval 0 Successfully returned value * -EINVAL invalid device, queue or attr_id provided, or attr_value * was NULL + * -EOVERFLOW returned when attr_id is set to + * RTE_EVENT_QUEUE_ATTR_SCHEDULE_TYPE and event_queue_cfg is set to + * RTE_EVENT_QUEUE_CFG_ALL_TYPES */ int rte_event_queue_attr_get(uint8_t dev_id, uint8_t queue_id, uint32_t attr_id, -- 2.7.4