cm_set_ah_attr(&av->ah_attr, av->port->port_num, path->dlid, path->sl, path->slid & 0x7F); 
cm_set_ah_attr(&av->ah_attr, av->port->port_num, be16_to_cpu(path->dlid), path->sl, be16_to_cpu(path->slid) & 0x7F); 
static int cm_init_av_by_path(struct ib_sa_path_rec *path, struct cm_av *av){	struct cm_device *cm_dev;	struct cm_port *port = NULL;	unsigned long flags;	int ret;	u8 p;	read_lock_irqsave(&cm.device_lock, flags);	list_for_each_entry(cm_dev, &cm.device_list, list) {		if (!ib_find_cached_gid(cm_dev->device, &path->sgid,					&p, NULL)) {			port = &cm_dev->port[p-1];			break;		}	}	read_unlock_irqrestore(&cm.device_lock, flags);	if (!port)		return -EINVAL;	ret = ib_find_cached_pkey(cm_dev->device, port->port_num,				  be16_to_cpu(path->pkey), &av->pkey_index);	if (ret)		return ret;	av->port = port;	cm_set_ah_attr(&av->ah_attr, av->port->port_num, path->dlid,		       path->sl, path->slid & 0x7F);	av->packet_life_time = path->packet_life_time;	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/97f52eb438be7caebe026421545619d8a0c1398a/cm.c/clean/drivers/infiniband/core/cm.c