Skip to content

Commit 7b1cd95

Browse files
committed
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma
Pull RDMA subsystem updates from Jason Gunthorpe: "Overall this cycle did not have any major excitement, and did not require any shared branch with netdev. Lots of driver updates, particularly of the scale-up and performance variety. The largest body of core work was Parav's patches fixing and restructing some of the core code to make way for future RDMA containerization. Summary: - misc small driver fixups to bnxt_re/hfi1/qib/hns/ocrdma/rdmavt/vmw_pvrdma/nes - several major feature adds to bnxt_re driver: SRIOV VF RoCE support, HugePages support, extended hardware stats support, and SRQ support - a notable number of fixes to the i40iw driver from debugging scale up testing - more work to enable the new hip08 chip in the hns driver - misc small ULP fixups to srp/srpt//ipoib - preparation for srp initiator and target to support the RDMA-CM protocol for connections - add RDMA-CM support to srp initiator, srp target is still a WIP - fixes for a couple of places where ipoib could spam the dmesg log - fix encode/decode of FDR/EDR data rates in the core - many patches from Parav with ongoing work to clean up inconsistencies and bugs in RoCE support around the rdma_cm - mlx5 driver support for the userspace features 'thread domain', 'wallclock timestamps' and 'DV Direct Connected transport'. Support for the firmware dual port rocee capability - core support for more than 32 rdma devices in the char dev allocation - kernel doc updates from Randy Dunlap - new netlink uAPI for inspecting RDMA objects similar in spirit to 'ss' - one minor change to the kobject code acked by Greg KH" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (259 commits) RDMA/nldev: Provide detailed QP information RDMA/nldev: Provide global resource utilization RDMA/core: Add resource tracking for create and destroy PDs RDMA/core: Add resource tracking for create and destroy CQs RDMA/core: Add resource tracking for create and destroy QPs RDMA/restrack: Add general infrastructure to track RDMA resources RDMA/core: Save kernel caller name when creating PD and CQ objects RDMA/core: Use the MODNAME instead of the function name for pd callers RDMA: Move enum ib_cq_creation_flags to uapi headers IB/rxe: Change RDMA_RXE kconfig to use select IB/qib: remove qib_keys.c IB/mthca: remove mthca_user.h RDMA/cm: Fix access to uninitialized variable RDMA/cma: Use existing netif_is_bond_master function IB/core: Avoid SGID attributes query while converting GID from OPA to IB RDMA/mlx5: Avoid memory leak in case of XRCD dealloc failure IB/umad: Fix use of unprotected device pointer IB/iser: Combine substrings for three messages IB/iser: Delete an unnecessary variable initialisation in iser_send_data_out() IB/iser: Delete an error message for a failed memory allocation in iser_send_data_out() ...
2 parents 2155e69 + e7996a9 commit 7b1cd95

File tree

187 files changed

+10240
-4028
lines changed

Some content is hidden

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

187 files changed

+10240
-4028
lines changed

MAINTAINERS

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6892,7 +6892,7 @@ M: Jason Gunthorpe <[email protected]>
68926892
68936893
W: http://www.openfabrics.org/
68946894
Q: http://patchwork.kernel.org/project/linux-rdma/list/
6895-
T: git git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma.git
6895+
T: git git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git
68966896
S: Supported
68976897
F: Documentation/devicetree/bindings/infiniband/
68986898
F: Documentation/infiniband/
@@ -11218,7 +11218,8 @@ S: Maintained
1121811218
F: drivers/firmware/qemu_fw_cfg.c
1121911219

1122011220
QIB DRIVER
11221-
M: Mike Marciniszyn <[email protected]>
11221+
M: Dennis Dalessandro <[email protected]>
11222+
M: Mike Marciniszyn <[email protected]>
1122211223
1122311224
S: Supported
1122411225
F: drivers/infiniband/hw/qib/
@@ -11245,7 +11246,6 @@ F: include/linux/qed/
1124511246
F: drivers/net/ethernet/qlogic/qede/
1124611247

1124711248
QLOGIC QL4xxx RDMA DRIVER
11248-
M: Ram Amrani <[email protected]>
1124911249
M: Michal Kalderon <[email protected]>
1125011250
M: Ariel Elior <[email protected]>
1125111251
@@ -11507,6 +11507,7 @@ F: drivers/net/ethernet/rdc/r6040.c
1150711507

1150811508
RDMAVT - RDMA verbs software
1150911509
M: Dennis Dalessandro <[email protected]>
11510+
M: Mike Marciniszyn <[email protected]>
1151011511
1151111512
S: Supported
1151211513
F: drivers/infiniband/sw/rdmavt

