skb->mac.raw = skb->data; 
static void ipoib_ib_handle_wc(struct net_device *dev,			       struct ib_wc *wc){	struct ipoib_dev_priv *priv = netdev_priv(dev);	unsigned int wr_id = wc->wr_id;	ipoib_dbg_data(priv, "called: id %d, op %d, status: %d\n",		       wr_id, wc->opcode, wc->status);	if (wr_id & IPOIB_OP_RECV) {		wr_id &= ~IPOIB_OP_RECV;		if (wr_id < IPOIB_RX_RING_SIZE) {			struct sk_buff *skb = priv->rx_ring[wr_id].skb;			priv->rx_ring[wr_id].skb = NULL;			dma_unmap_single(priv->ca->dma_device,					 pci_unmap_addr(&priv->rx_ring[wr_id],							mapping),					 IPOIB_BUF_SIZE,					 DMA_FROM_DEVICE);			if (wc->status != IB_WC_SUCCESS) {				if (wc->status != IB_WC_WR_FLUSH_ERR)					ipoib_warn(priv, "failed recv event "						   "(status=%d, wrid=%d vend_err %x)\n",						   wc->status, wr_id, wc->vendor_err);				dev_kfree_skb_any(skb);				return;			}			ipoib_dbg_data(priv, "received %d bytes, SLID 0x%04x\n",				       wc->byte_len, wc->slid);			skb_put(skb, wc->byte_len);			skb_pull(skb, IB_GRH_BYTES);			if (wc->slid != priv->local_lid ||			    wc->src_qp != priv->qp->qp_num) {				skb->protocol = ((struct ipoib_header *) skb->data)->proto;				skb_pull(skb, IPOIB_ENCAP_LEN);				dev->last_rx = jiffies;				++priv->stats.rx_packets;				priv->stats.rx_bytes += skb->len;				skb->dev = dev;				/* XXX get correct PACKET_ type here */				skb->pkt_type = PACKET_HOST;				netif_rx_ni(skb);			} else {				ipoib_dbg_data(priv, "dropping loopback packet\n");				dev_kfree_skb_any(skb);			}			/* repost receive */			if (ipoib_ib_post_receive(dev, wr_id))				ipoib_warn(priv, "ipoib_ib_post_receive failed "					   "for buf %d\n", wr_id);		} else			ipoib_warn(priv, "completion event with wrid %d\n",				   wr_id);	} else {		struct ipoib_buf *tx_req;		unsigned long flags;		if (wr_id >= IPOIB_TX_RING_SIZE) {			ipoib_warn(priv, "completion event with wrid %d (> %d)\n",				   wr_id, IPOIB_TX_RING_SIZE);			return;		}		ipoib_dbg_data(priv, "send complete, wrid %d\n", wr_id);		tx_req = &priv->tx_ring[wr_id];		dma_unmap_single(priv->ca->dma_device,				 pci_unmap_addr(tx_req, mapping),				 tx_req->skb->len,				 DMA_TO_DEVICE);		++priv->stats.tx_packets;		priv->stats.tx_bytes += tx_req->skb->len;		dev_kfree_skb_any(tx_req->skb);		spin_lock_irqsave(&priv->tx_lock, flags);		++priv->tx_tail;		if (netif_queue_stopped(dev) &&		    priv->tx_head - priv->tx_tail <= IPOIB_TX_RING_SIZE / 2)			netif_wake_queue(dev);		spin_unlock_irqrestore(&priv->tx_lock, flags);		if (wc->status != IB_WC_SUCCESS &&		    wc->status != IB_WC_WR_FLUSH_ERR)			ipoib_warn(priv, "failed send event "				   "(status=%d, wrid=%d vend_err %x)\n",				   wc->status, wr_id, wc->vendor_err);	}}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/62241eb497721be7640e5d9330e60f4a88a4db46/ipoib_ib.c/clean/drivers/infiniband/ulp/ipoib/ipoib_ib.c