Skip to content

Commit

Permalink
linux/efa: Update EFA linux driver to version 0.9.1
Browse files Browse the repository at this point in the history
Signed-off-by: Gal Pressman <[email protected]>
  • Loading branch information
gal-pressman committed Apr 11, 2019
1 parent 0328a70 commit 5a92625
Show file tree
Hide file tree
Showing 13 changed files with 677 additions and 519 deletions.
5 changes: 4 additions & 1 deletion kernel/linux/efa/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ ccflags-y := -I$(src)
KERNEL_VERSION ?= $(shell uname -r)

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

install: modules
make -C /lib/modules/$(KERNEL_VERSION)/build M=$(CURDIR) modules_install

clean:
make -C /lib/modules/$(KERNEL_VERSION)/build M=$(CURDIR) clean
5 changes: 5 additions & 0 deletions kernel/linux/efa/RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ The driver was tested on the following distributions:
* CentOS 7.4
* CentOS 7.6

## r0.9.1 release notes

* Bug fix in EFA spec file
* Upstream review cleanups

## r0.9.0 release notes

Initial commit
2 changes: 1 addition & 1 deletion kernel/linux/efa/conf/dkms.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PACKAGE_NAME="efa"
PACKAGE_VERSION="0.9.0"
PACKAGE_VERSION="0.9.1"
CLEAN="make clean"
MAKE="make KERNEL_VERSION=${kernelver}"
BUILT_MODULE_NAME[0]="efa"
Expand Down
41 changes: 17 additions & 24 deletions kernel/linux/efa/efa.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,27 +32,6 @@
#define EFA_NUM_MSIX_VEC 1
#define EFA_MGMNT_MSIX_VEC_IDX 0

#define efa_dbg(_dev, format, ...) \
dev_dbg(_dev, "(pid %d) %s: " format, current->pid, \
__func__, ##__VA_ARGS__)
#define efa_info(_dev, format, ...) \
dev_info(_dev, "(pid %d) %s: " format, current->pid, \
__func__, ##__VA_ARGS__)
#define efa_warn(_dev, format, ...) \
dev_warn(_dev, "(pid %d) %s: " format, current->pid, \
__func__, ##__VA_ARGS__)
#define efa_err(_dev, format, ...) \
dev_err(_dev, "(pid %d) %s: " format, current->pid, \
__func__, ##__VA_ARGS__)
#define efa_err_rl(_dev, format, ...) \
dev_err_ratelimited(_dev, "(pid %d) %s: " format, current->pid, \
__func__, ##__VA_ARGS__)

enum {
EFA_DEVICE_RUNNING_BIT,
EFA_MSIX_ENABLED_BIT
};

struct efa_irq {
irq_handler_t handler;
void *data;
Expand All @@ -79,8 +58,8 @@ struct efa_stats {

struct efa_dev {
struct ib_device ibdev;
struct efa_com_dev edev;
struct pci_dev *pdev;
struct efa_com_dev *edev;
struct efa_com_get_device_attr_result dev_attr;

u64 reg_bar_addr;
Expand All @@ -97,7 +76,6 @@ struct efa_dev {
#else
int admin_msix_vector_idx;
#endif
unsigned long state;
struct efa_irq admin_irq;

#ifndef HAVE_CREATE_AH_UDATA
Expand All @@ -115,10 +93,14 @@ struct efa_dev {

struct efa_ucontext {
struct ib_ucontext ibucontext;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0)
struct xarray mmap_xa;
#else
/* Protects ucontext state */
struct mutex lock;
struct list_head pending_mmaps;
u64 mmap_key;
u32 mmap_page;
#endif
u16 uarn;
};

Expand Down Expand Up @@ -219,9 +201,16 @@ int efa_mmap(struct ib_ucontext *ibucontext,
struct vm_area_struct *vma);
#ifdef HAVE_CREATE_AH_UDATA
#ifdef HAVE_CREATE_AH_RDMA_ATTR
#ifdef HAVE_CREATE_DESTROY_AH_FLAGS
struct ib_ah *efa_create_ah(struct ib_pd *ibpd,
struct rdma_ah_attr *ah_attr,
u32 flags,
struct ib_udata *udata);
#else
struct ib_ah *efa_create_ah(struct ib_pd *ibpd,
struct rdma_ah_attr *ah_attr,
struct ib_udata *udata);
#endif
#else
struct ib_ah *efa_create_ah(struct ib_pd *ibpd,
struct ib_ah_attr *ah_attr,
Expand All @@ -231,7 +220,11 @@ struct ib_ah *efa_create_ah(struct ib_pd *ibpd,
struct ib_ah *efa_create_ah(struct ib_pd *ibpd,
struct ib_ah_attr *ah_attr);
#endif
#ifdef HAVE_CREATE_DESTROY_AH_FLAGS
int efa_destroy_ah(struct ib_ah *ibah, u32 flags);
#else
int efa_destroy_ah(struct ib_ah *ibah);
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 0)
int efa_post_send(struct ib_qp *ibqp,
struct ib_send_wr *wr,
Expand Down
4 changes: 1 addition & 3 deletions kernel/linux/efa/efa_admin_cmds_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@

/* EFA admin queue opcodes */
enum efa_admin_aq_opcode {
/* starting opcode of efa admin commands */
EFA_ADMIN_START_CMD_RANGE = 1,
EFA_ADMIN_CREATE_QP = EFA_ADMIN_START_CMD_RANGE,
EFA_ADMIN_CREATE_QP = 1,
EFA_ADMIN_MODIFY_QP = 2,
EFA_ADMIN_QUERY_QP = 3,
EFA_ADMIN_DESTROY_QP = 4,
Expand Down
Loading

0 comments on commit 5a92625

Please sign in to comment.