DPDK patches and discussions
 help / color / mirror / Atom feed
From: Dariusz Sosnowski <dsosnowski@nvidia.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Matan Azrad <matan@nvidia.com>,
	Slava Ovsiienko <viacheslavo@nvidia.com>,
	 Ori Kam <orika@nvidia.com>, Suanming Mou <suanmingm@nvidia.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	Raslan Darawsheh <rasland@nvidia.com>
Subject: RE: [PATCH 4/8] net/mlx5: add sysfs check for Multiport E-Switch
Date: Tue, 31 Oct 2023 17:37:31 +0000	[thread overview]
Message-ID: <IA1PR12MB831131AC75B024E728D59CEAA4A0A@IA1PR12MB8311.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20231031090905.7cf14956@fedora>

Hi Stephen,

Thank you for your comment.

> -----Original Message-----
> From: Stephen Hemminger <stephen@networkplumber.org>
> Sent: Tuesday, October 31, 2023 17:09
> To: Dariusz Sosnowski <dsosnowski@nvidia.com>
> Cc: Matan Azrad <matan@nvidia.com>; Slava Ovsiienko
> <viacheslavo@nvidia.com>; Ori Kam <orika@nvidia.com>; Suanming Mou
> <suanmingm@nvidia.com>; dev@dpdk.org; Raslan Darawsheh
> <rasland@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@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

  reply	other threads:[~2023-10-31 17:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-31 14:27 [PATCH 0/8] net/mlx5: add Multiport E-Switch support Dariusz Sosnowski
2023-10-31 14:27 ` [PATCH 1/8] net/mlx5/hws: fix leak in FT management Dariusz Sosnowski
2023-10-31 14:27 ` [PATCH 2/8] common/mlx5: fix controller index parsing Dariusz Sosnowski
2023-10-31 14:27 ` [PATCH 3/8] common/mlx5: add Netlink check for Multiport E-Switch Dariusz Sosnowski
2023-10-31 14:27 ` [PATCH 4/8] net/mlx5: add sysfs " Dariusz Sosnowski
2023-10-31 16:09   ` Stephen Hemminger
2023-10-31 17:37     ` Dariusz Sosnowski [this message]
2023-10-31 14:27 ` [PATCH 5/8] net/mlx5: add checking Multiport E-Switch state Dariusz Sosnowski
2023-10-31 14:27 ` [PATCH 6/8] net/mlx5: support port probing of Multiport E-Switch device Dariusz Sosnowski
2023-10-31 14:27 ` [PATCH 7/8] net/mlx5: sort port spawn data with uplink ports first Dariusz Sosnowski
2023-10-31 14:27 ` [PATCH 8/8] net/mlx5: add support for vport match selection Dariusz Sosnowski
2023-10-31 21:49 ` [PATCH 0/8] net/mlx5: add Multiport E-Switch support Raslan Darawsheh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=IA1PR12MB831131AC75B024E728D59CEAA4A0A@IA1PR12MB8311.namprd12.prod.outlook.com \
    --to=dsosnowski@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=matan@nvidia.com \
    --cc=orika@nvidia.com \
    --cc=rasland@nvidia.com \
    --cc=stephen@networkplumber.org \
    --cc=suanmingm@nvidia.com \
    --cc=viacheslavo@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).