ice: add ice_adapter for shared data across PFs on the same NIC
authorMichal Schmidt <mschmidt@redhat.com>
Mon, 25 Mar 2024 23:20:37 +0000 (00:20 +0100)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Mon, 1 Apr 2024 15:58:09 +0000 (08:58 -0700)
commit0e2bddf9e5f926ce32ed635012d0f8a0b54075d5
tree458bf8c638060b754862b89aa4d20894c7570f79
parent3b4cf29bdab08328dfab5bb7b41a62937ea5b379
ice: add ice_adapter for shared data across PFs on the same NIC

There is a need for synchronization between ice PFs on the same physical
adapter.

Add a "struct ice_adapter" for holding data shared between PFs of the
same multifunction PCI device. The struct is refcounted - each ice_pf
holds a reference to it.

Its first use will be for PTP. I expect it will be useful also to
improve the ugliness that is ice_prot_id_tbl.

Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/Makefile
drivers/net/ethernet/intel/ice/ice.h
drivers/net/ethernet/intel/ice/ice_adapter.c [new file with mode: 0644]
drivers/net/ethernet/intel/ice/ice_adapter.h [new file with mode: 0644]
drivers/net/ethernet/intel/ice/ice_main.c