Subject: Re: [iwl-next v2 03/15] ice: add basic devlink subfunctions support

From: Simon Horman <[email-masked]>
Date: Mon, 13 May 2024 17:05:51 +0100

On Mon, May 13, 2024 at 10:37:23AM +0200, Michal Swiatkowski wrote:

...

> diff --git a/drivers/net/ethernet/intel/ice/devlink/devlink_port.h b/drivers/net/ethernet/intel/ice/devlink/devlink_port.h
> index 9223bcdb6444..f20d7cc522a6 100644
> --- a/drivers/net/ethernet/intel/ice/devlink/devlink_port.h
> +++ b/drivers/net/ethernet/intel/ice/devlink/devlink_port.h
> @@ -4,9 +4,42 @@
>  #ifndef _DEVLINK_PORT_H_
>  #define _DEVLINK_PORT_H_
>  
> +#include "../ice.h"
> +
> +/**
> + * struct ice_dynamic_port - Track dynamically added devlink port instance
> + * @hw_addr: the HW address for this port
> + * @active: true if the port has been activated
> + * @devlink_port: the associated devlink port structure
> + * @pf: pointer to the PF private structure
> + * @vsi: the VSI associated with this port

nit: An entry for @sfnum should go here.

> + *
> + * An instance of a dynamically added devlink port. Each port flavour
> + */
> +struct ice_dynamic_port {
> +	u8 hw_addr[ETH_ALEN];
> +	u8 active: 1;
> +	struct devlink_port devlink_port;
> +	struct ice_pf *pf;
> +	struct ice_vsi *vsi;
> +	u32 sfnum;
> +};

...