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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <SJ0PR11MB586520F7C1885D5335ABCA398F462@SJ0PR11MB5865.namprd11.prod.outlook.com>
Date: Wed, 16 Oct 2024 08:58:55 +0000
From: "Romanowski, Rafal" <rafal.romanowski@...el.com>
To: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>,
	"intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>, "Kitszel, Przemyslaw"
	<przemyslaw.kitszel@...el.com>
Subject: Re: [Intel-wired-lan] [iwl-net v1] ice: block SF port creation in
 legacy mode

From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> on behalf of Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>
Sent: Friday, October 4, 2024 8:55 AM
To: intel-wired-lan@...ts.osuosl.org <intel-wired-lan@...ts.osuosl.org>
Cc: netdev@...r.kernel.org <netdev@...r.kernel.org>; Kitszel, Przemyslaw <przemyslaw.kitszel@...el.com>
Subject: [Intel-wired-lan] [iwl-net v1] ice: block SF port creation in legacy mode
 
There is no support for SF in legacy mode. Reflect it in the code.

Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@...el.com>
Fixes: eda69d654c7e ("ice: add basic devlink subfunctions support")
Signed-off-by: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>
---
 drivers/net/ethernet/intel/ice/devlink/devlink_port.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/ethernet/intel/ice/devlink/devlink_port.c b/drivers/net/ethernet/intel/ice/devlink/devlink_port.c
index 928c8bdb6649..c6779d9dffff 100644
--- a/drivers/net/ethernet/intel/ice/devlink/devlink_port.c
+++ b/drivers/net/ethernet/intel/ice/devlink/devlink_port.c
@@ -989,5 +989,11 @@ ice_devlink_port_new(struct devlink *devlink,
         if (err)
                 return err;
 
+       if (!ice_is_eswitch_mode_switchdev(pf)) {
+               NL_SET_ERR_MSG_MOD(extack,
+                                  "SF ports are only supported in eswitch switchdev mode");
+               return -EOPNOTSUPP;
+       }
+
         return ice_alloc_dynamic_port(pf, new_attr, extack, devlink_port);
 }
--
2.42.0



Tested-by: Rafal Romanowski <rafal.romanowski@...el.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