Skip to content

Commit f1fa719

Browse files
jpirkodavem330
authored andcommitted
nfp: do not handle nn->port defined case in nfp_net_get_phys_port_name()
If nn->port is defined it means that devlink_port has been registered for this port as well. Devlink core is handling the port name formatting. Signed-off-by: Jiri Pirko <[email protected]> Reviewed-by: Jakub Kicinski <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent d484210 commit f1fa719

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/net/ethernet/netronome/nfp/nfp_net_common.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3324,8 +3324,11 @@ nfp_net_get_phys_port_name(struct net_device *netdev, char *name, size_t len)
33243324
struct nfp_net *nn = netdev_priv(netdev);
33253325
int n;
33263326

3327+
/* If port is defined, devlink_port is registered and devlink core
3328+
* is taking care of name formatting.
3329+
*/
33273330
if (nn->port)
3328-
return nfp_port_get_phys_port_name(netdev, name, len);
3331+
return -EOPNOTSUPP;
33293332

33303333
if (nn->dp.is_vf || nn->vnic_no_name)
33313334
return -EOPNOTSUPP;

0 commit comments

Comments
 (0)