On Wed, Jun 10, 2015 at 04:06:18PM +0300, Erez Shitrit wrote:
> > + if (unlikely(ipoib_dma_map_tx(priv->ca, tx_req))) {
> > + ++dev->stats.tx_errors;
> > + dev_kfree_skb_any(skb);
> > + return;
> > + }
>
> I think you should call skb_orphan(skb) and skb_dst_drop(skb) before
> queuing the packet for sending.
> (like it done in the else part below)
Thanks Erez.
This is already addressed in v4 (which is currently under test).
>
> > + rc = post_send_sg(priv, tx, tx->tx_head &
> > + (ipoib_sendq_size - 1),
> > + skb, tx_req->mapping);
> > + } else {
> > + addr = ib_dma_map_single(priv->ca, skb->data, skb->len,
> > + DMA_TO_DEVICE);
> > + if (unlikely(ib_dma_mapping_error(priv->ca, addr))) {
> > + ++dev->stats.tx_errors;
> > + dev_kfree_skb_any(skb);
> > + return;
> > + }
> > +
> > + tx_req->mapping[0] = addr;
> >
> > - skb_orphan(skb);
> > - skb_dst_drop(skb);
> > + skb_orphan(skb);
> > + skb_dst_drop(skb);
> >
> > - rc = post_send(priv, tx, tx->tx_head & (ipoib_sendq_size - 1),
> > - addr, skb->len);
> > + rc = post_send(priv, tx, tx->tx_head & (ipoib_sendq_size -
> > 1),
> > + addr, skb->len);
> > + }
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> > the body of a message to [email protected]
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html