mirror of
https://github.com/torvalds/linux.git
synced 2026-05-02 05:22:49 -04:00
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma
Pull rdma updates from Jason Gunthorpe:
- Various minor code cleanups and fixes for hns, iser, cxgb4, hfi1,
rxe, erdma, mana_ib
- Prefetch supprot for rxe ODP
- Remove memory window support from hns as new device FW is no longer
support it
- Remove qib, it is very old and obsolete now, Cornelis wishes to
restructure the hfi1/qib shared layer
- Fix a race in destroying CQs where we can still end up with work
running because the work is cancled before the driver stops
triggering it
- Improve interaction with namespaces:
* Follow the devlink namespace for newly spawned RDMA devices
* Create iopoib net devces in the parent IB device's namespace
* Allow CAP_NET_RAW checks to pass in user namespaces
- A new flow control scheme for IB MADs to try and avoid queue
overflows in the network
- Fix 2G message sizes in bnxt_re
- Optimize mkey layout for mlx5 DMABUF
- New "DMA Handle" concept to allow controlling PCI TPH and steering
tags
* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (71 commits)
RDMA/siw: Change maintainer email address
RDMA/mana_ib: add support of multiple ports
RDMA/mlx5: Refactor optional counters steering code
RDMA/mlx5: Add DMAH support for reg_user_mr/reg_user_dmabuf_mr
IB: Extend UVERBS_METHOD_REG_MR to get DMAH
RDMA/mlx5: Add DMAH object support
RDMA/core: Introduce a DMAH object and its alloc/free APIs
IB/core: Add UVERBS_METHOD_REG_MR on the MR object
net/mlx5: Add support for device steering tag
net/mlx5: Expose IFC bits for TPH
PCI/TPH: Expose pcie_tph_get_st_table_size()
RDMA/mlx5: Fix incorrect MKEY masking
RDMA/mlx5: Fix returned type from _mlx5r_umr_zap_mkey()
RDMA/mlx5: remove redundant check on err on return expression
RDMA/mana_ib: add additional port counters
RDMA/mana_ib: Fix DSCP value in modify QP
RDMA/efa: Add CQ with external memory support
RDMA/core: Add umem "is_contiguous" and "start_dma_addr" helpers
RDMA/uverbs: Add a common way to create CQ with umem
RDMA/mlx5: Optimize DMABUF mkey page size
...
This commit is contained in:
@@ -16,6 +16,18 @@ struct mlx5_ib_counter {
|
||||
u32 type;
|
||||
};
|
||||
|
||||
struct mlx5_rdma_counter {
|
||||
struct rdma_counter rdma_counter;
|
||||
|
||||
struct mlx5_fc *fc[MLX5_IB_OPCOUNTER_MAX];
|
||||
struct xarray qpn_opfc_xa;
|
||||
};
|
||||
|
||||
static struct mlx5_rdma_counter *to_mcounter(struct rdma_counter *counter)
|
||||
{
|
||||
return container_of(counter, struct mlx5_rdma_counter, rdma_counter);
|
||||
}
|
||||
|
||||
#define INIT_Q_COUNTER(_name) \
|
||||
{ .name = #_name, .offset = MLX5_BYTE_OFF(query_q_counter_out, _name)}
|
||||
|
||||
@@ -602,7 +614,7 @@ static int mlx5_ib_counter_dealloc(struct rdma_counter *counter)
|
||||
return 0;
|
||||
|
||||
WARN_ON(!xa_empty(&mcounter->qpn_opfc_xa));
|
||||
mlx5r_fs_destroy_fcs(dev, counter);
|
||||
mlx5r_fs_destroy_fcs(dev, mcounter->fc);
|
||||
MLX5_SET(dealloc_q_counter_in, in, opcode,
|
||||
MLX5_CMD_OP_DEALLOC_Q_COUNTER);
|
||||
MLX5_SET(dealloc_q_counter_in, in, counter_set_id, counter->id);
|
||||
@@ -612,6 +624,7 @@ static int mlx5_ib_counter_dealloc(struct rdma_counter *counter)
|
||||
static int mlx5_ib_counter_bind_qp(struct rdma_counter *counter,
|
||||
struct ib_qp *qp, u32 port)
|
||||
{
|
||||
struct mlx5_rdma_counter *mcounter = to_mcounter(counter);
|
||||
struct mlx5_ib_dev *dev = to_mdev(qp->device);
|
||||
bool new = false;
|
||||
int err;
|
||||
@@ -635,7 +648,11 @@ static int mlx5_ib_counter_bind_qp(struct rdma_counter *counter,
|
||||
if (err)
|
||||
goto fail_set_counter;
|
||||
|
||||
err = mlx5r_fs_bind_op_fc(qp, counter, port);
|
||||
if (!counter->mode.bind_opcnt)
|
||||
return 0;
|
||||
|
||||
err = mlx5r_fs_bind_op_fc(qp, mcounter->fc, &mcounter->qpn_opfc_xa,
|
||||
port);
|
||||
if (err)
|
||||
goto fail_bind_op_fc;
|
||||
|
||||
@@ -655,9 +672,12 @@ fail_set_counter:
|
||||
static int mlx5_ib_counter_unbind_qp(struct ib_qp *qp, u32 port)
|
||||
{
|
||||
struct rdma_counter *counter = qp->counter;
|
||||
struct mlx5_rdma_counter *mcounter;
|
||||
int err;
|
||||
|
||||
mlx5r_fs_unbind_op_fc(qp, counter);
|
||||
mcounter = to_mcounter(counter);
|
||||
|
||||
mlx5r_fs_unbind_op_fc(qp, &mcounter->qpn_opfc_xa);
|
||||
|
||||
err = mlx5_ib_qp_set_counter(qp, NULL);
|
||||
if (err)
|
||||
@@ -666,7 +686,9 @@ static int mlx5_ib_counter_unbind_qp(struct ib_qp *qp, u32 port)
|
||||
return 0;
|
||||
|
||||
fail_set_counter:
|
||||
mlx5r_fs_bind_op_fc(qp, counter, port);
|
||||
if (counter->mode.bind_opcnt)
|
||||
mlx5r_fs_bind_op_fc(qp, mcounter->fc,
|
||||
&mcounter->qpn_opfc_xa, port);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user