[dpdk-dev] [PATCH 03/49] net/ice/base: add API to configure MIB

Maxime Coquelin maxime.coquelin at redhat.com
Tue Jun 4 19:14:46 CEST 2019



On 6/4/19 7:42 AM, Leyi Rong wrote:
> Add ice_cfg_lldp_mib_change and treat DCBx state NOT_STARTED as valid.
> 
> Signed-off-by: Chinh T Cao <chinh.t.cao at intel.com>
> Signed-off-by: Dave Ertman <david.m.ertman at intel.com>
> Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr at intel.com>
> Signed-off-by: Leyi Rong <leyi.rong at intel.com>
> ---
>   drivers/net/ice/base/ice_dcb.c | 41 +++++++++++++++++++++++++++++-----
>   drivers/net/ice/base/ice_dcb.h |  3 ++-
>   2 files changed, 38 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/net/ice/base/ice_dcb.c b/drivers/net/ice/base/ice_dcb.c
> index a7810578d..100c4bb0f 100644
> --- a/drivers/net/ice/base/ice_dcb.c
> +++ b/drivers/net/ice/base/ice_dcb.c
> @@ -927,10 +927,11 @@ enum ice_status ice_get_dcb_cfg(struct ice_port_info *pi)
>   /**
>    * ice_init_dcb
>    * @hw: pointer to the HW struct
> + * @enable_mib_change: enable MIB change event
>    *
>    * Update DCB configuration from the Firmware
>    */
> -enum ice_status ice_init_dcb(struct ice_hw *hw)
> +enum ice_status ice_init_dcb(struct ice_hw *hw, bool enable_mib_change)
>   {
>   	struct ice_port_info *pi = hw->port_info;
>   	enum ice_status ret = ICE_SUCCESS;
> @@ -944,7 +945,8 @@ enum ice_status ice_init_dcb(struct ice_hw *hw)
>   	pi->dcbx_status = ice_get_dcbx_status(hw);
>   
>   	if (pi->dcbx_status == ICE_DCBX_STATUS_DONE ||
> -	    pi->dcbx_status == ICE_DCBX_STATUS_IN_PROGRESS) {
> +	    pi->dcbx_status == ICE_DCBX_STATUS_IN_PROGRESS ||
> +	    pi->dcbx_status == ICE_DCBX_STATUS_NOT_STARTED) {

Should this really be in this patch?
It does not seem related to the API addition.

>   		/* Get current DCBX configuration */
>   		ret = ice_get_dcb_cfg(pi);
>   		pi->is_sw_lldp = (hw->adminq.sq_last_status == ICE_AQ_RC_EPERM);
> @@ -952,13 +954,42 @@ enum ice_status ice_init_dcb(struct ice_hw *hw)
>   			return ret;
>   	} else if (pi->dcbx_status == ICE_DCBX_STATUS_DIS) {
>   		return ICE_ERR_NOT_READY;
> -	} else if (pi->dcbx_status == ICE_DCBX_STATUS_MULTIPLE_PEERS) {

Ditto.




More information about the dev mailing list