@@ -87,9 +87,6 @@ typedef void (*roce_netdev_callback)(struct ib_device *device, u32 port,
typedef bool (*roce_netdev_filter)(struct ib_device *device, u32 port,
struct net_device *idev, void *cookie);
-struct net_device *ib_device_get_netdev(struct ib_device *ib_dev,
- u32 port);
-
void ib_enum_roce_netdev(struct ib_device *ib_dev,
roce_netdev_filter filter,
void *filter_cookie,
@@ -2263,6 +2263,7 @@ struct net_device *ib_device_get_netdev(struct ib_device *ib_dev,
return res;
}
+EXPORT_SYMBOL(ib_device_get_netdev);
/**
* ib_device_get_by_netdev - Find an IB device associated with a netdev
@@ -4453,6 +4453,8 @@ struct net_device *ib_get_net_dev_by_params(struct ib_device *dev, u32 port,
const struct sockaddr *addr);
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);
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);
Many drivers do not implement the ib_device_ops.get_netdev callback function; for them, use the generic helper function ib_device_get_netdev() enough. Therefore, this patch exports ib_device_get_netdev() helper allows it to be used in other modules. Signed-off-by: Liu Jian <liujian56@huawei.com> --- drivers/infiniband/core/core_priv.h | 3 --- drivers/infiniband/core/device.c | 1 + include/rdma/ib_verbs.h | 2 ++ 3 files changed, 3 insertions(+), 3 deletions(-)