From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0071.outbound.protection.outlook.com [104.47.32.71]) by dpdk.org (Postfix) with ESMTP id 61A351B40D for ; Fri, 22 Dec 2017 16:17:45 +0100 (CET) Received: from CY4PR03CA0084.namprd03.prod.outlook.com (10.171.242.153) by BN6PR03MB2690.namprd03.prod.outlook.com (10.173.144.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.345.14; Fri, 22 Dec 2017 15:17:44 +0000 Received: from BN1AFFO11FD010.protection.gbl (2a01:111:f400:7c10::117) by CY4PR03CA0084.outlook.office365.com (2603:10b6:910:4d::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.345.14 via Frontend Transport; Fri, 22 Dec 2017 15:17:43 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.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 BN1AFFO11FD010.mail.protection.outlook.com (10.58.52.70) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.302.6 via Frontend Transport; Fri, 22 Dec 2017 15:17:28 +0000 Received: from sunil-OptiPlex-790.ap.freescale.net (sunil-OptiPlex-790.ap.freescale.net [10.232.132.53]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id vBMFHVex024113; Fri, 22 Dec 2017 08:17:41 -0700 From: Sunil Kumar Kori To: CC: , Date: Fri, 22 Dec 2017 20:47:19 +0530 Message-ID: <20171222151725.11273-6-sunil.kori@nxp.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20171222151725.11273-1-sunil.kori@nxp.com> References: <20171215130828.14218-7-sunil.kori@nxp.com> <20171222151725.11273-1-sunil.kori@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131584294489397348; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(336005)(396003)(376002)(39380400002)(346002)(39860400002)(2980300002)(1110001)(1109001)(339900001)(189003)(199004)(2351001)(316002)(97736004)(47776003)(104016004)(1076002)(8656006)(51416003)(36756003)(85426001)(2906002)(54906003)(86362001)(81166006)(48376002)(50466002)(81156014)(8676002)(77096006)(5660300001)(53936002)(6666003)(105606002)(68736007)(16586007)(6916009)(356003)(106466001)(305945005)(2950100002)(4326008)(76176011)(50226002)(8936002)(59450400001)(498600001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR03MB2690; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD010; 1:6krUeatfqmZYl0/X3m/eAbIaUWZlxeYT30ZjJ0XS8vTlMsS/8H5yvMgSvIONn3OG3PyOiHQLvsdWJIKA5a2YmAyprwc1p+3F1NQ+QpaDYgDKq4vMWowlhA16x11SE/N0 MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 81895f21-708f-48d1-9864-08d5494f1d86 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4628075)(201703131517081)(5600026)(4604075)(2017052603307); SRVR:BN6PR03MB2690; X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2690; 3:Bhrh5rQTFS14B+VQsTDbcPH/ofMN5403DxyXtpiH6R1tMCIP/wt5F+/lk+RINDYK1ZqKvbLM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6+M5dVHMBAqAQspFnmClJ9fj1C7chIN27qJb9cpaxMCczXYUQoFwlCSATm0RWTdxbS/fFuNtRmkTL+6oT9Kljj07CJ9S8x0qMWcBI2q79VDl/YE1OVuSplSqAsolljkjnL6U1BovV7M32/0+qeuNmOA7vrzj5yIlM343OVYJl9LA6pWXxcx3 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)(93006095)(93001095)(10201501046)(3231023)(6055026)(6096035)(20161123565025)(20161123559100)(20161123561025)(201703131430075)(201703131448075)(201703131433075)(201703161259150)(201703151042153)(20161123563025)(20161123556025)(201708071742011); SRVR:BN6PR03MB2690; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:BN6PR03MB2690; X-Forefront-PRVS: 05299D545B X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR03MB2690; 23:d/eRkyETE9RS6HchfLHUk6aVo4YOB/FqX6VaduzCZ?= =?us-ascii?Q?FfKRxc8N611KDggBQ8pz8+rX2ul+vEmNzfUD9Wg6N+2zhzAHzbr25yJXP1Xq?= =?us-ascii?Q?nOe5b9U5VHalUwcoi6I0UiezHyr1sqrwOJqOcNeMKHjPPa3LFOg+scwxPUBf?= =?us-ascii?Q?vPp/t0L0PInJh/1qhWrR6E8rN4gwcePCo48TCFD2ajs0UYyMNkDihDyEr7XU?= =?us-ascii?Q?Yb16dvw2ixxypD0bgM9NJ+f0D/TIRo53Et5Tmiye0JS2EbyHt7ie/7A1PKoz?= =?us-ascii?Q?aYeKwQq5aEX450D58noMqGGL0JrqRuSMFTpFLwfZZJPbDNam9jrVC1WZaG+U?= =?us-ascii?Q?Rb/VNcL9kEbE+fNrDONPZ9J34NE2JwajoTFppsCI+dw9Ra6OOhNzD0DZb6RF?= =?us-ascii?Q?Yas5HZ4Ux8QyxJ1r25qbNjnhDLHJ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n950mFU/gmnka7/CYyDXs0TKfX8iZpAYfCl9RR4yVSt2EH3bftQodU1rjPJaQXMK5Bkrj6k2U9L5a0cE3CyBBeNQcIKiWI1mzMwPApD0oYI+1zw0CxIJH2TfmPfhcq1CyfNCjSppGo8gPJXdNI51Pxss9HVUpcGaaUfdxfU/GVRVAdVDEoJAJVDuUi1lY8rIA3/0ak98fLDlk=; 5:VIauUkaRawexaHD2gmatHe7uUeMtxzo39nNwQfGHfq/C7E4IpgufTN1moaO6D5l/SKxlvl26fT761+GPkI2zUCExbn50xlSODKL2WtrciUKE3F6rqr240px6HKRWwpqpS6LRugGFHlmKyfBptmGrcXq2u5fXi5R5ntK0g0XD/nM=; 24:W5HTCrx4Zc4GESoee9CNZSj1PtYG/oE2CN75TLnTR3nF5qsJgL38b03IpC7hO+gzufQEQqPuviBgA5wP2bSWvBj/21CE0Tufts5QVa4Sb1c=; 7:zAxYjS3fA5yBXKDaIFG7WTPbeDXhaGZOCgY5MFowfwjixE6ktrGOQB2jBDmDvc6wTO3df4TE/ko09C1qPhZbGoo128Vck/m/A8EjOAPT6odK6uREKBXLT3rfbHQt0NxCl/uQKJ9C2MVH8FOvYTaTEFUZudojHAzJEfmhoci/3vUf8WnjTod5dLsHcFE0OKhfkbsPaiHFyd+NbaOBp06XNse7iKyotZPVRB4zIwdv1V2cSsQgvEfbYlFpEe5PdNSC SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Dec 2017 15:17:28.7681 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 81895f21-708f-48d1-9864-08d5494f1d86 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: BN6PR03MB2690 Subject: [dpdk-dev] [PATCH v2 06/12] 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: Fri, 22 Dec 2017 15:17:45 -0000 Signed-off-by: Sunil Kumar Kori --- 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 c4c81c9..538ba01 100644 --- a/drivers/event/dpaa/dpaa_eventdev.c +++ b/drivers/event/dpaa/dpaa_eventdev.c @@ -199,7 +199,51 @@ dpaa_event_dev_close(struct rte_eventdev *dev) 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, @@ -207,6 +251,9 @@ static const struct rte_eventdev_ops dpaa_eventdev_ops = { .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 -- 2.9.3