[PATCH 4/8] net/mlx5: add sysfs check for Multiport E-Switch
Dariusz Sosnowski
dsosnowski at nvidia.com
Tue Oct 31 18:37:31 CET 2023
Hi Stephen,
Thank you for your comment.
> -----Original Message-----
> From: Stephen Hemminger <stephen at networkplumber.org>
> Sent: Tuesday, October 31, 2023 17:09
> To: Dariusz Sosnowski <dsosnowski at nvidia.com>
> Cc: Matan Azrad <matan at nvidia.com>; Slava Ovsiienko
> <viacheslavo at nvidia.com>; Ori Kam <orika at nvidia.com>; Suanming Mou
> <suanmingm at nvidia.com>; dev at dpdk.org; Raslan Darawsheh
> <rasland at nvidia.com>
> Subject: Re: [PATCH 4/8] net/mlx5: add sysfs check for Multiport E-Switch
>
> External email: Use caution opening links or attachments
>
>
> 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.
Agreed.
>From a quick glance, I see that there are a few sysfs paths with which several drivers interact with e.g.:
- /sys/class/net
- /sys/bus/pci/devices
- /sys/devices
I think that, introducing common sysfs utilities (for example, some way of interacting with such common paths or just constructing sysfs paths) in DPDK could be beneficial.
We definitely can look into it, to see if it is viable.
Best regards,
Dariusz Sosnowski
More information about the dev
mailing list