numam-dpdk/drivers/common/mlx5/mlx5_common_pci.h
Matan Azrad 832a4cf1d1 compress/mlx5: introduce PMD
Add a new compress PMD for Mellanox devices.

The MLX5 compress driver library provides support for Mellanox
BlueField 2 families of 25/50/100/200 Gb/s adapters.

GGAs (Generic Global Accelerators) are offload engines that can be used
to do memory to memory tasks on data.
These engines are part of the ARM complex of the BlueField 2 chip, and
as such they do not use NIC related resources (e.g. RX/TX bandwidth).
They do share the same PCI and memory bandwidth.

So, using the BlueField 2 device, the compress class operations can be
run in parallel to the net, vdpa, and regex class operations.

This driver is depending on rdma-core like the other mlx5 PMDs, also it
is going to use mlx5 DevX to create HW objects directly by the FW.

Add the probing functions, PCI bus connectivity, HW capabilities checks
and some basic objects preparations.

Signed-off-by: Matan Azrad <matan@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
2021-01-27 20:40:03 +01:00

78 lines
2.3 KiB
C

/* SPDX-License-Identifier: BSD-3-Clause
* Copyright 2020 Mellanox Technologies, Ltd
*/
#ifndef _MLX5_COMMON_PCI_H_
#define _MLX5_COMMON_PCI_H_
/**
* @file
*
* RTE Mellanox PCI Driver Interface
* Mellanox ConnectX PCI device supports multiple class: net,vdpa,regex and
* compress devices. This layer enables creating such multiple class of devices
* on a single PCI device by allowing to bind multiple class specific device
* driver to attach to mlx5_pci driver.
*
* ----------- ------------ ------------- ----------------
* | mlx5 | | mlx5 | | mlx5 | | mlx5 |
* | net pmd | | vdpa pmd | | regex pmd | | compress pmd |
* ----------- ------------ ------------- ----------------
* \ \ / /
* \ \ / /
* \ \_--------------_/ /
* \_______________| mlx5 |_______________/
* | pci common |
* --------------
* |
* -----------
* | mlx5 |
* | pci dev |
* -----------
*
* - mlx5 pci driver binds to mlx5 PCI devices defined by PCI
* ID table of all related mlx5 PCI devices.
* - mlx5 class driver such as net, vdpa, regex PMD defines its
* specific PCI ID table and mlx5 bus driver probes matching
* class drivers.
* - mlx5 pci bus driver is cental place that validates supported
* class combinations.
*/
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include <rte_pci.h>
#include <rte_bus_pci.h>
#include <mlx5_common.h>
void mlx5_common_pci_init(void);
/**
* A structure describing a mlx5 pci driver.
*/
struct mlx5_pci_driver {
struct rte_pci_driver pci_driver; /**< Inherit core pci driver. */
uint32_t driver_class; /**< Class of this driver, enum mlx5_class */
TAILQ_ENTRY(mlx5_pci_driver) next;
};
/**
* Register a mlx5_pci device driver.
*
* @param driver
* A pointer to a mlx5_pci_driver structure describing the driver
* to be registered.
*/
__rte_internal
void
mlx5_pci_driver_register(struct mlx5_pci_driver *driver);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* _MLX5_COMMON_PCI_H_ */