From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0081.outbound.protection.outlook.com [104.47.40.81]) by dpdk.org (Postfix) with ESMTP id 5BC3D2C3F for ; Fri, 31 Mar 2017 21:36:03 +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=+JcCpjkofva9UujaB7a46/oJm5mbETn5E9j+iRi2Czc=; b=H246avEKm/m4cNR463UZzl9hoDcy41H44BZONJ8IUTiG4uEFMj62MJlplHIFJpQHkxXL1msxmbx+cPHYtqY5RBDMlEb10MxsZbT9uBvCw3GKxgcEISW3j6URp7weX+EjA5afw8iD/ftwv4gAqiHXF68QmbYSOWSweQg/pM3uwWI= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost.localdomain (14.140.2.178) by BY1PR0701MB1723.namprd07.prod.outlook.com (10.162.111.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.991.14; Fri, 31 Mar 2017 19:35:58 +0000 From: Jerin Jacob To: dev@dpdk.org Cc: thomas.monjalon@6wind.com, bruce.richardson@intel.com, harry.van.haaren@intel.com, hemant.agrawal@nxp.com, gage.eads@intel.com, nipun.gupta@nxp.com, santosh.shukla@caviumnetworks.com, Jerin Jacob Date: Sat, 1 Apr 2017 01:04:33 +0530 Message-Id: <1490988905-12584-7-git-send-email-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1490988905-12584-1-git-send-email-jerin.jacob@caviumnetworks.com> References: <1488562101-6658-1-git-send-email-jerin.jacob@caviumnetworks.com> <1490988905-12584-1-git-send-email-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.140.2.178] X-ClientProxiedBy: MAXPR01CA0058.INDPRD01.PROD.OUTLOOK.COM (10.164.146.158) To BY1PR0701MB1723.namprd07.prod.outlook.com (10.162.111.142) X-MS-Office365-Filtering-Correlation-Id: e6310b78-1b97-41d9-36fc-08d4786d29c8 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BY1PR0701MB1723; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 3:XQI2y//H4MnvWIFWfi0p5ED2vEjBgvAykI9ULxe0emZ2dh+eIrySSjPWtMrLmfn+GexCpSQXxC/PEzIH2HURu7zuRtMbzstqIFtJnnszwOGTSBPb4O5ExKGC9dw+fwxWbqo1yLzvihrg8GuY3sYaP2TbhSw3J9BiM33FuwuCgJQtiIf293C2+8gjxo87Y5D7Uc4OAtBncuCelaGautwRDjgcpSl+KF29UtZxijTDnWiKsem3Xl1UVepyJ2Wh54NUjWdLSPSsUxHNlExp7KcpQKvK/pRLi8qs1LTlwLCpknbKBOE+eHXxOy6rdfTVerGRcEsDlnNm8GUetMYdba81aQ==; 25:pS2L6qG8L4XIkF+Y2dxVjs/rmBAONUJnd2/QSOTlJHr7VyUvxcq1nGh3jgA13m5xF3SS58t+miWkILmwaWtzONyw0da7YbDq4vjgX/1KU1w/hDYYXNdJM/lM5b2iFPtLFiChBHJjJEFGmLyLMpQ9T49UF7vgXee08tz/NlcLgUQw83L5jTSkezjp7gyHW1S6ahLIe+IQTXeUmgLAcNC4GxeLHDW3/36cY2Z401DKxD/j5jwEvmF+ClCHaEzXRvQ2tbhdi1PQrHCH8qeUgXq1+8K1g5i6skFmgfnFw+fV8dK/uQz1dJQzXiY1kfZ7DXOtYYw0tk+ktwObyz7beQZ9Af6teQS+3MAysQX7aX9vK5k5s9Qb327OZZJviMFM8gLdc+DWGCiA9zmy5dZheZPZQ9diLS8L4uff7/g9myGv9xG5oryvKcr4rv8+fmIj99XLYibroYagEUacE8h/ue0e0Q== X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 31:0VnKusFwT7so/O5anz7On3Kmrj/bAsOT3bPutgnCI/JcqdTuPkKqmO/1CrE4fkssSevCoUVjK6Hk+LWKN6Ko4CD0aqrdrXZ07wGUEkaEjtOCD95PXJRoCGbGeZDInT+ThcNzVEw+/9jM49F0Bdisp2Food6rQiokWd2gYWvWuk95Y+9afWNYjVf0zMYpm5eBvtOGlCB3pmI2b5olMRkRBrQyOgYYEP8J/K2awp+stPs=; 20:sZf43HzLgemugvMIeWWPYr/WCN5iDmWRqqskQpOVPw32wIHIKhjHlPc8ST8KttnogRYKHUOSN2sKcR9jYd9hjjcm02Li7q3IqhhoU7thowz/77gpNYuQokRKYf7SDl4BS+Ag+NXikyjM3Ua3gr7u8DcpnU8mDyzL0wwWXSf8MQG59tYk+KmFNvG38DBhkm95yqpIJ/JjDYshzt9bM2ubZwfTGOZ3U3Im2F71dSjncl5blEoILiLDPLggkFRNNct9wCL4CtVrJll66aDJeYEcgDw5oKIOL+Xvbegmp7QJUUJDnFhNm0D5ISBEc1bBYDqcZZaY+OCwdgFZTCLc4d+i4DitaWZhW4PT6T0LNVmzE4NbN1jfjr7yYvmhZ8IOHjwrLZrQdE4ADEj8+Wg4CGHHxibRukflbxQq2Yvf7ERmfHeniemq3a2OBxg5StqKFGgVIoycNVERUavAq2Q+87FuiKWjX6X1nJuJbza1LYgcTRnLYQFST0IotPGy34DYq8H6OnONWlN64KhnOcPFiqM+yuvNsLz91SXFzue3glI2NoL3QnN/qo2jyQWI/KXuY2Kp9veo01TXzMn96iIQzzuFhT1NRUIErYmUcHMnUA5X3PE= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(10201501046)(93006095)(3002001)(6041248)(20161123555025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(20161123560025)(20161123564025)(6072148); SRVR:BY1PR0701MB1723; BCL:0; PCL:0; RULEID:; SRVR:BY1PR0701MB1723; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 4:njgqqI8H3P0I+IyREktGU7GDigML/gDiRWH3T20ymxDEiUvPYehrRQ6pRv/+MU9mMEM85YQo+XoHnPe97TMH3ZDHxtE6M+SoScenwKvNneWZ6kGsmCGJXFR5FtT/SbdnNya5OYScfVoMUqr+8Uc+gH/jwl+MB64QMnse1mNNAAYSVzj2uJ0EIBPAKVJHs+ks75ingENwo6KOM5K/yulDk6siBavjYSb9VACIp1C3MBdTtA3TDdowXM8pQxWfGN1wefAK54tQSarSjKXYtRZIT7lSYVNoD7hYg9QrAlL1ixSjCS1MWCGhdp2Jn9tEn5wWUUPHvm7FVl1wxGOjATeL885EK37t82AJ6dTCLu9bW/jmHz1/k9GlMiu9pJCl202ZzoQavIOsZyWOAA0xk3Vd0dNLj62R2ZT4u/5Y5/oRnWc0lvTIc9Ef+rYlzLplZ9ihhhYf/DrgeSa3mA80I+PuLUKhvn27FUd4harCvlWQpwifM0sR+cjd8Ix6nQnDVzRZaXSJba8iXeuxr2Iyd6SIdjYiF3SwSa/GCIW6c1/BIIOrEl39hiIOtGqDxomBOMmRunjlGtmE1zY0FPsuV6DpnjTHOLgn5SKIzrywe7tbj5uE3MlDv1dBYVtO6NM1BD2eL0PE10UE4CF5Rn1B9U0WScajFQpbyr+iX6drq7BNBPkoLECJ9/uUEmdalAuMKu2H/f+2iUYXxQbN7DB7RyLqj2gUdvM72DdsG/0yoT5xFmLTJuQ++lN7RbxB+hDDVQ7o X-Forefront-PRVS: 02638D901B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(39450400003)(39410400002)(39400400002)(39850400002)(39840400002)(38730400002)(8676002)(107886003)(110136004)(50466002)(189998001)(305945005)(6506006)(36756003)(50226002)(25786009)(48376002)(6666003)(8656002)(6486002)(7736002)(2950100002)(5660300001)(53936002)(81156014)(81166006)(3846002)(42882006)(6916009)(6116002)(6512007)(42186005)(33646002)(2361001)(2351001)(76176999)(50986999)(5003940100001)(47776003)(2906002)(5009440100003)(4326008)(66066001)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR0701MB1723; H:localhost.localdomain; FPR:; SPF:None; MLV:nov; PTR:InfoNoRecords; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY1PR0701MB1723; 23:13nBebfuB0Dy3COqaKSlABNHqz7QsR7pJfryRki?= =?us-ascii?Q?sAv20w5UDO1KlXupRNaB/jNHj1dTM88Jf8dUFWkP6bmI89AJ1slGeXm4obqj?= =?us-ascii?Q?bN67gSqEaPLB/lxOaGc1c8vp2WBrb0x4MLMFFyt1EqgVUwISlvt2qrGR+BIc?= =?us-ascii?Q?D6bl92t8cj/Cw5pthtgM+cJ8BSq2Imd+E56pCh6N3VdOj+sBkuk7nM7YiePg?= =?us-ascii?Q?gdZyyS6lzBtAqNUa8cpxrLwYoJu95ROe+i5ZylRv4fsyS08yZDzPLmGceEg7?= =?us-ascii?Q?QBmL6Kc7ZmyxzYaUZ6FjCnbtdVmmPK3YJb1UMtnOwrdETzvD7AoHdTfH9cBA?= =?us-ascii?Q?pqIdlurLNPKtv5N1vI69EzW43eih8HKEKJ+QkEmvbPuvIiBwKmX440++ScI5?= =?us-ascii?Q?5vu4ULQzIVAkyI8juJHc86crm4oOiWmX26nZVhRdbOW8dGISP4k92M0C11nZ?= =?us-ascii?Q?HDmEUjiopG7VOfbvY0EYOUY4hVZPOk7tbXl0aByV7vf0E/OQADmdaLe+HxKm?= =?us-ascii?Q?zkRRzGLagU9eMT7j+QwDkme1iDOVJNSlxGFx4CW0aJoTwvVTRr1QasfpibXj?= =?us-ascii?Q?hAAzVqBSB6YlWx4ZwPa2xN9nKxQ5o5yRWstPQnBSG9iseDXY5DEfCkEEaWHI?= =?us-ascii?Q?o1f1c6s4gsIK7W5z63sQnJteeFadtPed0CWST/grHp2JXHBhjk8LgSEqYAXZ?= =?us-ascii?Q?usxmnVz1Ds4f1IgLvQZULTIWPLTaLAAKgf+NI0r7ueseVrxnbcyR0DIaliR9?= =?us-ascii?Q?0QT6x/kDYHfX9SSRkMTg1kAmhECMp12/Rfnc0uI+kYA14HA6PRArjg/+3ees?= =?us-ascii?Q?g/rnNtHKhhGh/0eTo8zC7uNalB8jIhX1xs6r3k+JRvcdsOGz39j6Pnl/qlGM?= =?us-ascii?Q?2tAqUpEc8Aa/l7EBEuRaR6FQmNgTUs7u46SYrMWZC7LZ/8/WQCGvqnLnXvgj?= =?us-ascii?Q?AkJ5adbFCxNMGyvasn3OJ+xv4zKZjma9vI9dOSkn8AgkuVTMiKcbDXjtkh7n?= =?us-ascii?Q?lUmZi7nzKejyGWNa2b2jihLPbvnroZRNB0csF7NznV/JdH6zOgyAYdULDqH7?= =?us-ascii?Q?yNRVuBSXoefXwvfe/rVPoqsmx6uU1ERHNNTCOJEln2BYF2aaji9mUSScU2Yv?= =?us-ascii?Q?5sFrptKRd2yYCDdf1YLoj5PpjJOjyc6sxyvBjiA0HQV2XiWPEQvvEiXearKJ?= =?us-ascii?Q?ILnE4rB10jM7KUow=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 6:k6xEm+LK1OzuJeCaGf8OnM/i9+BUH9gqnIQxt7EA3XFL+CHOPueP6Qd/2nluaR7vWOocKlxrrE94sGDKudbX8pCIcnQYUC063lzK0xAPOoN4MvuHUyONuVJ7jK865TL6+6sOUnbu81eLTelljfWwM+uEsn79OvJTx/nV9ghyXF3/g2kx8Z88XlKqfRHcIn7DlyPQFNLlncVQmN3J+cwg/JzJID6/cFkaDlEAJVDt745SoPbAXz5Hon+qIFufQBfWGg/cp06YQeEQVxKRkXj+DZs4JOR58XV1zWq3y4Tm7W2MynoXXuoV02AH0sneV8OcAMmTiOJ18tVgxf/aUkZ8Wm1UEEirNtVyXzhD55ZWUCTRqu/zSNZuxiAvba4zwmyw4mDjAxcCK+i4zppmBOv6cQ==; 5:e8yAYu5oymrb9QK/MFFPBCRUXnKcHBgdqpInyK3iFpD2JU5UUbg6ggL6aFcmnbCu9RgZTrWf1afB5ChHprjbzdapsLZ63VW7ibS62layeN1tS5/YnCOFBnCiAwGTNh4cu++iwUmwriBbBMt9PaMIV0btaShrIyiE0Havvf22th8=; 24:bpkQqDUHrKuJvyo83KxtqmoVA/u81A+1C+9OX0DM6AnaFdf2lrzJoTKohbkF41YfH3IPE7Q7ezR5vOhw/4HL4Zm/yzJ6V1ldwaBqfqmldA8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 7:A0oxlAEfBYznVqt0SORFWz6L9l1N7lGpjhNoR/IVHes0G1fyahneRNT2Wm7dGIC6HwRIU+i6B8D8nIOemvZtEgka9if7e14JSsyIGuRqyAMBZDRrwqfxl98HwZfgPpOMdaa2O3RN+MWjTRiDInUlDuvyB+tBOb4nLlXMxaZjZ/LVjGgE5OP+N02JaUvkydTEwJmM4v4iQopQ0W/20GgNgZ/muTRNfhUpblKBY9LV7TU1YoyEMuBI9vdxm+XPC041cHD2SMMPqUbunwujjmQtygNf97zER/abUyMRvpui9OZzCqOSv+rpIKutDRNMY9Ui5Ir2W6y+HyDELURWQeHoWw== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2017 19:35:58.0588 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1723 Subject: [dpdk-dev] [PATCH v2 06/38] event/octeontx: add octeontx eventdev driver 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, 31 Mar 2017 19:36:04 -0000 This adds the minimal changes to allow a octeontx eventdev implementation to be compiled, linked and created at run time. The eventdev does nothing, but can be created via vdev on command line, e.g. sudo ./build/app/test -c 0xff00 --vdev=event_octeontx ... Initializing event_octeontx domain=4 max_queues=64 max_ports=32 RTE>> Signed-off-by: Jerin Jacob Signed-off-by: Santosh Shukla Acked-by: Gage Eads --- drivers/event/octeontx/Makefile | 1 + drivers/event/octeontx/ssovf_evdev.c | 148 +++++++++++++++++++++++++++++++++++ drivers/event/octeontx/ssovf_evdev.h | 23 ++++++ 3 files changed, 172 insertions(+) create mode 100644 drivers/event/octeontx/ssovf_evdev.c diff --git a/drivers/event/octeontx/Makefile b/drivers/event/octeontx/Makefile index 3076b85..6e8227b 100644 --- a/drivers/event/octeontx/Makefile +++ b/drivers/event/octeontx/Makefile @@ -46,6 +46,7 @@ LIBABIVER := 1 # # all source are stored in SRCS-y # +SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF) += ssovf_evdev.c SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF) += ssovf_probe.c SRCS-$(CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF) += ssovf_mbox.c diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c new file mode 100644 index 0000000..b349adc --- /dev/null +++ b/drivers/event/octeontx/ssovf_evdev.c @@ -0,0 +1,148 @@ +/* + * BSD LICENSE + * + * Copyright (C) Cavium networks Ltd. 2017. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Cavium networks nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "ssovf_evdev.h" + +/* SSOPF Mailbox messages */ + +struct ssovf_mbox_dev_info { + uint64_t min_deq_timeout_ns; + uint64_t max_deq_timeout_ns; + uint32_t max_num_events; +}; + +static int +ssovf_mbox_dev_info(struct ssovf_mbox_dev_info *info) +{ + struct octeontx_mbox_hdr hdr = {0}; + uint16_t len = sizeof(struct ssovf_mbox_dev_info); + + hdr.coproc = SSO_COPROC; + hdr.msg = SSO_GET_DEV_INFO; + hdr.vfid = 0; + + memset(info, 0, len); + return octeontx_ssovf_mbox_send(&hdr, NULL, 0, info, len); +} + +static int +ssovf_vdev_probe(const char *name, const char *params) +{ + struct octeontx_ssovf_info oinfo; + struct ssovf_mbox_dev_info info; + struct ssovf_evdev *edev; + struct rte_eventdev *eventdev; + static int ssovf_init_once; + int ret; + + RTE_SET_USED(params); + + /* More than one instance is not supported */ + if (ssovf_init_once) { + ssovf_log_err("Request to create >1 %s instance", name); + return -EINVAL; + } + + eventdev = rte_event_pmd_vdev_init(name, sizeof(struct ssovf_evdev), + rte_socket_id()); + if (eventdev == NULL) { + ssovf_log_err("Failed to create eventdev vdev %s", name); + return -ENOMEM; + } + eventdev->dev_ops = NULL; + + /* For secondary processes, the primary has done all the work */ + if (rte_eal_process_type() != RTE_PROC_PRIMARY) + return 0; + + ret = octeontx_ssovf_info(&oinfo); + if (ret) { + ssovf_log_err("Failed to probe and validate ssovfs %d", ret); + return ret; + } + + edev = ssovf_pmd_priv(eventdev); + edev->max_event_ports = oinfo.total_ssowvfs; + edev->max_event_queues = oinfo.total_ssovfs; + edev->is_timeout_deq = 0; + + ret = ssovf_mbox_dev_info(&info); + if (ret < 0 || ret != sizeof(struct ssovf_mbox_dev_info)) { + ssovf_log_err("Failed to get mbox devinfo %d", ret); + return ret; + } + + edev->min_deq_timeout_ns = info.min_deq_timeout_ns; + edev->max_deq_timeout_ns = info.max_deq_timeout_ns; + edev->max_num_events = info.max_num_events; + ssovf_log_dbg("min_deq_tmo=%"PRId64" max_deq_tmo=%"PRId64" max_evts=%d", + info.min_deq_timeout_ns, info.max_deq_timeout_ns, + info.max_num_events); + + if (!edev->max_event_ports || !edev->max_event_queues) { + ssovf_log_err("Not enough eventdev resource queues=%d ports=%d", + edev->max_event_queues, edev->max_event_ports); + return -ENODEV; + } + + ssovf_log_info("Initializing %s domain=%d max_queues=%d max_ports=%d\n", + name, oinfo.domain, edev->max_event_queues, + edev->max_event_ports); + + ssovf_init_once = 1; + return 0; +} + +static int +ssovf_vdev_remove(const char *name) +{ + ssovf_log_info("Closing %s\n", name); + return rte_event_pmd_vdev_uninit(name); +} + +static struct rte_vdev_driver vdev_ssovf_pmd = { + .probe = ssovf_vdev_probe, + .remove = ssovf_vdev_remove +}; + +RTE_PMD_REGISTER_VDEV(EVENTDEV_NAME_OCTEONTX_PMD, vdev_ssovf_pmd); diff --git a/drivers/event/octeontx/ssovf_evdev.h b/drivers/event/octeontx/ssovf_evdev.h index c2b8187..b8b89a7 100644 --- a/drivers/event/octeontx/ssovf_evdev.h +++ b/drivers/event/octeontx/ssovf_evdev.h @@ -34,6 +34,7 @@ #define __SSOVF_EVDEV_H__ #include +#include #include #include "rte_pmd_octeontx_ssovf.h" @@ -108,4 +109,26 @@ #define SSOW_BAR4_LEN (64 * 1024) +/* Mailbox message constants */ +#define SSO_COPROC 0x2 + +#define SSO_GETDOMAINCFG 0x1 +#define SSO_IDENTIFY 0x2 +#define SSO_GET_DEV_INFO 0x3 + +struct ssovf_evdev { + uint8_t max_event_queues; + uint8_t max_event_ports; + uint8_t is_timeout_deq; + uint32_t min_deq_timeout_ns; + uint32_t max_deq_timeout_ns; + int32_t max_num_events; +} __rte_cache_aligned; + +static inline struct ssovf_evdev * +ssovf_pmd_priv(const struct rte_eventdev *eventdev) +{ + return eventdev->data->dev_private; +} + #endif /* __SSOVF_EVDEV_H__ */ -- 2.5.5