diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-01-31 14:40:36 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-01-31 14:40:36 -0800 |
commit | 8fdd4019bcb2d824c5ab45c6fc340293cfed843f (patch) | |
tree | 9a7627096f8c0d351c8ed0335da3cb1afb9049d9 /drivers/infiniband/sw/siw/siw.h | |
parent | Merge tag 'thermal-v5.6-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux (diff) | |
parent | RDMA/core: Make the entire API tree static (diff) | |
download | linux-dev-8fdd4019bcb2d824c5ab45c6fc340293cfed843f.tar.xz linux-dev-8fdd4019bcb2d824c5ab45c6fc340293cfed843f.zip |
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma
Pull rdma updates from Jason Gunthorpe:
"A very quiet cycle with few notable changes. Mostly the usual list of
one or two patches to drivers changing something that isn't quite rc
worthy. The subsystem seems to be seeing a larger number of rework and
cleanup style patches right now, I feel that several vendors are
prepping their drivers for new silicon.
Summary:
- Driver updates and cleanup for qedr, bnxt_re, hns, siw, mlx5, mlx4,
rxe, i40iw
- Larger series doing cleanup and rework for hns and hfi1.
- Some general reworking of the CM code to make it a little more
understandable
- Unify the different code paths connected to the uverbs FD scheme
- New UAPI ioctls conversions for get context and get async fd
- Trace points for CQ and CM portions of the RDMA stack
- mlx5 driver support for virtio-net formatted rings as RDMA raw
ethernet QPs
- verbs support for setting the PCI-E relaxed ordering bit on DMA
traffic connected to a MR
- A couple of bug fixes that came too late to make rc7"
* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (108 commits)
RDMA/core: Make the entire API tree static
RDMA/efa: Mask access flags with the correct optional range
RDMA/cma: Fix unbalanced cm_id reference count during address resolve
RDMA/umem: Fix ib_umem_find_best_pgsz()
IB/mlx4: Fix leak in id_map_find_del
IB/opa_vnic: Spelling correction of 'erorr' to 'error'
IB/hfi1: Fix logical condition in msix_request_irq
RDMA/cm: Remove CM message structs
RDMA/cm: Use IBA functions for complex structure members
RDMA/cm: Use IBA functions for simple structure members
RDMA/cm: Use IBA functions for swapping get/set acessors
RDMA/cm: Use IBA functions for simple get/set acessors
RDMA/cm: Add SET/GET implementations to hide IBA wire format
RDMA/cm: Add accessors for CM_REQ transport_type
IB/mlx5: Return the administrative GUID if exists
RDMA/core: Ensure that rdma_user_mmap_entry_remove() is a fence
IB/mlx4: Fix memory leak in add_gid error flow
IB/mlx5: Expose RoCE accelerator counters
RDMA/mlx5: Set relaxed ordering when requested
RDMA/core: Add the core support field to METHOD_GET_CONTEXT
...
Diffstat (limited to 'drivers/infiniband/sw/siw/siw.h')
-rw-r--r-- | drivers/infiniband/sw/siw/siw.h | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/drivers/infiniband/sw/siw/siw.h b/drivers/infiniband/sw/siw/siw.h index b939f489cd46..af5e9f8c0fcd 100644 --- a/drivers/infiniband/sw/siw/siw.h +++ b/drivers/infiniband/sw/siw/siw.h @@ -7,6 +7,7 @@ #define _SIW_H #include <rdma/ib_verbs.h> +#include <rdma/restrack.h> #include <linux/socket.h> #include <linux/skbuff.h> #include <crypto/hash.h> @@ -209,7 +210,6 @@ struct siw_cq { u32 cq_put; u32 cq_get; u32 num_cqe; - bool kernel_verbs; struct rdma_user_mmap_entry *cq_entry; /* mmap info for CQE array */ u32 id; /* For debugging only */ }; @@ -254,8 +254,8 @@ struct siw_srq { u32 rq_get; u32 num_rqe; /* max # of wqe's allowed */ struct rdma_user_mmap_entry *srq_entry; /* mmap info for SRQ array */ - char armed; /* inform user if limit hit */ - char kernel_verbs; /* '1' if kernel client */ + bool armed:1; /* inform user if limit hit */ + bool is_kernel_res:1; /* true if kernel client */ }; struct siw_qp_attrs { @@ -418,13 +418,11 @@ struct siw_iwarp_tx { }; struct siw_qp { + struct ib_qp base_qp; struct siw_device *sdev; - struct ib_qp *ib_qp; struct kref ref; - u32 qp_num; struct list_head devq; int tx_cpu; - bool kernel_verbs; struct siw_qp_attrs attrs; struct siw_cep *cep; @@ -472,11 +470,6 @@ struct siw_qp { struct rcu_head rcu; }; -struct siw_base_qp { - struct ib_qp base_qp; - struct siw_qp *qp; -}; - /* helper macros */ #define rx_qp(rx) container_of(rx, struct siw_qp, rx_stream) #define tx_qp(tx) container_of(tx, struct siw_qp, tx_ctx) @@ -572,14 +565,9 @@ static inline struct siw_ucontext *to_siw_ctx(struct ib_ucontext *base_ctx) return container_of(base_ctx, struct siw_ucontext, base_ucontext); } -static inline struct siw_base_qp *to_siw_base_qp(struct ib_qp *base_qp) -{ - return container_of(base_qp, struct siw_base_qp, base_qp); -} - static inline struct siw_qp *to_siw_qp(struct ib_qp *base_qp) { - return to_siw_base_qp(base_qp)->qp; + return container_of(base_qp, struct siw_qp, base_qp); } static inline struct siw_cq *to_siw_cq(struct ib_cq *base_cq) @@ -624,7 +612,7 @@ static inline struct siw_qp *siw_qp_id2obj(struct siw_device *sdev, int id) static inline u32 qp_id(struct siw_qp *qp) { - return qp->qp_num; + return qp->base_qp.qp_num; } static inline void siw_qp_get(struct siw_qp *qp) @@ -735,7 +723,7 @@ static inline void siw_crc_skb(struct siw_rx_stream *srx, unsigned int len) "MEM[0x%08x] %s: " fmt, mem->stag, __func__, ##__VA_ARGS__) #define siw_dbg_cep(cep, fmt, ...) \ - ibdev_dbg(&cep->sdev->base_dev, "CEP[0x%pK] %s: " fmt, \ + ibdev_dbg(&cep->sdev->base_dev, "CEP[0x%pK] %s: " fmt, \ cep, __func__, ##__VA_ARGS__) void siw_cq_flush(struct siw_cq *cq); |