X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fqede%2Fbase%2Fecore_dcbx.c;h=632297a78ebca983ae5ba202186ed005905e6d6f;hb=cbc12b0a96f5;hp=97fd48457b580636a6c863930fa5d9c6fe42f5fd;hpb=81dba2b2ff61ae1b2f5b45d6a93ccd82bf0cbfdb;p=dpdk.git diff --git a/drivers/net/qede/base/ecore_dcbx.c b/drivers/net/qede/base/ecore_dcbx.c index 97fd48457b..632297a78e 100644 --- a/drivers/net/qede/base/ecore_dcbx.c +++ b/drivers/net/qede/base/ecore_dcbx.c @@ -163,7 +163,6 @@ ecore_dcbx_update_app_info(struct ecore_dcbx_results *p_data, { enum ecore_pci_personality personality; enum dcbx_protocol_type id; - const char *name; /* @DPDK */ int i; for (i = 0; i < OSAL_ARRAY_SIZE(ecore_dcbx_app_update); i++) { @@ -173,7 +172,6 @@ ecore_dcbx_update_app_info(struct ecore_dcbx_results *p_data, continue; personality = ecore_dcbx_app_update[i].personality; - name = ecore_dcbx_app_update[i].name; ecore_dcbx_set_params(p_data, p_hwfn, enable, prio, tc, type, personality); @@ -228,7 +226,7 @@ ecore_dcbx_get_app_protocol_type(struct ecore_hwfn *p_hwfn, return true; } -/* Parse app TLV's to update TC information in hw_info structure for +/* Parse app TLV's to update TC information in hw_info structure for * reconfiguring QM. Get protocol specific data for PF update ramrod command. */ static enum _ecore_status_t @@ -318,14 +316,14 @@ static enum _ecore_status_t ecore_dcbx_process_mib_info(struct ecore_hwfn *p_hwfn) { struct dcbx_app_priority_feature *p_app; - enum _ecore_status_t rc = ECORE_SUCCESS; - struct ecore_dcbx_results data = { 0 }; struct dcbx_app_priority_entry *p_tbl; + struct ecore_dcbx_results data = { 0 }; struct dcbx_ets_feature *p_ets; struct ecore_hw_info *p_info; u32 pri_tc_tbl, flags; u8 dcbx_version; int num_entries; + enum _ecore_status_t rc = ECORE_SUCCESS; flags = p_hwfn->p_dcbx_info->operational.flags; dcbx_version = GET_MFW_FIELD(flags, DCBX_CONFIG_VERSION); @@ -363,9 +361,9 @@ ecore_dcbx_copy_mib(struct ecore_hwfn *p_hwfn, struct ecore_dcbx_mib_meta_data *p_data, enum ecore_mib_read_type type) { - enum _ecore_status_t rc = ECORE_SUCCESS; u32 prefix_seq_num, suffix_seq_num; int read_count = 0; + enum _ecore_status_t rc = ECORE_SUCCESS; /* The data is considered to be valid only if both sequence numbers are * the same. @@ -684,9 +682,9 @@ static void ecore_dcbx_get_local_lldp_params(struct ecore_hwfn *p_hwfn, OSAL_MEMCPY(params->lldp_local.local_chassis_id, p_local->local_chassis_id, - OSAL_ARRAY_SIZE(p_local->local_chassis_id)); + sizeof(params->lldp_local.local_chassis_id)); OSAL_MEMCPY(params->lldp_local.local_port_id, p_local->local_port_id, - OSAL_ARRAY_SIZE(p_local->local_port_id)); + sizeof(params->lldp_local.local_port_id)); } static void ecore_dcbx_get_remote_lldp_params(struct ecore_hwfn *p_hwfn, @@ -698,9 +696,9 @@ static void ecore_dcbx_get_remote_lldp_params(struct ecore_hwfn *p_hwfn, OSAL_MEMCPY(params->lldp_remote.peer_chassis_id, p_remote->peer_chassis_id, - OSAL_ARRAY_SIZE(p_remote->peer_chassis_id)); + sizeof(params->lldp_remote.peer_chassis_id)); OSAL_MEMCPY(params->lldp_remote.peer_port_id, p_remote->peer_port_id, - OSAL_ARRAY_SIZE(p_remote->peer_port_id)); + sizeof(params->lldp_remote.peer_port_id)); } static enum _ecore_status_t @@ -859,7 +857,7 @@ static enum _ecore_status_t ecore_dcbx_read_mib(struct ecore_hwfn *p_hwfn, DP_ERR(p_hwfn, "MIB read err, unknown mib type %d\n", type); } - return rc; + return ECORE_SUCCESS; } /* @@ -882,8 +880,6 @@ ecore_dcbx_mib_update_event(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt, rc = ecore_dcbx_process_mib_info(p_hwfn); if (!rc) { - bool enabled; - /* reconfigure tcs of QM queues according * to negotiation results */ @@ -891,11 +887,6 @@ ecore_dcbx_mib_update_event(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt, /* update storm FW with negotiation results */ ecore_sp_pf_update_dcbx(p_hwfn); - - /* set eagle enigne 1 flow control workaround - * according to negotiation results - */ - enabled = p_hwfn->p_dcbx_info->results.dcbx_enabled; } } @@ -1164,6 +1155,9 @@ ecore_dcbx_set_local_params(struct ecore_hwfn *p_hwfn, local_admin->config = DCBX_CONFIG_VERSION_DISABLED; } + DP_VERBOSE(p_hwfn, ECORE_MSG_DCB, "Dcbx version = %d\n", + local_admin->config); + if (params->override_flags & ECORE_DCBX_OVERRIDE_PFC_CFG) ecore_dcbx_set_pfc_data(p_hwfn, &local_admin->features.pfc, ¶ms->config.params);