mbox series

[v4,0/9] ethdev: support SubFunction representor

Message ID 1610968623-31345-1-git-send-email-xuemingl@nvidia.com (mailing list archive)
Headers show
Series ethdev: support SubFunction representor | expand

Message

Xueming(Steven) Li Jan. 18, 2021, 11:16 a.m. UTC
SubFunction [1] is a portion of the PCI device, a SF netdev has its own
dedicated queues(txq, rxq). A SF netdev supports E-Switch representation
offload similar to existing PF and VF representors. A SF shares PCI
level resources with other SFs and/or with its parent PCI function.

From SmartNIC perspective, when PCI device is shared for multi-host,
representors for host controller and host PF is required.

This patch set introduces new representor types in addtion to existing
VF representor. Syntax:

[[c#]pf#]vf#: VF port representor/s from controller/pf
[[c#]pf#]sf#: SF port representor/s from controller/pf
#: VF representor - for backwards compatibility

"#" is number instance, list or range, valid examples:
  1, [1,3,5], [0-3], [0,2-4,6]

For backward compatibility, this patch also introduces new netdev
capability to indicate the capability of supportting SF representor.

Version history:
 RFC:
 	initial version [2]
 V2:
    - separate patch for represnetor infrastructure, controller, pf and
      sf.
    - replace representor ID macro with functions:
      rte_eth_representor_id_encode()
      rte_eth_representor_id_parse()
    - new patch to allow devargs with same PCI BDF but different
      representors.
    - other minor code updates according to comments, thanks Andrew!
    - update document
 V3:
    - improve probing of allowed devargs with same name.
    - parse single word of kvargs as key. 
    - update kvargs test cases.
 V4:
    - split first representor refactor patch into
      1: add representor type
      2: refector representor list parsing
    - push the patch supporting multi-devargs for same device.


[1] SubFunction in kernel:
https://lore.kernel.org/netdev/20201112192424.2742-1-parav@nvidia.com/

[2] RFC:
http://patchwork.dpdk.org/project/dpdk/list/?series=14376

[3] V2:
http://patchwork.dpdk.org/project/dpdk/list/?series=14559

[4] v3:
1 http://patchwork.dpdk.org/patch/86460/
2 http://patchwork.dpdk.org/patch/86461/
3 http://patchwork.dpdk.org/patch/86462/
4 http://patchwork.dpdk.org/patch/86463/
5 http://patchwork.dpdk.org/patch/86464/
6 http://patchwork.dpdk.org/patch/86465/
7 http://patchwork.dpdk.org/patch/86467/
8 http://patchwork.dpdk.org/patch/86466/
9 http://patchwork.dpdk.org/patch/86468/


Xueming Li (9):
  ethdev: introduce representor type
  ethdev: support representor port list
  ethdev: support new VF representor syntax
  ethdev: support sub function representor
  ethdev: support PF index in representor
  ethdev: support multi-host in representor
  devarg: change representor ID to bitmap
  ethdev: add capability of sub-function representor
  kvargs: update parser to support lists

 app/test/test_kvargs.c                   |  46 +++++++-
 config/rte_config.h                      |   1 +
 doc/guides/prog_guide/poll_mode_drv.rst  |  13 ++-
 drivers/net/bnxt/bnxt_ethdev.c           |   7 ++
 drivers/net/bnxt/bnxt_reps.c             |   3 +-
 drivers/net/enic/enic_ethdev.c           |   7 ++
 drivers/net/enic/enic_vf_representor.c   |   3 +-
 drivers/net/i40e/i40e_ethdev.c           |   8 ++
 drivers/net/i40e/i40e_vf_representor.c   |   3 +-
 drivers/net/ixgbe/ixgbe_ethdev.c         |   8 ++
 drivers/net/ixgbe/ixgbe_vf_representor.c |   3 +-
 drivers/net/mlx5/linux/mlx5_os.c         |  15 ++-
 lib/librte_ethdev/ethdev_private.c       | 140 ++++++++++++++---------
 lib/librte_ethdev/ethdev_private.h       |   3 -
 lib/librte_ethdev/rte_class_eth.c        |  40 +++++--
 lib/librte_ethdev/rte_ethdev.c           |  31 ++++-
 lib/librte_ethdev/rte_ethdev.h           |   2 +
 lib/librte_ethdev/rte_ethdev_driver.h    |  66 +++++++++++
 lib/librte_ethdev/version.map            |   2 +
 lib/librte_kvargs/rte_kvargs.c           | 101 +++++++++++-----
 20 files changed, 389 insertions(+), 113 deletions(-)

Comments

Thomas Monjalon Jan. 18, 2021, 4:24 p.m. UTC | #1
18/01/2021 12:16, Xueming Li:
> This patch set introduces new representor types in addtion to existing
> VF representor. Syntax:
> 
> [[c#]pf#]vf#: VF port representor/s from controller/pf
> [[c#]pf#]sf#: SF port representor/s from controller/pf
> #: VF representor - for backwards compatibility
> 
> "#" is number instance, list or range, valid examples:
>   1, [1,3,5], [0-3], [0,2-4,6]
[...]
> Xueming Li (9):
>   ethdev: introduce representor type
>   ethdev: support representor port list
>   ethdev: support new VF representor syntax
>   ethdev: support sub function representor
>   ethdev: support PF index in representor
>   ethdev: support multi-host in representor
>   devarg: change representor ID to bitmap
>   ethdev: add capability of sub-function representor
>   kvargs: update parser to support lists

For the series,
Acked-by: Thomas Monjalon <thomas@monjalon.net>

Nice work, thank you.