IB/ipoib: Add detailed error message to dev_queue_xmit call
authorFeras Daoud <ferasda@mellanox.com>
Wed, 28 Dec 2016 12:47:25 +0000 (14:47 +0200)
committerDoug Ledford <dledford@redhat.com>
Thu, 12 Jan 2017 19:01:04 +0000 (14:01 -0500)
Add a detailed return code to dev_queue_xmit function when
calling to requeue packet via __skb_dequeue.

Signed-off-by: Feras Daoud <ferasda@mellanox.com>
Signed-off-by: Erez Shitrit <erezsh@mellanox.com>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/ulp/ipoib/ipoib_cm.c
drivers/infiniband/ulp/ipoib/ipoib_main.c
drivers/infiniband/ulp/ipoib/ipoib_multicast.c

index 1c7a9a16efc7ee7d9719cc4572870cb6367ddb29..a720d2ddddc159884a2c62a120563c84cdad66d7 100644 (file)
@@ -1015,9 +1015,10 @@ 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");
+               ret = dev_queue_xmit(skb);
+               if (ret)
+                       ipoib_warn(priv, "%s:dev_queue_xmit failed to re-queue packet, ret:%d\n",
+                                  __func__, ret);
        }
 
        ret = ib_send_cm_rtu(cm_id, NULL, 0);
index 045f844d7f4a05c0f0fa32d1c67314c43ab5779d..1086858f1cbfea87eb242ba739e581979a26105a 100644 (file)
@@ -843,10 +843,12 @@ static void path_rec_completion(int status,
                ipoib_put_ah(old_ah);
 
        while ((skb = __skb_dequeue(&skqueue))) {
+               int ret;
                skb->dev = dev;
-               if (dev_queue_xmit(skb))
-                       ipoib_warn(priv, "dev_queue_xmit failed "
-                                  "to requeue packet\n");
+               ret = dev_queue_xmit(skb);
+               if (ret)
+                       ipoib_warn(priv, "%s: dev_queue_xmit failed to re-queue packet, ret:%d\n",
+                                  __func__, ret);
        }
 }
 
index fddff403d5d21b0c8a3216de6f7ec0170afa3278..7c6c67bbdab30b2fa9613eb24ee5f979167d0a74 100644 (file)
@@ -314,9 +314,11 @@ static int ipoib_mcast_join_finish(struct ipoib_mcast *mcast,
                netif_tx_unlock_bh(dev);
 
                skb->dev = dev;
-               if (dev_queue_xmit(skb))
-                       ipoib_warn(priv, "dev_queue_xmit failed to requeue packet\n");
 
+               ret = dev_queue_xmit(skb);
+               if (ret)
+                       ipoib_warn(priv, "%s:dev_queue_xmit failed to re-queue packet, ret:%d\n",
+                                  __func__, ret);
                netif_tx_lock_bh(dev);
        }
        netif_tx_unlock_bh(dev);