Changeset View
Changeset View
Standalone View
Standalone View
sys/ofed/drivers/infiniband/core/ib_cm.c
Show First 20 Lines • Show All 423 Lines • ▼ Show 20 Lines | |||||
static int cm_init_av_by_path(struct ib_sa_path_rec *path, struct cm_av *av, | static int cm_init_av_by_path(struct ib_sa_path_rec *path, struct cm_av *av, | ||||
struct cm_id_private *cm_id_priv) | struct cm_id_private *cm_id_priv) | ||||
{ | { | ||||
struct cm_device *cm_dev; | struct cm_device *cm_dev; | ||||
struct cm_port *port = NULL; | struct cm_port *port = NULL; | ||||
unsigned long flags; | unsigned long flags; | ||||
int ret; | int ret; | ||||
u8 p; | u8 p; | ||||
struct net_device *ndev = ib_get_ndev_from_path(path); | struct ifnet *ndev = ib_get_ndev_from_path(path); | ||||
read_lock_irqsave(&cm.device_lock, flags); | read_lock_irqsave(&cm.device_lock, flags); | ||||
list_for_each_entry(cm_dev, &cm.device_list, list) { | list_for_each_entry(cm_dev, &cm.device_list, list) { | ||||
if (!ib_find_cached_gid(cm_dev->ib_device, &path->sgid, | if (!ib_find_cached_gid(cm_dev->ib_device, &path->sgid, | ||||
path->gid_type, ndev, &p, NULL)) { | path->gid_type, ndev, &p, NULL)) { | ||||
port = cm_dev->port[p-1]; | port = cm_dev->port[p-1]; | ||||
break; | break; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 3,745 Lines • Show Last 20 Lines |