Message ID | 20210526200027.14008-1-parav@nvidia.com |
---|---|
State | New |
Headers | show |
Series | [net] devlink: Correct VIRTUAL port to not have phys_port attributes | expand |
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Wed, 26 May 2021 23:00:27 +0300 you wrote: > Physical port name, port number attributes do not belong to virtual port > flavour. When VF or SF virtual ports are registered they incorrectly > append "np0" string in the netdevice name of the VF/SF. > > Before this fix, VF netdevice name were ens2f0np0v0, ens2f0np0v1 for VF > 0 and 1 respectively. > > [...] Here is the summary with links: - [net] devlink: Correct VIRTUAL port to not have phys_port attributes https://git.kernel.org/netdev/net/c/b28d8f0c25a9 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
diff --git a/net/core/devlink.c b/net/core/devlink.c index 4eb969518ee0..051432ea4f69 100644 --- a/net/core/devlink.c +++ b/net/core/devlink.c @@ -705,7 +705,6 @@ static int devlink_nl_port_attrs_put(struct sk_buff *msg, case DEVLINK_PORT_FLAVOUR_PHYSICAL: case DEVLINK_PORT_FLAVOUR_CPU: case DEVLINK_PORT_FLAVOUR_DSA: - case DEVLINK_PORT_FLAVOUR_VIRTUAL: if (nla_put_u32(msg, DEVLINK_ATTR_PORT_NUMBER, attrs->phys.port_number)) return -EMSGSIZE; @@ -8631,7 +8630,6 @@ static int __devlink_port_phys_port_name_get(struct devlink_port *devlink_port, switch (attrs->flavour) { case DEVLINK_PORT_FLAVOUR_PHYSICAL: - case DEVLINK_PORT_FLAVOUR_VIRTUAL: if (!attrs->split) n = snprintf(name, len, "p%u", attrs->phys.port_number); else @@ -8679,6 +8677,8 @@ static int __devlink_port_phys_port_name_get(struct devlink_port *devlink_port, n = snprintf(name, len, "pf%usf%u", attrs->pci_sf.pf, attrs->pci_sf.sf); break; + case DEVLINK_PORT_FLAVOUR_VIRTUAL: + return -EOPNOTSUPP; } if (n >= len)