net/mlx5: enable DevX Tx queue creation
authorXueming Li <xuemingl@nvidia.com>
Tue, 19 Oct 2021 10:35:00 +0000 (18:35 +0800)
committerRaslan Darawsheh <rasland@nvidia.com>
Thu, 21 Oct 2021 07:31:13 +0000 (09:31 +0200)
commit686d05b60d5047fb204635c0fadcda8484fed4a3
treede7164f73fec5e3a985be56a6c4efc592cb2b94b
parentebe9afedc70a08b68495a607e90fdb82e0224f91
net/mlx5: enable DevX Tx queue creation

Verbs API does not support Infiniband device port number larger 255 by
design. To support more representors on a single Infiniband device DevX
API should be engaged.

While creating Send Queue (SQ) object with Verbs API, the PMD assigned
IB device port attribute and kernel created the default miss flows in
FDB domain, to redirect egress traffic from the queue being created to
representor appropriate peer (wire, HPF, VF or SF).

With DevX API there is no IB-device port attribute (it is merely kernel
one, DevX operates in PRM terms) and PMD must create default miss flows
in FDB explicitly. PMD did not provide this and using DevX API for
E-Switch configurations was disabled.

The default miss FDB flow matches E-Switch manager vport (to make sure
the source is some representor) and SQn (Send Queue number - device
internal queue index). The root flow table managed by kernel/firmware
and it does not support vport redirect action, we have to split the
default miss flow into two ones:

- flow with lowest priority in the root table that matches E-Switch
manager vport ID and jump to group 1.
- flow in group 1 that matches E-Switch manager vport ID and SQn and
forwards packet to peer vport

Signed-off-by: Xueming Li <xuemingl@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
drivers/net/mlx5/linux/mlx5_os.c
drivers/net/mlx5/mlx5.h
drivers/net/mlx5/mlx5_devx.c
drivers/net/mlx5/mlx5_devx.h
drivers/net/mlx5/mlx5_flow.c
drivers/net/mlx5/mlx5_trigger.c