X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fbnxt%2Ftf_core%2Ftf_msg.c;h=7c2ad172f241533d1f5dbd5a5a4bc03245484a53;hb=7ecfe8521fbb6a845f08a6b178676d1d6c5a7802;hp=2e2d4264cdee165b0d4e2cfd256072e6993cf31d;hpb=06b997c75e76cb382eec7af9a438ef1b76fac797;p=dpdk.git diff --git a/drivers/net/bnxt/tf_core/tf_msg.c b/drivers/net/bnxt/tf_core/tf_msg.c index 2e2d4264cd..7c2ad172f2 100644 --- a/drivers/net/bnxt/tf_core/tf_msg.c +++ b/drivers/net/bnxt/tf_core/tf_msg.c @@ -28,7 +28,6 @@ */ #define TF_MSG_SET_GLOBAL_CFG_DATA_SIZE 16 #define TF_MSG_EM_INSERT_KEY_SIZE 64 -#define TF_MSG_TCAM_SET_DEV_DATA_SIZE 88 #define TF_MSG_TBL_TYPE_SET_DATA_SIZE 88 /* Compile check - Catch any msg changes that we depend on, like the @@ -1251,8 +1250,8 @@ tf_msg_get_if_tbl_entry(struct tf *tfp, { int rc = 0; struct tfp_send_msg_parms parms = { 0 }; - tf_if_tbl_get_input_t req = { 0 }; - tf_if_tbl_get_output_t resp; + struct hwrm_tf_if_tbl_get_input req = { 0 }; + struct hwrm_tf_if_tbl_get_output resp = { 0 }; uint32_t flags = 0; struct tf_session *tfs; @@ -1266,25 +1265,26 @@ tf_msg_get_if_tbl_entry(struct tf *tfp, return rc; } - flags = (params->dir == TF_DIR_TX ? TF_IF_TBL_GET_INPUT_FLAGS_DIR_TX : - TF_IF_TBL_GET_INPUT_FLAGS_DIR_RX); + flags = (params->dir == TF_DIR_TX ? + HWRM_TF_IF_TBL_GET_INPUT_FLAGS_DIR_TX : + HWRM_TF_IF_TBL_GET_INPUT_FLAGS_DIR_RX); /* Populate the request */ req.fw_session_id = tfp_cpu_to_le_32(tfs->session_id.internal.fw_session_id); req.flags = flags; - req.tf_if_tbl_type = params->hcapi_type; - req.idx = tfp_cpu_to_le_16(params->idx); - req.data_sz_in_bytes = tfp_cpu_to_le_16(params->data_sz_in_bytes); + req.type = params->hcapi_type; + req.index = tfp_cpu_to_le_16(params->idx); + req.size = tfp_cpu_to_le_16(params->data_sz_in_bytes); - MSG_PREP(parms, - TF_KONG_MB, - HWRM_TF, - HWRM_TFT_IF_TBL_GET, - req, - resp); + parms.tf_type = HWRM_TF_IF_TBL_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_tunneled(tfp, &parms); + rc = tfp_send_msg_direct(tfp, &parms); if (rc != 0) return rc; @@ -1292,7 +1292,7 @@ tf_msg_get_if_tbl_entry(struct tf *tfp, if (parms.tf_resp_code != 0) return tfp_le_to_cpu_32(parms.tf_resp_code); - tfp_memcpy(¶ms->data[0], resp.data, req.data_sz_in_bytes); + tfp_memcpy(¶ms->data[0], resp.data, req.size); return tfp_le_to_cpu_32(parms.tf_resp_code); } @@ -1303,7 +1303,8 @@ tf_msg_set_if_tbl_entry(struct tf *tfp, { int rc = 0; struct tfp_send_msg_parms parms = { 0 }; - tf_if_tbl_set_input_t req = { 0 }; + struct hwrm_tf_if_tbl_set_input req = { 0 }; + struct hwrm_tf_if_tbl_get_output resp = { 0 }; uint32_t flags = 0; struct tf_session *tfs; @@ -1318,25 +1319,27 @@ tf_msg_set_if_tbl_entry(struct tf *tfp, } - flags = (params->dir == TF_DIR_TX ? TF_IF_TBL_SET_INPUT_FLAGS_DIR_TX : - TF_IF_TBL_SET_INPUT_FLAGS_DIR_RX); + flags = (params->dir == TF_DIR_TX ? + HWRM_TF_IF_TBL_SET_INPUT_FLAGS_DIR_TX : + HWRM_TF_IF_TBL_SET_INPUT_FLAGS_DIR_RX); /* Populate the request */ req.fw_session_id = tfp_cpu_to_le_32(tfs->session_id.internal.fw_session_id); req.flags = flags; - req.tf_if_tbl_type = params->hcapi_type; - req.idx = tfp_cpu_to_le_32(params->idx); - req.data_sz_in_bytes = tfp_cpu_to_le_32(params->data_sz_in_bytes); + req.type = params->hcapi_type; + req.index = tfp_cpu_to_le_32(params->idx); + req.size = tfp_cpu_to_le_32(params->data_sz_in_bytes); tfp_memcpy(&req.data[0], params->data, params->data_sz_in_bytes); - MSG_PREP_NO_RESP(parms, - TF_KONG_MB, - HWRM_TF, - HWRM_TFT_IF_TBL_SET, - req); + parms.tf_type = HWRM_TF_IF_TBL_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;