diff options
author | Michal Swiatkowski <michal.swiatkowski@linux.intel.com> | 2024-06-10 09:44:31 +0200 |
---|---|---|
committer | Tony Nguyen <anthony.l.nguyen@intel.com> | 2024-06-21 07:44:33 -0700 |
commit | 639ac8ce8b65a44f176e3e831e39d5dde738ac71 (patch) | |
tree | 24292755940c66da52f235e92853c06e735ac0c1 /drivers/net/ethernet/intel/ice/ice_repr.c | |
parent | 3226607302ca5a74dee6f1c817580c713ef9d0dd (diff) |
ice: store representor ID in bridge port
It is used to get representor structure during cleaning.
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Tested-by: Sujai Buvaneswaran <sujai.buvaneswaran@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_repr.c')
-rw-r--r-- | drivers/net/ethernet/intel/ice/ice_repr.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_repr.c b/drivers/net/ethernet/intel/ice/ice_repr.c index d367f4c66dcd..fe83f305cc7d 100644 --- a/drivers/net/ethernet/intel/ice/ice_repr.c +++ b/drivers/net/ethernet/intel/ice/ice_repr.c @@ -415,12 +415,9 @@ err_repr_add: return ERR_PTR(err); } -struct ice_repr *ice_repr_get_by_vsi(struct ice_vsi *vsi) +struct ice_repr *ice_repr_get(struct ice_pf *pf, u32 id) { - if (!vsi->vf) - return NULL; - - return xa_load(&vsi->back->eswitch.reprs, vsi->vf->repr_id); + return xa_load(&pf->eswitch.reprs, id); } /** |