net/mlx5: support sub-function representor
authorXueming Li <xuemingl@nvidia.com>
Sun, 28 Mar 2021 13:48:08 +0000 (13:48 +0000)
committerRaslan Darawsheh <rasland@nvidia.com>
Wed, 31 Mar 2021 07:16:25 +0000 (09:16 +0200)
commitcb95feefdd03e0a4104cc707a881e29f0421fa68
treee708fe9562b5003c36e3eff5adabf49ed7cfe618
parent59df97f1a832a0edfd7f77ffbe5149e553e860b5
net/mlx5: support sub-function representor

This patch adds support for SF representor. Similar to VF representor,
switch port name of SF representor in phys_port_name sysfs key is
"pf<x>sf<y>".

Device representor argument is "representors=sf[list]", list member
could be mix of instance and range. Example:
  representors=sf[0,2,4,8-12,-1]

To probe VF representor and SF representor, need to separate into 2
devices:
  -a <BDF>,representor=vf[list] -a <BDF>,representor=sf[list]

Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
doc/guides/nics/mlx5.rst
drivers/net/mlx5/linux/mlx5_ethdev_os.c
drivers/net/mlx5/linux/mlx5_os.c
drivers/net/mlx5/mlx5.c
drivers/net/mlx5/mlx5.h
drivers/net/mlx5/mlx5_ethdev.c