Hello Roland & Eli,
We have seen memory allocation failure when allocating large tx_ring
size. Like 1K tx_ring size, kerne page size = 4K. tx_ring will need at
least 36 pages (MAX_SKB_FRAGS = 64K/4K + 2 =18) contiguous memory per port.
Either each mapping needs to be dynamically allocated or the allocation
should be based on page size for tx_ring.
struct ipoib_tx_buf {
struct sk_buff *skb;
u64 mapping[MAX_SKB_FRAGS + 1];
};
Thanks
Shirley
Roland
Dreier
<rdreier@ To
cisco.com [EMAIL PROTECTED]
> cc
Sent by: openfabrics <[email protected]>
general-b Subject
[EMAIL PROTECTED] [ofa-general] Re: [PATCH 2/16 v4]
IB/ipoib:
sts.openf Add s/g support
abrics.or
g
02/08/08
02:32 PM
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.
_______________________________________________
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
<<inline: graycol.gif>>
<<inline: pic31887.gif>>
<<inline: ecblank.gif>>
_______________________________________________ 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
