common/mlx5: support sub-function representor parsing
authorXueming Li <xuemingl@nvidia.com>
Sun, 28 Mar 2021 13:48:07 +0000 (13:48 +0000)
committerRaslan Darawsheh <rasland@nvidia.com>
Wed, 31 Mar 2021 07:16:23 +0000 (09:16 +0200)
commit59df97f1a832a0edfd7f77ffbe5149e553e860b5
tree3dae30661644d84aa867a644c3e2091bb7908367
parented9726ce83eb7562b3dcfaf0ee10647ed816ae4a
common/mlx5: support sub-function representor parsing

This patch supports representor name parsing for SF.
In sysfs, representor name stored under "phys_port_name" sysfs key,
similar to VF representor, switch port name of SF representor is
"pf<x>sf<y>".

For netlink message, net SF type is supported.

Examples:

pf0sf1
pf0sf[0-3]

Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
drivers/common/mlx5/linux/mlx5_common_os.c
drivers/common/mlx5/linux/mlx5_nl.c
drivers/common/mlx5/mlx5_common.h
drivers/net/mlx5/linux/mlx5_ethdev_os.c