From 0ccbb8ff779d4e905fc4fea5d2570f6e72821b0e Mon Sep 17 00:00:00 2001 From: Hanoh Haim Date: Wed, 3 Aug 2016 15:36:44 +0300 Subject: trex-214 another small optimization- move to 0x407 AQ command --- src/dpdk/drivers/net/i40e/i40e_ethdev.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/dpdk/drivers/net/i40e/i40e_ethdev.c b/src/dpdk/drivers/net/i40e/i40e_ethdev.c index be85794d..0e66be74 100644 --- a/src/dpdk/drivers/net/i40e/i40e_ethdev.c +++ b/src/dpdk/drivers/net/i40e/i40e_ethdev.c @@ -4351,7 +4351,8 @@ i40e_vsi_update_tc_bandwidth_ex(struct i40e_vsi *vsi) { struct i40e_hw *hw = I40E_VSI_TO_HW(vsi); int i, ret; - struct i40e_aqc_configure_vsi_tc_bw_data tc_bw_data; + struct i40e_aqc_configure_vsi_ets_sla_bw_data tc_bw_data; + struct i40e_aqc_configure_vsi_tc_bw_data * res_buffer; if (!vsi->seid) { PMD_DRV_LOG(ERR, "seid not valid"); @@ -4360,18 +4361,19 @@ i40e_vsi_update_tc_bandwidth_ex(struct i40e_vsi *vsi) memset(&tc_bw_data, 0, sizeof(tc_bw_data)); tc_bw_data.tc_valid_bits = 3; - tc_bw_data.tc_bw_credits[0]=1; - tc_bw_data.tc_bw_credits[1]=127; - ret = i40e_aq_config_vsi_tc_bw(hw, vsi->seid, &tc_bw_data, NULL); + /* enable TC 0,1 */ + ret = i40e_aq_config_vsi_ets_sla_bw_limit(hw, vsi->seid, &tc_bw_data, NULL); if (ret != I40E_SUCCESS) { PMD_DRV_LOG(ERR, "Failed to configure TC BW"); return ret; } + vsi->enabled_tc=3; - - (void)rte_memcpy(vsi->info.qs_handle, tc_bw_data.qs_handles, + res_buffer = ( struct i40e_aqc_configure_vsi_tc_bw_data *)&tc_bw_data; + (void)rte_memcpy(vsi->info.qs_handle, res_buffer->qs_handles, sizeof(vsi->info.qs_handle)); + return I40E_SUCCESS; } -- cgit 1.2.3-korg