From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0065.outbound.protection.outlook.com [104.47.40.65]) by dpdk.org (Postfix) with ESMTP id C7EFE1B654 for ; Mon, 23 Oct 2017 18:29:59 +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=ihgQ0BMz47iMbcZ57/UzgkrxbOzEWGun3okXdj/yfiw=; b=aScdwzwZYa2gmcHnm4Fk5WH+DYQZ6pXFAN9Tb4fVMrm5NTzI3f1XOyzURyVXXnk57IoeWHgKZC6lIt/8Ao/NKZk6Z6PrebEfu43qxeS6x38DIqd+LL+FaiMWVTecwIorV4QO3DFM+Nh0Wdzl4behLIWoMc6s3uXpqUUZEppsIQQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from localhost.localdomain (103.16.71.47) by MWHPR07MB3472.namprd07.prod.outlook.com (10.164.192.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.156.4; Mon, 23 Oct 2017 16:29:57 +0000 From: Pavan Nikhilesh To: harry.van.haaren@intel.com, hemant.agrawal@nxp.com, jerin.jacob@caviumnetworks.com Cc: dev@dpdk.org, Pavan Bhagavatula Date: Mon, 23 Oct 2017 21:59:36 +0530 Message-Id: <1508776177-11264-2-git-send-email-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1508776177-11264-1-git-send-email-pbhagavatula@caviumnetworks.com> References: <1507814147-8223-1-git-send-email-pbhagavatula@caviumnetworks.com> <1508776177-11264-1-git-send-email-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [103.16.71.47] X-ClientProxiedBy: HK2PR04CA0047.apcprd04.prod.outlook.com (10.170.154.15) To MWHPR07MB3472.namprd07.prod.outlook.com (10.164.192.23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: dd26a7ee-b173-45ae-9244-08d51a334d7d X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(4627075)(201703031133081)(201702281549075)(2017052603199); SRVR:MWHPR07MB3472; X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3472; 3:YCtac5wQ+FxHLUg8nd+TyI3JfqKtCP9R4e7Ai7NRK95zcFQ55XTytbvgTTKLmmQv9gACaElETBhQq7QoV94Ev+kwPARVi0FKjsvU7TjCv2/AJBYjgzaEmrPnT+y0KNKtJsH2x5drSSWO+qJI8KprjDYafKBdOqjJwyI/aBl7vDg67+vmFmyvLt2D14+nVzbr2UaY2xTGfU+qZbJneYHbJYP6+HIW9PZuSTE5xR74SGDP6g0Q3Aw/1HV/66l6J61b; 25:W5yJ6PPybGbSRrf/KJPZlpVTAn+Vdt1ORuM1mw4PJ0i1FLEt64lcrOeJDL6tjK9PWLHlMPjgLr3VVrdQ672BIB4EczyB/rNJvIrqVLNBej09zfQNMFQwGKPpyYXEmQlAnTIdnrMJeVsO0aaCoDxpcvRsI7/Qqxq4Fs36GuQ3BhrMx944mV3RTLv0G89gkR2t1qSgk4Dz+7lIKWyAQMAYvgN8tU623y6SgNQoIeJcLGgq7aPJgqKqrNPbPTvrBRcJvgwgdChCLa7kmTxA5kcsbM3cw+GjmekhRbQbmZSteF8oghfPn6DG2o/ANL6C57CF4DMiebk8T5nUV4lWqqr8SA==; 31:SejcXNWqHSu15WDWVblXd2SIMYWLTyoIDCs4UH9QyO1O0QDuDASUdvvLumcxbHvgLAo+nn//XXWr3SFenqMVlZyEovNP6pZOXqjyp3aieGcKKCW6V/joE84fy2IHySd8xJBxYgpWeiCNpOWaYADD55G2udifOM4mYpDmYXLciTm2btsDPubmmxDYwBa+dBj1RdEaHjmyYQ6H/tluJpzUPt7m1chXH//tAXIxdzE3ct4= X-MS-TrafficTypeDiagnostic: MWHPR07MB3472: X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3472; 20:oUh7/7APsARsFR6ypdyiktZHqdZDFxg2Ss4762Qg/aVADIxObTqeeSCBqnB51w03PfSGif1om+kWHdB5736wN4on1trKgIRdTSHShkAlGJ8hIyVgGx2kgcIjcg0HWYJREUYqZ6WQwTlLNvoo0x8fHxHrX9rfsfDaNAYG7X8bOxydjkfMQX8Uc2Vmxf3vt8UFZ11AioiNn/nWQFnw5xoXLf7EFWD5KHtdWniOnjOr/4sV0VvH5UC/0G3Bptmxm+vzFTafcG1eqXZJYRMstwQc8d7HYDraBIKhTzztxY+uvQbh54LuiYeAeF6cDOD10RyYQMUOxNZ+QftuuxiWjx1byWOQEiKXX/dXgPrmiOZ6SC54jdu4K6FJaMVATSyVOlmt7Z0xeRta6olAnflE8AxWwC62lH0a5oHOiyfjrYgtA2f/rwiX8DQndzXjr8zhE524EXSvy0/rCVISkdSTqzscY1Kk8cSkKQKdV4PIWBIMlYeo3PPwdjHN8oaQztFXE3lN4CiTlX55YmLIURQDZQpFsT4Hc4Ng+l+XcXjKOPnhMeNtuyHZZG/DkJh4q/u3bYlsCAIMDje1aydiBd80SjQgPpO9w9VDHNdx/qszZwcPAjg=; 4:ntewZPzi++1IAlZgCSA8HhRNOS9YNfvPv8Pp5qSwq0kc0A26rg+pbnIJEnSMrRX+H+8AfJbIqbdunjVSjv/sUxn3z4yepGyaulCVbZPG6rcsn6EfSOTMU/6uhJ0rkhX8amQWRXBZhTU2UnmKnX0fOHMZ40AxN7EjU38ecO9REqO8bR4McM9O7SrZa6t3M7528TWmzW98DeOLLCcvonUq2unl/1FQsBm6vjEkJzgs4x83Jn6iK8roLkH0oMk8GG5I X-Exchange-Antispam-Report-Test: UriScan:; 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)(3231020)(3002001)(10201501046)(100000703101)(100105400095)(93006095)(6041248)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123562025)(20161123558100)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:MWHPR07MB3472; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:MWHPR07MB3472; X-Forefront-PRVS: 046985391D X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(6009001)(376002)(346002)(189002)(199003)(4326008)(48376002)(42882006)(8936002)(2950100002)(8656005)(8656005)(36756003)(6116002)(3846002)(316002)(33646002)(189998001)(107886003)(81156014)(2906002)(81166006)(8676002)(50466002)(16586007)(6636002)(6666003)(66066001)(97736004)(53936002)(47776003)(105586002)(72206003)(7736002)(106356001)(478600001)(101416001)(50986999)(76176999)(5660300001)(6512007)(305945005)(6506006)(50226002)(25786009)(6486002)(16526018)(5003940100001)(68736007)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR07MB3472; H:localhost.localdomain; 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; MWHPR07MB3472; 23:Hy+812VxPs+C02zz45lNKZfoMNxn3zzn8VzL/KgRF?= =?us-ascii?Q?jQmfLrQ85ZTE+MQ79gBPDm5ULg+bi8ZqPSRP01eAbHyHxvtoZjb9ajv/y0LI?= =?us-ascii?Q?/ICwujH8aOk+Ubuda0NiEEZXaY/zzhFlqSgaK5YydgrL7JLRGgYcV0n/AY/E?= =?us-ascii?Q?QEBVhb3FJmF6BUyZIYYCUVkNDtkC+uQLSxb+fW4KbfiOGOw+zxVvqdSlk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nosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Oct 2017 16:29:57.3210 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: dd26a7ee-b173-45ae-9244-08d51a334d7d X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR07MB3472 Subject: [dpdk-dev] [PATCH v2 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: Mon, 23 Oct 2017 16:30:00 -0000 From: Pavan Bhagavatula Add schedule type queue attribute so that it can be queried along with the queue config structure. Signed-off-by: Pavan Nikhilesh --- 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..fa18422 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