Skip to content

Commit 2dacc1e

Browse files
committed
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma
Pull rdma updates from Jason Gunthorpe: - Minor bug fixes in mlx5, mthca, pvrdma, rtrs, mlx4, hfi1, hns - Minor cleanups: coding style, useless includes and documentation - Reorganize how multicast processing works in rxe - Replace a red/black tree with xarray in rxe which improves performance - DSCP support and HW address handle re-use in irdma - Simplify the mailbox command handling in hns - Simplify iser now that FMR is eliminated * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (93 commits) RDMA/nldev: Prevent underflow in nldev_stat_set_counter_dynamic_doit() IB/iser: Fix error flow in case of registration failure IB/iser: Generalize map/unmap dma tasks IB/iser: Use iser_fr_desc as registration context IB/iser: Remove iser_reg_data_sg helper function RDMA/rxe: Use standard names for ref counting RDMA/rxe: Replace red-black trees by xarrays RDMA/rxe: Shorten pool names in rxe_pool.c RDMA/rxe: Move max_elem into rxe_type_info RDMA/rxe: Replace obj by elem in declaration RDMA/rxe: Delete _locked() APIs for pool objects RDMA/rxe: Reverse the sense of RXE_POOL_NO_ALLOC RDMA/rxe: Replace mr by rkey in responder resources RDMA/rxe: Fix ref error in rxe_av.c RDMA/hns: Use the reserved loopback QPs to free MR before destroying MPT RDMA/irdma: Add support for address handle re-use RDMA/qib: Fix typos in comments RDMA/mlx5: Fix memory leak in error flow for subscribe event routine Revert "RDMA/core: Fix ib_qp_usecnt_dec() called when error" RDMA/rxe: Remove useless argument for update_state() ...
2 parents 85c7000 + 87e0eac commit 2dacc1e

106 files changed

Lines changed: 2870 additions & 2875 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

drivers/infiniband/core/addr.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
#include <linux/inetdevice.h>
3838
#include <linux/slab.h>
3939
#include <linux/workqueue.h>
40-
#include <linux/module.h>
4140
#include <net/arp.h>
4241
#include <net/neighbour.h>
4342
#include <net/route.h>

drivers/infiniband/core/cache.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
*/
3535

3636
#include <linux/if_vlan.h>
37-
#include <linux/module.h>
3837
#include <linux/errno.h>
3938
#include <linux/slab.h>
4039
#include <linux/workqueue.h>

drivers/infiniband/core/cma.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2642,7 +2642,7 @@ int rdma_set_ack_timeout(struct rdma_cm_id *id, u8 timeout)
26422642
{
26432643
struct rdma_id_private *id_priv;
26442644

2645-
if (id->qp_type != IB_QPT_RC)
2645+
if (id->qp_type != IB_QPT_RC && id->qp_type != IB_QPT_XRC_INI)
26462646
return -EINVAL;
26472647

26482648
id_priv = container_of(id, struct rdma_id_private, id);

drivers/infiniband/core/cma_configfs.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
* SOFTWARE.
3131
*/
3232

33-
#include <linux/module.h>
3433
#include <linux/configfs.h>
3534
#include <rdma/ib_verbs.h>
3635
#include <rdma/rdma_cm.h>

drivers/infiniband/core/cq.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
/*
33
* Copyright (c) 2015 HGST, a Western Digital Company.
44
*/
5-
#include <linux/module.h>
65
#include <linux/err.h>
76
#include <linux/slab.h>
87
#include <rdma/ib_verbs.h>

drivers/infiniband/core/iwpm_util.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
#ifndef _IWPM_UTIL_H
3434
#define _IWPM_UTIL_H
3535

36-
#include <linux/module.h>
3736
#include <linux/io.h>
3837
#include <linux/in.h>
3938
#include <linux/in6.h>

drivers/infiniband/core/nldev.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1951,9 +1951,10 @@ static int nldev_stat_set_counter_dynamic_doit(struct nlattr *tb[],
19511951
u32 port)
19521952
{
19531953
struct rdma_hw_stats *stats;
1954-
int rem, i, index, ret = 0;
19551954
struct nlattr *entry_attr;
19561955
unsigned long *target;
1956+
int rem, i, ret = 0;
1957+
u32 index;
19571958

19581959
stats = ib_get_hw_stats_port(device, port);
19591960
if (!stats)

drivers/infiniband/core/sa_query.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
* SOFTWARE.
3333
*/
3434

35-
#include <linux/module.h>
3635
#include <linux/init.h>
3736
#include <linux/err.h>
3837
#include <linux/random.h>

drivers/infiniband/core/verbs.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,6 @@ struct ib_pd *__ib_alloc_pd(struct ib_device *device, unsigned int flags,
268268
return ERR_PTR(-ENOMEM);
269269

270270
pd->device = device;
271-
pd->uobject = NULL;
272-
pd->__internal_mr = NULL;
273-
atomic_set(&pd->usecnt, 0);
274271
pd->flags = flags;
275272

276273
rdma_restrack_new(&pd->res, RDMA_RESTRACK_PD);
@@ -341,11 +338,6 @@ int ib_dealloc_pd_user(struct ib_pd *pd, struct ib_udata *udata)
341338
pd->__internal_mr = NULL;
342339
}
343340

344-
/* uverbs manipulates usecnt with proper locking, while the kabi
345-
* requires the caller to guarantee we can't race here.
346-
*/
347-
WARN_ON(atomic_read(&pd->usecnt));
348-
349341
ret = pd->device->ops.dealloc_pd(pd, udata);
350342
if (ret)
351343
return ret;
@@ -2153,6 +2145,7 @@ struct ib_mr *ib_reg_user_mr(struct ib_pd *pd, u64 start, u64 length,
21532145
return mr;
21542146

21552147
mr->device = pd->device;
2148+
mr->type = IB_MR_TYPE_USER;
21562149
mr->pd = pd;
21572150
mr->dm = NULL;
21582151
atomic_inc(&pd->usecnt);

drivers/infiniband/hw/hfi1/affinity.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
#include <linux/topology.h>
77
#include <linux/cpumask.h>
8-
#include <linux/module.h>
98
#include <linux/interrupt.h>
109
#include <linux/numa.h>
1110

@@ -667,7 +666,7 @@ int hfi1_dev_affinity_init(struct hfi1_devdata *dd)
667666
* engines, use the same CPU cores as general/control
668667
* context.
669668
*/
670-
if (cpumask_weight(&entry->def_intr.mask) == 0)
669+
if (cpumask_empty(&entry->def_intr.mask))
671670
cpumask_copy(&entry->def_intr.mask,
672671
&entry->general_intr_mask);
673672
}
@@ -687,7 +686,7 @@ int hfi1_dev_affinity_init(struct hfi1_devdata *dd)
687686
* vectors, use the same CPU core as the general/control
688687
* context.
689688
*/
690-
if (cpumask_weight(&entry->comp_vect_mask) == 0)
689+
if (cpumask_empty(&entry->comp_vect_mask))
691690
cpumask_copy(&entry->comp_vect_mask,
692691
&entry->general_intr_mask);
693692
}

0 commit comments

Comments
 (0)