aboutsummaryrefslogtreecommitdiffstats
path: root/include/rdma
diff options
context:
space:
mode:
authorYuyu Li <liyuyu6@huawei.com>2024-11-22 18:52:57 +0800
committerLeon Romanovsky <leon@kernel.org>2024-12-24 05:21:45 -0500
commit0c039a57b68dfb1dd49dfc16240791086d8e57ad (patch)
treea41e449768b3f422dc67ba534b4146152e1cbe7b /include/rdma
parentRDMA/core: Remove unused ib_copy_path_rec_from_user (diff)
downloadlinux-0c039a57b68dfb1dd49dfc16240791086d8e57ad.tar.gz
linux-0c039a57b68dfb1dd49dfc16240791086d8e57ad.zip
RDMA/core: Add ib_query_netdev_port() to query netdev port by IB device.
Query the port number of a netdev associated with an ibdev. Signed-off-by: Yuyu Li <liyuyu6@huawei.com> Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com> Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'include/rdma')
-rw-r--r--include/rdma/ib_verbs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index 77472e19ec0c..c539a1706f66 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -4468,6 +4468,8 @@ int ib_device_set_netdev(struct ib_device *ib_dev, struct net_device *ndev,
unsigned int port);
struct net_device *ib_device_get_netdev(struct ib_device *ib_dev,
u32 port);
+int ib_query_netdev_port(struct ib_device *ibdev, struct net_device *ndev,
+ u32 *port);
struct ib_wq *ib_create_wq(struct ib_pd *pd,
struct ib_wq_init_attr *init_attr);
int ib_destroy_wq_user(struct ib_wq *wq, struct ib_udata *udata);