nfp: prefix vNIC phys_port_name with 'n'

Some drivers are using a bare number inside phys_port_name
as VF id and OpenStack's regexps will pick it up.  We can't
use a bare number for your vNICs, prefix the names with 'n'.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Jakub Kicinski 2018-05-25 21:53:26 -07:00 committed by David S. Miller
parent 6fd1cfc0f0
commit ca14573272
1 changed files with 1 additions and 1 deletions

View File

@ -3289,7 +3289,7 @@ nfp_net_get_phys_port_name(struct net_device *netdev, char *name, size_t len)
if (nn->dp.is_vf)
return -EOPNOTSUPP;
n = snprintf(name, len, "%d", nn->id);
n = snprintf(name, len, "n%d", nn->id);
if (n >= len)
return -EINVAL;