[ofa-general] Re: [PATCH 2/16 v4] IB/ipoib: Add s/g support

Roland Dreier rdreier at cisco.com
Fri Feb 8 14:32:52 PST 2008


Thanks, applied...

 > --- a/drivers/infiniband/ulp/ipoib/ipoib.h
 > +++ b/drivers/infiniband/ulp/ipoib/ipoib.h

 > +static inline int ipoib_dma_map_tx(struct ib_device *ca,
 > +				   struct ipoib_tx_buf *tx_req)

I didn't see why this needed to be in a header-- I just moved it to
ipoib_ib.c.  Also

 > +	int frags;
 > +	int i;
 > +
 > +	mapping[0] = ib_dma_map_single(ca, skb->data, skb_headlen(skb),
 > +				       DMA_TO_DEVICE);
 > +	if (unlikely(ib_dma_mapping_error(ca, mapping[0])))
 > +		return -EIO;
 > +
 > +	frags = skb_shinfo(skb)->nr_frags;

Not sure what the advantage of having a local variable that is only
used once to hold the value of nr_frags, so I got rid of it.

 - R.



More information about the general mailing list