drivers/infiniband/core/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ib_core-y := packer.o ud_header.o verbs.o cq.o rw.o sysfs.o \
1212
device.o fmr_pool.o cache.o netlink.o \
1313
roce_gid_mgmt.o mr_pool.o addr.o sa_query.o \
1414
multicast.o mad.o smi.o agent.o mad_rmpp.o \
15-
security.o nldev.o
15+
security.o nldev.o restrack.o
1616

1717
ib_core-$(CONFIG_INFINIBAND_USER_MEM) += umem.o
1818
ib_core-$(CONFIG_INFINIBAND_ON_DEMAND_PAGING) += umem_odp.o

drivers/infiniband/core/addr.c

Lines changed: 8 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,7 @@ void rdma_copy_addr(struct rdma_dev_addr *dev_addr,
243243
EXPORT_SYMBOL(rdma_copy_addr);
244244

245245
int rdma_translate_ip(const struct sockaddr *addr,
246-
struct rdma_dev_addr *dev_addr,
247-
u16 *vlan_id)
246+
struct rdma_dev_addr *dev_addr)
248247
{
249248
struct net_device *dev;
250249

@@ -266,9 +265,6 @@ int rdma_translate_ip(const struct sockaddr *addr,
266265
return -EADDRNOTAVAIL;
267266

268267
rdma_copy_addr(dev_addr, dev, NULL);
269-
dev_addr->bound_dev_if = dev->ifindex;
270-
if (vlan_id)
271-
*vlan_id = rdma_vlan_dev_vlan_id(dev);
272268
dev_put(dev);
273269
break;
274270
#if IS_ENABLED(CONFIG_IPV6)
@@ -279,9 +275,6 @@ int rdma_translate_ip(const struct sockaddr *addr,
279275
&((const struct sockaddr_in6 *)addr)->sin6_addr,
280276
dev, 1)) {
281277
rdma_copy_addr(dev_addr, dev, NULL);
282-
dev_addr->bound_dev_if = dev->ifindex;
283-
if (vlan_id)
284-
*vlan_id = rdma_vlan_dev_vlan_id(dev);
285278
break;
286279
}
287280
}
@@ -481,7 +474,7 @@ static int addr_resolve_neigh(struct dst_entry *dst,
481474
if (dst->dev->flags & IFF_LOOPBACK) {
482475
int ret;
483476

484-
ret = rdma_translate_ip(dst_in, addr, NULL);
477+
ret = rdma_translate_ip(dst_in, addr);
485478
if (!ret)
486479
memcpy(addr->dst_dev_addr, addr->src_dev_addr,
487480
MAX_ADDR_LEN);
@@ -558,7 +551,7 @@ static int addr_resolve(struct sockaddr *src_in,
558551
}
559552

560553
if (ndev->flags & IFF_LOOPBACK) {
561-
ret = rdma_translate_ip(dst_in, addr, NULL);
554+
ret = rdma_translate_ip(dst_in, addr);
562555
/*
563556
* Put the loopback device and get the translated
564557
* device instead.
@@ -744,47 +737,38 @@ void rdma_addr_cancel(struct rdma_dev_addr *addr)
744737
EXPORT_SYMBOL(rdma_addr_cancel);
745738

746739
struct resolve_cb_context {
747-
struct rdma_dev_addr *addr;
748740
struct completion comp;
749741
int status;
750742
};
751743

752744
static void resolve_cb(int status, struct sockaddr *src_addr,
753745
struct rdma_dev_addr *addr, void *context)
754746
{
755-
if (!status)
756-
memcpy(((struct resolve_cb_context *)context)->addr,
757-
addr, sizeof(struct rdma_dev_addr));
758747
((struct resolve_cb_context *)context)->status = status;
759748
complete(&((struct resolve_cb_context *)context)->comp);
760749
}
761750

762751
int rdma_addr_find_l2_eth_by_grh(const union ib_gid *sgid,
763752
const union ib_gid *dgid,
764-
u8 *dmac, u16 *vlan_id, int *if_index,
753+
u8 *dmac, const struct net_device *ndev,
765754
int *hoplimit)
766755
{
767-
int ret = 0;
768756
struct rdma_dev_addr dev_addr;
769757
struct resolve_cb_context ctx;
770-
struct net_device *dev;
771-
772758
union {
773759
struct sockaddr _sockaddr;
774760
struct sockaddr_in _sockaddr_in;
775761
struct sockaddr_in6 _sockaddr_in6;
776762
} sgid_addr, dgid_addr;
777-
763+
int ret;
778764

779765
rdma_gid2ip(&sgid_addr._sockaddr, sgid);
780766
rdma_gid2ip(&dgid_addr._sockaddr, dgid);
781767

782768
memset(&dev_addr, 0, sizeof(dev_addr));
783-
if (if_index)
784-
dev_addr.bound_dev_if = *if_index;
769+
dev_addr.bound_dev_if = ndev->ifindex;
785770
dev_addr.net = &init_net;
786771

787-
ctx.addr = &dev_addr;
788772
init_completion(&ctx.comp);
789773
ret = rdma_resolve_ip(&self, &sgid_addr._sockaddr, &dgid_addr._sockaddr,
790774
&dev_addr, 1000, resolve_cb, &ctx);
@@ -798,42 +782,9 @@ int rdma_addr_find_l2_eth_by_grh(const union ib_gid *sgid,
798782
return ret;
799783

800784
memcpy(dmac, dev_addr.dst_dev_addr, ETH_ALEN);
801-
dev = dev_get_by_index(&init_net, dev_addr.bound_dev_if);
802-
if (!dev)
803-
return -ENODEV;
804-
if (if_index)
805-
*if_index = dev_addr.bound_dev_if;
806-
if (vlan_id)
807-
*vlan_id = rdma_vlan_dev_vlan_id(dev);
808-
if (hoplimit)
809-
*hoplimit = dev_addr.hoplimit;
810-
dev_put(dev);
811-
return ret;
812-
}
813-
EXPORT_SYMBOL(rdma_addr_find_l2_eth_by_grh);
814-
815-
int rdma_addr_find_smac_by_sgid(union ib_gid *sgid, u8 *smac, u16 *vlan_id)
816-
{
817-
int ret = 0;
818-
struct rdma_dev_addr dev_addr;
819-
union {
820-
struct sockaddr _sockaddr;
821-
struct sockaddr_in _sockaddr_in;
822-
struct sockaddr_in6 _sockaddr_in6;
823-
} gid_addr;
824-
825-
rdma_gid2ip(&gid_addr._sockaddr, sgid);
826-
827-
memset(&dev_addr, 0, sizeof(dev_addr));
828-
dev_addr.net = &init_net;
829-
ret = rdma_translate_ip(&gid_addr._sockaddr, &dev_addr, vlan_id);
830-
if (ret)
831-
return ret;
832-
833-
memcpy(smac, dev_addr.src_dev_addr, ETH_ALEN);
834-
return ret;
785+
*hoplimit = dev_addr.hoplimit;
786+
return 0;
835787
}
836-
EXPORT_SYMBOL(rdma_addr_find_smac_by_sgid);
837788

838789
static int netevent_callback(struct notifier_block *self, unsigned long event,
839790
void *ctx)

drivers/infiniband/core/cache.c

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -573,27 +573,24 @@ static int ib_cache_gid_find_by_filter(struct ib_device *ib_dev,
573573
struct ib_gid_attr attr;
574574

575575
if (table->data_vec[i].props & GID_TABLE_ENTRY_INVALID)
576-
goto next;
576+
continue;
577577

578578
if (memcmp(gid, &table->data_vec[i].gid, sizeof(*gid)))
579-
goto next;
579+
continue;
580580

581581
memcpy(&attr, &table->data_vec[i].attr, sizeof(attr));
582582

583-
if (filter(gid, &attr, context))
583+
if (filter(gid, &attr, context)) {
584584
found = true;
585-
586-
next:
587-
if (found)
585+
if (index)
586+
*index = i;
588587
break;
588+
}
589589
}
590590
read_unlock_irqrestore(&table->rwlock, flags);
591591

592592
if (!found)
593593
return -ENOENT;
594-
595-
if (index)
596-
*index = i;
597594
return 0;
598595
}
599596

@@ -824,12 +821,7 @@ static int gid_table_setup_one(struct ib_device *ib_dev)
824821
if (err)
825822
return err;
826823

827-
err = roce_rescan_device(ib_dev);
828-
829-
if (err) {
830-
gid_table_cleanup_one(ib_dev);
831-
gid_table_release_one(ib_dev);
832-
}
824+
rdma_roce_rescan_device(ib_dev);
833825

834826
return err;
835827
}
@@ -883,7 +875,6 @@ int ib_find_gid_by_filter(struct ib_device *device,
883875
port_num, filter,
884876
context, index);
885877
}
886-
EXPORT_SYMBOL(ib_find_gid_by_filter);
887878

888879
int ib_get_cached_pkey(struct ib_device *device,
889880
u8 port_num,

0 commit comments

Comments
 (0)