Skip to content

Commit

Permalink
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/gi…
Browse files Browse the repository at this point in the history
…t/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
  ...
  • Loading branch information
torvalds committed Jul 1, 2021
2 parents 514798d + 3d82875 commit e04360a
Show file tree
Hide file tree
Showing 233 changed files with 38,023 additions and 34,428 deletions.
20 changes: 0 additions & 20 deletions Documentation/ABI/stable/sysfs-class-infiniband
Original file line number Diff line number Diff line change
Expand Up @@ -731,26 +731,6 @@ Description:
is the irq number of "sdma3", and M is irq number of "sdma4" in
the /proc/interrupts file.


sysfs interface for Intel(R) X722 iWARP i40iw driver
----------------------------------------------------

What: /sys/class/infiniband/i40iwX/hw_rev
What: /sys/class/infiniband/i40iwX/hca_type
What: /sys/class/infiniband/i40iwX/board_id
Date: Jan, 2016
KernelVersion: v4.10
Contact: [email protected]
Description:
=============== ==== ========================
hw_rev: (RO) Hardware revision number

hca_type: (RO) Show HCA type (I40IW)

board_id: (RO) I40IW board ID
=============== ==== ========================


sysfs interface for QLogic qedr NIC Driver
------------------------------------------

Expand Down
20 changes: 8 additions & 12 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -3737,9 +3737,6 @@ F: drivers/gpio/gpio-bcm-kona.c

BROADCOM NETXTREME-E ROCE DRIVER
M: Selvin Xavier <[email protected]>
M: Devesh Sharma <[email protected]>
M: Somnath Kotur <[email protected]>
M: Sriharsha Basavapatna <[email protected]>
M: Naresh Kumar PBS <[email protected]>
L: [email protected]
S: Supported
Expand Down Expand Up @@ -6779,7 +6776,6 @@ F: drivers/net/ethernet/emulex/benet/

