[dpdk-dev] [PATCH v2 1/3] i40e: enable DCB in VMDQ VSIs

Wu, Jingjing jingjing.wu at intel.com
Thu Feb 25 08:04:57 CET 2016


> > +		/* 4 bits per TC, 4th bit is reserved */
> > +		veb->bw_info.bw_ets_max[i] =
> > +			(uint8_t)((bw_max >> (i * I40E_4_BIT_WIDTH)) &
> > +				  I40E_3_BIT_MASK);
> Use RTE_LEN2MASK() to replace I40E_3_BIT_MASK.

OK.

> 
> > +		PMD_DRV_LOG(DEBUG, "\tVEB TC%u:share credits %u", i,
> > +			    veb->bw_info.bw_ets_share_credits[i]);
> > +		PMD_DRV_LOG(DEBUG, "\tVEB TC%u:credits %u", i,
> > +			    veb->bw_info.bw_ets_credits[i]);
> > +		PMD_DRV_LOG(DEBUG, "\tVEB TC%u: max credits: %u", i,
> > +			    veb->bw_info.bw_ets_max[i]);
> > +	}
> > +
> > +	veb->enabled_tc = tc_map;
> > +
> > +	return ret;
> > +}
> > +
> > +
> > +/*
> >   * i40e_vsi_config_tc - Configure VSI tc setting for given TC map
> >   * @vsi: VSI to be configured
> >   * @tc_map: enabled TC bitmap
> > @@ -8152,7 +8252,7 @@ i40e_vsi_update_queue_mapping(struct i40e_vsi
> > *vsi,
> >   * Returns 0 on success, negative value on failure
> >   */
> >  static enum i40e_status_code
> > -i40e_vsi_config_tc(struct i40e_vsi *vsi, u8 tc_map)
> > +i40e_vsi_config_tc(struct i40e_vsi *vsi, uint8_t tc_map)
> >  {
> >  	struct i40e_aqc_configure_vsi_tc_bw_data bw_data;
> >  	struct i40e_vsi_context ctxt;
> > @@ -8294,15 +8394,27 @@ i40e_dcb_hw_configure(struct i40e_pf *pf,
> >  	i40e_aq_get_dcb_config(hw, I40E_AQ_LLDP_MIB_LOCAL, 0,
> >  				     &hw->local_dcbx_config);
> >
> > +	/* if Veb is created, need to update TC of it at first */
> > +	if (main_vsi->veb) {
> > +		ret = i40e_config_switch_comp_tc(main_vsi->veb, tc_map);
> > +		if (ret)
> > +			PMD_INIT_LOG(WARNING,
> > +				 "Failed configuring TC for VEB seid=%d\n",
> > +				 main_vsi->veb->seid);
> > +	}
> How about if VEB hasn't been created?

If VEB is not created, no need to update tc on switch comp.

Thanks
Jingjing
> 
> > 2.4.0



More information about the dev mailing list