From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0046.outbound.protection.outlook.com [104.47.34.46]) by dpdk.org (Postfix) with ESMTP id A433E1B6A6 for ; Mon, 23 Oct 2017 19:41:22 +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=CiY8+AS/3FVdc9b521zoIVQbiILhQFewZBsRdBI6p2W9c5I3yh0G+d1zUP5c89jBaJnPvlwCAte3M1zdDsDn/RlxpJ6W/AzPSJHNQTJRUjS/VunTJ4/Olp+k+F4HBxXWgXNACUiiaC1wzN+uanVvftMXU6iOdw9q8aPWrP+rHqE= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from localhost.localdomain (103.16.71.47) by MWHPR07MB3471.namprd07.prod.outlook.com (10.164.192.22) 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 17:41:20 +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 23:10:55 +0530 Message-Id: <1508780456-27837-2-git-send-email-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1508780456-27837-1-git-send-email-pbhagavatula@caviumnetworks.com> References: <1507814147-8223-1-git-send-email-pbhagavatula@caviumnetworks.com> <1508780456-27837-1-git-send-email-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [103.16.71.47] X-ClientProxiedBy: HK2PR04CA0048.apcprd04.prod.outlook.com (10.170.154.16) To MWHPR07MB3471.namprd07.prod.outlook.com (10.164.192.22) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 44cad098-a5d9-453f-390d-08d51a3d4656 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(4627075)(201703031133081)(201702281549075)(2017052603199); SRVR:MWHPR07MB3471; X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3471; 3:kf/mnSn0cG020GY3EDeep0BemWNaVD0Np2WPXRM1ADKFNkqrbpGy8LUKMSVYpOHDcbuN4BNowD9uznVqdIzHKW/twiNtHyZ9WZmxFlVIEqzXUAWDzq13J4NizJSZ0F6TW9tVTGP7FVpCbkP8Msb9IZljvUGJtZ4FEVRCFmeqleNzxe5i2ZoHdDGEEIIf9Ba96vo0k0Mx9SyuzSriuUcN8Hy4PJDER+BWe2Ckygmr1G8Ql7EeqLbPb6aqkXfuo9uL; 25:Mn+kkcFwR+xjJ52eW/CVQ1Lc27gkgt9ZvOg/IVlnmo+Dz4ZlYJEKHBbL+3rpcXUDwblJhyHDF2Z9jbYpfOqxYrEUMh9DRX6l/FYd7NyqomAzCyX2ComgcLp0O8NW6awmsihG9FxmwW3CFCNSVRa3AawN38Nnxr2m/XlTgDvZfgIYG/6vjSjz67z68r5G7RN8PQH2etc9EI3wxCI27A/qL27W3YPE7UchccULXKP7UktcBv7WQp0zOJBP5D6RwRe4irsCuzDs62o0d1AFvwuuNXpqQh2/Ob/WyW9HSK+U7liJJn/7fruQS1RA7vrpjEWSS+76nvZztHmkGcsNdg0qgg==; 31:i0foec5Iux40OLVjUOzxpJWJ/0BWjTvxPiX3QzRlScsRwsdFWoRNfLGsQ4INovEEa0GnRAsXThFZ+1Ig2xPeYiNb43PuVwN7H8qsUQq6zdrhWF5GSYcDZs1bUcsMT0DOr4ZPP7SJSioJ+KPgXcWpMRwpqLoJryCWta1pwM/flu3YV4bFHMU2x9BmZIWlCVDf776aPGBKEZeJu6rcAkQU2UbYhEP7iipTdWLYaejVI8o= X-MS-TrafficTypeDiagnostic: MWHPR07MB3471: X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3471; 20:17WIo/vkheNuOkmuousayYclx47W2VmcYgJZ/UZc+W1Ijrp6R+eWS4vPjgrFyJUVLiBJOaNexO002aYPQBHNSVlISs6Qhw4rTcv5Srobs8V7fxTX8cxU+iepOEmc8PD8jsihybV52UOAvtpbFmjHJeW5jLM/MrWhUYOBTEyCsgODL1u2w5hF8GB0aUIhEUnM5m1vPXZM5AFFeszI8DKWmf3K0TbR3sZsZQxEnyBsL1/1qZTZva0N4O5zmdz82dzx3Gd2FYpgNQ3a/fkqQxzRtQcVByENHx7bZ4qAB15JlyBwXaZNO2urnOM1q77t0612/wzoq9VU+89uifa8WAR2aPHQlp/YQBHkCix6iP8Oc5K+ifqliTSLFf1xMkGvnh8mWsa+yKbPjlM6u192c5aGTO6es3t/Xk1bF6WdpYKRDStVCvptKHNgQQGP8g8b+u4U2Xe46R2XkysgKcl7Iim3wXQb/F7/Khpcwo4cK+h95ECVBySfbg6GNwF2icOY72co712LYLUDyhFKT/YTmhaELolx4PiOXpyaYDAFkM1JaIHf61ctR7QZS6YVJgHiY0gkclfNWRB7JPXIu4OZAN+JyINPoJat7SVZD+JKrPy01Ug=; 4:3hpEaMMi0iQ+WZknB9OXwk4oHEsmbAZAsY1YsQYkRLM6jUaLBmo7+cGugwx4Ld2smWopDs7bE/HqSbVW70Q1/MOl3IjwUHdVkc6YvqAYvYN+EJOzNmkM6149Y5b6mhpCQD+f9/WxxxLGJpBZY4LD0RZZa+9ABMAjGqfSRSR2KOL9r1kmwlsfGkNB9P4CH4PV1O1E8JOVg+DThUyXQkuUC/uVu63Xnbj06EKPhULZ3DcVa2qX2I36RbgPjwkJuM8L 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)(8121501046)(5005006)(93006095)(100000703101)(100105400095)(10201501046)(3002001)(3231020)(6041248)(20161123564025)(20161123558100)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:MWHPR07MB3471; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:MWHPR07MB3471; X-Forefront-PRVS: 046985391D X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(6069001)(346002)(376002)(199003)(189002)(8656005)(8656005)(6666003)(2950100002)(42882006)(6636002)(101416001)(47776003)(68736007)(106356001)(5660300001)(33646002)(105586002)(6116002)(16526018)(189998001)(6486002)(107886003)(97736004)(6506006)(3846002)(5003940100001)(4326008)(6512007)(53936002)(7736002)(305945005)(36756003)(8676002)(2906002)(66066001)(81166006)(81156014)(8936002)(76176999)(50226002)(50986999)(50466002)(478600001)(25786009)(16586007)(316002)(48376002)(72206003)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR07MB3471; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX: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; MWHPR07MB3471; 23:LGccwmSxQ/lfRpE3nQ9atUJLyo7WkCQjJ5kPcdWTu?= =?us-ascii?Q?I7sAH1Hhtc3t+eFSH9um00c3WWN4ZpyuXJeZKuMkB2gCmRleIv9ny2KqUi7i?= =?us-ascii?Q?zYJysLCUwkVZANlObrJvo7AKh4yVqCV4dAPRAWF8jXo47RzNdgw3KuyH5vaT?= =?us-ascii?Q?vClC2MPGBj7j6fEjar+kUpV57MWn4FHoNKn8ZLMI1kkaht/itazjn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Metadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Oct 2017 17:41:20.2707 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 44cad098-a5d9-453f-390d-08d51a3d4656 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR07MB3471 Subject: [dpdk-dev] [PATCH v3 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 17:41:23 -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