DPDK patches and discussions
 help / color / mirror / Atom feed
From: Rami Rosen <ramirose@gmail.com>
To: Dekel Peled <dekelp@mellanox.com>
Cc: Shahaf Shuler <shahafs@mellanox.com>,
	Yongseok Koh <yskoh@mellanox.com>,  "dev@dpdk.org" <dev@dpdk.org>,
	Ori Kam <orika@mellanox.com>, Matan Azrad <matan@mellanox.com>
Subject: Re: [dpdk-dev] [RFC] net/mlx5: support new naming scheme for representors
Date: Thu, 28 Feb 2019 18:44:32 +0200	[thread overview]
Message-ID: <CAHLOa7RsrbbAiyE+zSz2U70EK_CaYGe90WnuEaLpC0pR76TDng@mail.gmail.com> (raw)
In-Reply-To: <VI1PR05MB4224F5A1BB0CB4D3B9754969B6750@VI1PR05MB4224.eurprd05.prod.outlook.com>

Hi, Dekel,
It seems that the link to the patch in your post is broken.

Regards,
Rami Rosen


בתאריך יום ה׳, 28 בפבר׳ 2019, 12:04, מאת Dekel Peled ‏<dekelp@mellanox.com>:

> In current kernel implementation, the physical port name for representors
> is a numeric string (i.e. '0', '1', etc.).
>
> Kernel patch [1] implements an updated scheme for naming of representors
> ports.
> The new scheme gives a unique name for each port using the PF ID and the
> VF ID.
> Uplink representors are named 'p0', 'p1', etc.
> VF representors are named 'pf0vf0', 'pf0vf1', 'pf1vf0', 'pf1vf1', etc.
>
> This RFC describes the suggested changes to MLX5 PMD, in order to support
> the new naming scheme, while maintaining support of the existing naming
> scheme.
>
> During PCI probing, MLX5 PMD uses Netlink to query the kernel for switch
> information.
> The response is processed by mlx5_nl_switch_info_cb().
> If this query fails, MLX5 PMD attempts to use sysfs to query for switch
> information.
> This query is implemented in mlx5_sysfs_switch_info();
>
> The following section describes the suggested changes by pseudocode:
> mlx5_nl_switch_info_cb()
> {
>         Parse the netlink response message.
>         If found type IFLA_PHYS_PORT_NAME {
>                 Convert payload string to number, store as port-name.
>                 /* START NEW CODE */
>                 If convert failed {
>                         If found substring "vf" in payload string {
>                                 Convert the remainder of payload string to
> number
>                                 Store as port-name.
>                         }
>                 }
>                 /* END OF NEW CODE */
>         }
> }
>
> mlx5_sysfs_switch_info()
> {
>         Convert ifindex to ifname.
>         Open file /sys/class/net/<ifname>/phys_port_name
>         Try to convert file contents to number, if succeeded store as
> port-name.
>         /* START NEW CODE */
>         If convert failed {
>                 Try to convert file contents to 'pf'/number/'vf'/number.
>                 If succeeded, store last number as port-name.
>         }
>         /* END OF NEW CODE */
> }
>
> [1] http://l-gerrit.mtl.labs.mlnx:8080/#/c/upstream/linux/+/160883/
>

      reply	other threads:[~2019-02-28 16:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-28 10:04 Dekel Peled
2019-02-28 16:44 ` Rami Rosen [this message]

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=CAHLOa7RsrbbAiyE+zSz2U70EK_CaYGe90WnuEaLpC0pR76TDng@mail.gmail.com \
    --to=ramirose@gmail.com \
    --cc=dekelp@mellanox.com \
    --cc=dev@dpdk.org \
    --cc=matan@mellanox.com \
    --cc=orika@mellanox.com \
    --cc=shahafs@mellanox.com \
    --cc=yskoh@mellanox.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).