diff mbox

"Unicast, no dst" warning from IPoIB

Message ID 20100322122040.GA12224@mtldesk030.lab.mtl.com (mailing list archive)
State New, archived
Headers show

Commit Message

Eli Cohen March 22, 2010, 12:20 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
index f8302c2..114404f 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
@@ -996,9 +996,14 @@  static int ipoib_cm_rep_handler(struct ib_cm_id *cm_id, struct ib_cm_event *even
 
 	while ((skb = __skb_dequeue(&skqueue))) {
 		skb->dev = p->dev;
-		if (dev_queue_xmit(skb))
-			ipoib_warn(priv, "dev_queue_xmit failed "
-				   "to requeue packet\n");
+		if (skb_dst(skb) && skb_dst(skb)->neighbour) {
+			if (dev_queue_xmit(skb))
+				ipoib_warn(priv, "dev_queue_xmit failed "
+					   "to requeue packet\n");
+		} else {
+			++p->dev->stats.tx_dropped;
+			dev_kfree_skb_any(skb);
+		}
 	}
 
 	ret = ib_send_cm_rtu(cm_id, NULL, 0);
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index 5e6c2de..12265b7 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -490,9 +490,14 @@  static void path_rec_completion(int status,
 
 	while ((skb = __skb_dequeue(&skqueue))) {
 		skb->dev = dev;
-		if (dev_queue_xmit(skb))
-			ipoib_warn(priv, "dev_queue_xmit failed "
-				   "to requeue packet\n");
+		if (skb_dst(skb) && skb_dst(skb)->neighbour) {
+			if (dev_queue_xmit(skb))
+				ipoib_warn(priv, "dev_queue_xmit failed "
+					   "to requeue packet\n");
+		} else {
+			++dev->stats.tx_dropped;
+			dev_kfree_skb_any(skb);
+		}
 	}
 }