From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0040.outbound.protection.outlook.com [104.47.33.40]) by dpdk.org (Postfix) with ESMTP id 2F6021B017 for ; Tue, 16 Jan 2018 12:43:22 +0100 (CET) Received: from CY4PR03CA0100.namprd03.prod.outlook.com (10.171.242.169) by CO2PR03MB2358.namprd03.prod.outlook.com (10.166.93.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.407.7; Tue, 16 Jan 2018 11:43:21 +0000 Received: from BY2FFO11FD009.protection.gbl (2a01:111:f400:7c0c::126) by CY4PR03CA0100.outlook.office365.com (2603:10b6:910:4d::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.407.7 via Frontend Transport; Tue, 16 Jan 2018 11:43:21 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; NXP1.onmicrosoft.com; dkim=none (message not signed) header.d=none;NXP1.onmicrosoft.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BY2FFO11FD009.mail.protection.outlook.com (10.1.14.73) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.345.12 via Frontend Transport; Tue, 16 Jan 2018 11:43:20 +0000 Received: from b27504-OptiPlex-790.ap.freescale.net (b27504-OptiPlex-790.ap.freescale.net [10.232.132.60]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id w0GBgtjQ014705; Tue, 16 Jan 2018 04:43:18 -0700 From: Nipun Gupta To: CC: , , Date: Tue, 16 Jan 2018 23:27:59 +0530 Message-ID: <1516125485-28919-7-git-send-email-nipun.gupta@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1516125485-28919-1-git-send-email-nipun.gupta@nxp.com> References: <20171215130828.14218-1-sunil.kori@nxp.com> <1516125485-28919-1-git-send-email-nipun.gupta@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131605766008064041; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(346002)(376002)(396003)(39380400002)(39860400002)(2980300002)(1109001)(1110001)(339900001)(199004)(189003)(76176011)(498600001)(97736004)(51416003)(5660300001)(59450400001)(36756003)(2351001)(68736007)(47776003)(305945005)(8936002)(81156014)(8676002)(8656006)(16586007)(296002)(316002)(54906003)(2906002)(50226002)(81166006)(356003)(26005)(53936002)(6916009)(6666003)(85426001)(2950100002)(86362001)(4326008)(50466002)(48376002)(105606002)(77096006)(104016004)(106466001); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR03MB2358; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD009; 1:Dc6OeAXquxc6MPJ6fKaALePoONYHRKigBpw4ZEj2dEG4+q93B19+gVS4SKQztdasEKF+rm86HVOlohBmIBQzDiTn5UF5mZL4awU2nIOEw3vZ+MxF/E3Mh2faQvX1ATQK MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7bf85075-7728-4c99-c829-08d55cd657c4 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:CO2PR03MB2358; X-Microsoft-Exchange-Diagnostics: 1; CO2PR03MB2358; 3:qyATNFIxah7tRJGwJbtSTiaZydMrlNM+ZvGbgWTPNaxG5tDBUlKfT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5y/HvPhb3mi2SAIg/SVfBXCTuYDX4+mEjMOGB92DLniHPYX9saX/uTvw7NbzAy+Pz09T4jnJPr8JyjvRDMzS1kQrtk4v9adcqYXI7JTjosn4nMLBGk1pd7y+GCpuKN+W4GDjxPB3r6iCiL6hj/FV1/w9QFe9EO+vtkVtQcd8lGpg9ZQcYHosicKDXu6L1TQIslp5riAJF1 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(8121501046)(5005006)(3002001)(10201501046)(3231023)(944501161)(93006095)(93001095)(6055026)(6096035)(20161123559100)(201703131430075)(201703131520075)(201703131448075)(201703131433075)(201703151042153)(20161123563025)(20161123561025)(20161123565025)(20161123556025)(201708071742011); SRVR:CO2PR03MB2358; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:CO2PR03MB2358; X-Forefront-PRVS: 0554B1F54F X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CO2PR03MB2358; 23:6FF0hsM1r+HcMNosn5A6j8NUomp+M0hVN3ZPXGt42?= =?us-ascii?Q?9lCiX0Vur9hNVZbfX4+plMe8GQVrpVdGV3/ebuQGqYIsT96pDuL5LnkvKXAl?= =?us-ascii?Q?ggQuXBqYqdLG2kso5ol5hrmYrOE94QngSyY6tZR4ow90HSdcQndWFuDi8RwI?= =?us-ascii?Q?advJ5HW8PUfyzwfZ6HiwyQq7AVIKMB02+SBqjsCg7bx+ZZDde0MHsjJa16Zy?= =?us-ascii?Q?nOOFKu8dnsrxUmX1if3gQwK1jXOVGWm070ihYr+n5sHnpYH+vsc00JBEPL5W?= =?us-ascii?Q?nKCMKIfaTe923EZ/VJSaEqefdmDJzXpExLjEMTaGA8eNrztfFr2xsBOh1RED?= =?us-ascii?Q?flUpAkOv8tCs4zFo+M463oQoVGoVIZH4SFvwK75sBvTlvuGWmgqsA34HrBwj?= =?us-ascii?Q?o2wiLlmDb4SoB+mL5gYnnl033h23NXjplRE4zuj+bnQ3d4I4DTtyS+2fsi7T?= =?us-ascii?Q?aP6ig1uIXOxJ4pnCNUyEwJX6jA0yILQa5pRk8TSj2MdgiAYk7dt1+pnyVmEj?= =?us-ascii?Q?8XGg8u/7W+fy+tBJnSv/sqNmx28CxCYEBpfetx2QNPHFIZYg+YV1ax+982Qs?= =?us-ascii?Q?ZhgnTuwkahp4durDe4RPX/CkvKPptqyY90JA3Uh3Ht301Hs6pA/SA0s59USD?= =?us-ascii?Q?deJVOopDNbKg2/HOLHcSN70WWGXyD/qIgq09QIKnj5Q8vXEIamn7kI3VxCEA?= =?us-ascii?Q?4QTRtzRfpyvzlqC+glR27nQfHOjhTKeo6uwR54NRTLMXsW7cZS4AwgrpsZA2?= =?us-ascii?Q?HOr6ngAIRBQHhWNBlHXKFeoerDzO1ohcrW9bfMmHvpUezwcK4qLIwRUvzyik?= =?us-ascii?Q?e+mLnjXGhs96STiU7sAwEE2O+/pWF91PCPS4LnYPhL+CaYzEL93uYf8uCT3Z?= =?us-ascii?Q?qwibZuDU6KQ40NxCbB/Myr7Khsa93TPNvNA9ovzINFDOpP0fRzicLZXSrxd8?= =?us-ascii?Q?4KYI/JrfxmUpQDaLyn7eEo4kj4cDWXth27i6RqqRmHywXpAxfZBjC+YMpr85?= =?us-ascii?Q?dq5dd2+LzyNLMTeR0wCWxD1ubwgk3iQy5NiMyWyzInycNAjeIBMSsc/wI2EX?= =?us-ascii?Q?uKbrcvvyxvdK3FvUmSb4qEnAbDwaxCbY3ufyOqcZMno9QOZibpb3TF3WptbR?= =?us-ascii?Q?urpFKb40L8=3D?= X-Microsoft-Exchange-Diagnostics: 1; CO2PR03MB2358; 6:DzMypcIoqaWX1TnUlmwA4V171Ru9tFRmX3y27/tLk2hbys+A4liA83cyn8XjAsO78lQW1Uss0rGQI41eDcTEExnRbbP4o59wLE1qpBG9dV5FHfiPS/ehNHkF9eUuBsg/a/CgQ9a2VaahOgwjXtuhLmvSg6/h7dqltE6YI+9mPVEPtkVYOnbQW2usycjFJkM7gJh3XnZJjwAUP7zG9DfKrc03TvPE4F2AlxFHWd9YpCIM4+At8xOjPooz9bfT4Cbpq4kM5W6lRc6KBH4ZMglxMd9xKsJNSCRtksYCX/fHIT1lO3kZj2oSs0Yq3dY8S3FF6MV52LmW77vbJ1ha236OLMKtljVfkuA+dj5izvI1MJg=; 5:SBpzXEoK9R/7KoSoqdntOSUI9bnIeAm1JwbMJgxBwPu/A6zUeFA671lIcefs9JXFOdP9pJ1BqaVQPRF12YPS/EahpCoyn6qfqjsxI++Er/Nec1vKlN0urjobvzFGqrmciB1KtgFeowijyajQIlo5ILkyjuwh8Fx+ZHBb6c5tF1Y=; 24:YP8RD1FiUtFiy/vv19ebdCr2XXAfSrMuVDVBsAfDHI2F7L78CbxJUHz1BRT16KgUBjitPuqZ4VEMJoKcEq62rHGpNmaLEcBZTSzIiJAZbAE=; 7:Nhr+Qw3VZvbs39yBHuX2DwuYIPAXK8Stx6nf0kMJKzn3/JMRovycCnE6udzaipzDhOTXMa2vw369pTLsAF9NkBezip0typA80Tbzqv3VPvMZkIALpuZqQVjxXAja+0UoHilS1gc4iA3ZX6tiRa1eYiPCT2BR8xjYBVesGcQZjGMa/WuTE8XM3RzPyCg6QpskPuq11IF0a+kYbD3TRknRvfexE1K+HqQUCOmr23hVaNS68+sxQRdRETyIHMW+Q9iw SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jan 2018 11:43:20.6192 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7bf85075-7728-4c99-c829-08d55cd657c4 X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR03MB2358 Subject: [dpdk-dev] [PATCH 06/12 v3] event/dpaa: add event queue config get/set support 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: Tue, 16 Jan 2018 11:43:22 -0000 From: Sunil Kumar Kori Signed-off-by: Sunil Kumar Kori Acked-by: Hemant Agrawal --- drivers/event/dpaa/dpaa_eventdev.c | 47 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/drivers/event/dpaa/dpaa_eventdev.c b/drivers/event/dpaa/dpaa_eventdev.c index 0bd74bb..f1db711 100644 --- a/drivers/event/dpaa/dpaa_eventdev.c +++ b/drivers/event/dpaa/dpaa_eventdev.c @@ -201,7 +201,51 @@ return 0; } +static void +dpaa_event_queue_def_conf(struct rte_eventdev *dev, uint8_t queue_id, + struct rte_event_queue_conf *queue_conf) +{ + EVENTDEV_DRV_FUNC_TRACE(); + + RTE_SET_USED(dev); + RTE_SET_USED(queue_id); + + memset(queue_conf, 0, sizeof(struct rte_event_queue_conf)); + queue_conf->schedule_type = RTE_SCHED_TYPE_PARALLEL; + queue_conf->priority = RTE_EVENT_DEV_PRIORITY_HIGHEST; +} + +static int +dpaa_event_queue_setup(struct rte_eventdev *dev, uint8_t queue_id, + const struct rte_event_queue_conf *queue_conf) +{ + struct dpaa_eventdev *priv = dev->data->dev_private; + struct dpaa_eventq *evq_info = &priv->evq_info[queue_id]; + + EVENTDEV_DRV_FUNC_TRACE(); + + switch (queue_conf->schedule_type) { + case RTE_SCHED_TYPE_PARALLEL: + case RTE_SCHED_TYPE_ATOMIC: + break; + case RTE_SCHED_TYPE_ORDERED: + EVENTDEV_DRV_ERR("Schedule type is not supported."); + return -1; + } + evq_info->event_queue_cfg = queue_conf->event_queue_cfg; + evq_info->event_queue_id = queue_id; + + return 0; +} +static void +dpaa_event_queue_release(struct rte_eventdev *dev, uint8_t queue_id) +{ + EVENTDEV_DRV_FUNC_TRACE(); + + RTE_SET_USED(dev); + RTE_SET_USED(queue_id); +} static const struct rte_eventdev_ops dpaa_eventdev_ops = { .dev_infos_get = dpaa_event_dev_info_get, @@ -209,6 +253,9 @@ .dev_start = dpaa_event_dev_start, .dev_stop = dpaa_event_dev_stop, .dev_close = dpaa_event_dev_close, + .queue_def_conf = dpaa_event_queue_def_conf, + .queue_setup = dpaa_event_queue_setup, + .queue_release = dpaa_event_queue_release, }; static int -- 1.9.1