Skip to content

Commit

Permalink
drivers/amazon: efa: update to 1.12.1
Browse files Browse the repository at this point in the history
Signed-off-by: Ethan Chen <[email protected]>
  • Loading branch information
yishache authored and shaoyingxu committed Nov 23, 2024
1 parent 21b592a commit f3d3602
Show file tree
Hide file tree
Showing 10 changed files with 135 additions and 267 deletions.
2 changes: 1 addition & 1 deletion drivers/amazon/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ config AMAZON_ENA_ETHERNET

config AMAZON_EFA_INFINIBAND
tristate "Elastic Fabric Adapter (EFA) support"
depends on INFINIBAND_USER_ACCESS && AMAZON_ENA_ETHERNET
depends on INFINIBAND_USER_ACCESS
---help---
This driver support Elastic Fabric Adapter (EFA)

Expand Down
199 changes: 10 additions & 189 deletions drivers/amazon/net/efa/config.h
Original file line number Diff line number Diff line change
@@ -1,194 +1,15 @@
/* src/config.h. Generated from config.h.in by configure. */
/* src/config.h.in. Generated from configure.ac by autoheader. */

/* have ah core allocation */
/* #undef HAVE_AH_CORE_ALLOCATION */

/* have device ops alloc_pd without ucontext */
/* #undef HAVE_ALLOC_PD_NO_UCONTEXT */

/* have bitfield.h */
#define HAVE_BITFIELD_H 1

/* have core mmap xarray */
/* #undef HAVE_CORE_MMAP_XA */

/* have cq core allocation */
/* #undef HAVE_CQ_CORE_ALLOCATION */

/* rdma_ah_init_attr exists */
/* #undef HAVE_CREATE_AH_INIT_ATTR */

/* create_ah doesn't have udata */
/* #undef HAVE_CREATE_AH_NO_UDATA */

/* create_ah has rdma_attr */
#define HAVE_CREATE_AH_RDMA_ATTR 1

/* create_ah has udata */
#define HAVE_CREATE_AH_UDATA 1

/* create_cq has attr param */
#define HAVE_UMEM_SCATTERLIST_IF 1
#define HAVE_CREATE_CQ_ATTR 1

/* have device ops create_cq without ucontext */
/* #undef HAVE_CREATE_CQ_NO_UCONTEXT */

/* create/destroy_ah has flags */
/* #undef HAVE_CREATE_DESTROY_AH_FLAGS */

/* have device ops dealloc pd has udata */
/* #undef HAVE_DEALLOC_PD_UDATA */

/* have device ops dereg mr udata */
/* #undef HAVE_DEREG_MR_UDATA */

/* have device ops destroy cq udata */
/* #undef HAVE_DESTROY_CQ_UDATA */

/* have device ops destroy qp udata */
/* #undef HAVE_DESTROY_QP_UDATA */

/* dev has parent field */
#define HAVE_IB_QUERY_DEVICE_UDATA 1
#define HAVE_CREATE_AH_RDMA_ATTR 1
#define HAVE_HW_STATS 1
#define HAVE_DEV_PARENT 1

/* driver_id field exists */
/* #undef HAVE_DRIVER_ID */

/* efa gdr enabled */
/* #undef HAVE_EFA_GDR */

/* get_port_immutable exists */
#define HAVE_GET_PORT_IMMUTABLE 1

/* have hw_stats */
#define HAVE_HW_STATS 1

/* have ibdev print */
/* #undef HAVE_IBDEV_PRINT */

/* have ibdev ratelimited print */
/* #undef HAVE_IBDEV_PRINT_RATELIMITED */

/* IB_ACCESS_OPTIONAL exists */
/* #undef HAVE_IB_ACCESS_OPTIONAL */

/* ib_device_ops has common fields */
/* #undef HAVE_IB_DEVICE_OPS_COMMON */

/* struct ib_device_ops exists */
/* #undef HAVE_IB_DEV_OPS */

/* have ib_is_udata_cleared */
#define HAVE_IB_IS_UDATA_CLEARED 1

/* ib_modify_qp_is_ok has four params */
/* #undef HAVE_IB_MODIFY_QP_IS_OK_FOUR_PARAMS */

/* ib_mr has length field */
#define HAVE_IB_MR_LENGTH 1

/* ib_mtu_int_to_enum exists */
#define HAVE_IB_MTU_INT_TO_ENUM 1

/* have ib port phys state link up */
/* #undef HAVE_IB_PORT_PHYS_STATE_LINK_UP */

/* have driver qpt */
/* #undef HAVE_IB_QPT_DRIVER */

