Hi Stephen,

Thank you for your comment.

> -----Original Message-----
> From: Stephen Hemminger <[email protected]>
> Sent: Tuesday, October 31, 2023 17:09
> To: Dariusz Sosnowski <[email protected]>
> Cc: Matan Azrad <[email protected]>; Slava Ovsiienko
> <[email protected]>; Ori Kam <[email protected]>; Suanming Mou
> <[email protected]>; [email protected]; Raslan Darawsheh
> <[email protected]>
> 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 <[email protected]> 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

Reply via email to