From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0088.outbound.protection.outlook.com [104.47.32.88]) by dpdk.org (Postfix) with ESMTP id AFA29591E for ; Wed, 8 Feb 2017 15:43:59 +0100 (CET) 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=TvUrn02TQKuuv4+wDnQ3zP3JIgC34J/liKvf4acsNV4=; b=PXcIvO7br3d08j68CXCWodqJrGSEh4XxpUFtpGvEsS/radotSaWot3Z/4VONB/mg9ZpW2RTiJ+j0C3xnsPiMOW1BmatZt9KuiT6QfAbIvw3coxEap4czkPKvcDp/F/wumLy3RJmCp9AvrD97aNx8EpmBR7nHqlk4KQTyYlBYPr0= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@cavium.com; Received: from localhost.localdomain (122.167.145.188) by BN3PR0701MB1717.namprd07.prod.outlook.com (10.163.39.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.16; Wed, 8 Feb 2017 14:43:54 +0000 Date: Wed, 8 Feb 2017 20:13:42 +0530 From: Jerin Jacob To: Nipun Gupta CC: , , , , Message-ID: <20170208144340.GE22978@localhost.localdomain> References: <1486407877-4772-1-git-send-email-nipun.gupta@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1486407877-4772-1-git-send-email-nipun.gupta@nxp.com> User-Agent: Mutt/1.7.1 (2016-10-04) X-Originating-IP: [122.167.145.188] X-ClientProxiedBy: MA1PR01CA0098.INDPRD01.PROD.OUTLOOK.COM (10.174.56.142) To BN3PR0701MB1717.namprd07.prod.outlook.com (10.163.39.16) X-MS-Office365-Filtering-Correlation-Id: 0c7c03a2-e0a2-4efa-6188-08d45030e98e X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BN3PR0701MB1717; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1717; 3:GU4wyKa1rQkn1I3i/ztxBoVlbSgMIrwBrPemh+IsYDfwGW7nSXUxd18IDr9BTDcUrbPViCCV8J8sA2XHMtF4Zg5cb9FKlhEwPysoIw9HjG/KdIgXtQlbE9XbOyPZ8+UHzoRr6WiQklMgcR3fo7F5ZUS7JvowoLD3K8uZ7u2aRz69UluVZ5Kes4NOU6SfeRBqApAajcumeywvZW9+srk57MrWrCYg+V9mi2BAsGYU4BvzjLv5CrNsFCdSQFiOuilaLh03Ol3ef22kxCej3jhUBw==; 25:A+yXEuib+2dLv0PH4ntSFySzsmiop/8ntCmOCvQNOQi/1Td1BgDBlycMqcqis2Ug31PDjemx+QBW/+8CEWaeLiNVj/ok6KLE3+/KSx9m3/XC9ekZn+NBmHhJPkRf97kSJHcjn1SYAufaJ9G9YWcb1aLzCt75TaVjEX7IEVqSdGIcMdJKGtZ3n+0GyhpaXUi9VQxOLca+yT3sKutGO9Cpg/+7fYEHzduOFVTIETG8VIAvpBSVTvhB1BpfoS/sVGd8zdCc4t0NZFQEaViqLxKAPJ5SA6FJpjH0VjSVu4KU4fOXBwyeZTFE3uRQV3qfDLMn2UXvbJGttW0S3SVdeNO8GMKfuQo4brJJVKerfBEXylR1QlkAp3aTTqPbyPBJOW8mWewrFiYjXXeL3uV3Z3wgFplqk24YAQTSHgRDpW+TgGhryUDuHt+3rWKnHNnnC9brb3OZ4rk0V3UnaRsdDAQ7vw== X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1717; 31:vR6KJRTlh5fjJFj1m3A9dM4oAW+u3AJNE62venU/nr2oYHOzeKO4rMIhXuvW+QC0NgSPaI3pp+sPIicUufZYToB12sj3HZTFT41cK5oQ5A7I4ZH5LqgN9s+JHEfvsj3oRqdi/MzDPW38cM4GozaouSFXsb8UjUhtz7IdwVjzVxdmqgQRfHsmf505jVG4M/QpWM1LOjpi76EFEVoEes2S66CAmEIjF22GESQc+AFTEEFaF3KeSpYE7D1kP++K46YhBhjspjyQ+9ipttqinEflfigP2GgorflKprLPq2D95yg=; 20:wvHZbdQDdH5Iyxh/JLqVDJINzBSgHRotoP+2qCdpSmD29W0Xy/IEcC1HWupCnMiw2B7FwEi4ahNx2wRAbWKY/p9lznCbF/Xp1qTaSCfDgA1X1ZN9wsPEWuq2nvHRnbwTcwiCMWW51hmeVIfOeeQirT0tTQ6Y0eZb/Ipmmxi9AFKbR45BPEwfpKg59Ev6DJIhIhrIDpo4DzVTUE/Unmn1WpGmLCzLmumF1eXR71FQorrNP9ftIoZpGtRaomWCUFPYli4sKBv/AqUlPTmadtxCc0Vaqe3b24z7ZBa876ROzI2xQdVR3cCbyEuJYWnSXSqvm20FeE2s1X+fZbgqQ4RztPRIXcGDKxrzEHeT1NLQIhVIyIna1Qj4S1otXstGdZWR+vivR1zJEyxBZLif7FZKOn9i8ib2NBd/qzK6EQBvMtLgWstBTRamW2Ugumvc4bn1n3ONHWG37w96Vm5fIiisl1QPMHa1Ey0zs0FkVwZyQDygt5PA/4KSj842m4JtvTntyWyqvJpgWtzd5PXC3ZWg8AYzPWR13aiv1ExR5eIgbZXXZwgdoc8n8O0MbyilC908x1Rq04aXBaPwU53aLhijV+5CC44/f9xvagT8oiI2LrY= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(20170203043)(2017020702029)(3002001)(10201501046)(6041248)(20161123558025)(20161123560025)(20161123555025)(20161123562025)(20161123564025)(6072148); SRVR:BN3PR0701MB1717; BCL:0; PCL:0; RULEID:; SRVR:BN3PR0701MB1717; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1717; 4:RsycbIdT3aW6bAI7ud/sGS/UE0BcnuEZolJE3FYDvUBD1sBELN7yghV5sNd3egQDm3GrZ62h/sxT6WFr6pWRMwftStA4YJHjCFiGzngJYk4JyFXmOvOpxwH55uup7+zLQ4wVGHaHkCzWGnnXJ86T8WGVqmAeBG2+9FvQ20AZARwwF+gpGZm90icw+1X2J3EWa8cQkCCdFTZ4mmFPCrhkyYN2iF8jbTv4MBAoLqET9u5pMw52EFofBOripIw3VA7qJmmagFgO+4dbPsQ6b4WcCRvpiqAwW4Yi6FcLcnd9tH2PcJS10KaDT2l4Ta0G1on/mMYphF5klM0fOxCwzMSiHSRDt7UFoDFvicvSYiAim0jLh/809pM/GVmlTOd3eUjWjwpzHRUHDaOZPiq5qrDOnB/0UJRbPnPvdUxA3KuIbHJ2MTH9scL8d8rlO/m2LiAsIHtbPgoqU9cM4B/NnTXR9A3YAM+2BHqkfCFCF9RkNYcrVNcOxuyJ5eizDskE+CZKRjS/mt8NFaN642qnLZ8vlXfdOD9340UJBDngtoP1o9eHvzzsCM1v1pG0Hrj7kCCiPbRJDthmQHfQGhKF5/aYCrj2RjwOCcRXYxjJ5LoE5P43/mflYU/pAKo/eofg1849mFss51BNcvnvkf2XkhKb5B+DeaWzeA086iHLKLq32qzbWMLZS6wfjbMF/B2FtVpL7Wjv9zQUl9TyV5RZEiuSzQ== X-Forefront-PRVS: 0212BDE3BE X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(7916002)(39450400003)(24454002)(189002)(199003)(54906002)(81156014)(229853002)(8676002)(9686003)(55016002)(42186005)(6246003)(47776003)(105586002)(38730400002)(66066001)(53936002)(8656002)(6506006)(110136004)(106356001)(25786008)(81166006)(68736007)(6666003)(4326007)(33656002)(83506001)(6916009)(42882006)(15650500001)(2950100002)(7736002)(46406003)(1076002)(23726003)(6116002)(76176999)(189998001)(54356999)(92566002)(3846002)(50986999)(101416001)(61506002)(4001350100001)(50466002)(2906002)(97756001)(5660300001)(305945005)(97736004)(7099028)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR0701MB1717; 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; BN3PR0701MB1717; 23:uSBjAZ3IKa9W0BJZdgoVEn+riqsVc3hsYxg+RNq?= =?us-ascii?Q?5DmXacHDF5agn9/TBUP02lJMC59ukshT7vx80ECMSYpo6oY+14CRrXDC4H2t?= =?us-ascii?Q?pi5ZdviTZSZY189BskJmMcezkD+ovMDDL1ZjA1QhR6sCaG4R2fJNpvcPbiss?= =?us-ascii?Q?7SrTMPvGRDg/wId8hYFboQ6vHfdtIgPX/fEvMNhmYtzLumH7Br3PG4DUebo5?= =?us-ascii?Q?dX/J3OCvX9KcuRFETwNcJ4saWcTOVyRfwamwxf1nKxtuglncRdZqC7KS4IkF?= =?us-ascii?Q?cMrmIN84LHpCL4NmEaFpArcAcjX/IJsD6wCDHXSFWsnCtiWV3zCIRUKApVfr?= =?us-ascii?Q?e4j9Rmig3USPeXTQaSsdp3H5otlDi5skI/ZurMY0UoRaCbHBkP8Z17CV7VCN?= =?us-ascii?Q?tCjnIC7S/4NHFq17Dg5vLAbg4haJXCBi8/WRjPIgohRLnOhUqxpeAk1OWmg6?= =?us-ascii?Q?gnCWe+8sKZyV8dCxYaKvSY0bhyomttBUsrVONYErneI+Ro9dC8x98d3d72kv?= =?us-ascii?Q?q6g55keFLZbVlyy4WL4yz2+zj/TEH5j8uKFCKs/c4sg/fBPOnR2yS86Rrg4m?= =?us-ascii?Q?WOZNlARprMMZgwLhoB6ZBrm02U0hIxTRYD6lUf84gdo00vtaRPjJYBcCGVSP?= =?us-ascii?Q?96coMa753Ohc137ZfawE76psUJ6gaCkOfuypZ6WGvfn5u2i+bQ1XuKeJxDe0?= =?us-ascii?Q?xEoVF3Gpbtdqp/YtMOhlcNjN/DxlYWUSYrgPltBPBkEtoeVic0FavoF1zq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rN2piDY61fj6aIUaRbsyRVFSMYY7MDctThzek4K1v74vwiGMibjLgFaA0hMBw/mQjRaT6Dv+Y/4kVUv4VcQXgegwQhZ2kqUJLN5heVaBYy/7qyImaIKC8wjbtRdGUqfwD8RMUB7Y7AlFVyhmjsKzm94cDYwAW1SBTlFcqrQ==; 5:Yojzk5B0/7YMpjVqrgsHmT7ocb1mAyJdCoKc+kukQKBcVu0pY5vlHpkODLnouToex1eG53Hn2J7y4oOomPdrSzSZqz/Li2znxc5y4wh/Va4xU/eC5kMkHtjyX/py1cReRwZ0B3XRvC7ekFZWuQ7ylA==; 24:1RAi4sOL/DN8X81yWigwLq8xByKfEjZkOcKG8JOiHu3gXO/0PnWGVn6yajjiF/uWRGB6DhIJpW9pJg1rxrKG7LAFnw3dFcY+Oee95yQhYFY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1717; 7:8KUIZy5Dl2WUclA8aXYwZ+IB8ShZCRy4NNt4OQhsNJ63AD/O5qWAObaz13cUSkw9CFelfuwByDJcpzWZhd1oC3A087glDzXsdQH/yc+C6fmuPJZCBNZ0p9pwuNefk8f8s/ti8c5qZOyARF2Y/zszsRp6zrwWyEfIoANVsIudYqwxAhIgU38uQ7Urdj/G585yyOo+1YCe8Puq2PV0JR06Q98zps4nHLFa8tC7npe9rlIpsjdpklA0bHl7sRo5oLFbEhdDnR4NFL+RPqVbkOyW2RWWEEXo25VfOISSkc1QAECDAAe4ffunh+jWMpCHh4uI/hmfIr4ok801U3wYbnOpHceG/5ego9PyZouLtaoGVF5a8UNE+h6dar0ugknGS8Ae5wwhn9D8zVzapsCRP6N7Wjikg9uyR5XbABLGtS9Wp5FKOCvfrbaJK9IwbIAxK05rKuNj8Zqi7DVKVoN41zeDYGjkigY3SJm/IXAOyKnYSxsk6gsc3upo9DbFAzl3t5pe4yjLYG+gzHXU9CpXjIHDfw== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2017 14:43:54.6205 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0701MB1717 Subject: Re: [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: Wed, 08 Feb 2017 14:44:00 -0000 On Tue, Feb 07, 2017 at 12:34:37AM +0530, Nipun Gupta wrote: > 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 Acked-by: Jerin Jacob Applied to dpdk-next-eventdev/master. Thanks. > --- > 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 >