[ofa-general] IB/ipoib: no need to call skb_orphan() in cm_send()?

Hoang-Nam Nguyen hnguyen at linux.vnet.ibm.com
Mon Jun 2 12:01:02 PDT 2008


Hello Eli!
I'm referring to the thread below, where you explained the rational of
calling skb_orphan() after post_send() in UD path:
[ewg] Re: [PATCH] call skb_orphan() after sending an SKB
http://lists.openfabrics.org/pipermail/ewg/2008-February/005739.html

Looking at cm_send path I don't see that call. Is there any reason not to
do that here?

void ipoib_cm_send(struct net_device *dev, struct sk_buff *skb, struct ipoib_cm_tx *tx)
{
...
	if (unlikely(post_send(priv, tx, tx->tx_head & (ipoib_sendq_size - 1),
			       addr, skb->len))) {
		ipoib_warn(priv, "post_send failed\n");
		++priv->stats.tx_errors;
		ib_dma_unmap_single(priv->ca, addr, skb->len, DMA_TO_DEVICE);
		dev_kfree_skb_any(skb);
	} else {
		dev->trans_start = jiffies;
		++tx->tx_head;

		if (++priv->tx_outstanding == ipoib_sendq_size - 1) {
			ipoib_dbg(priv, "%s: TX ring 0x%x full,"
				  "stopping kernel net queue\n", __func__,
				  tx->qp->qp_num);
			netif_stop_queue(dev);
		}
	}
}

Thanks and regards

Nam




More information about the general mailing list