/* query_device has udata */
#define HAVE_IB_QUERY_DEVICE_UDATA 1

/* ib_register_device has name param */
/* #undef HAVE_IB_REGISTER_DEVICE_NAME_PARAM */

/* ib_register_device has two params */
/* #undef HAVE_IB_REGISTER_DEVICE_TWO_PARAMS */

/* ib_umem_find_single_pg_size exists */
/* #undef HAVE_IB_UMEM_FIND_SINGLE_PG_SIZE */

/* have ib_umem_get device param */
/* #undef HAVE_IB_UMEM_GET_DEVICE_PARAM */

/* ib_umem_get has no dmasync parameter */
/* #undef HAVE_IB_UMEM_GET_NO_DMASYNC */

/* ib_umem_get has udata */
/* #undef HAVE_IB_UMEM_GET_UDATA */

/* have void destroy cq */
/* #undef HAVE_IB_VOID_DESTROY_CQ */

/* have kvzalloc */
#define HAVE_KVZALLOC 1

/* ib_device_attr has max_send_recv_sge */
/* #undef HAVE_MAX_SEND_RCV_SGE */

/* have no kverbs drivers */
/* #undef HAVE_NO_KVERBS_DRIVERS */

/* have pci_irq_vector */
#define HAVE_PCI_IRQ_VECTOR 1

/* have amazon pci id */
/* #undef HAVE_PCI_VENDOR_ID_AMAZON */

/* have pd core allocation */
/* #undef HAVE_PD_CORE_ALLOCATION */

/* have device ops const wr in post verbs */
/* #undef HAVE_POST_CONST_WR */

/* have unspecified node type */
/* #undef HAVE_RDMA_NODE_UNSPECIFIED */

/* rdma_user_mmap_io exists */
/* #undef HAVE_RDMA_USER_MMAP_IO */

/* safe ib_alloc_device exists */
/* #undef HAVE_SAFE_IB_ALLOC_DEVICE */

/* for_each_sg_dma_page exists */
/* #undef HAVE_SG_DMA_PAGE_ITER */

/* have ucontext core allocation */
/* #undef HAVE_UCONTEXT_CORE_ALLOCATION */

/* rdma_udata_to_drv_context exists */
/* #undef HAVE_UDATA_TO_DRV_CONTEXT */

/* ib umem scatterlist exists */
#define HAVE_UMEM_SCATTERLIST_IF 1

/* have upstream efa */
/* #undef HAVE_UPSTREAM_EFA */

/* have uverbs command header fix */
#define HAVE_IB_MTU_INT_TO_ENUM 1
#define HAVE_IB_MR_LENGTH 1
#define HAVE_UVERBS_CMD_HDR_FIX 1

/* Name of package */
#define PACKAGE "efa"

/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT ""

/* Define to the full name of this package. */
#define PACKAGE_NAME "efa"

/* Define to the full name and version of this package. */
#define PACKAGE_STRING "efa 1.9.0"

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "efa"

/* Define to the home page for this package. */
#define PACKAGE_URL ""

/* Define to the version of this package. */
#define PACKAGE_VERSION "1.9.0"

