summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2024-01-18 23:50:40 +0300
committerDavid S. Miller <davem@davemloft.net>2024-01-21 21:11:09 +0300
commit359724fa3ab79fbe9f42c6263cddc2afae32eef3 (patch)
tree5570ab79d2f7cbe81244fff7a12ae28c80208ad2 /net
parenta54d51fb2dfb846aedf3751af501e9688db447f5 (diff)
downloadlinux-359724fa3ab79fbe9f42c6263cddc2afae32eef3.tar.xz
idpf: distinguish vports by the dev_port attribute
idpf registers multiple netdevs (virtual ports) for one PCI function, but it does not provide a way for userspace to distinguish them with sysfs attributes. Per Documentation/ABI/testing/sysfs-class-net, it is a bug not to set dev_port for independent ports on the same PCI bus, device and function. Without dev_port set, systemd-udevd's default naming policy attempts to assign the same name ("ens2f0") to all four idpf netdevs on my test system and obviously fails, leaving three of them with the initial eth<N> name. With this patch, systemd-udevd is able to assign unique names to the netdevs (e.g. "ens2f0", "ens2f0d1", "ens2f0d2", "ens2f0d3"). The Intel-provided out-of-tree idpf driver already sets dev_port. In this patch I chose to do it in the same place in the idpf_cfg_netdev function. Fixes: 0fe45467a104 ("idpf: add create vport and netdev configuration") Signed-off-by: Michal Schmidt <mschmidt@redhat.com> Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions