numam-dpdk/drivers/net/mlx5/windows
Ophir Munk 882595159f net/mlx5: introduce flow support on Windows
This patch adds the initial flow framework under Windows OS. It supports
a subset of filters (ETH, IPV4, UDP) and a QUEUE action.  It is based on
DevX mechanism to send commands to the NIC through the kernel. It does
not support steering rules (i.e. writing directly to the NIC memory).
The Windows framework uses the existing DV framework where file
mlx5_flow_dv.c remains intact.

Steps involved in flow creation:
1. Create a domain (RX, TX, FDB). Since domains are created by steering
rules and not with DevX, Windows does not require a domain object (this
means switch dev mode which requires an FDB domain is not supported).
2. Create a table object. Windows only supports table 0. The call to
mlx5_flow_os_create_flow_tbl() silently returns successfully.
3. Create a matcher object. A matcher struct is created by calling
mlx5_flow_os_create_flow_matcher().  The matcher validation and
translation are part of the DV implementation. The matcher bits that
were created by DV in standard PRM format are copied into the matcher
struct.
4. Create an action object. The call to
mlx5_flow_os_create_flow_action_dest_devx_tir() creates an action struct
with the TIR type and id.  This struct will be a parameter later in a
call to flow creation.  All other action calls (e.g. packet reformat,
header modification, jump to flow table, etc) return with a non
supported error.
5. Create the flow. The call to mlx5_flow_os_create_flow() receives the
matcher struct, action struct, and copy them into Windows specific
fs_rule struct, then it calls glue API devx_fs_rule_add().

Details on additional APIs:
* mlx5_flow_os_get_type() is called during flow type selection. In
Windows it constantly returns MLX5_FLOW_TYPE_DV.
* mlx5_flow_os_item_supported() is called before starting DV items
validation or translation. It filters out the OS non supported items in
advance.
* mlx5_flow_os_action_supported() is called before starting DV actions
validation or translation. It filters out the OS non supported actions
in advance.
* mlx5_flow_adjust_priority() is an OS stub for flow priority
adjustment. Windows only supports flow priority 0.

Signed-off-by: Ophir Munk <ophirmu@nvidia.com>
Signed-off-by: Dekel Peled <dekelp@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2021-01-08 16:03:08 +01:00
..
meson.build net/mlx5: introduce flow support on Windows 2021-01-08 16:03:08 +01:00
mlx5_ethdev_os.c net/mlx5: support device removed query on Windows 2021-01-08 16:03:08 +01:00
mlx5_flow_os.c net/mlx5: introduce flow support on Windows 2021-01-08 16:03:08 +01:00
mlx5_flow_os.h net/mlx5: introduce flow support on Windows 2021-01-08 16:03:08 +01:00
mlx5_mp_os.c net/mlx5: add stubs for MP requests on Windows 2021-01-08 16:03:07 +01:00
mlx5_os.c net/mlx5: support VF PCI address on Windows 2021-01-08 16:03:08 +01:00
mlx5_os.h net/mlx5: add macros for file name and path 2021-01-08 16:03:07 +01:00
mlx5_vlan_os.c net/mlx5: add VLAN stubs on Windows 2021-01-08 16:03:08 +01:00