[openib-general] IPOIB_NUM_WC question

Shirley Ma xma at us.ibm.com
Mon Mar 6 19:43:31 PST 2006


Hello, Roland,

I have a question about below code. Why IPOIB_NUM_WC was set to 4 by 
default? If there is no particular reason, I would like to submit a patch 
to make this value tunable.

I found some interesting result on different drivers when making this 
number tunable. In some case, netperf could even get up to 30% throughout 
on ehca, but mthca only gets around 2%. I can post a patch and test result 
if you are interested. 

Also I noticed that mthca sends IB_CQ_NEXT_COMP with completion entry==0 
pretty often, in my netperf test, more than 30% time.

void ipoib_ib_completion(struct ib_cq *cq, void *dev_ptr)
{
        struct net_device *dev = (struct net_device *) dev_ptr;
        struct ipoib_dev_priv *priv = netdev_priv(dev);
        int n, i;

        ib_req_notify_cq(cq, IB_CQ_NEXT_COMP);
        do {
                n = ib_poll_cq(cq, IPOIB_NUM_WC, priv->ibwc);
                for (i = 0; i < n; ++i)
                        ipoib_ib_handle_wc(dev, priv->ibwc + i);
        } while (n == IPOIB_NUM_WC);
}

Thanks
Shirley Ma
IBM Linux Technology Center
15300 SW Koll Parkway
Beaverton, OR 97006-6063
Phone(Fax): (503) 578-7638

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20060306/8a32853e/attachment.html>


More information about the general mailing list