This source file includes following definitions.
- qede_rdma_dev_add
- qede_rdma_dev_event_open
- qede_rdma_dev_event_close
- qede_rdma_dev_remove
- qede_rdma_event_changeaddr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32 #ifndef QEDE_ROCE_H
33 #define QEDE_ROCE_H
34
35 #include <linux/pci.h>
36 #include <linux/netdevice.h>
37 #include <linux/types.h>
38 #include <linux/workqueue.h>
39
40 struct qedr_dev;
41 struct qed_dev;
42 struct qede_dev;
43
44 enum qede_rdma_event {
45 QEDE_UP,
46 QEDE_DOWN,
47 QEDE_CHANGE_ADDR,
48 QEDE_CLOSE
49 };
50
51 struct qede_rdma_event_work {
52 struct list_head list;
53 struct work_struct work;
54 void *ptr;
55 enum qede_rdma_event event;
56 };
57
58 struct qedr_driver {
59 unsigned char name[32];
60
61 struct qedr_dev* (*add)(struct qed_dev *, struct pci_dev *,
62 struct net_device *);
63
64 void (*remove)(struct qedr_dev *);
65 void (*notify)(struct qedr_dev *, enum qede_rdma_event);
66 };
67
68
69
70
71 int qede_rdma_register_driver(struct qedr_driver *drv);
72 void qede_rdma_unregister_driver(struct qedr_driver *drv);
73
74 bool qede_rdma_supported(struct qede_dev *dev);
75
76 #if IS_ENABLED(CONFIG_QED_RDMA)
77 int qede_rdma_dev_add(struct qede_dev *dev, bool recovery);
78 void qede_rdma_dev_event_open(struct qede_dev *dev);
79 void qede_rdma_dev_event_close(struct qede_dev *dev);
80 void qede_rdma_dev_remove(struct qede_dev *dev, bool recovery);
81 void qede_rdma_event_changeaddr(struct qede_dev *edr);
82
83 #else
84 static inline int qede_rdma_dev_add(struct qede_dev *dev,
85 bool recovery)
86 {
87 return 0;
88 }
89
90 static inline void qede_rdma_dev_event_open(struct qede_dev *dev) {}
91 static inline void qede_rdma_dev_event_close(struct qede_dev *dev) {}
92 static inline void qede_rdma_dev_remove(struct qede_dev *dev,
93 bool recovery) {}
94 static inline void qede_rdma_event_changeaddr(struct qede_dev *edr) {}
95 #endif
96 #endif