Skip to content

Commit 5a92625

Browse files
committed
linux/efa: Update EFA linux driver to version 0.9.1
Signed-off-by: Gal Pressman <[email protected]>
1 parent 0328a70 commit 5a92625

File tree

13 files changed

+677
-519
lines changed

13 files changed

+677
-519
lines changed

kernel/linux/efa/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@ ccflags-y := -I$(src)
1515
KERNEL_VERSION ?= $(shell uname -r)
1616

1717
ccflags-y += -Wfatal-errors
18-
all:
18+
modules:
1919
make -C /lib/modules/$(KERNEL_VERSION)/build M=$(CURDIR) modules
2020

21+
install: modules
22+
make -C /lib/modules/$(KERNEL_VERSION)/build M=$(CURDIR) modules_install
23+
2124
clean:
2225
make -C /lib/modules/$(KERNEL_VERSION)/build M=$(CURDIR) clean

kernel/linux/efa/RELEASENOTES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ The driver was tested on the following distributions:
1313
* CentOS 7.4
1414
* CentOS 7.6
1515

16+
## r0.9.1 release notes
17+
18+
* Bug fix in EFA spec file
19+
* Upstream review cleanups
20+
1621
## r0.9.0 release notes
1722

1823
Initial commit

kernel/linux/efa/conf/dkms.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
PACKAGE_NAME="efa"
2-
PACKAGE_VERSION="0.9.0"
2+
PACKAGE_VERSION="0.9.1"
33
CLEAN="make clean"
44
MAKE="make KERNEL_VERSION=${kernelver}"
55
BUILT_MODULE_NAME[0]="efa"

kernel/linux/efa/efa.h

Lines changed: 17 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -32,27 +32,6 @@
3232
#define EFA_NUM_MSIX_VEC 1
3333
#define EFA_MGMNT_MSIX_VEC_IDX 0
3434

35-
#define efa_dbg(_dev, format, ...) \
36-
dev_dbg(_dev, "(pid %d) %s: " format, current->pid, \
37-
__func__, ##__VA_ARGS__)
38-
#define efa_info(_dev, format, ...) \
39-
dev_info(_dev, "(pid %d) %s: " format, current->pid, \
40-
__func__, ##__VA_ARGS__)
41-
#define efa_warn(_dev, format, ...) \
42-
dev_warn(_dev, "(pid %d) %s: " format, current->pid, \
43-
__func__, ##__VA_ARGS__)
44-
#define efa_err(_dev, format, ...) \
45-
dev_err(_dev, "(pid %d) %s: " format, current->pid, \
46-
__func__, ##__VA_ARGS__)
47-
#define efa_err_rl(_dev, format, ...) \
48-
dev_err_ratelimited(_dev, "(pid %d) %s: " format, current->pid, \
49-
__func__, ##__VA_ARGS__)
50-
51-
enum {
52-
EFA_DEVICE_RUNNING_BIT,
53-
EFA_MSIX_ENABLED_BIT
54-
};
55-
5635
struct efa_irq {
5736
irq_handler_t handler;
5837
void *data;
@@ -79,8 +58,8 @@ struct efa_stats {
7958

8059
struct efa_dev {
8160
struct ib_device ibdev;
61+
struct efa_com_dev edev;
8262
struct pci_dev *pdev;
83-
struct efa_com_dev *edev;
8463
struct efa_com_get_device_attr_result dev_attr;
8564

8665
u64 reg_bar_addr;
@@ -97,7 +76,6 @@ struct efa_dev {
9776
#else
9877
int admin_msix_vector_idx;
9978
#endif
100-
unsigned long state;
10179
struct efa_irq admin_irq;
10280

10381
#ifndef HAVE_CREATE_AH_UDATA
@@ -115,10 +93,14 @@ struct efa_dev {
11593

11694
struct efa_ucontext {
11795
struct ib_ucontext ibucontext;
96+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0)
97+
struct xarray mmap_xa;
98+
#else
11899
/* Protects ucontext state */
119100
struct mutex lock;
120101
struct list_head pending_mmaps;
121-
u64 mmap_key;
102+
u32 mmap_page;
103+
#endif
122104
u16 uarn;
123105
};
124106

@@ -219,9 +201,16 @@ int efa_mmap(struct ib_ucontext *ibucontext,
219201
struct vm_area_struct *vma);
220202
#ifdef HAVE_CREATE_AH_UDATA
221203
#ifdef HAVE_CREATE_AH_RDMA_ATTR
204+
#ifdef HAVE_CREATE_DESTROY_AH_FLAGS
205+
struct ib_ah *efa_create_ah(struct ib_pd *ibpd,
206+
struct rdma_ah_attr *ah_attr,
207+
u32 flags,
208+
struct ib_udata *udata);
209+
#else
222210
struct ib_ah *efa_create_ah(struct ib_pd *ibpd,
223211
struct rdma_ah_attr *ah_attr,
224212
struct ib_udata *udata);
213+
#endif
225214
#else
226215
struct ib_ah *efa_create_ah(struct ib_pd *ibpd,
227216
struct ib_ah_attr *ah_attr,
@@ -231,7 +220,11 @@ struct ib_ah *efa_create_ah(struct ib_pd *ibpd,
231220
struct ib_ah *efa_create_ah(struct ib_pd *ibpd,
232221
struct ib_ah_attr *ah_attr);
233222
#endif
223+
#ifdef HAVE_CREATE_DESTROY_AH_FLAGS
224+
int efa_destroy_ah(struct ib_ah *ibah, u32 flags);
225+
#else
234226
int efa_destroy_ah(struct ib_ah *ibah);
227+
#endif
235228
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 0)
236229
int efa_post_send(struct ib_qp *ibqp,
237230
struct ib_send_wr *wr,

kernel/linux/efa/efa_admin_cmds_defs.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@
1111

1212
/* EFA admin queue opcodes */
1313
enum efa_admin_aq_opcode {
14-
/* starting opcode of efa admin commands */
15-
EFA_ADMIN_START_CMD_RANGE = 1,
16-
EFA_ADMIN_CREATE_QP = EFA_ADMIN_START_CMD_RANGE,
14+
EFA_ADMIN_CREATE_QP = 1,
1715
EFA_ADMIN_MODIFY_QP = 2,
1816
EFA_ADMIN_QUERY_QP = 3,
1917
EFA_ADMIN_DESTROY_QP = 4,

0 commit comments

Comments
 (0)