if (ib_sa_rate_enum_to_int(pathrec->rate) > 0) av.static_rate = (2 * priv->local_rate - ib_sa_rate_enum_to_int(pathrec->rate) - 1) / (priv->local_rate ? priv->local_rate : 1); 
if (path_rate > 0 && priv->local_rate > path_rate) av.static_rate = (priv->local_rate - 1) / path_rate; 
static void path_rec_completion(int status,				struct ib_sa_path_rec *pathrec,				void *path_ptr){	struct ipoib_path *path = path_ptr;	struct net_device *dev = path->dev;	struct ipoib_dev_priv *priv = netdev_priv(dev);	struct ipoib_ah *ah = NULL;	struct ipoib_neigh *neigh;	struct sk_buff_head skqueue;	struct sk_buff *skb;	unsigned long flags;	if (pathrec)		ipoib_dbg(priv, "PathRec LID 0x%04x for GID " IPOIB_GID_FMT "\n",			  be16_to_cpu(pathrec->dlid), IPOIB_GID_ARG(pathrec->dgid));	else		ipoib_dbg(priv, "PathRec status %d for GID " IPOIB_GID_FMT "\n",			  status, IPOIB_GID_ARG(path->pathrec.dgid));	skb_queue_head_init(&skqueue);	if (!status) {		struct ib_ah_attr av = {			.dlid 	       = be16_to_cpu(pathrec->dlid),			.sl 	       = pathrec->sl,			.port_num      = priv->port		};		if (ib_sa_rate_enum_to_int(pathrec->rate) > 0)			av.static_rate = (2 * priv->local_rate -					  ib_sa_rate_enum_to_int(pathrec->rate) - 1) /				(priv->local_rate ? priv->local_rate : 1);		ipoib_dbg(priv, "static_rate %d for local port %dX, path %dX\n",			  av.static_rate, priv->local_rate,			  ib_sa_rate_enum_to_int(pathrec->rate));		ah = ipoib_create_ah(dev, priv->pd, &av);	}	spin_lock_irqsave(&priv->lock, flags);	path->ah = ah;	if (ah) {		path->pathrec = *pathrec;		ipoib_dbg(priv, "created address handle %p for LID 0x%04x, SL %d\n",			  ah, be16_to_cpu(pathrec->dlid), pathrec->sl);		while ((skb = __skb_dequeue(&path->queue)))			__skb_queue_tail(&skqueue, skb);		list_for_each_entry(neigh, &path->neigh_list, list) {			kref_get(&path->ah->ref);			neigh->ah = path->ah;			while ((skb = __skb_dequeue(&neigh->queue)))				__skb_queue_tail(&skqueue, skb);		}	} else		path->query = NULL;	complete(&path->done);	spin_unlock_irqrestore(&priv->lock, flags);	while ((skb = __skb_dequeue(&skqueue))) {		skb->dev = dev;		if (dev_queue_xmit(skb))			ipoib_warn(priv, "dev_queue_xmit failed "				   "to requeue packet\n");	}}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/e6ded99cbbbfef2cef537d717ad61d2f77f4dfd6/ipoib_main.c/clean/drivers/infiniband/ulp/ipoib/ipoib_main.c