From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0052.outbound.protection.outlook.com [104.47.42.52]) by dpdk.org (Postfix) with ESMTP id 78B82F949 for ; Thu, 2 Mar 2017 12:38:30 +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=Ic3YuwRDJADUmtC4jEvYGvzkqglm/40ii2n+bC2atPg=; b=CYkqDaJPryjPgxJZXtgHcfrnGPovLmZzmyo6a3SR7ZjV8AVDj8U23kk6+VDACAE2QlBT7BELBpZPBEDM+NXK8BUzpUBJPonGqoeEoLme51YwWIhCwGJcFQ0Cm3G0qCFGdrF+fmb8yOHj5PPpcsrnWSpwsvsCU4JbEzAIkM2A6MA= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=caviumnetworks.com; Received: from lio357.in.caveonetworks.com (14.140.2.178) by CY1PR07MB2277.namprd07.prod.outlook.com (10.164.112.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.947.12; Thu, 2 Mar 2017 11:38:26 +0000 From: Shijith Thotton To: ferruh.yigit@intel.com Cc: dev@dpdk.org, Jerin Jacob , Derek Chickles , Venkat Koppula , Srisivasubramanian S , Mallesham Jatharakonda Date: Thu, 2 Mar 2017 17:02:16 +0530 Message-Id: <1488454371-3342-12-git-send-email-shijith.thotton@caviumnetworks.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1488454371-3342-1-git-send-email-shijith.thotton@caviumnetworks.com> References: <1487669225-30091-1-git-send-email-shijith.thotton@caviumnetworks.com> <1488454371-3342-1-git-send-email-shijith.thotton@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.140.2.178] X-ClientProxiedBy: BM1PR01CA0021.INDPRD01.PROD.OUTLOOK.COM (10.163.198.156) To CY1PR07MB2277.namprd07.prod.outlook.com (10.164.112.155) X-MS-Office365-Filtering-Correlation-Id: 31db400e-efe1-4562-7e49-08d46160a59a X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:CY1PR07MB2277; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2277; 3:jETB7AIYfyfwYIz3bt64PhD9FinDZZ/TukkJC7zFQ9i76bjzyEnFmIImrpJLr5U+gLHB6fPcuhvSNLaYitUMXPBDvi6+IsBjn3u6ivX1ez4/gY1xOwTwaAAjNPwYsol80bru53pAeW693KrFPx0rWwtavJfP17H0NOIhAnmCVZ8aeahq+rQ9xAfDcfxRlYibJvh3aLpMvoXzuR6SAyNcJcVqJd6j+636aprn64D9PN193x2u3LRkDDAPgLLzL5d2OJm6EeH8KZhSU94AbtERXg==; 25:w3b96HngWKkwPFITtG/cSc9TiVclkxThTHBcuaVeqRjlEsN5paXcNLRAeCX/N23cQv/QbpCXDnzAq3UFUkOXYvYeW6+pSwKSSwJ9rbOr7Q/qdASk3FGL6NlpvWqvvj+w8mL61/fWnI4IGkE3RJf3aHGP5T4A/qyiXP1sEZzE/BWHi8Qup9fvZQZ3psy3C3mHVNrI5NjgP7QAlitZBQWp7UrYuOY1I0wfillgQumn6FJsSHgLd45gvUyeyNr6kkYoLwFcLniSV44UFAiZyHAEZmKfYi1Nn4n24DLt82YkPpQakAXZ2rU9WwsR+BrOzVcKn7YWdTWr1/qUlu7oupOMSvr4qfYiApJU6WB5afxagJnGdeOwB1dE5Z5ZpZ2lEBocUJvESZU8dthZG4qFhZ3Mtgb2widIyU78znhW68Uk+w0/iif4p4fiC8ORO6dv3jBL8mEXKGEGPnIfGtceSNpMlQ== X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2277; 31:1opsd/eGInEtfw6eeUjnwkRw2MtYsWB39pvyEVxmeT6Jbh/DJStwXUs1OjA434Uq20iaownJj6k3ENPKrYfgbe+//eyrd3RKgvoN8YHqV9QHZIQq01+Q6uJVsciSK3keRTYrDKHOdhyePppRmIFUyZzDe52ZqDVxgrug2emkfUDSwkrS1cftqqbSEYL6ULAhJSE+097RIvvH2B5zGzAFRwLDy2/4nNGKvhCBYS5+hdI=; 20:ca7a7T+bLu7BPS7XyBr20Tc859yr4NHnS8cAl9GwkRcy/OcFNcpDioCM54pEe8t6UtVPffEZ+yNNxBhnbWzSDaEiu5sThnPLaWhVOYuuHj9nkP1rzzN+g2LIZ+66kI2unykAzcbgx/EjVzb0b+S18yD+aeqonMAn1dEfZgtYCG1SzFAKuCIdw2f4T/5koxgGUwCEeaLjRyiIdZ5oYsTHS4SlZmS/fDvWF8PieZOXvS1sb5jYKX+ms7qUUJ3XiZLJJylolpiKbWPxKvk2DebUHvd40vxcKNTx+KxA5cQ3bJWgIx+DleaurciIzuKg1Wcl3PZaYgseIJP7/SjxMbGrfqmYObqbUYDOGn3AV7UOaIcEllNxtvmTvxU7A11IyYb/7opKi/d9VEv7BVtnomd26S5+uAbdoL32ywLcyRTk6wp1voBD2oJqTPZ5i2GoFLy5COmV+Ayaq1FsepQZXvPMhzJzJ4ps+pFnVpYKzQ3e8KfDneot42sleTeQ8zjuA5tCCtfBOvSeJPJlFNdx0otWJQKMYcTDHriWSee9unMjpzZsmAZezBulIS9urJLKN3M5n6EsHxlvt4mMHl7Vi2CaJIW6gxmi1HChDjZq5M27zMI= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6041248)(20161123558025)(20161123555025)(20161123560025)(20161123564025)(20161123562025)(6072148); SRVR:CY1PR07MB2277; BCL:0; PCL:0; RULEID:; SRVR:CY1PR07MB2277; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2277; 4:iL6SQhC0yFkef2r3+3/l3Fx3I2R3Ai+ba1tAEHVNOlzQK0TRyd+7+SOUN5MO3O84irtf6f/i/aGY3/HO9wQqt2f9CSoBGvsLA6o4DtdYJQV5A//vELNKhwcYH1bzRY7eTCsdOi0TKqpOgUN1OmNaM4bwOUXR+71LwM8QnYF1SR4pE1NwnZOendyzbE5opQGQy85groNXm19/H/6ChNsFRAZUEx/gttWxGFouS9kcsvLX38D+QNv5Igru9oWNoLPticMGSWAZgNznEIdGLGIJgd/JG5TMtiujqD+KW/z3yLZfgE/lCgCjVKVnmBeZk4Tz4DxJH6nKXL6GtFbtfCUE/FF2OLxexcPbCPo8LnQykqTL2VsHk6vSEPL6qhAPbsWCK576D+p01uOUiyP5eIykIrg7Dvfaq1UlSXj1m/ggBKqepfObnKMmd9iLh5bAWv2wQAld9NsN+h2wZGA1fSwTGOHP50yeI6r3OgVRKPGXGJPyu7gD+/hBjNceE5LpExGqbYEjBOfYLsqqAL0iOQNcBhJMDKwztXpXk8X03o3FVKHKgpERiOhcrRmUjQMOR8BSalH3xlDGdZC8CmhmW8bgvC94Sto+SZFyoasemlDQ3qk= X-Forefront-PRVS: 023495660C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(39450400003)(2950100002)(6916009)(42882006)(575784001)(5660300001)(92566002)(4720700003)(33646002)(48376002)(50226002)(6666003)(2906002)(5003940100001)(36756003)(8676002)(50466002)(81166006)(110136004)(38730400002)(4326008)(305945005)(2361001)(53936002)(2351001)(25786008)(6512007)(189998001)(54906002)(47776003)(6506006)(6486002)(66066001)(6116002)(3846002)(50986999)(76176999)(5009440100003)(42186005)(7736002)(7099028)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR07MB2277; H:lio357.in.caveonetworks.com; FPR:; SPF:None; MLV:nov; PTR:InfoNoRecords; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR07MB2277; 23:3lI9PNFrBKQIX0LYuaoaSrUPVVL46O8WMaFHRh2Cf?= =?us-ascii?Q?MuxVUiV9qFjL0iFHYAXUxlXkUX7UmjBKVHvfnunr6/U43dL3ZejWSzzr7KJQ?= =?us-ascii?Q?/2qqmFJ7JAXRHv2gySNyrQo39Td6VhrjyOB1GAuUO5ITp90ADufpoS7o591x?= =?us-ascii?Q?Xf7bHj8u0K9GuV6OrUZkdk2r5mdyjS229C70MivLMvHJwpxUCD5dFIXNE1g6?= =?us-ascii?Q?vCFmrcjE8DkN90QQcS2z8gWwAnQWSpS/cl1/C5romoCscuV3eJ1EBBxZlwUb?= =?us-ascii?Q?nwmDU1UAvsRQreqEBLx3AwFQtlbzFIvH4DU+KbJmEiTfXGog3qNJHjFP06bh?= =?us-ascii?Q?9xpmvxommuTYMoiIHhypauTqLykG2SU4ALsnVRMnYZoUtdf8Jruh9LoWhmhK?= =?us-ascii?Q?XrYblzvopgR61159+NqceToJCSrzosgp1Bsr8Cxex3pYfai5pRZ1yx8JDV8q?= =?us-ascii?Q?iAxBwLW/u0Mvvgj5y3guBMYhdl4LBcYt9VGjHjdBJhTdkHquDMMgEZwIGyF+?= =?us-ascii?Q?YB6z5wtMTa8A/STsqhFBC5UaeboZhJ3ud0XldfR6ggcjEx0tyuAuHJuRZzzW?= =?us-ascii?Q?U3+vVhC0H132UX/K0Hxb0Cl9cKbNxMTCaCvrYr2VLK4Jk2d52fyfklYWWSUt?= =?us-ascii?Q?tg/q29bMfolpCPwjhCbtYe5+f/jtkjQSZuVxSSalBWAfobQsiVuRBWLBU/BY?= =?us-ascii?Q?g1brAsxdI6UKuS6MC8XWo46d52cY0S7jXCC+CsLfPXDl5BJA8IM9PwsPkCC8?= =?us-ascii?Q?T9DyLzGsyoShbDFZemaEaVPJ5Vn/es2gdcSWwSSmSWZHgcaKZzJtzZOCWo1V?= =?us-ascii?Q?N+mCtdvsOmTXVpWVTxLpuOgdYIaieYQu52qm3CGwb9TGpn8BtKokjmO4S0Su?= =?us-ascii?Q?/hkYClSDaT/cuY1l9xCnhPid8IZ+Ps9bvbu5Q1DvYz6ivrSk32v2+8MuKMuq?= =?us-ascii?Q?97vqoQz2FCWFcLMn8Way43OfDBNEleyQ00HOK2E7bT6lzYmO4eg8YFEV10ew?= =?us-ascii?Q?UMGZ8o5ORPoAoR6KcW39m2RzIogX1DzHIH0TtImeTPqSOSAlL1S8c0DSd5ts?= =?us-ascii?Q?JuiwL9pA6iS8SnJw0dETRsMQlFpZXcBSLm4ySYZ5d6iyFM9fww17+Iyka5p/?= =?us-ascii?Q?ntKS3MASQw=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2277; 6:sqxBHsoLBlMQ4teDp25bjgm73meO30DO2y0Il3AJbrxU31ap5arBERtEtScFjlasNkISbaT+BYIwkCSdlgBru8MMmCAZpqiuYW52g2o86hA/Pqucofm+zQ6BI895IWqOxfZXJcMHQRoj+J3ODCrdaBayKkIN5amNh4Jsm7cVf7pcQII1MZo+4l8wohreSJbnCELHk03UdKyt4fciNlAf5X7wZ2YxX1ZNS/R8StUAvaAZsnWWfezpXtBrgJ3tJfr+dW2KMqcEgeMe00q2jcK3JO1TfWYScbX3GXiO5Z1hJCt8pWIjL5XB3RLyJSYVGKmaXyFa6glgSbAIi83nzgTynoGJhOFZzYayN2cMMydnetHFparUz3nO/6Oa+GJizB0yBj7Kkd+IypehdsvOsRrvzA==; 5:ebO73KluR6BGHFae3IeySW+aryQBMD2FiiDZTMD9wf/XtH5QfLtovh5kVEPt8bunAeHkFHeDvfUKD96w0NvJGemvPEB7oytvcTaPFf7yNEywS1kmUQ86CoLkUkByb124CLeWWxGfydhc536Z3J3etA==; 24:SaknU7vvKYs+rfffzycLwZFG4hrLxPlEpons1nHv7DFa+Qb2179SwX/Ztqz8QEAle/NWb2gnA/9tEYGzwNMLt9R90JKnKCdQtfMhaV3hpNM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2277; 7:Vt7h+5D+hT1BbVwtyrKZq5KKe3GmnRFmDIdvZaaPw5LNdEDddW5zfl8vZdB3CWa3RruMMQuOyMTjK1CKH7wxzEHz45PVKoawF7JR9XwW9F1U6v7jKwB3PgzE+ppf2DLfzmr6cDImVjROPM5njSKLiParAm5765Fd8IqXEzrFM9fjSndWvf8mDQCcVGTYdBS7GCpVjALQglavz7Qz608RYcutN18IKfszpHPNwDKSQNus/P8AJ7izFhaubtxtPgQHrwpHnM1iGZpxXDUJnptroOK0GD1228B15oQqEqq59UVVP+wg7OQV+zxZky2KNNl4J36b5yqQWVxIDRaRNj4WQw== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Mar 2017 11:38:26.4827 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2277 Subject: [dpdk-dev] [PATCH v2 11/46] net/liquidio: add API for PF VF handshake 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: Thu, 02 Mar 2017 11:38:31 -0000 Handshake with PF kernel driver to check driver version compatibility. Signed-off-by: Shijith Thotton Signed-off-by: Jerin Jacob Signed-off-by: Derek Chickles Signed-off-by: Venkat Koppula Signed-off-by: Srisivasubramanian S Signed-off-by: Mallesham Jatharakonda --- drivers/net/liquidio/base/lio_23xx_vf.c | 96 +++++++++++++++++++++++++++++++++ drivers/net/liquidio/base/lio_23xx_vf.h | 4 ++ drivers/net/liquidio/base/lio_hw_defs.h | 3 ++ drivers/net/liquidio/base/lio_mbox.h | 1 + drivers/net/liquidio/lio_ethdev.c | 21 ++++++++ drivers/net/liquidio/lio_struct.h | 45 ++++++++++++++++ 6 files changed, 170 insertions(+) diff --git a/drivers/net/liquidio/base/lio_23xx_vf.c b/drivers/net/liquidio/base/lio_23xx_vf.c index 70faa9b..6270af5 100644 --- a/drivers/net/liquidio/base/lio_23xx_vf.c +++ b/drivers/net/liquidio/base/lio_23xx_vf.c @@ -255,6 +255,102 @@ return 0; } +static void +cn23xx_pfvf_hs_callback(struct lio_device *lio_dev, + struct lio_mbox_cmd *cmd, void *arg) +{ + uint32_t major = 0; + + PMD_INIT_FUNC_TRACE(); + + rte_memcpy((uint8_t *)&lio_dev->pfvf_hsword, cmd->msg.s.params, 6); + if (cmd->recv_len > 1) { + struct lio_version *lio_ver = (struct lio_version *)cmd->data; + + major = lio_ver->major; + major = major << 16; + } + + rte_atomic64_set((rte_atomic64_t *)arg, major | 1); +} + +int +cn23xx_pfvf_handshake(struct lio_device *lio_dev) +{ + struct lio_mbox_cmd mbox_cmd; + struct lio_version *lio_ver = (struct lio_version *)&mbox_cmd.data[0]; + rte_atomic64_t status; + uint32_t count = 0; + uint32_t pfmajor; + uint32_t vfmajor; + uint32_t ret; + + PMD_INIT_FUNC_TRACE(); + + /* Sending VF_ACTIVE indication to the PF driver */ + lio_dev_dbg(lio_dev, "requesting info from PF\n"); + + mbox_cmd.msg.mbox_msg64 = 0; + mbox_cmd.msg.s.type = LIO_MBOX_REQUEST; + mbox_cmd.msg.s.resp_needed = 1; + mbox_cmd.msg.s.cmd = LIO_VF_ACTIVE; + mbox_cmd.msg.s.len = 2; + mbox_cmd.data[0] = 0; + lio_ver->major = LIO_BASE_MAJOR_VERSION; + lio_ver->minor = LIO_BASE_MINOR_VERSION; + lio_ver->micro = LIO_BASE_MICRO_VERSION; + mbox_cmd.q_no = 0; + mbox_cmd.recv_len = 0; + mbox_cmd.recv_status = 0; + mbox_cmd.fn = (lio_mbox_callback)cn23xx_pfvf_hs_callback; + mbox_cmd.fn_arg = (void *)&status; + + if (lio_mbox_write(lio_dev, &mbox_cmd)) { + lio_dev_err(lio_dev, "Write to mailbox failed\n"); + return -1; + } + + rte_atomic64_set(&status, 0); + + do { + rte_delay_ms(1); + } while ((rte_atomic64_read(&status) == 0) && (count++ < 10000)); + + ret = rte_atomic64_read(&status); + if (ret == 0) { + lio_dev_err(lio_dev, "cn23xx_pfvf_handshake timeout\n"); + return -1; + } + + vfmajor = LIO_BASE_MAJOR_VERSION; + pfmajor = ret >> 16; + if (pfmajor != vfmajor) { + lio_dev_err(lio_dev, + "VF LiquidIO driver (major version %d) is not compatible with LiquidIO PF driver (major version %d)\n", + vfmajor, pfmajor); + ret = -EPERM; + } else { + lio_dev_dbg(lio_dev, + "VF LiquidIO driver (major version %d), LiquidIO PF driver (major version %d)\n", + vfmajor, pfmajor); + ret = 0; + } + + return ret; +} + +void +cn23xx_vf_handle_mbox(struct lio_device *lio_dev) +{ + uint64_t mbox_int_val; + + /* read and clear by writing 1 */ + mbox_int_val = rte_read64(lio_dev->mbox[0]->mbox_int_reg); + rte_write64(mbox_int_val, lio_dev->mbox[0]->mbox_int_reg); + if (lio_mbox_read(lio_dev->mbox[0])) + lio_mbox_process_message(lio_dev->mbox[0]); +} + int cn23xx_vf_setup_device(struct lio_device *lio_dev) { diff --git a/drivers/net/liquidio/base/lio_23xx_vf.h b/drivers/net/liquidio/base/lio_23xx_vf.h index 1af09d0..83dc053 100644 --- a/drivers/net/liquidio/base/lio_23xx_vf.h +++ b/drivers/net/liquidio/base/lio_23xx_vf.h @@ -87,5 +87,9 @@ #define CN23XX_VF_BUSY_READING_REG_LOOP_COUNT 100000 +int cn23xx_pfvf_handshake(struct lio_device *lio_dev); + int cn23xx_vf_setup_device(struct lio_device *lio_dev); + +void cn23xx_vf_handle_mbox(struct lio_device *lio_dev); #endif /* _LIO_23XX_VF_H_ */ diff --git a/drivers/net/liquidio/base/lio_hw_defs.h b/drivers/net/liquidio/base/lio_hw_defs.h index a2654cd..9282068 100644 --- a/drivers/net/liquidio/base/lio_hw_defs.h +++ b/drivers/net/liquidio/base/lio_hw_defs.h @@ -77,6 +77,9 @@ enum lio_card_type { #define LIO_23XX_NAME "23xx" #define LIO_DEVICE_NAME_LEN 32 +#define LIO_BASE_MAJOR_VERSION 1 +#define LIO_BASE_MINOR_VERSION 5 +#define LIO_BASE_MICRO_VERSION 1 /* Routines for reading and writing CSRs */ #ifdef RTE_LIBRTE_LIO_DEBUG_REGS diff --git a/drivers/net/liquidio/base/lio_mbox.h b/drivers/net/liquidio/base/lio_mbox.h index 28c9e1a..f1c5b8e 100644 --- a/drivers/net/liquidio/base/lio_mbox.h +++ b/drivers/net/liquidio/base/lio_mbox.h @@ -42,6 +42,7 @@ #define LIO_MBOX_DATA_MAX 32 +#define LIO_VF_ACTIVE 0x1 #define LIO_CORES_CRASHED 0x3 /* Macro for Read acknowledgment */ diff --git a/drivers/net/liquidio/lio_ethdev.c b/drivers/net/liquidio/lio_ethdev.c index 5ee1bb5..bebe0e8 100644 --- a/drivers/net/liquidio/lio_ethdev.c +++ b/drivers/net/liquidio/lio_ethdev.c @@ -40,6 +40,20 @@ #include "lio_23xx_vf.h" #include "lio_ethdev.h" +static void +lio_check_pf_hs_response(void *lio_dev) +{ + struct lio_device *dev = lio_dev; + + /* check till response arrives */ + if (dev->pfvf_hsword.coproc_tics_per_us) + return; + + cn23xx_vf_handle_mbox(dev); + + rte_eal_alarm_set(1, lio_check_pf_hs_response, lio_dev); +} + /** * \brief Identify the LIO device and to map the BAR address space * @param lio_dev lio device @@ -91,6 +105,13 @@ goto error; } + /* Check PF response */ + lio_check_pf_hs_response((void *)lio_dev); + + /* Do handshake and exit if incompatible PF driver */ + if (cn23xx_pfvf_handshake(lio_dev)) + goto error; + if (cn23xx_vf_set_io_queues_off(lio_dev)) { lio_dev_err(lio_dev, "Setting io queues off failed\n"); goto error; diff --git a/drivers/net/liquidio/lio_struct.h b/drivers/net/liquidio/lio_struct.h index 01b5716..e8b6e1d 100644 --- a/drivers/net/liquidio/lio_struct.h +++ b/drivers/net/liquidio/lio_struct.h @@ -43,6 +43,13 @@ #include "lio_hw_defs.h" +struct lio_version { + uint16_t major; + uint16_t minor; + uint16_t micro; + uint16_t reserved; +}; + struct lio_device; struct lio_fn_list { int (*setup_mbox)(struct lio_device *); @@ -51,6 +58,42 @@ struct lio_fn_list { int (*setup_device_regs)(struct lio_device *); }; +struct lio_pf_vf_hs_word { +#if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN + /** PKIND value assigned for the DPI interface */ + uint64_t pkind : 8; + + /** OCTEON core clock multiplier */ + uint64_t core_tics_per_us : 16; + + /** OCTEON coprocessor clock multiplier */ + uint64_t coproc_tics_per_us : 16; + + /** app that currently running on OCTEON */ + uint64_t app_mode : 8; + + /** RESERVED */ + uint64_t reserved : 16; + +#elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN + + /** RESERVED */ + uint64_t reserved : 16; + + /** app that currently running on OCTEON */ + uint64_t app_mode : 8; + + /** OCTEON coprocessor clock multiplier */ + uint64_t coproc_tics_per_us : 16; + + /** OCTEON core clock multiplier */ + uint64_t core_tics_per_us : 16; + + /** PKIND value assigned for the DPI interface */ + uint64_t pkind : 8; +#endif +}; + struct lio_sriov_info { /** Number of rings assigned to VF */ uint32_t rings_per_vf; @@ -129,6 +172,8 @@ struct lio_device { struct lio_sriov_info sriov_info; + struct lio_pf_vf_hs_word pfvf_hsword; + /** Mail Box details of each lio queue. */ struct lio_mbox **mbox; -- 1.8.3.1