[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241021-iwl-2024-10-21-iwl-net-fixes-v1-2-a50cb3059f55@intel.com>
Date: Mon, 21 Oct 2024 16:26:25 -0700
From: Jacob Keller <jacob.e.keller@...el.com>
To: Przemek Kitszel <przemyslaw.kitszel@...el.com>,
Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Jeff Garzik <jgarzik@...hat.com>,
Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>,
Piotr Raczynski <piotr.raczynski@...el.com>,
Vadim Fedorenko <vadim.fedorenko@...ux.dev>,
Milena Olech <milena.olech@...el.com>,
Arkadiusz Kubalewski <arkadiusz.kubalewski@...el.com>,
Michal Michalik <michal.michalik@...el.com>,
netdev <netdev@...r.kernel.org>
Cc: Jiri Pirko <jiri@...nulli.us>, Jacob Keller <jacob.e.keller@...el.com>,
Kalesh AP <kalesh-anakkur.purayil@...adcom.com>,
Rafal Romanowski <rafal.romanowski@...el.com>
Subject: [PATCH net 2/3] ice: block SF port creation in legacy mode
From: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>
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>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@...adcom.com>
Tested-by: Rafal Romanowski <rafal.romanowski@...el.com>
Signed-off-by: Jacob Keller <jacob.e.keller@...el.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.47.0.265.g4ca455297942
Powered by blists - more mailing lists