* [iwl-net v1] ice: block SF port creation in legacy mode
@ 2024-10-04 6:55 Michal Swiatkowski
2024-10-04 8:12 ` Kalesh Anakkur Purayil
2024-10-16 8:58 ` [Intel-wired-lan] " Romanowski, Rafal
0 siblings, 2 replies; 3+ messages in thread
From: Michal Swiatkowski @ 2024-10-04 6:55 UTC (permalink / raw)
To: intel-wired-lan; +Cc: netdev, przemyslaw.kitszel
There is no support for SF in legacy mode. Reflect it in the code.
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Fixes: eda69d654c7e ("ice: add basic devlink subfunctions support")
Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.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
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [iwl-net v1] ice: block SF port creation in legacy mode
2024-10-04 6:55 [iwl-net v1] ice: block SF port creation in legacy mode Michal Swiatkowski
@ 2024-10-04 8:12 ` Kalesh Anakkur Purayil
2024-10-16 8:58 ` [Intel-wired-lan] " Romanowski, Rafal
1 sibling, 0 replies; 3+ messages in thread
From: Kalesh Anakkur Purayil @ 2024-10-04 8:12 UTC (permalink / raw)
To: Michal Swiatkowski; +Cc: intel-wired-lan, netdev, przemyslaw.kitszel
[-- Attachment #1: Type: text/plain, Size: 483 bytes --]
On Fri, Oct 4, 2024 at 12:25 PM Michal Swiatkowski
<michal.swiatkowski@linux.intel.com> wrote:
>
> There is no support for SF in legacy mode. Reflect it in the code.
>
> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
> Fixes: eda69d654c7e ("ice: add basic devlink subfunctions support")
> Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
LGTM,
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
--
Regards,
Kalesh A P
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4239 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [Intel-wired-lan] [iwl-net v1] ice: block SF port creation in legacy mode
2024-10-04 6:55 [iwl-net v1] ice: block SF port creation in legacy mode Michal Swiatkowski
2024-10-04 8:12 ` Kalesh Anakkur Purayil
@ 2024-10-16 8:58 ` Romanowski, Rafal
1 sibling, 0 replies; 3+ messages in thread
From: Romanowski, Rafal @ 2024-10-16 8:58 UTC (permalink / raw)
To: Michal Swiatkowski, intel-wired-lan@lists.osuosl.org
Cc: netdev@vger.kernel.org, Kitszel, Przemyslaw
From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> on behalf of Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Sent: Friday, October 4, 2024 8:55 AM
To: intel-wired-lan@lists.osuosl.org <intel-wired-lan@lists.osuosl.org>
Cc: netdev@vger.kernel.org <netdev@vger.kernel.org>; Kitszel, Przemyslaw <przemyslaw.kitszel@intel.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@intel.com>
Fixes: eda69d654c7e ("ice: add basic devlink subfunctions support")
Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.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@intel.com>
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-10-16 8:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-04 6:55 [iwl-net v1] ice: block SF port creation in legacy mode Michal Swiatkowski
2024-10-04 8:12 ` Kalesh Anakkur Purayil
2024-10-16 8:58 ` [Intel-wired-lan] " Romanowski, Rafal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).