Date: Fri, 22 Jan 2021 12:48:42 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 1f1f6b4cb5ee - stable/11 - MFC r353632: Replace rdma_is_upper_dev_rcu() with rdma_vlan_dev_real_dev() in ibcore. This reduces the number of references to VLAN_TRUNKDEV() in ibcore. Currently only VLAN is supported as a child interface in FreeBSD. Remove superfluous RCU locking. Message-ID: <202101221248.10MCmgEK019992@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/11 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=1f1f6b4cb5eebe79c8dc5761a865e9a65d5dd034 commit 1f1f6b4cb5eebe79c8dc5761a865e9a65d5dd034 Author: Hans Petter Selasky <hselasky@FreeBSD.org> AuthorDate: 2019-10-16 08:55:29 +0000 Commit: Hans Petter Selasky <hselasky@FreeBSD.org> CommitDate: 2021-01-22 12:36:28 +0000 MFC r353632: Replace rdma_is_upper_dev_rcu() with rdma_vlan_dev_real_dev() in ibcore. This reduces the number of references to VLAN_TRUNKDEV() in ibcore. Currently only VLAN is supported as a child interface in FreeBSD. Remove superfluous RCU locking. Sponsored by: Mellanox Technologies --- sys/ofed/drivers/infiniband/core/core_priv.h | 10 ---------- sys/ofed/drivers/infiniband/core/ib_sa_query.c | 4 +--- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/sys/ofed/drivers/infiniband/core/core_priv.h b/sys/ofed/drivers/infiniband/core/core_priv.h index 97ddb9e73a2a..6385afe68f9a 100644 --- a/sys/ofed/drivers/infiniband/core/core_priv.h +++ b/sys/ofed/drivers/infiniband/core/core_priv.h @@ -126,16 +126,6 @@ int ib_cache_setup_one(struct ib_device *device); void ib_cache_cleanup_one(struct ib_device *device); void ib_cache_release_one(struct ib_device *device); -static inline bool rdma_is_upper_dev_rcu(struct net_device *dev, - struct net_device *upper) -{ - - /* TODO: add support for LAGG */ - upper = VLAN_TRUNKDEV(upper); - - return (dev == upper); -} - int addr_init(void); void addr_cleanup(void); diff --git a/sys/ofed/drivers/infiniband/core/ib_sa_query.c b/sys/ofed/drivers/infiniband/core/ib_sa_query.c index 971cbba1833e..7b09b7a7e3f5 100644 --- a/sys/ofed/drivers/infiniband/core/ib_sa_query.c +++ b/sys/ofed/drivers/infiniband/core/ib_sa_query.c @@ -702,12 +702,10 @@ int ib_init_ah_from_path(struct ib_device *device, u8 port_num, return -ENODEV; } ndev = ib_get_ndev_from_path(rec); - rcu_read_lock(); if ((ndev && ndev != resolved_dev) || (resolved_dev != idev && - !rdma_is_upper_dev_rcu(idev, resolved_dev))) + rdma_vlan_dev_real_dev(resolved_dev) != idev)) ret = -EHOSTUNREACH; - rcu_read_unlock(); dev_put(idev); dev_put(resolved_dev); if (ret) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202101221248.10MCmgEK019992>