From: Saeed Mahameed <saeed@kernel.org>
To: "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, Saeed Mahameed <saeedm@nvidia.com>
Subject: [pull request][net-next 00/11] mlx5 External sub function controller
Date: Wed, 21 Apr 2021 10:47:12 -0700 [thread overview]
Message-ID: <20210421174723.159428-1-saeed@kernel.org> (raw)
From: Saeed Mahameed <saeedm@nvidia.com>
Hi Dave, Jakub,
This adds the support to instantiate Sub-Functions on external hosts
For more information please see tag log below.
Please pull and let me know if there is any problem.
Thanks,
Saeed.
---
The following changes since commit a926c025d56bb1acd8a192fca0e307331ee91b30:
net: wwan: mhi_wwan_ctrl: Fix RX buffer starvation (2021-04-20 17:13:43 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux.git tags/mlx5-updates-2021-04-21
for you to fetch changes up to 88320da2bfa9f9acce8373d0713b054039802f61:
net/mlx5: SF, Extend SF table for additional SF id range (2021-04-21 10:44:10 -0700)
----------------------------------------------------------------
mlx5-updates-2021-04-21
devlink external port attribute for SF (Sub-Function) port flavour
This adds the support to instantiate Sub-Functions on external hosts
E.g when Eswitch manager is enabled on the ARM SmarNic SoC CPU, users
are now able to spawn new Sub-Functions on the Host server CPU.
Parav Pandit Says:
==================
This series introduces and uses external attribute for the SF port to
indicate that a SF port belongs to an external controller.
This is needed to generate unique phys_port_name when PF and SF numbers
are overlapping between local and external controllers.
For example two controllers 0 and 1, both of these controller have a SF.
having PF number 0, SF number 77. Here, phys_port_name has duplicate
entry which doesn't have controller number in it.
Hence, add controller number optionally when a SF port is for an
external controller. This extension is similar to existing PF and VF
eswitch ports of the external controller.
When a SF is for external controller an example view of external SF
port and config sequence:
On eswitch system:
$ devlink dev eswitch set pci/0033:01:00.0 mode switchdev
$ devlink port show
pci/0033:01:00.0/196607: type eth netdev enP51p1s0f0np0 flavour physical port 0 splittable false
pci/0033:01:00.0/131072: type eth netdev eth0 flavour pcipf controller 1 pfnum 0 external true splittable false
function:
hw_addr 00:00:00:00:00:00
$ devlink port add pci/0033:01:00.0 flavour pcisf pfnum 0 sfnum 77 controller 1
pci/0033:01:00.0/163840: type eth netdev eth1 flavour pcisf controller 1 pfnum 0 sfnum 77 splittable false
function:
hw_addr 00:00:00:00:00:00 state inactive opstate detached
phys_port_name construction:
$ cat /sys/class/net/eth1/phys_port_name
c1pf0sf77
Patch summary:
First 3 patches prepares the eswitch to handle vports in more generic
way using xarray to lookup vport from its unique vport number.
Patch-1 returns maximum eswitch ports only when eswitch is enabled
Patch-2 prepares eswitch to return eswitch max ports from a struct
Patch-3 uses xarray for vport and representor lookup
Patch-4 considers SF for an additioanl range of SF vports
Patch-5 relies on SF hw table to check SF support
Patch-6 extends SF devlink port attribute for external flag
Patch-7 stores the per controller SF allocation attributes
Patch-8 uses SF function id for filtering events
Patch-9 uses helper for allocation and free
Patch-10 splits hw table into per controller table and generic one
Patch-11 extends sf table for additional range
==================
----------------------------------------------------------------
Parav Pandit (11):
net/mlx5: E-Switch, Return eswitch max ports when eswitch is supported
net/mlx5: E-Switch, Prepare to return total vports from eswitch struct
net/mlx5: E-Switch, Use xarray for vport number to vport and rep mapping
net/mlx5: E-Switch, Consider SF ports of host PF
net/mlx5: SF, Rely on hw table for SF devlink port allocation
devlink: Extend SF port attributes to have external attribute
net/mlx5: SF, Store and use start function id
net/mlx5: SF, Consider own vhca events of SF devices
net/mlx5: SF, Use helpers for allocation and free
net/mlx5: SF, Split mlx5_sf_hw_table into two parts
net/mlx5: SF, Extend SF table for additional SF id range
.../mellanox/mlx5/core/esw/acl/egress_lgcy.c | 2 +-
.../mellanox/mlx5/core/esw/acl/egress_ofld.c | 4 +-
.../ethernet/mellanox/mlx5/core/esw/acl/helper.c | 8 +-
.../ethernet/mellanox/mlx5/core/esw/acl/helper.h | 2 +-
.../mellanox/mlx5/core/esw/acl/ingress_lgcy.c | 2 +-
.../mellanox/mlx5/core/esw/acl/ingress_ofld.c | 4 +-
.../ethernet/mellanox/mlx5/core/esw/devlink_port.c | 7 +-
.../net/ethernet/mellanox/mlx5/core/esw/legacy.c | 3 +-
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 276 +++++++++++++++----
drivers/net/ethernet/mellanox/mlx5/core/eswitch.h | 193 +++-----------
.../ethernet/mellanox/mlx5/core/eswitch_offloads.c | 293 ++++++++++++++-------
.../net/ethernet/mellanox/mlx5/core/sf/dev/dev.c | 12 +-
.../net/ethernet/mellanox/mlx5/core/sf/devlink.c | 38 +--
.../net/ethernet/mellanox/mlx5/core/sf/hw_table.c | 256 +++++++++++++-----
drivers/net/ethernet/mellanox/mlx5/core/sf/priv.h | 9 +-
drivers/net/ethernet/mellanox/mlx5/core/vport.c | 14 -
include/linux/mlx5/eswitch.h | 11 +-
include/linux/mlx5/vport.h | 8 -
include/net/devlink.h | 5 +-
net/core/devlink.c | 11 +-
20 files changed, 724 insertions(+), 434 deletions(-)
next reply other threads:[~2021-04-21 17:47 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-21 17:47 Saeed Mahameed [this message]
2021-04-21 17:47 ` [net-next 01/11] net/mlx5: E-Switch, Return eswitch max ports when eswitch is supported Saeed Mahameed
2021-04-21 17:47 ` [net-next 02/11] net/mlx5: E-Switch, Prepare to return total vports from eswitch struct Saeed Mahameed
2021-04-21 17:47 ` [net-next 03/11] net/mlx5: E-Switch, Use xarray for vport number to vport and rep mapping Saeed Mahameed
2021-04-21 17:47 ` [net-next 04/11] net/mlx5: E-Switch, Consider SF ports of host PF Saeed Mahameed
2021-04-21 17:47 ` [net-next 05/11] net/mlx5: SF, Rely on hw table for SF devlink port allocation Saeed Mahameed
2021-04-21 17:47 ` [net-next 06/11] devlink: Extend SF port attributes to have external attribute Saeed Mahameed
2021-04-21 19:20 ` Jakub Kicinski
2021-04-22 3:55 ` Parav Pandit
2021-04-22 16:36 ` Jakub Kicinski
2021-04-23 6:53 ` Parav Pandit
2021-04-23 23:14 ` Jakub Kicinski
2021-04-21 17:47 ` [net-next 07/11] net/mlx5: SF, Store and use start function id Saeed Mahameed
2021-04-21 17:47 ` [net-next 08/11] net/mlx5: SF, Consider own vhca events of SF devices Saeed Mahameed
2021-04-21 17:47 ` [net-next 09/11] net/mlx5: SF, Use helpers for allocation and free Saeed Mahameed
2021-04-21 17:47 ` [net-next 10/11] net/mlx5: SF, Split mlx5_sf_hw_table into two parts Saeed Mahameed
2021-04-21 17:47 ` [net-next 11/11] net/mlx5: SF, Extend SF table for additional SF id range Saeed Mahameed
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=20210421174723.159428-1-saeed@kernel.org \
--to=saeed@kernel.org \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=saeedm@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).