From: Somnath Kotur <somnath.kotur@broadcom.com>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com
Subject: [dpdk-dev] [PATCH 07/20] nxt/bnxt: added HWRM support for global cfg
Date: Mon, 6 Jul 2020 13:54:49 +0530 [thread overview]
Message-ID: <20200706082502.26935-8-somnath.kotur@broadcom.com> (raw)
In-Reply-To: <20200706082502.26935-1-somnath.kotur@broadcom.com>
From: Jay Ding <jay.ding@broadcom.com>
Change global cfg from tunneled to non-tunneled
HWRM cmds.
Signed-off-by: Jay Ding <jay.ding@broadcom.com>
Reviewed-by: Michael Wildt <michael.wildt@broadcom.com>
Reviewed-by: Peter Spreadborough <peter.spreadborough@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
---
drivers/net/bnxt/tf_core/tf_msg.c | 43 ++++++++++++++++++++-------------------
1 file changed, 22 insertions(+), 21 deletions(-)
diff --git a/drivers/net/bnxt/tf_core/tf_msg.c b/drivers/net/bnxt/tf_core/tf_msg.c
index ed506de..77c9659 100644
--- a/drivers/net/bnxt/tf_core/tf_msg.c
+++ b/drivers/net/bnxt/tf_core/tf_msg.c
@@ -1021,8 +1021,8 @@ tf_msg_get_global_cfg(struct tf *tfp,
{
int rc = 0;
struct tfp_send_msg_parms parms = { 0 };
- tf_get_global_cfg_input_t req = { 0 };
- tf_get_global_cfg_output_t resp = { 0 };
+ struct hwrm_tf_global_cfg_get_input req = { 0 };
+ struct hwrm_tf_global_cfg_get_output resp = { 0 };
uint32_t flags = 0;
uint8_t fw_session_id;
uint16_t resp_size = 0;
@@ -1037,8 +1037,8 @@ tf_msg_get_global_cfg(struct tf *tfp,
}
flags = (params->dir == TF_DIR_TX ?
- TF_GET_GLOBAL_CFG_INPUT_FLAGS_DIR_TX :
- TF_GET_GLOBAL_CFG_INPUT_FLAGS_DIR_RX);
+ HWRM_TF_GLOBAL_CFG_GET_INPUT_FLAGS_DIR_TX :
+ HWRM_TF_GLOBAL_CFG_GET_INPUT_FLAGS_DIR_RX);
/* Populate the request */
req.fw_session_id = tfp_cpu_to_le_32(fw_session_id);
@@ -1047,15 +1047,14 @@ tf_msg_get_global_cfg(struct tf *tfp,
req.offset = tfp_cpu_to_le_32(params->offset);
req.size = tfp_cpu_to_le_32(params->config_sz_in_bytes);
- MSG_PREP(parms,
- TF_KONG_MB,
- HWRM_TF,
- HWRM_TFT_GET_GLOBAL_CFG,
- req,
- resp);
-
- rc = tfp_send_msg_tunneled(tfp, &parms);
+ parms.tf_type = HWRM_TF_GLOBAL_CFG_GET;
+ parms.req_data = (uint32_t *)&req;
+ parms.req_size = sizeof(req);
+ parms.resp_data = (uint32_t *)&resp;
+ parms.resp_size = sizeof(resp);
+ parms.mailbox = TF_KONG_MB;
+ rc = tfp_send_msg_direct(tfp, &parms);
if (rc != 0)
return rc;
@@ -1080,7 +1079,8 @@ tf_msg_set_global_cfg(struct tf *tfp,
{
int rc = 0;
struct tfp_send_msg_parms parms = { 0 };
- tf_set_global_cfg_input_t req = { 0 };
+ struct hwrm_tf_global_cfg_set_input req = { 0 };
+ struct hwrm_tf_global_cfg_set_output resp = { 0 };
uint32_t flags = 0;
uint8_t fw_session_id;
@@ -1094,8 +1094,8 @@ tf_msg_set_global_cfg(struct tf *tfp,
}
flags = (params->dir == TF_DIR_TX ?
- TF_SET_GLOBAL_CFG_INPUT_FLAGS_DIR_TX :
- TF_SET_GLOBAL_CFG_INPUT_FLAGS_DIR_RX);
+ HWRM_TF_GLOBAL_CFG_SET_INPUT_FLAGS_DIR_TX :
+ HWRM_TF_GLOBAL_CFG_SET_INPUT_FLAGS_DIR_RX);
/* Populate the request */
req.fw_session_id = tfp_cpu_to_le_32(fw_session_id);
@@ -1106,13 +1106,14 @@ tf_msg_set_global_cfg(struct tf *tfp,
params->config_sz_in_bytes);
req.size = tfp_cpu_to_le_32(params->config_sz_in_bytes);
- MSG_PREP_NO_RESP(parms,
- TF_KONG_MB,
- HWRM_TF,
- HWRM_TFT_SET_GLOBAL_CFG,
- req);
+ parms.tf_type = HWRM_TF_GLOBAL_CFG_SET;
+ parms.req_data = (uint32_t *)&req;
+ parms.req_size = sizeof(req);
+ parms.resp_data = (uint32_t *)&resp;
+ parms.resp_size = sizeof(resp);
+ parms.mailbox = TF_KONG_MB;
- rc = tfp_send_msg_tunneled(tfp, &parms);
+ rc = tfp_send_msg_direct(tfp, &parms);
if (rc != 0)
return rc;
--
2.7.4
next prev parent reply other threads:[~2020-07-06 8:31 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-06 8:24 [dpdk-dev] [PATCH 00/20] bnxt patches Somnath Kotur
2020-07-06 8:24 ` [dpdk-dev] [PATCH 01/20] net/bnxt: vxlan encap and decap with src property enabled Somnath Kotur
2020-07-06 8:24 ` [dpdk-dev] [PATCH 02/20] net/bnxt: add support vlan header bitmap Somnath Kotur
2020-07-06 8:24 ` [dpdk-dev] [PATCH 03/20] net/bnxt: add support for negative conditional opcodes Somnath Kotur
2020-07-06 8:24 ` [dpdk-dev] [PATCH 04/20] net/bnxt: add validations to dpdk port id and phy port parsing Somnath Kotur
2020-07-06 8:24 ` [dpdk-dev] [PATCH 05/20] net/bnxt: add support for index opcode constant Somnath Kotur
2020-07-06 8:24 ` [dpdk-dev] [PATCH 06/20] net/bnxt: updated hsi_struct_def_dpdk.h Somnath Kotur
2020-07-06 8:24 ` Somnath Kotur [this message]
2020-07-06 8:24 ` [dpdk-dev] [PATCH 08/20] net/bnxt: cleanup and refactoring Somnath Kotur
2020-07-06 8:24 ` [dpdk-dev] [PATCH 09/20] net/bnxt: add support for vlan push and vlan pop actions Somnath Kotur
2020-07-06 8:24 ` [dpdk-dev] [PATCH 10/20] net/bnxt: remove vnic and vport act bits from template matching Somnath Kotur
2020-07-06 8:24 ` [dpdk-dev] [PATCH 11/20] net/bnxt: fix vxlan outer ip protocol id encapsulation Somnath Kotur
2020-07-06 8:24 ` [dpdk-dev] [PATCH 12/20] net/bnxt: add number of vlan tags in the computed field list Somnath Kotur
2020-07-06 8:24 ` [dpdk-dev] [PATCH 13/20] net/bnxt: enable support for PF and VF port action items Somnath Kotur
2020-07-06 8:24 ` [dpdk-dev] [PATCH 14/20] net/bnxt: port configuration changes to support full offload Somnath Kotur
2020-07-06 8:24 ` [dpdk-dev] [PATCH 15/20] net/bnxt: add support for conditional opcodes for mapper result table Somnath Kotur
2020-07-06 8:24 ` [dpdk-dev] [PATCH 16/20] net/bnxt: add support for nat rte action items Somnath Kotur
2020-07-06 8:24 ` [dpdk-dev] [PATCH 17/20] net/bnxt: add support for tp src/dst " Somnath Kotur
2020-07-06 8:25 ` [dpdk-dev] [PATCH 18/20] net/bnxt: use VF vnic when port action is for a VF rep port Somnath Kotur
2020-07-06 8:25 ` [dpdk-dev] [PATCH 19/20] net/bnxt: enable flow ctrl ops for the VF-rep device Somnath Kotur
2020-07-06 8:25 ` [dpdk-dev] [PATCH 20/20] net/bnxt: use byte/pkt count shift/masks from the device template Somnath Kotur
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200706082502.26935-8-somnath.kotur@broadcom.com \
--to=somnath.kotur@broadcom.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).