Skip to content

Commit 3e13a8c

Browse files
Michal SwiatkowskiPaolo Abeni
authored andcommitted
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 <[email protected]> Fixes: eda69d6 ("ice: add basic devlink subfunctions support") Signed-off-by: Michal Swiatkowski <[email protected]> Reviewed-by: Kalesh AP <[email protected]> Tested-by: Rafal Romanowski <[email protected]> Signed-off-by: Jacob Keller <[email protected]> Reviewed-by: Simon Horman <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
1 parent 338c4d3 commit 3e13a8c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/net/ethernet/intel/ice/devlink/devlink_port.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -989,5 +989,11 @@ ice_devlink_port_new(struct devlink *devlink,
989989
if (err)
990990
return err;
991991

992+
if (!ice_is_eswitch_mode_switchdev(pf)) {
993+
NL_SET_ERR_MSG_MOD(extack,
994+
"SF ports are only supported in eswitch switchdev mode");
995+
return -EOPNOTSUPP;
996+
}
997+
992998
return ice_alloc_dynamic_port(pf, new_attr, extack, devlink_port);
993999
}

0 commit comments

Comments
 (0)