Skip to content

Commit e04360a

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: "This contains a replacement driver for Intel iWarp hardware. This new driver supports the old ethernet hardware and also newer chips that can do ROCE. Other than that, this contains the typical mix of patches: - Driver updates and cleanups for bnxt_re, cxgb4, mlx4, and mlx5 - Many static checker driven code clean ups, including a wide refcount_t conversion - Several series for the hns driver, more HIP09 HW capabilities, migration to new HW register manipulators, and code cleanups - Minor fixes and improvements in srp, rts, and cm - Improvements throughout for sysfs related code to use DEVICE_ATTR_*, make the ib_port sysfs first-class, and overall use sysfs APIs properly - Intel's new irdma driver replacing i40iw - rxe general clean ups and Memory Window support" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (211 commits) RDMA/core: Always release restrack object RDMA/mlx5: Don't access NULL-cleared mpi pointer RDMA/irdma: Fix potential overflow expression in irdma_prm_get_pbles RDMA/irdma: Check contents of user-space irdma_mem_reg_req object RDMA/rxe: Missing unlock on error in get_srq_wqe() RDMA/cma: Fix rdma_resolve_route() memory leak RDMA/core/sa_query: Remove unused argument RDMA/cma: Fix incorrect Packet Lifetime calculation RDMA/cma: Protect RMW with qp_mutex RDMA/cma: Remove unnecessary INIT->INIT transition RDMA/hns: Add window selection field of congestion control RDMA/hfi1: Remove use of kmap() RDMA/irdma: Remove use of kmap() RDMA/bnxt_re: Fix uninitialized struct bit field rsvd1 IB/isert: Align target max I/O size to initiator size RDMA/hns: Fix incorrect vlan enable bit in QPC MAINTAINERS: Update Broadcom RDMA maintainers RDMA/irdma: Use the queried port attributes RDMA/rxe: Fix redundant skb_put_zero RDMA/rxe: Fix extra copy in prepare_ack_packet ...
2 parents 514798d + 3d82875 commit e04360a

File tree

233 files changed

+38023
-34428
lines changed

Some content is hidden

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

233 files changed

+38023
-34428
lines changed

Documentation/ABI/stable/sysfs-class-infiniband

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -731,26 +731,6 @@ Description:
731731
is the irq number of "sdma3", and M is irq number of "sdma4" in
732732
the /proc/interrupts file.
733733

734-
735-
sysfs interface for Intel(R) X722 iWARP i40iw driver
736-
----------------------------------------------------
737-
738-
What: /sys/class/infiniband/i40iwX/hw_rev
739-
What: /sys/class/infiniband/i40iwX/hca_type
740-
What: /sys/class/infiniband/i40iwX/board_id
741-
Date: Jan, 2016
742-
KernelVersion: v4.10
743-
744-
Description:
745-
=============== ==== ========================
746-
hw_rev: (RO) Hardware revision number
747-
748-
hca_type: (RO) Show HCA type (I40IW)
749-
750-
board_id: (RO) I40IW board ID
751-
=============== ==== ========================
752-
753-
754734
sysfs interface for QLogic qedr NIC Driver
755735
------------------------------------------
756736

MAINTAINERS

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3737,9 +3737,6 @@ F: drivers/gpio/gpio-bcm-kona.c
37373737

37383738
BROADCOM NETXTREME-E ROCE DRIVER
37393739
M: Selvin Xavier <[email protected]>
3740-
M: Devesh Sharma <[email protected]>
3741-
M: Somnath Kotur <[email protected]>
3742-
M: Sriharsha Basavapatna <[email protected]>
37433740
M: Naresh Kumar PBS <[email protected]>
37443741
37453742
S: Supported
@@ -6779,7 +6776,6 @@ F: drivers/net/ethernet/emulex/benet/
67796776

