This patch series introduces FreeBSD OS support for MLX5 PMD Currently there is an ongoing review of FreeBSD OFED drivers and RDMA-core libraries. Their status can be tracked at https://reviews.freebsd.org/p/vag.singh_oneconvergence.com
Only MLX5 SRIOV interface is supported along with the following features: - Hypervisors: KVM, ESXi and Azure/HyperV - Multiple Tx and Rx queues - Support for scattered Tx and Rx frames - RSS - VLAN filtering, stripping and insertion - RX CRC stripping configuration - Promiscuous and Multicast mode - Statistics query including Basic, Extended, and per queue. - Configurable MTU and MAC - Jumbo frame support - Trust mode support - Vxlan - QoS - Flow steering Tested on : MT27710 Family [ConnectX-4 Lx] MT27710 Family [ConnectX-4 Lx Virtual Function] (Azure) MT27700 Family [ConnectX-4] MT27800 Family [ConnectX-5] MT2894 Family [ConnectX-6 Lx] MT28908 Family [ConnectX-6] MT2892 Family [ConnectX-6 Dx] v1 : Initial submission v2 : Addressed community comments Srikanth Kaka (41): common/mlx5: add glue files for FreeBSD common/mlx5: add memory APIs common/mlx5: add FreeBSD getter functions common/mlx5: add mlx5_glue_constructor common/mlx5: add meson support for FreeBSD net/mlx5: implement device attribute getter common/mlx5: retrieve the device index and name common/mlx5: derive PCI addr from device path net/mlx5: get the FreeBSD interface name net/mlx5: socket for inter-process communication common/mlx5: add mr reg/dereg API net/mlx5: add helpers for MR & HW operations net/mlx5: define MR callbacks net/mlx5: add open IB device routines common/mlx5: add PF_INET socket interface common/mlx5: add VLAN vmwa structures net/mlx5: add vlan vmwa stub net/mlx5: add get MAC net/mlx5: add get MTU net/mlx5: add OS MAC routines net/mlx5: add set MTU routine net/mlx5: add link state callbacks net/mlx5: add link update callback net/mlx5: read device clock net/mlx5: handle async device events net/mlx5: add callback to check dev is removed net/mlx5: add flow control callbacks net/mlx5: add module callbacks net/mlx5: added stats support net/mlx5: add stubs for bonding net/mlx5: add stub to read hw counters net/mlx5: add multiprocess support net/mlx5: add initialization routines net/mlx5: add flow workspace APIs net/mlx5: add pci probe and dev spawn support net/mlx5: set file descriptor as non-blocking net/mlx5: add routine to extract pdn net/mlx5: set promisc and allmulti modes common/mlx5: add stub for mlx5_translate_port_name net/mlx5: add meson support for FreeBSD doc/mlx5: update docs with FreeBSD information doc/guides/nics/mlx5.rst | 30 + drivers/common/mlx5/freebsd/meson.build | 149 + drivers/common/mlx5/freebsd/mlx5_common_os.c | 172 ++ drivers/common/mlx5/freebsd/mlx5_common_os.h | 296 ++ .../common/mlx5/freebsd/mlx5_common_verbs.c | 73 + drivers/common/mlx5/freebsd/mlx5_glue.c | 1505 ++++++++++ drivers/common/mlx5/freebsd/mlx5_glue.h | 374 +++ drivers/common/mlx5/freebsd/mlx5_inet.c | 308 ++ drivers/common/mlx5/freebsd/mlx5_inet.h | 67 + drivers/common/mlx5/meson.build | 12 +- drivers/net/mlx5/freebsd/meson.build | 14 + drivers/net/mlx5/freebsd/mlx5_ethdev_os.c | 1005 +++++++ drivers/net/mlx5/freebsd/mlx5_flow_os.c | 38 + drivers/net/mlx5/freebsd/mlx5_flow_os.h | 484 ++++ drivers/net/mlx5/freebsd/mlx5_mp_os.c | 305 ++ drivers/net/mlx5/freebsd/mlx5_os.c | 2554 +++++++++++++++++ drivers/net/mlx5/freebsd/mlx5_os.h | 22 + drivers/net/mlx5/freebsd/mlx5_socket.c | 249 ++ drivers/net/mlx5/freebsd/mlx5_verbs.c | 1208 ++++++++ drivers/net/mlx5/freebsd/mlx5_verbs.h | 18 + drivers/net/mlx5/freebsd/mlx5_vlan_os.c | 84 + drivers/net/mlx5/meson.build | 14 +- 22 files changed, 8974 insertions(+), 7 deletions(-) create mode 100644 drivers/common/mlx5/freebsd/meson.build create mode 100644 drivers/common/mlx5/freebsd/mlx5_common_os.c create mode 100644 drivers/common/mlx5/freebsd/mlx5_common_os.h create mode 100644 drivers/common/mlx5/freebsd/mlx5_common_verbs.c create mode 100644 drivers/common/mlx5/freebsd/mlx5_glue.c create mode 100644 drivers/common/mlx5/freebsd/mlx5_glue.h create mode 100644 drivers/common/mlx5/freebsd/mlx5_inet.c create mode 100644 drivers/common/mlx5/freebsd/mlx5_inet.h create mode 100644 drivers/net/mlx5/freebsd/meson.build create mode 100644 drivers/net/mlx5/freebsd/mlx5_ethdev_os.c create mode 100644 drivers/net/mlx5/freebsd/mlx5_flow_os.c create mode 100644 drivers/net/mlx5/freebsd/mlx5_flow_os.h create mode 100644 drivers/net/mlx5/freebsd/mlx5_mp_os.c create mode 100644 drivers/net/mlx5/freebsd/mlx5_os.c create mode 100644 drivers/net/mlx5/freebsd/mlx5_os.h create mode 100644 drivers/net/mlx5/freebsd/mlx5_socket.c create mode 100644 drivers/net/mlx5/freebsd/mlx5_verbs.c create mode 100644 drivers/net/mlx5/freebsd/mlx5_verbs.h create mode 100644 drivers/net/mlx5/freebsd/mlx5_vlan_os.c -- 2.30.2