[ofa-general] [PATCH v2] IB/ipoib: use vmap with allocation of tx ring

David Wilder dwilder at us.ibm.com
Thu Feb 14 14:35:15 PST 2008


Eli Cohen wrote:
> David Wilder wrote:
>>
>> I tested with OFED-1.3-20080214-0725.tgz.  This build look to have 
>> both a tx_ring and rx_ring fix.
>>
>> This build fixes our problem using send_queue_size=1024
>>
>> But the recv_queue_size=2048 is still failing.
>>
>> [dmesg]
>> ib%d: failed allocating SRQ wr array
>> ib%d: failed allocating SRQ wr array
>>
>> kernel:  2.6.16.57-0.9
>>
>>
> 
> I did not replace the allocation function for the SRQ wr array.
> 

I saw that :)
You need to make the same change in three more places:

static void ipoib_cm_create_srq(struct net_device *dev, int max_sge)
.
.
----> priv->cm.rx_wr_arr = kzalloc(ipoib_recvq_size *
                           sizeof priv->cm.rx_wr_arr[0], GFP_KERNEL);
         if (!priv->cm.rx_wr_arr) {
                 ipoib_warn(priv, "failed allocating SRQ wr array\n");
                 goto destory_srq;
         }
.
.
.
----> priv->cm.srq_ring = kzalloc(ipoib_recvq_size *
                              sizeof *priv->cm.srq_ring, GFP_KERNEL);
         if (!priv->cm.srq_ring) {
                 printk(KERN_WARNING "%s: failed to allocate CM SRQ ring 
(%d entries)\n",
                        priv->ca->name, ipoib_recvq_size);
                 goto free_wr_array;
         }


static int ipoib_cm_tx_init(struct ipoib_cm_tx *p, u32 qpn,
                             struct ib_sa_path_rec *pathrec)
{
         struct ipoib_dev_priv *priv = netdev_priv(p->dev);
         int ret;
----->   p->tx_ring = kzalloc(ipoib_sendq_size * sizeof *p->tx_ring,
                                 GFP_KERNEL);
         if (!p->tx_ring) {
                 ipoib_warn(priv, "failed to allocate tx ring\n");
                 ret = -ENOMEM;
                 goto err_tx;
         }







More information about the general mailing list