#ifndef _IIDC_RDMA_H_
#define _IIDC_RDMA_H_
#include <linux/auxiliary_bus.h>
#include <linux/device.h>
#include <linux/if_ether.h>
#include <linux/kernel.h>
#include <linux/netdevice.h>
#include <net/dscp.h>
enum iidc_rdma_event_type {
IIDC_RDMA_EVENT_BEFORE_MTU_CHANGE,
IIDC_RDMA_EVENT_AFTER_MTU_CHANGE,
IIDC_RDMA_EVENT_BEFORE_TC_CHANGE,
IIDC_RDMA_EVENT_AFTER_TC_CHANGE,
IIDC_RDMA_EVENT_WARN_RESET,
IIDC_RDMA_EVENT_CRIT_ERR,
IIDC_RDMA_EVENT_NBITS
};
struct iidc_rdma_event {
DECLARE_BITMAP(type, IIDC_RDMA_EVENT_NBITS);
u32 reg;
};
enum iidc_rdma_reset_type {
IIDC_FUNC_RESET,
IIDC_DEV_RESET,
};
enum iidc_rdma_protocol {
IIDC_RDMA_PROTOCOL_IWARP = BIT(0),
IIDC_RDMA_PROTOCOL_ROCEV2 = BIT(1),
};
struct iidc_rdma_core_dev_info {
struct pci_dev *pdev;
struct auxiliary_device *adev;
enum iidc_rdma_protocol rdma_protocol;
void *iidc_priv;
};
struct iidc_rdma_core_auxiliary_dev {
struct auxiliary_device adev;
struct iidc_rdma_core_dev_info *cdev_info;
};
struct iidc_rdma_core_auxiliary_drv {
struct auxiliary_driver adrv;
void (*event_handler)(struct iidc_rdma_core_dev_info *cdev,
struct iidc_rdma_event *event);
};
#endif