Skip to content

Commit f34b2cf

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 is significantly bug fixes and general cleanups. The noteworthy new features are fairly small: - XRC support for HNS and improves RQ operations - Bug fixes and updates for hns, mlx5, bnxt_re, hfi1, i40iw, rxe, siw and qib - Quite a few general cleanups on spelling, error handling, static checker detections, etc - Increase the number of device ports supported beyond 255. High port count software switches now exist - Several bug fixes for rtrs - mlx5 Device Memory support for host controlled atomics - Report SRQ tables through to rdma-tool" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (145 commits) IB/qib: Remove redundant assignment to ret RDMA/nldev: Add copy-on-fork attribute to get sys command RDMA/bnxt_re: Fix a double free in bnxt_qplib_alloc_res RDMA/siw: Fix a use after free in siw_alloc_mr IB/hfi1: Remove redundant variable rcd RDMA/nldev: Add QP numbers to SRQ information RDMA/nldev: Return SRQ information RDMA/restrack: Add support to get resource tracking for SRQ RDMA/nldev: Return context information RDMA/core: Add CM to restrack after successful attachment to a device RDMA/cma: Skip device which doesn't support CM RDMA/rxe: Fix a bug in rxe_fill_ip_info() RDMA/mlx5: Expose private query port RDMA/mlx4: Remove an unused variable RDMA/mlx5: Fix type assignment for ICM DM IB/mlx5: Set right RoCE l3 type and roce version while deleting GID RDMA/i40iw: Fix error unwinding when i40iw_hmc_sd_one fails RDMA/cxgb4: add missing qpid increment IB/ipoib: Remove unnecessary struct declaration RDMA/bnxt_re: Get rid of custom module reference counting ...
2 parents 9f67672 + 6da7bda commit f34b2cf

File tree

226 files changed

+5325
-4036
lines changed

Some content is hidden

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

226 files changed

+5325
-4036
lines changed

Documentation/ABI/testing/sysfs-class-rtrs-client

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ Description: Multipath policy specifies which path should be selected on each IO
3434
min-inflight (1):
3535
select path with minimum inflights.
3636

37+
min-latency (2):
38+
select path with minimum latency.
39+
3740
What: /sys/class/rtrs-client/<session-name>/paths/
3841
Date: Feb 2020
3942
KernelVersion: 5.7
@@ -95,6 +98,15 @@ KernelVersion: 5.7
9598
Contact: Jack Wang <[email protected]> Danil Kipnis <[email protected]>
9699
Description: RO, Contains the destination address of the path
97100

101+
What: /sys/class/rtrs-client/<session-name>/paths/<src@dst>/cur_latency
102+
Date: Feb 2020
103+
KernelVersion: 5.7
104+
Contact: Jack Wang <[email protected]> Danil Kipnis <[email protected]>
105+
Description: RO, Contains the latency time calculated by the heart-beat messages.
106+
Whenever the client sends heart-beat message, it checks the time gap
107+
between sending the heart-beat message and receiving the ACK.
108+
This value can be changed regularly.
109+
98110
What: /sys/class/rtrs-client/<session-name>/paths/<src@dst>/stats/reset_all
99111
Date: Feb 2020
100112
KernelVersion: 5.7

Documentation/devicetree/bindings/infiniband/hisilicon-hns-roce.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Hisilicon RoCE DT description
22

33
Hisilicon RoCE engine is a part of network subsystem.
4-
It works depending on other part of network wubsytem, such as, gmac and
4+
It works depending on other part of network subsystem, such as gmac and
55
dsa fabric.
66

77
Additional properties are described here:

MAINTAINERS

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8226,7 +8226,6 @@ F: drivers/crypto/hisilicon/zip/
82268226

82278227
HISILICON ROCE DRIVER
82288228
M: Lijun Ou <[email protected]>
8229-
M: Wei Hu(Xavier) <[email protected]>
82308229
M: Weihang Li <[email protected]>
82318230
82328231
S: Maintained
@@ -15826,8 +15825,8 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/jes/linux.git rtl8xxxu-deve
1582615825
F: drivers/net/wireless/realtek/rtl8xxxu/
1582715826

