[PATCH 4/8] net/mlx5: add sysfs check for Multiport E-Switch

Stephen Hemminger stephen at networkplumber.org
Tue Oct 31 17:09:05 CET 2023


On Tue, 31 Oct 2023 16:27:29 +0200
Dariusz Sosnowski <dsosnowski at nvidia.com> wrote:

> +		MKSTR(sysfs_if_path, "/sys/class/net/%s", ifname);
> +		if (mlx5_get_pci_addr(sysfs_if_path, &if_pci_addr))
> +			continue;
> +		if (pci_addr->domain != if_pci_addr.domain ||
> +		    pci_addr->bus != if_pci_addr.bus ||
> +		    pci_addr->devid != if_pci_addr.devid ||
> +		    pci_addr->function != if_pci_addr.function)
> +			continue;
> +		MKSTR(sysfs_mpesw_path,
> +		      "/sys/class/net/%s/compat/devlink/lag_port_select_mode", ifname);

There are lots of DPDK code that reads sysfs, but eal and each driver ends up
coding there own way of handling this. Would be good to have common helpers in EAL.


More information about the dev mailing list