EMULEX ONECONNECT ROCE DRIVER
M: Selvin Xavier <[email protected]>
M: Devesh Sharma <[email protected]>
L: [email protected]
S: Odd Fixes
W: http://www.broadcom.com
Expand Down Expand Up @@ -9182,6 +9178,14 @@ F: drivers/net/ethernet/intel/*/
F: include/linux/avf/virtchnl.h
F: include/linux/net/intel/iidc.h

INTEL ETHERNET PROTOCOL DRIVER FOR RDMA
M: Mustafa Ismail <[email protected]>
M: Shiraz Saleem <[email protected]>
L: [email protected]
S: Supported
F: drivers/infiniband/hw/irdma/
F: include/uapi/rdma/irdma-abi.h

INTEL FRAMEBUFFER DRIVER (excluding 810 and 815)
M: Maik Broemme <[email protected]>
L: [email protected]
Expand Down Expand Up @@ -9421,14 +9425,6 @@ L: [email protected]
S: Supported
F: drivers/cpufreq/intel_pstate.c

INTEL RDMA RNIC DRIVER
M: Faisal Latif <[email protected]>
M: Shiraz Saleem <[email protected]>
L: [email protected]
S: Supported
F: drivers/infiniband/hw/i40iw/
F: include/uapi/rdma/i40iw-abi.h

INTEL SCU DRIVERS
M: Mika Westerberg <[email protected]>
S: Maintained
Expand Down
5 changes: 3 additions & 2 deletions drivers/block/rnbd/rnbd-clt.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ static int rnbd_clt_set_dev_attr(struct rnbd_clt_dev *dev,
dev->fua = !!(rsp->cache_policy & RNBD_FUA);

dev->max_hw_sectors = sess->max_io_size / SECTOR_SIZE;
dev->max_segments = BMAX_SEGMENTS;
dev->max_segments = sess->max_segments;

return 0;
}
Expand Down Expand Up @@ -1292,7 +1292,7 @@ find_and_get_or_create_sess(const char *sessname,
sess->rtrs = rtrs_clt_open(&rtrs_ops, sessname,
paths, path_cnt, port_nr,
0, /* Do not use pdu of rtrs */
RECONNECT_DELAY, BMAX_SEGMENTS,
RECONNECT_DELAY,
MAX_RECONNECTS, nr_poll_queues);
if (IS_ERR(sess->rtrs)) {
err = PTR_ERR(sess->rtrs);
Expand All @@ -1306,6 +1306,7 @@ find_and_get_or_create_sess(const char *sessname,
sess->max_io_size = attrs.max_io_size;
sess->queue_depth = attrs.queue_depth;
sess->nr_poll_queues = nr_poll_queues;
sess->max_segments = attrs.max_segments;

err = setup_mq_tags(sess);
if (err)
Expand Down
5 changes: 1 addition & 4 deletions drivers/block/rnbd/rnbd-clt.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@
#include "rnbd-proto.h"
#include "rnbd-log.h"

/* Max. number of segments per IO request, Mellanox Connect X ~ Connect X5,
* choose minimial 30 for all, minus 1 for internal protocol, so 29.
*/
#define BMAX_SEGMENTS 29
/* time in seconds between reconnect tries, default to 30 s */
#define RECONNECT_DELAY 30
/*
Expand Down Expand Up @@ -89,6 +85,7 @@ struct rnbd_clt_session {
atomic_t busy;
size_t queue_depth;
u32 max_io_size;
u32 max_segments;
struct blk_mq_tag_set tag_set;
u32 nr_poll_queues;
struct mutex lock; /* protects state and devs_list */
Expand Down
2 changes: 1 addition & 1 deletion drivers/infiniband/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ source "drivers/infiniband/hw/mthca/Kconfig"
source "drivers/infiniband/hw/qib/Kconfig"
source "drivers/infiniband/hw/cxgb4/Kconfig"
source "drivers/infiniband/hw/efa/Kconfig"
source "drivers/infiniband/hw/i40iw/Kconfig"
source "drivers/infiniband/hw/irdma/Kconfig"
source "drivers/infiniband/hw/mlx4/Kconfig"
source "drivers/infiniband/hw/mlx5/Kconfig"
source "drivers/infiniband/hw/ocrdma/Kconfig"
Expand Down
40 changes: 21 additions & 19 deletions drivers/infiniband/core/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ static void free_gid_entry_locked(struct ib_gid_table_entry *entry)
u32 port_num = entry->attr.port_num;
struct ib_gid_table *table = rdma_gid_table(device, port_num);

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

write_lock_irq(&table->rwlock);
Expand Down Expand Up @@ -323,7 +323,7 @@ static void store_gid_entry(struct ib_gid_table *table,
{
entry->state = GID_TABLE_ENTRY_VALID;

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

Expand Down Expand Up @@ -354,15 +354,15 @@ static int add_roce_gid(struct ib_gid_table_entry *entry)
int ret;

if (!attr->ndev) {
dev_err(&attr->device->dev, "%s NULL netdev port=%d index=%d\n",
dev_err(&attr->device->dev, "%s NULL netdev port=%u index=%u\n",
__func__, attr->port_num, attr->index);
return -EINVAL;
}
if (rdma_cap_roce_gid_table(attr->device, attr->port_num)) {
ret = attr->device->ops.add_gid(attr, &entry->context);
if (ret) {
dev_err(&attr->device->dev,
"%s GID add failed port=%d index=%d\n",
"%s GID add failed port=%u index=%u\n",
__func__, attr->port_num, attr->index);
return ret;
}
Expand Down Expand Up @@ -805,7 +805,7 @@ static void release_gid_table(struct ib_device *device,
continue;
if (kref_read(&table->data_vec[i]->kref) > 1) {
dev_err(&device->dev,
"GID entry ref leak for index %d ref=%d\n", i,
"GID entry ref leak for index %d ref=%u\n", i,
kref_read(&table->data_vec[i]->kref));
leak = true;
}
Expand Down Expand Up @@ -1069,19 +1069,14 @@ int ib_get_cached_pkey(struct ib_device *device,
}
EXPORT_SYMBOL(ib_get_cached_pkey);

int ib_get_cached_subnet_prefix(struct ib_device *device, u32 port_num,
void ib_get_cached_subnet_prefix(struct ib_device *device, u32 port_num,
u64 *sn_pfx)
{
unsigned long flags;

if (!rdma_is_port_valid(device, port_num))
return -EINVAL;

read_lock_irqsave(&device->cache_lock, flags);
*sn_pfx = device->port_data[port_num].cache.subnet_prefix;
read_unlock_irqrestore(&device->cache_lock, flags);

return 0;
}
EXPORT_SYMBOL(ib_get_cached_subnet_prefix);

Expand Down Expand Up @@ -1465,10 +1460,12 @@ static int config_non_roce_gid_cache(struct ib_device *device,
}

static int
ib_cache_update(struct ib_device *device, u32 port, bool enforce_security)
ib_cache_update(struct ib_device *device, u32 port, bool update_gids,
bool update_pkeys, bool enforce_security)
{
struct ib_port_attr *tprops = NULL;
struct ib_pkey_cache *pkey_cache = NULL, *old_pkey_cache;
struct ib_pkey_cache *pkey_cache = NULL;
struct ib_pkey_cache *old_pkey_cache = NULL;
int i;
int ret;

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

if (!rdma_protocol_roce(device, port)) {
if (!rdma_protocol_roce(device, port) && update_gids) {
ret = config_non_roce_gid_cache(device, port,
tprops->gid_tbl_len);
if (ret)
goto err;
}

if (tprops->pkey_tbl_len) {
update_pkeys &= !!tprops->pkey_tbl_len;

if (update_pkeys) {
pkey_cache = kmalloc(struct_size(pkey_cache, table,
tprops->pkey_tbl_len),
GFP_KERNEL);
Expand All @@ -1517,9 +1516,10 @@ ib_cache_update(struct ib_device *device, u32 port, bool enforce_security)

write_lock_irq(&device->cache_lock);

old_pkey_cache = device->port_data[port].cache.pkey;

device->port_data[port].cache.pkey = pkey_cache;
if (update_pkeys) {
old_pkey_cache = device->port_data[port].cache.pkey;
device->port_data[port].cache.pkey = pkey_cache;
}
device->port_data[port].cache.lmc = tprops->lmc;
device->port_data[port].cache.port_state = tprops->state;

Expand Down Expand Up @@ -1551,6 +1551,8 @@ static void ib_cache_event_task(struct work_struct *_work)
* the cache.
*/
ret = ib_cache_update(work->event.device, work->event.element.port_num,
work->event.event == IB_EVENT_GID_CHANGE,
work->event.event == IB_EVENT_PKEY_CHANGE,
work->enforce_security);

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

rdma_for_each_port (device, p) {
err = ib_cache_update(device, p, true);
err = ib_cache_update(device, p, true, true, true);
if (err)
return err;
}
Expand Down
Loading

0 comments on commit e04360a

Please sign in to comment.