67806777
EMULEX ONECONNECT ROCE DRIVER
67816778
M: Selvin Xavier <[email protected]>
6782-
M: Devesh Sharma <[email protected]>
67836779
67846780
S: Odd Fixes
67856781
W: http://www.broadcom.com
@@ -9182,6 +9178,14 @@ F: drivers/net/ethernet/intel/*/
91829178
F: include/linux/avf/virtchnl.h
91839179
F: include/linux/net/intel/iidc.h
91849180

9181+
INTEL ETHERNET PROTOCOL DRIVER FOR RDMA
9182+
M: Mustafa Ismail <[email protected]>
9183+
M: Shiraz Saleem <[email protected]>
9184+
9185+
S: Supported
9186+
F: drivers/infiniband/hw/irdma/
9187+
F: include/uapi/rdma/irdma-abi.h
9188+
91859189
INTEL FRAMEBUFFER DRIVER (excluding 810 and 815)
91869190
M: Maik Broemme <[email protected]>
91879191
@@ -9421,14 +9425,6 @@ L: [email protected]
94219425
S: Supported
94229426
F: drivers/cpufreq/intel_pstate.c
94239427

9424-
INTEL RDMA RNIC DRIVER
9425-
M: Faisal Latif <[email protected]>
9426-
M: Shiraz Saleem <[email protected]>
9427-
9428-
S: Supported
9429-
F: drivers/infiniband/hw/i40iw/
9430-
F: include/uapi/rdma/i40iw-abi.h
9431-
94329428
INTEL SCU DRIVERS
94339429
M: Mika Westerberg <[email protected]>
94349430
S: Maintained

drivers/block/rnbd/rnbd-clt.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ static int rnbd_clt_set_dev_attr(struct rnbd_clt_dev *dev,
9292
dev->fua = !!(rsp->cache_policy & RNBD_FUA);
9393

9494
dev->max_hw_sectors = sess->max_io_size / SECTOR_SIZE;
95-
dev->max_segments = BMAX_SEGMENTS;
95+
dev->max_segments = sess->max_segments;
9696

9797
return 0;
9898
}
@@ -1292,7 +1292,7 @@ find_and_get_or_create_sess(const char *sessname,
12921292
sess->rtrs = rtrs_clt_open(&rtrs_ops, sessname,
12931293
paths, path_cnt, port_nr,
12941294
0, /* Do not use pdu of rtrs */
1295-
RECONNECT_DELAY, BMAX_SEGMENTS,
1295+
RECONNECT_DELAY,
12961296
MAX_RECONNECTS, nr_poll_queues);
12971297
if (IS_ERR(sess->rtrs)) {
12981298
err = PTR_ERR(sess->rtrs);
@@ -1306,6 +1306,7 @@ find_and_get_or_create_sess(const char *sessname,
13061306
sess->max_io_size = attrs.max_io_size;
13071307
sess->queue_depth = attrs.queue_depth;
13081308
sess->nr_poll_queues = nr_poll_queues;
1309+
sess->max_segments = attrs.max_segments;
13091310

13101311
err = setup_mq_tags(sess);
13111312
if (err)

drivers/block/rnbd/rnbd-clt.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@
2020
#include "rnbd-proto.h"
2121
#include "rnbd-log.h"
2222

23-
/* Max. number of segments per IO request, Mellanox Connect X ~ Connect X5,
24-
* choose minimial 30 for all, minus 1 for internal protocol, so 29.
25-
*/
26-
#define BMAX_SEGMENTS 29
2723
/* time in seconds between reconnect tries, default to 30 s */
2824
#define RECONNECT_DELAY 30
2925
/*
@@ -89,6 +85,7 @@ struct rnbd_clt_session {
8985
atomic_t busy;
9086
size_t queue_depth;
9187
u32 max_io_size;
88+
u32 max_segments;
9289
struct blk_mq_tag_set tag_set;
9390
u32 nr_poll_queues;
9491
struct mutex lock; /* protects state and devs_list */

drivers/infiniband/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ source "drivers/infiniband/hw/mthca/Kconfig"
8282
source "drivers/infiniband/hw/qib/Kconfig"
8383
source "drivers/infiniband/hw/cxgb4/Kconfig"
8484
source "drivers/infiniband/hw/efa/Kconfig"
85-
source "drivers/infiniband/hw/i40iw/Kconfig"
85+
source "drivers/infiniband/hw/irdma/Kconfig"
8686
source "drivers/infiniband/hw/mlx4/Kconfig"
8787
source "drivers/infiniband/hw/mlx5/Kconfig"
8888
source "drivers/infiniband/hw/ocrdma/Kconfig"

drivers/infiniband/core/cache.c

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ static void free_gid_entry_locked(struct ib_gid_table_entry *entry)
240240
u32 port_num = entry->attr.port_num;
241241
struct ib_gid_table *table = rdma_gid_table(device, port_num);
242242

243-
dev_dbg(&device->dev, "%s port=%u index=%d gid %pI6\n", __func__,
243+
dev_dbg(&device->dev, "%s port=%u index=%u gid %pI6\n", __func__,
244244
port_num, entry->attr.index, entry->attr.gid.raw);
245245

246246
write_lock_irq(&table->rwlock);
@@ -323,7 +323,7 @@ static void store_gid_entry(struct ib_gid_table *table,
323323
{
324324
entry->state = GID_TABLE_ENTRY_VALID;
325325

326-
dev_dbg(&entry->attr.device->dev, "%s port=%d index=%d gid %pI6\n",
326+
dev_dbg(&entry->attr.device->dev, "%s port=%u index=%u gid %pI6\n",
327327
__func__, entry->attr.port_num, entry->attr.index,
328328
entry->attr.gid.raw);
329329

@@ -354,15 +354,15 @@ static int add_roce_gid(struct ib_gid_table_entry *entry)
354354
int ret;
355355

356356
if (!attr->ndev) {
357-
dev_err(&attr->device->dev, "%s NULL netdev port=%d index=%d\n",
357+
dev_err(&attr->device->dev, "%s NULL netdev port=%u index=%u\n",
358358
__func__, attr->port_num, attr->index);
359359
return -EINVAL;
360360
}
361361
if (rdma_cap_roce_gid_table(attr->device, attr->port_num)) {
362362
ret = attr->device->ops.add_gid(attr, &entry->context);
363363
if (ret) {
364364
dev_err(&attr->device->dev,
365-
"%s GID add failed port=%d index=%d\n",
365+
"%s GID add failed port=%u index=%u\n",
366366
__func__, attr->port_num, attr->index);
367367
return ret;
368368
}
@@ -805,7 +805,7 @@ static void release_gid_table(struct ib_device *device,
805805
continue;
806806
if (kref_read(&table->data_vec[i]->kref) > 1) {
807807
dev_err(&device->dev,
808-
"GID entry ref leak for index %d ref=%d\n", i,
808+
"GID entry ref leak for index %d ref=%u\n", i,
809809
kref_read(&table->data_vec[i]->kref));
810810
leak = true;
811811
}
@@ -1069,19 +1069,14 @@ int ib_get_cached_pkey(struct ib_device *device,
10691069
}
10701070
EXPORT_SYMBOL(ib_get_cached_pkey);
10711071

1072-
int ib_get_cached_subnet_prefix(struct ib_device *device, u32 port_num,
1072+
void ib_get_cached_subnet_prefix(struct ib_device *device, u32 port_num,
10731073
u64 *sn_pfx)
10741074
{
10751075
unsigned long flags;
10761076

1077-
if (!rdma_is_port_valid(device, port_num))
1078-
return -EINVAL;
1079-
10801077
read_lock_irqsave(&device->cache_lock, flags);
10811078
*sn_pfx = device->port_data[port_num].cache.subnet_prefix;
10821079
read_unlock_irqrestore(&device->cache_lock, flags);
1083-
1084-
return 0;
10851080
}
10861081
EXPORT_SYMBOL(ib_get_cached_subnet_prefix);
10871082

@@ -1465,10 +1460,12 @@ static int config_non_roce_gid_cache(struct ib_device *device,
14651460
}
14661461

14671462
static int
1468-
ib_cache_update(struct ib_device *device, u32 port, bool enforce_security)
1463+
ib_cache_update(struct ib_device *device, u32 port, bool update_gids,
1464+
bool update_pkeys, bool enforce_security)
14691465
{
14701466
struct ib_port_attr *tprops = NULL;
1471-
struct ib_pkey_cache *pkey_cache = NULL, *old_pkey_cache;
1467+
struct ib_pkey_cache *pkey_cache = NULL;
1468+
struct ib_pkey_cache *old_pkey_cache = NULL;
14721469
int i;
14731470
int ret;
14741471

@@ -1485,14 +1482,16 @@ ib_cache_update(struct ib_device *device, u32 port, bool enforce_security)
14851482
goto err;
14861483
}
14871484

1488-
if (!rdma_protocol_roce(device, port)) {
1485+
if (!rdma_protocol_roce(device, port) && update_gids) {
14891486
ret = config_non_roce_gid_cache(device, port,
14901487
tprops->gid_tbl_len);
14911488
if (ret)
14921489
goto err;
14931490
}
14941491

1495-
if (tprops->pkey_tbl_len) {
1492+
update_pkeys &= !!tprops->pkey_tbl_len;
1493+
1494+
if (update_pkeys) {
14961495
pkey_cache = kmalloc(struct_size(pkey_cache, table,
14971496
tprops->pkey_tbl_len),
14981497
GFP_KERNEL);
@@ -1517,9 +1516,10 @@ ib_cache_update(struct ib_device *device, u32 port, bool enforce_security)
15171516

15181517
write_lock_irq(&device->cache_lock);
15191518

1520-
old_pkey_cache = device->port_data[port].cache.pkey;
1521-
1522-
device->port_data[port].cache.pkey = pkey_cache;
1519+
if (update_pkeys) {
1520+
old_pkey_cache = device->port_data[port].cache.pkey;
1521+
device->port_data[port].cache.pkey = pkey_cache;
1522+
}
15231523
device->port_data[port].cache.lmc = tprops->lmc;
15241524
device->port_data[port].cache.port_state = tprops->state;
15251525

@@ -1551,6 +1551,8 @@ static void ib_cache_event_task(struct work_struct *_work)
15511551
* the cache.
15521552
*/
15531553
ret = ib_cache_update(work->event.device, work->event.element.port_num,
1554+
work->event.event == IB_EVENT_GID_CHANGE,
1555+
work->event.event == IB_EVENT_PKEY_CHANGE,
15541556
work->enforce_security);
15551557

15561558
/* GID event is notified already for individual GID entries by
@@ -1624,7 +1626,7 @@ int ib_cache_setup_one(struct ib_device *device)
16241626
return err;
16251627

16261628
rdma_for_each_port (device, p) {
1627-
err = ib_cache_update(device, p, true);
1629+
err = ib_cache_update(device, p, true, true, true);
16281630
if (err)
16291631
return err;
16301632
}

0 commit comments

Comments
 (0)