lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240213072724.77275-9-michal.swiatkowski@linux.intel.com>
Date: Tue, 13 Feb 2024 08:27:17 +0100
From: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>
To: intel-wired-lan@...ts.osuosl.org
Cc: netdev@...r.kernel.org,
	jacob.e.keller@...el.com,
	michal.kubiak@...el.com,
	maciej.fijalkowski@...el.com,
	sridhar.samudrala@...el.com,
	przemyslaw.kitszel@...el.com,
	wojciech.drewek@...el.com,
	pio.raczynski@...il.com,
	Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>
Subject: [iwl-next v1 08/15] ice: store SF data in VSI struct

Store subfunction pointer in VSI struct. The same is done for VF
pointer. Make union of subfunction and VF pointer as only one of them
can be set with one VSI.

Reviewed-by: Wojciech Drewek <wojciech.drewek@...el.com>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@...el.com>
Signed-off-by: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>
---
 drivers/net/ethernet/intel/ice/ice.h        | 7 ++++++-
 drivers/net/ethernet/intel/ice/ice_sf_eth.c | 1 +
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/ice/ice.h b/drivers/net/ethernet/intel/ice/ice.h
index 767ea80684e7..4d35480178bc 100644
--- a/drivers/net/ethernet/intel/ice/ice.h
+++ b/drivers/net/ethernet/intel/ice/ice.h
@@ -352,7 +352,12 @@ struct ice_vsi {
 	u16 vsi_num;			/* HW (absolute) index of this VSI */
 	u16 idx;			/* software index in pf->vsi[] */
 
-	struct ice_vf *vf;		/* VF associated with this VSI */
+	union {
+		/* VF associated with this VSI */
+		struct ice_vf *vf;
+		/* SF associated with this VSI */
+		struct ice_dynamic_port *sf;
+	};
 
 	u16 num_gfltr;
 	u16 num_bfltr;
diff --git a/drivers/net/ethernet/intel/ice/ice_sf_eth.c b/drivers/net/ethernet/intel/ice/ice_sf_eth.c
index abee733710a5..55db2e4beb72 100644
--- a/drivers/net/ethernet/intel/ice/ice_sf_eth.c
+++ b/drivers/net/ethernet/intel/ice/ice_sf_eth.c
@@ -117,6 +117,7 @@ static int ice_sf_dev_probe(struct auxiliary_device *adev,
 		dev_err(dev, "Subfunction vsi config failed");
 		return err;
 	}
+	vsi->sf = dyn_port;
 
 	err = ice_devlink_create_sf_dev_port(sf_dev);
 	if (err)
-- 
2.42.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