[v5,0/2] multiple representors in one device

Message ID 20240201100219.26677-1-hkalra@marvell.com (mailing list archive)
Headers
Series multiple representors in one device |

Message

Harman Kalra Feb. 1, 2024, 10:02 a.m. UTC
  Following series adds support to enable creation of multiple representors
under one base device. There may be scenarios where port representors for
multiple PFs or VFs under PF are required and all these representor ports
created under a single pci device. Marvell CNXK port representor solution
is designed around this scenario where all representors are backed by a
single switch device.

Earlier this change was implemented as part of the Marvell CNXK port
representor series but after suggestions from Thomas we would like
to propose these changes in common code.
https://patches.dpdk.org/project/dpdk/patch/20231219174003.72901-25-hkalra@marvell.com/#166785

V5:
- Added test cases to demonstrate valid and invalid cases
- changed the tokenizing logic to address all valid cases

V4:
- Used MT safe strtok_r in place of strtok
- Reworded some comments

V3:
- Fix duplicate representor devarg key handling logic

V2:
- Updated the multiple representor devarg pattern to list
i.e. representor=[pf[0-1],pf2vf[1,2-3],[4-5]]
- Introduced size of array as third argument to rte_eth_devargs_parse()
to avoid array corruption
- Squashed separate document patch 


Harman Kalra (2):
  ethdev: parsing multiple representor devargs string
  test/devargs: add eth devargs parse cases

 app/test/test_devargs.c                       | 107 +++++++++++
 doc/guides/prog_guide/poll_mode_drv.rst       |   4 +-
 .../prog_guide/switch_representation.rst      |   1 +
 drivers/net/bnxt/bnxt_ethdev.c                |   4 +-
 drivers/net/enic/enic_ethdev.c                |   4 +-
 drivers/net/i40e/i40e_ethdev.c                |   4 +-
 drivers/net/ice/ice_dcf_ethdev.c              |   4 +-
 drivers/net/ixgbe/ixgbe_ethdev.c              |   4 +-
 drivers/net/mlx5/linux/mlx5_os.c              |   8 +-
 .../net/nfp/flower/nfp_flower_representor.c   |   4 +-
 drivers/net/sfc/sfc_ethdev.c                  |   4 +-
 lib/ethdev/ethdev_driver.c                    | 175 ++++++++++++++++--
 lib/ethdev/ethdev_driver.h                    |   9 +-
 13 files changed, 296 insertions(+), 36 deletions(-)
  

Comments

Ferruh Yigit Feb. 1, 2024, 6:35 p.m. UTC | #1
On 2/1/2024 10:02 AM, Harman Kalra wrote:
> Following series adds support to enable creation of multiple representors
> under one base device. There may be scenarios where port representors for
> multiple PFs or VFs under PF are required and all these representor ports
> created under a single pci device. Marvell CNXK port representor solution
> is designed around this scenario where all representors are backed by a
> single switch device.
> 
> Earlier this change was implemented as part of the Marvell CNXK port
> representor series but after suggestions from Thomas we would like
> to propose these changes in common code.
> https://patches.dpdk.org/project/dpdk/patch/20231219174003.72901-25-hkalra@marvell.com/#166785
> 
> V5:
> - Added test cases to demonstrate valid and invalid cases
> - changed the tokenizing logic to address all valid cases
> 
> V4:
> - Used MT safe strtok_r in place of strtok
> - Reworded some comments
> 
> V3:
> - Fix duplicate representor devarg key handling logic
> 
> V2:
> - Updated the multiple representor devarg pattern to list
> i.e. representor=[pf[0-1],pf2vf[1,2-3],[4-5]]
> - Introduced size of array as third argument to rte_eth_devargs_parse()
> to avoid array corruption
> - Squashed separate document patch 
> 
> 
> Harman Kalra (2):
>   ethdev: parsing multiple representor devargs string
>   test/devargs: add eth devargs parse cases
> 

Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com>


Squashed patches while merging,
Series applied to dpdk-next-net/main, thanks.