diff options
author | Michal Swiatkowski <michal.swiatkowski@linux.intel.com> | 2024-08-20 08:57:53 +0200 |
---|---|---|
committer | Tony Nguyen <anthony.l.nguyen@intel.com> | 2024-09-06 11:01:24 -0700 |
commit | 415db8399d06a45ebd7b7d26b951f831a4b01801 (patch) | |
tree | e0367ea34acd2c0d5c58f9f9305c10166ef100a6 /drivers/net/ethernet/intel/ice/devlink | |
parent | 8f9b681adb4437c8b2d1ad998d66b79558bc900a (diff) |
ice: make representor code generic
Keep the same flow of port representor creation, but instead of general
attach function create helpers for specific representor type.
Store function pointer for add and remove representor.
Type of port representor can be also known based on VSI type, but it
is more clean to have it directly saved in port representor structure.
Add devlink lock for whole port representor creation and destruction.
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Tested-by: Rafal Romanowski <rafal.romanowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/devlink')
-rw-r--r-- | drivers/net/ethernet/intel/ice/devlink/devlink_port.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/ice/devlink/devlink_port.h b/drivers/net/ethernet/intel/ice/devlink/devlink_port.h index 97b21b58c300..479d2b976745 100644 --- a/drivers/net/ethernet/intel/ice/devlink/devlink_port.h +++ b/drivers/net/ethernet/intel/ice/devlink/devlink_port.h @@ -14,6 +14,7 @@ * @devlink_port: the associated devlink port structure * @pf: pointer to the PF private structure * @vsi: the VSI associated with this port + * @repr_id: the representor ID * @sfnum: the subfunction ID * * An instance of a dynamically added devlink port. Each port flavour @@ -24,6 +25,7 @@ struct ice_dynamic_port { struct devlink_port devlink_port; struct ice_pf *pf; struct ice_vsi *vsi; + unsigned long repr_id; u32 sfnum; }; |