/* Version number of package */
#define VERSION "1.9.0"
#define HAVE_PCI_IRQ_VECTOR 1
#define HAVE_IB_IS_UDATA_CLEARED 1
#define HAVE_BITFIELD_H 1
#define HAVE_ATOMIC64_FETCH_INC 1
12 changes: 9 additions & 3 deletions drivers/amazon/net/efa/efa.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,9 @@ int efa_alloc_pd(struct ib_pd *ibpd,
struct ib_ucontext *ibucontext,
struct ib_udata *udata);
#endif
#ifdef HAVE_DEALLOC_PD_UDATA
#ifdef HAVE_DEALLOC_PD_UDATA_RC
int efa_dealloc_pd(struct ib_pd *ibpd, struct ib_udata *udata);
#elif defined(HAVE_DEALLOC_PD_UDATA)
void efa_dealloc_pd(struct ib_pd *ibpd, struct ib_udata *udata);
#elif defined(HAVE_PD_CORE_ALLOCATION)
void efa_dealloc_pd(struct ib_pd *ibpd);
Expand All @@ -190,7 +192,9 @@ int efa_destroy_qp(struct ib_qp *ibqp);
struct ib_qp *efa_create_qp(struct ib_pd *ibpd,
struct ib_qp_init_attr *init_attr,
struct ib_udata *udata);
#ifdef HAVE_IB_VOID_DESTROY_CQ
#ifdef HAVE_IB_INT_DESTROY_CQ
int efa_destroy_cq(struct ib_cq *ibcq, struct ib_udata *udata);
#elif defined(HAVE_IB_VOID_DESTROY_CQ)
void efa_destroy_cq(struct ib_cq *ibcq, struct ib_udata *udata);
#elif defined(HAVE_DESTROY_CQ_UDATA)
int efa_destroy_cq(struct ib_cq *ibcq, struct ib_udata *udata);
Expand Down Expand Up @@ -277,7 +281,9 @@ struct ib_ah *efa_kzalloc_ah(struct ib_pd *ibpd,
struct ib_ah_attr *ah_attr);
#endif
#endif
#ifdef HAVE_AH_CORE_ALLOCATION
#ifdef HAVE_AH_CORE_ALLOCATION_DESTROY_RC
int efa_destroy_ah(struct ib_ah *ibah, u32 flags);
#elif defined(HAVE_AH_CORE_ALLOCATION)
void efa_destroy_ah(struct ib_ah *ibah, u32 flags);
#elif defined(HAVE_CREATE_DESTROY_AH_FLAGS)
int efa_destroy_ah(struct ib_ah *ibah, u32 flags);
Expand Down
25 changes: 6 additions & 19 deletions drivers/amazon/net/efa/efa_admin_cmds_defs.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */
/*
* Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All rights reserved.
* Copyright 2018-2021 Amazon.com, Inc. or its affiliates. All rights reserved.
*/

#ifndef _EFA_ADMIN_CMDS_H_
Expand Down Expand Up @@ -161,8 +161,8 @@ struct efa_admin_create_qp_resp {
u32 qp_handle;

/*
* QP number in the given EFA virtual device. Least-significant bits
* (as needed according to max_qp) carry unique QP ID
* QP number in the given EFA virtual device. Least-significant bits (as
* needed according to max_qp) carry unique QP ID
*/
u16 qp_num;

Expand Down Expand Up @@ -465,7 +465,7 @@ struct efa_admin_create_cq_cmd {

/*
* number of sub cqs - must be equal to sub_cqs_per_cq of queue
* attributes.
* attributes.
*/
u16 num_sub_cqs;

Expand Down Expand Up @@ -563,12 +563,8 @@ struct efa_admin_acq_get_stats_resp {
};

struct efa_admin_get_set_feature_common_desc {
/*
* 1:0 : select - 0x1 - current value; 0x3 - default
* value
* 7:3 : reserved3 - MBZ
*/
u8 flags;
/* MBZ */
u8 reserved0;

/* as appears in efa_admin_aq_feature_id */
u8 feature_id;
Expand Down Expand Up @@ -823,12 +819,6 @@ enum efa_admin_aenq_group {
EFA_ADMIN_AENQ_GROUPS_NUM = 5,
};

enum efa_admin_aenq_notification_syndrom {
EFA_ADMIN_SUSPEND = 0,
EFA_ADMIN_RESUME = 1,
EFA_ADMIN_UPDATE_HINTS = 2,
};

struct efa_admin_mmio_req_read_less_resp {
u16 req_id;

Expand Down Expand Up @@ -909,9 +899,6 @@ struct efa_admin_host_info {
#define EFA_ADMIN_CREATE_CQ_CMD_VIRT_MASK BIT(6)
#define EFA_ADMIN_CREATE_CQ_CMD_CQ_ENTRY_SIZE_WORDS_MASK GENMASK(4, 0)

/* get_set_feature_common_desc */
#define EFA_ADMIN_GET_SET_FEATURE_COMMON_DESC_SELECT_MASK GENMASK(1, 0)

/* feature_device_attr_desc */
#define EFA_ADMIN_FEATURE_DEVICE_ATTR_DESC_RDMA_READ_MASK BIT(0)
#define EFA_ADMIN_FEATURE_DEVICE_ATTR_DESC_RNR_RETRY_MASK BIT(1)
Expand Down
4 changes: 2 additions & 2 deletions drivers/amazon/net/efa/efa_admin_defs.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */
/*
* Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All rights reserved.
* Copyright 2018-2021 Amazon.com, Inc. or its affiliates. All rights reserved.
*/

#ifndef _EFA_ADMIN_H_
Expand Down Expand Up @@ -82,7 +82,7 @@ struct efa_admin_acq_common_desc {

/*
* indicates to the driver which AQ entry has been consumed by the
* device and could be reused
* device and could be reused
*/
u16 sq_head_indx;
};
Expand Down
Loading

0 comments on commit f3d3602

Please sign in to comment.