From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0073.outbound.protection.outlook.com [104.47.37.73]) by dpdk.org (Postfix) with ESMTP id B9C1414EC for ; Mon, 6 Feb 2017 14:02:26 +0100 (CET) Received: from BN3PR0301CA0058.namprd03.prod.outlook.com (10.160.152.154) by BN6PR03MB2948.namprd03.prod.outlook.com (10.175.126.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.16; Mon, 6 Feb 2017 13:02:25 +0000 Received: from BN1BFFO11FD001.protection.gbl (2a01:111:f400:7c10::1:126) by BN3PR0301CA0058.outlook.office365.com (2a01:111:e400:401e::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.16 via Frontend Transport; Mon, 6 Feb 2017 13:02:25 +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;nxp.com; dkim=none (message not signed) header.d=none; 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 BN1BFFO11FD001.mail.protection.outlook.com (10.58.144.64) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.888.7 via Frontend Transport; Mon, 6 Feb 2017 13:02:25 +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 v16D2KBq027936; Mon, 6 Feb 2017 06:02:21 -0700 From: Nipun Gupta To: CC: , , , , , Nipun Gupta Date: Tue, 7 Feb 2017 00:34:37 +0530 Message-ID: <1486407877-4772-1-git-send-email-nipun.gupta@nxp.com> X-Mailer: git-send-email 1.9.1 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131308597452490384; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(336005)(39850400002)(39400400002)(39410400002)(39380400002)(39860400002)(39840400002)(39450400003)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(54906002)(305945005)(6916009)(97736004)(2351001)(110136003)(36756003)(50226002)(47776003)(8656002)(356003)(77096006)(85426001)(2906002)(189998001)(38730400001)(6666003)(5660300001)(626004)(4326007)(33646002)(81156014)(8676002)(86362001)(81166006)(50986999)(92566002)(8936002)(15650500001)(68736007)(48376002)(105606002)(50466002)(5003940100001)(106466001)(53936002)(104016004); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR03MB2948; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD001; 1:P2I4vzGhpBbSwE3zSrGSeit9p+w95RmQGlLyjVXAz6NEt8K+r+2ai3JLXNQpk+H0MRtugyr8UZCoL4cSvF0l/XcZoBIfWfmv1WBEHyGprFlebS29erkiKhyLlTJ2G2FLeuIFM0QuKi8D3cnVIUCvw7yjkVnYizYvi2SXb58dbXK+ka5ZJXVuvkVioApBY8KLx1IuMXPfqbDuF38tJyopMhSOatErE080dZ9ibw8VR6eGgGRqAEZhD5TLnIBMjlbPFkhBR2mDKkUwqcv5y1wMpsUEcnpvQCCWEUyv8lBQpyg8s8cQSsukn9eAYsW9SMg7aK7l//QbsgQaBZgEzGWIEJDgd+F6bL0MEp1SbzPEQxpk9/6dWFytLlcGKcMt3wd/hfp84nkmLEPjPJhb4UFFTAlroMixx76PpvL214tnSe9kjYbD5Y3mQcEDMXbF28RBAu9YYAGKew3EUCKG/Fx0L8LkZC+NWbhfCeuLmFj8Yy3vMfmmxwj/uVl4no8Rosms4q2UuwWTyvbuBhWDjlHDS53CM/I2AFa0FlEcVdL6P2uCPoyXZwCuFKpccoX0QrDY0slyAwj+9s898lnNHXDo78PKeE5T5BUwb2SNXCDLqj7M5lqZFGiVOnx6WTatWIncpSrkpc+CpnPJ7MfMIXb/yPfCLIzbao6CjPNsKrs9GtQoOE5L+qAVgLpqChLjf4PQOcwMkcf5P84ks9SWHHiOp9KofOqkhyBgzz82FkGIQyXsKz5ACm5kmQd70xgpDk9zN4RJpY7kJ1sFaSxTQ1skMw== MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 8be313fd-5d9f-44dd-4690-08d44e906593 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:BN6PR03MB2948; X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2948; 3:/vlLyMrll6OcHnI1gyRYXTKjsHkzCHG7DwVq/ltXPBMGkynKeOJQfMeN/mH9J/smgTF46vSou/ipOv+WTaNW/m0t/huZrqI9YevK5RlMggV5GRozc2GWkwtXgyJ7nvAzgY/BbjSjQ/0eO/71jIWJbhpvCdog/cXjuYAHBKz2WMmNWlxi1Xe4s8iHk9BkyQfJqmkcM060+dPSB68vcfmGqB3gxhYvuf8mNTocmPMd2CwS/Tf3CzT82sxleG6OOq56I04+9IafYGDbtV4ErdVwkUHWXhggH7yrfpGyGnxN3+0M4Z2EIU37uG7nLwO5uv0zepHnhMV8wQhNftGZOrs5GP9CJKrquoZZuAbtnaDaXnlCdGcPAM4LFL/ZqEm4v2k/; 25:7GgjnmTm02o2qLeIIZfjJobz7sGhGcVkGKHHeMIUo2Lf0r9Hgc0rzLWTyj9IksDnA+I8BhXfTmk4L5YLXm++/JbyuxRS4f7w6eGcfZywB4tYtFIYGOhWwL/V/mkg3z24iF5dPBgIFA2zJNBeVDGmQ3OpwhF2QTEOuGTtz9GmhlkqyyxHglEhfPvm89wXluS8VLVvPZLVQd/QRzqBBH3+vXg5PCQJGwQxnmZ3JZC6ySPwmzrtf0JmuT4hR/04ktqTpMnF9JyHBSntcVVtFFZ0Lt1XjTTAp55YWAxWtJ/bRpg0RTL8YygKxaUe+0qGKo5mthbkB7dFW2bPdGq50z7LoeepFkztJpmuFADvhvCWYx+xORoVOb+fnLeZ2azkRIpwzAXwwd2tmNPIVQUR80H+QMJY03GZuJfPN6NSo1eFb5niG1eZ7x7bYmPEQkT1K4D9fb1/QVJkky49Ms0Omls2YQ== X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2948; 31:RP6gQzAV8vevcaOME1Aqr5dUxEG2xihkxO8ZM8Qgn1Qcg+9tdwj2UWKloWggYnfO6FuDZ3wZAHSvM18EndwmPrQ+QOXJtxI3YU7uYDcosBBKB+uG+Mj8IX+yFrpuYoSCyW8x80Jth8VBXX0vr+0y9lJb1ELVhN1b50XwLdSwXV8cRNB+Wlb3YHh5iWUNA146q97QjI/EHVrp0elRehScDsNAKmPLfSXR5ODmdBDdiB1drR0Unovb/+hsfqKqfKjSGWRA/wpfUDUP9nM8nKR6W1OGXfy23i4WUvfpB2Iyurg= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095060)(601004)(2401047)(13018025)(13015025)(13017025)(20170203043)(8121501046)(13023025)(13024025)(5005006)(10201501046)(3002001)(6055026)(6096035)(20161123556025)(20161123559025)(20161123561025)(20161123565025)(20161123563025); SRVR:BN6PR03MB2948; BCL:0; PCL:0; RULEID:(400006); SRVR:BN6PR03MB2948; X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2948; 4:3q1F2/GFV5dqzQ3QoWzDnVeJp8fK9u+ISZBZ6nmSVy9h1jSQ2kSH8EgAtzPq44B4RZCV9CzvxCNJGLQiz0mFyMa3qAb4T1ap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IMMDjg0xjDIf1bSFGA7cM6cCdlk8OjeSNSnzAUJJ5KtBbHp1aR/X1vhN0bl?= =?us-ascii?Q?lcLLVOnKYE3rAIuQHIx6nJBObt0jMDdbUWbV+FVyH63lwkMA762b2buWrHVd?= =?us-ascii?Q?A+o43tUAq/AepYiUbxYHcpVA0DOVia4dT1rEMeLTRGXM4t24k0gCuz9JczLT?= =?us-ascii?B?QT09?= X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2948; 6:ro73NVe8j4NrdyZsBU8YYtYfYHOZZXNObpamyzbgLL3Nt9MiKBMvukRkYdcWYVEyTovT1fUF1/uPQ25tg1pPDU6sMCP8uHOyi7azeGPT1ckm/fCImNfst6Lqs/TYtJD0vR0eG2PC2Bt4AvoqxIYNzfoegIBocO6N07X2Temw9JSok5+fm7iUyAlbC6mi6OTzUVdwSyrU/IwBIm2FmBEr6oPHCWVYm2gwXELUTovnNu229Yjk+gohbaUBda2Nt9vQ1Ss6s/cZ4Dh+sZn1xVemTDc/TlL0NZPEiEtNXq/6unJmqMgEIrhYKwGD2iCMb7rUgkt5xzevDI9FHZD3aVKga2TvgVemjFcv1qWxowlEEV1Y+inP9Xe5ujq4MAG5rW1EIjMf/Uv5ITmTmQ2WbRfS+8leB1y79JXZp4MmUJLLhww=; 5:0qB6lzRoSVPXkKtXMIqHZ2SjqwJznZw9QREFT4E72CCIKGU9uk3Kid4dMq/+dRSWo4YF05S/UMR9CJwaX3RIUR/p3KPPo9jTi9zIUWjN9tsrlcF84wO0YMmtkDICsTzFeLSmtm3B8zt4nSF51IYVbiw9JdH67mHTbYOcIe2v2OxusZVA3WhA/VLlTS1qIxrj; 24:2NebDuCXb7AmQ+mBe1TgrXDJ4ambwLiUeK9+/DGioXfbm8Tt6q6NJB6rsaR9DVhjk7tW+meoAZq0Sya953vABhye4xpbY9/5D7DuscuO/aA= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN6PR03MB2948; 7:4x7v4XqkeKfb6gVaGg2dDxADGdTRpuxkhwpw0KU0F4CS0sq8c19FuwOIJYTyCCaE9h0/wbPLT7oBblLMi8HIi+tXtH/co8v6w7mY8QnOKTwb+TNoxtGmopuI3m979tevTcf4e2oaQp8vh+cwBIQByFf5lR/K7fgL4Eh6X/T7nI0UgEiRLPWBRdhhgXgUsvEPXXSBGd0dr2PqbXqrETu693FCYQlmDJGsmrtVG9uLmV+6CFmBpwMcrZUp2kZtfhTNlciS0ZkAy8JfOACO85LGTp+NrwVhsSBdquEiBaxcUZiLbN/Qt3cJrvIRP7KDpLB/jY986DNhrtV4YMAY6fU38h+5SfXl4f+0/REZMOI04fpe+FrPuqcuJD52BHWSpd6Vu8vG7Rhqsmr82H0o2YitgatesQK0lY+Mq5e43DtPKmzof3628tXAo0C9UT8AOJqpVEC3yvAYYIsVCHhpbn7Fse4n64qld3XA34b+Zj1M91kOiDntfod2DJO9eeASqSyJh7EJOiRMUPNdg3raQEffzQ== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Feb 2017 13:02:25.0618 (UTC) 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: BN6PR03MB2948 Subject: [dpdk-dev] [PATCH] eventdev: update event port link and unlink callbacks 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, 06 Feb 2017 13:02:27 -0000 Added a pointer to the rte_eventdev type in the event port link and unlink callbacks. This device shall be used by some of the event drivers to fetch queue related information. Also, update the skeleton eventdev driver with corresponding changes. Signed-off-by: Nipun Gupta --- drivers/event/skeleton/skeleton_eventdev.c | 8 +++++--- lib/librte_eventdev/rte_eventdev.c | 8 ++++---- lib/librte_eventdev/rte_eventdev_pmd.h | 8 ++++++-- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/drivers/event/skeleton/skeleton_eventdev.c b/drivers/event/skeleton/skeleton_eventdev.c index 085cb86..9330d74 100644 --- a/drivers/event/skeleton/skeleton_eventdev.c +++ b/drivers/event/skeleton/skeleton_eventdev.c @@ -287,13 +287,14 @@ } static int -skeleton_eventdev_port_link(void *port, +skeleton_eventdev_port_link(struct rte_eventdev *dev, void *port, const uint8_t queues[], const uint8_t priorities[], uint16_t nb_links) { struct skeleton_port *sp = port; PMD_DRV_FUNC_TRACE(); + RTE_SET_USED(dev); RTE_SET_USED(sp); RTE_SET_USED(queues); RTE_SET_USED(priorities); @@ -303,12 +304,13 @@ } static int -skeleton_eventdev_port_unlink(void *port, uint8_t queues[], - uint16_t nb_unlinks) +skeleton_eventdev_port_unlink(struct rte_eventdev *dev, void *port, + uint8_t queues[], uint16_t nb_unlinks) { struct skeleton_port *sp = port; PMD_DRV_FUNC_TRACE(); + RTE_SET_USED(dev); RTE_SET_USED(sp); RTE_SET_USED(queues); diff --git a/lib/librte_eventdev/rte_eventdev.c b/lib/librte_eventdev/rte_eventdev.c index c8f3e94..c7452f0 100644 --- a/lib/librte_eventdev/rte_eventdev.c +++ b/lib/librte_eventdev/rte_eventdev.c @@ -801,8 +801,8 @@ if (queues[i] >= RTE_EVENT_MAX_QUEUES_PER_DEV) return -EINVAL; - diag = (*dev->dev_ops->port_link)(dev->data->ports[port_id], queues, - priorities, nb_links); + diag = (*dev->dev_ops->port_link)(dev, dev->data->ports[port_id], + queues, priorities, nb_links); if (diag < 0) return diag; @@ -846,8 +846,8 @@ if (queues[i] >= RTE_EVENT_MAX_QUEUES_PER_DEV) return -EINVAL; - diag = (*dev->dev_ops->port_unlink)(dev->data->ports[port_id], queues, - nb_unlinks); + diag = (*dev->dev_ops->port_unlink)(dev, dev->data->ports[port_id], + queues, nb_unlinks); if (diag < 0) return diag; diff --git a/lib/librte_eventdev/rte_eventdev_pmd.h b/lib/librte_eventdev/rte_eventdev_pmd.h index c84c9a2..2e3e5d3 100644 --- a/lib/librte_eventdev/rte_eventdev_pmd.h +++ b/lib/librte_eventdev/rte_eventdev_pmd.h @@ -357,6 +357,8 @@ typedef int (*eventdev_port_setup_t)(struct rte_eventdev *dev, /** * Link multiple source event queues to destination event port. * + * @param dev + * Event device pointer * @param port * Event port pointer * @param link @@ -372,13 +374,15 @@ typedef int (*eventdev_port_setup_t)(struct rte_eventdev *dev, * Returns 0 on success. * */ -typedef int (*eventdev_port_link_t)(void *port, +typedef int (*eventdev_port_link_t)(struct rte_eventdev *dev, void *port, const uint8_t queues[], const uint8_t priorities[], uint16_t nb_links); /** * Unlink multiple source event queues from destination event port. * + * @param dev + * Event device pointer * @param port * Event port pointer * @param queues @@ -390,7 +394,7 @@ typedef int (*eventdev_port_link_t)(void *port, * Returns 0 on success. * */ -typedef int (*eventdev_port_unlink_t)(void *port, +typedef int (*eventdev_port_unlink_t)(struct rte_eventdev *dev, void *port, uint8_t queues[], uint16_t nb_unlinks); /** -- 1.9.1