Eli Cohen wrote:
can you resend the patch with function named appearing in each hunk
(ie after the @@ , use diff -p flag for that)
Or.

Sure. It is attached now - sorry but I using outlook from home :)

nope, the attachment was also without the functions names, anyway, please see below some comments.

Index: ofa_kernel-1.2/drivers/infiniband/ulp/ipoib/ipoib_ib.c
===================================================================
--- ofa_kernel-1.2.orig/drivers/infiniband/ulp/ipoib/ipoib_ib.c 2007-06-28 
13:48:51.000000000 +0300
+++ ofa_kernel-1.2/drivers/infiniband/ulp/ipoib/ipoib_ib.c      2007-07-08 
09:52:29.000000000 +0300
@@ -50,6 +50,8 @@ MODULE_PARM_DESC(data_debug_level,
                 "Enable data path debug tracing if > 0");
 #endif
+#define SKB_LEN_THOLD 150
+
 static DEFINE_MUTEX(pkey_mutex);
struct ipoib_ah *ipoib_create_ah(struct net_device *dev,
@@ -169,7 +171,7 @@ static void ipoib_ib_handle_rx_wc(struct
 {
        struct ipoib_dev_priv *priv = netdev_priv(dev);
        unsigned int wr_id = wc->wr_id & ~IPOIB_OP_RECV;
-       struct sk_buff *skb;
+       struct sk_buff *skb, *nskb;
        u64 addr;
ipoib_dbg_data(priv, "recv completion: id %d, op %d, status: %d\n",
@@ -223,6 +225,19 @@ static void ipoib_ib_handle_rx_wc(struct
                ++priv->stats.rx_packets;
                priv->stats.rx_bytes += skb->len;
+ if (skb->len < SKB_LEN_THOLD) {
+                       nskb = dev_alloc_skb(skb->len);
+                       if (!nskb) {
+                               ipoib_warn(priv, "failed to allocate skb\n");
+                               return;
+                       }
+                       memcpy(nskb->data, skb->data, skb->len);
+                       skb_put(nskb, skb->len);
+                       nskb->protocol = skb->protocol;
+                       dev_kfree_skb_any(skb);
+                       skb = nskb;
+               }
+
                skb->dev = dev;
                /* XXX get correct PACKET_ type here */
                skb->pkt_type = PACKET_HOST;
@@ -296,12 +311,12 @@ void ipoib_ib_completion(struct ib_cq *c
        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);
+       ib_req_notify_cq(cq, IB_CQ_NEXT_COMP);
 }

It seems that the change to ipoib_ib_completion() entered this patch by mistake, am I correct?

Or.

_______________________________________________
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

Reply via email to