> > + ib_dma_sync_single_for_cpu(priv->ca, addr, IPOIB_BUF_SIZE, > > + DMA_FROM_DEVICE); > > + skb_copy_from_linear_data_offset(skb, IB_GRH_BYTES, > > new_skb->data, > > + wc->byte_len - IB_GRH_BYTES); > > + ib_dma_sync_single_for_device(priv->ca, addr, IPOIB_BUF_SIZE, > > + DMA_FROM_DEVICE); > > BTW, why is ib_dma_sync_single_for_device necessary here?
Not sure what you're asking exactly. The sync for device is needed to match the previous sync for the cpu obviously. We need both syncs for the same reason we need the unmap when we don't copy -- we're copying data out of the skb we gave to the device earlier, so we need to make sure the cpu sees the right data. _______________________________________________ general mailing list [email protected] http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