1582815827
RTRS TRANSPORT DRIVERS
15829-
M: Danil Kipnis <danil.kipnis@cloud.ionos.com>
15830-
M: Jack Wang <jinpu.wang@cloud.ionos.com>
15828+
M: Md. Haris Iqbal <haris.iqbal@ionos.com>
15829+
M: Jack Wang <[email protected]>
1583115830
1583215831
S: Maintained
1583315832
F: drivers/infiniband/ulp/rtrs/

drivers/infiniband/core/cache.c

Lines changed: 40 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ struct ib_gid_table {
121121
u32 default_gid_indices;
122122
};
123123

124-
static void dispatch_gid_change_event(struct ib_device *ib_dev, u8 port)
124+
static void dispatch_gid_change_event(struct ib_device *ib_dev, u32 port)
125125
{
126126
struct ib_event event;
127127

@@ -197,7 +197,7 @@ int ib_cache_gid_parse_type_str(const char *buf)
197197
}
198198
EXPORT_SYMBOL(ib_cache_gid_parse_type_str);
199199

200-
static struct ib_gid_table *rdma_gid_table(struct ib_device *device, u8 port)
200+
static struct ib_gid_table *rdma_gid_table(struct ib_device *device, u32 port)
201201
{
202202
return device->port_data[port].cache.gid;
203203
}
@@ -237,10 +237,10 @@ static void put_gid_ndev(struct rcu_head *head)
237237
static void free_gid_entry_locked(struct ib_gid_table_entry *entry)
238238
{
239239
struct ib_device *device = entry->attr.device;
240-
u8 port_num = entry->attr.port_num;
240+
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=%d index=%d gid %pI6\n", __func__,
243+
dev_dbg(&device->dev, "%s port=%u index=%d gid %pI6\n", __func__,
244244
port_num, entry->attr.index, entry->attr.gid.raw);
245245

246246
write_lock_irq(&table->rwlock);
@@ -282,7 +282,7 @@ static void free_gid_work(struct work_struct *work)
282282
struct ib_gid_table_entry *entry =
283283
container_of(work, struct ib_gid_table_entry, del_work);
284284
struct ib_device *device = entry->attr.device;
285-
u8 port_num = entry->attr.port_num;
285+
u32 port_num = entry->attr.port_num;
286286
struct ib_gid_table *table = rdma_gid_table(device, port_num);
287287

288288
mutex_lock(&table->lock);
@@ -379,15 +379,15 @@ static int add_roce_gid(struct ib_gid_table_entry *entry)
379379
* @ix: GID entry index to delete
380380
*
381381
*/
382-
static void del_gid(struct ib_device *ib_dev, u8 port,
382+
static void del_gid(struct ib_device *ib_dev, u32 port,
383383
struct ib_gid_table *table, int ix)
384384
{
385385
struct roce_gid_ndev_storage *ndev_storage;
386386
struct ib_gid_table_entry *entry;
387387

388388
lockdep_assert_held(&table->lock);
389389

390-
dev_dbg(&ib_dev->dev, "%s port=%d index=%d gid %pI6\n", __func__, port,
390+
dev_dbg(&ib_dev->dev, "%s port=%u index=%d gid %pI6\n", __func__, port,
391391
ix, table->data_vec[ix]->attr.gid.raw);
392392

393393
write_lock_irq(&table->rwlock);
@@ -543,7 +543,7 @@ static void make_default_gid(struct net_device *dev, union ib_gid *gid)
543543
addrconf_ifid_eui48(&gid->raw[8], dev);
544544
}
545545

546-
static int __ib_cache_gid_add(struct ib_device *ib_dev, u8 port,
546+
static int __ib_cache_gid_add(struct ib_device *ib_dev, u32 port,
547547
union ib_gid *gid, struct ib_gid_attr *attr,
548548
unsigned long mask, bool default_gid)
549549
{
@@ -587,7 +587,7 @@ static int __ib_cache_gid_add(struct ib_device *ib_dev, u8 port,
587587
return ret;
588588
}
589589

590-
int ib_cache_gid_add(struct ib_device *ib_dev, u8 port,
590+
int ib_cache_gid_add(struct ib_device *ib_dev, u32 port,
591591
union ib_gid *gid, struct ib_gid_attr *attr)
592592
{
593593
unsigned long mask = GID_ATTR_FIND_MASK_GID |
@@ -598,7 +598,7 @@ int ib_cache_gid_add(struct ib_device *ib_dev, u8 port,
598598
}
599599

600600
static int
601-
_ib_cache_gid_del(struct ib_device *ib_dev, u8 port,
601+
_ib_cache_gid_del(struct ib_device *ib_dev, u32 port,
602602
union ib_gid *gid, struct ib_gid_attr *attr,
603603
unsigned long mask, bool default_gid)
604604
{
@@ -627,7 +627,7 @@ _ib_cache_gid_del(struct ib_device *ib_dev, u8 port,
627627
return ret;
628628
}
629629

630-
int ib_cache_gid_del(struct ib_device *ib_dev, u8 port,
630+
int ib_cache_gid_del(struct ib_device *ib_dev, u32 port,
631631
union ib_gid *gid, struct ib_gid_attr *attr)
632632
{
633633
unsigned long mask = GID_ATTR_FIND_MASK_GID |
@@ -638,7 +638,7 @@ int ib_cache_gid_del(struct ib_device *ib_dev, u8 port,
638638
return _ib_cache_gid_del(ib_dev, port, gid, attr, mask, false);
639639
}
640640

641-
int ib_cache_gid_del_all_netdev_gids(struct ib_device *ib_dev, u8 port,
641+
int ib_cache_gid_del_all_netdev_gids(struct ib_device *ib_dev, u32 port,
642642
struct net_device *ndev)
643643
{
644644
struct ib_gid_table *table;
@@ -683,7 +683,7 @@ const struct ib_gid_attr *
683683
rdma_find_gid_by_port(struct ib_device *ib_dev,
684684
const union ib_gid *gid,
685685
enum ib_gid_type gid_type,
686-
u8 port, struct net_device *ndev)
686+
u32 port, struct net_device *ndev)
687687
{
688688
int local_index;
689689
struct ib_gid_table *table;
@@ -734,7 +734,7 @@ EXPORT_SYMBOL(rdma_find_gid_by_port);
734734
*
735735
*/
736736
const struct ib_gid_attr *rdma_find_gid_by_filter(
737-
struct ib_device *ib_dev, const union ib_gid *gid, u8 port,
737+
struct ib_device *ib_dev, const union ib_gid *gid, u32 port,
738738
bool (*filter)(const union ib_gid *gid, const struct ib_gid_attr *,
739739
void *),
740740
void *context)
@@ -818,7 +818,7 @@ static void release_gid_table(struct ib_device *device,
818818
kfree(table);
819819
}
820820

821-
static void cleanup_gid_table_port(struct ib_device *ib_dev, u8 port,
821+
static void cleanup_gid_table_port(struct ib_device *ib_dev, u32 port,
822822
struct ib_gid_table *table)
823823
{
824824
int i;
@@ -834,7 +834,7 @@ static void cleanup_gid_table_port(struct ib_device *ib_dev, u8 port,
834834
mutex_unlock(&table->lock);
835835
}
836836

837-
void ib_cache_gid_set_default_gid(struct ib_device *ib_dev, u8 port,
837+
void ib_cache_gid_set_default_gid(struct ib_device *ib_dev, u32 port,
838838
struct net_device *ndev,
839839
unsigned long gid_type_mask,
840840
enum ib_cache_gid_default_mode mode)
@@ -867,7 +867,7 @@ void ib_cache_gid_set_default_gid(struct ib_device *ib_dev, u8 port,
867867
}
868868
}
869869

870-
static void gid_table_reserve_default(struct ib_device *ib_dev, u8 port,
870+
static void gid_table_reserve_default(struct ib_device *ib_dev, u32 port,
871871
struct ib_gid_table *table)
872872
{
873873
unsigned int i;
@@ -884,7 +884,7 @@ static void gid_table_reserve_default(struct ib_device *ib_dev, u8 port,
884884

885885
static void gid_table_release_one(struct ib_device *ib_dev)
886886
{
887-
unsigned int p;
887+
u32 p;
888888

889889
rdma_for_each_port (ib_dev, p) {
890890
release_gid_table(ib_dev, ib_dev->port_data[p].cache.gid);
@@ -895,7 +895,7 @@ static void gid_table_release_one(struct ib_device *ib_dev)
895895
static int _gid_table_setup_one(struct ib_device *ib_dev)
896896
{
897897
struct ib_gid_table *table;
898-
unsigned int rdma_port;
898+
u32 rdma_port;
899899

900900
rdma_for_each_port (ib_dev, rdma_port) {
901901
table = alloc_gid_table(
@@ -915,7 +915,7 @@ static int _gid_table_setup_one(struct ib_device *ib_dev)
915915

916916
static void gid_table_cleanup_one(struct ib_device *ib_dev)
917917
{
918-
unsigned int p;
918+
u32 p;
919919

920920
rdma_for_each_port (ib_dev, p)
921921
cleanup_gid_table_port(ib_dev, p,
@@ -950,7 +950,7 @@ static int gid_table_setup_one(struct ib_device *ib_dev)
950950
* Returns 0 on success or appropriate error code.
951951
*
952952
*/
953-
int rdma_query_gid(struct ib_device *device, u8 port_num,
953+
int rdma_query_gid(struct ib_device *device, u32 port_num,
954954
int index, union ib_gid *gid)
955955
{
956956
struct ib_gid_table *table;
@@ -1014,7 +1014,7 @@ const struct ib_gid_attr *rdma_find_gid(struct ib_device *device,
10141014
unsigned long mask = GID_ATTR_FIND_MASK_GID |
10151015
GID_ATTR_FIND_MASK_GID_TYPE;
10161016
struct ib_gid_attr gid_attr_val = {.ndev = ndev, .gid_type = gid_type};
1017-
unsigned int p;
1017+
u32 p;
10181018

10191019
if (ndev)
10201020
mask |= GID_ATTR_FIND_MASK_NETDEV;
@@ -1043,7 +1043,7 @@ const struct ib_gid_attr *rdma_find_gid(struct ib_device *device,
10431043
EXPORT_SYMBOL(rdma_find_gid);
10441044

10451045
int ib_get_cached_pkey(struct ib_device *device,
1046-
u8 port_num,
1046+
u32 port_num,
10471047
int index,
10481048
u16 *pkey)
10491049
{
@@ -1069,9 +1069,8 @@ 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,
1073-
u8 port_num,
1074-
u64 *sn_pfx)
1072+
int ib_get_cached_subnet_prefix(struct ib_device *device, u32 port_num,
1073+
u64 *sn_pfx)
10751074
{
10761075
unsigned long flags;
10771076

@@ -1086,10 +1085,8 @@ int ib_get_cached_subnet_prefix(struct ib_device *device,
10861085
}
10871086
EXPORT_SYMBOL(ib_get_cached_subnet_prefix);
10881087

1089-
int ib_find_cached_pkey(struct ib_device *device,
1090-
u8 port_num,
1091-
u16 pkey,
1092-
u16 *index)
1088+
int ib_find_cached_pkey(struct ib_device *device, u32 port_num,
1089+
u16 pkey, u16 *index)
10931090
{
10941091
struct ib_pkey_cache *cache;
10951092
unsigned long flags;
@@ -1116,8 +1113,9 @@ int ib_find_cached_pkey(struct ib_device *device,
11161113
*index = i;
11171114
ret = 0;
11181115
break;
1119-
} else
1116+
} else {
11201117
partial_ix = i;
1118+
}
11211119
}
11221120

11231121
if (ret && partial_ix >= 0) {
@@ -1132,10 +1130,8 @@ int ib_find_cached_pkey(struct ib_device *device,
11321130
}
11331131
EXPORT_SYMBOL(ib_find_cached_pkey);
11341132

1135-
int ib_find_exact_cached_pkey(struct ib_device *device,
1136-
u8 port_num,
1137-
u16 pkey,
1138-
u16 *index)
1133+
int ib_find_exact_cached_pkey(struct ib_device *device, u32 port_num,
1134+
u16 pkey, u16 *index)
11391135
{
11401136
struct ib_pkey_cache *cache;
11411137
unsigned long flags;
@@ -1169,9 +1165,7 @@ int ib_find_exact_cached_pkey(struct ib_device *device,
11691165
}
11701166
EXPORT_SYMBOL(ib_find_exact_cached_pkey);
11711167

1172-
int ib_get_cached_lmc(struct ib_device *device,
1173-
u8 port_num,
1174-
u8 *lmc)
1168+
int ib_get_cached_lmc(struct ib_device *device, u32 port_num, u8 *lmc)
11751169
{
11761170
unsigned long flags;
11771171
int ret = 0;
@@ -1187,8 +1181,7 @@ int ib_get_cached_lmc(struct ib_device *device,
11871181
}
11881182
EXPORT_SYMBOL(ib_get_cached_lmc);
11891183

1190-
int ib_get_cached_port_state(struct ib_device *device,
1191-
u8 port_num,
1184+
int ib_get_cached_port_state(struct ib_device *device, u32 port_num,
11921185
enum ib_port_state *port_state)
11931186
{
11941187
unsigned long flags;
@@ -1222,7 +1215,7 @@ EXPORT_SYMBOL(ib_get_cached_port_state);
12221215
* code.
12231216
*/
12241217
const struct ib_gid_attr *
1225-
rdma_get_gid_attr(struct ib_device *device, u8 port_num, int index)
1218+
rdma_get_gid_attr(struct ib_device *device, u32 port_num, int index)
12261219
{
12271220
const struct ib_gid_attr *attr = ERR_PTR(-ENODATA);
12281221
struct ib_gid_table *table;
@@ -1263,7 +1256,7 @@ ssize_t rdma_query_gid_table(struct ib_device *device,
12631256
const struct ib_gid_attr *gid_attr;
12641257
ssize_t num_entries = 0, ret;
12651258
struct ib_gid_table *table;
1266-
unsigned int port_num, i;
1259+
u32 port_num, i;
12671260
struct net_device *ndev;
12681261
unsigned long flags;
12691262

@@ -1361,7 +1354,7 @@ struct net_device *rdma_read_gid_attr_ndev_rcu(const struct ib_gid_attr *attr)
13611354
container_of(attr, struct ib_gid_table_entry, attr);
13621355
struct ib_device *device = entry->attr.device;
13631356
struct net_device *ndev = ERR_PTR(-EINVAL);
1364-
u8 port_num = entry->attr.port_num;
1357+
u32 port_num = entry->attr.port_num;
13651358
struct ib_gid_table *table;
13661359
unsigned long flags;
13671360
bool valid;
@@ -1441,7 +1434,7 @@ int rdma_read_gid_l2_fields(const struct ib_gid_attr *attr,
14411434
EXPORT_SYMBOL(rdma_read_gid_l2_fields);
14421435

14431436
static int config_non_roce_gid_cache(struct ib_device *device,
1444-
u8 port, int gid_tbl_len)
1437+
u32 port, int gid_tbl_len)
14451438
{
14461439
struct ib_gid_attr gid_attr = {};
14471440
struct ib_gid_table *table;
@@ -1472,7 +1465,7 @@ static int config_non_roce_gid_cache(struct ib_device *device,
14721465
}
14731466

14741467
static int
1475-
ib_cache_update(struct ib_device *device, u8 port, bool enforce_security)
1468+
ib_cache_update(struct ib_device *device, u32 port, bool enforce_security)
14761469
{
14771470
struct ib_port_attr *tprops = NULL;
14781471
struct ib_pkey_cache *pkey_cache = NULL, *old_pkey_cache;
@@ -1621,7 +1614,7 @@ EXPORT_SYMBOL(ib_dispatch_event);
16211614

16221615
int ib_cache_setup_one(struct ib_device *device)
16231616
{
1624-
unsigned int p;
1617+
u32 p;
16251618
int err;
16261619

16271620
rwlock_init(&device->cache_lock);
@@ -1641,7 +1634,7 @@ int ib_cache_setup_one(struct ib_device *device)
16411634

16421635
void ib_cache_release_one(struct ib_device *device)
16431636
{
1644-
unsigned int p;
1637+
u32 p;
16451638

16461639
/*
16471640
* The release function frees all the cache elements.

0 commit comments

Comments
 (0)