From: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Feras Daoud <ferasda-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
Erez Shitrit <erezsh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: [PATCH rdma-next 6/9] IB/ipoib: Add detailed error message to dev_queue_xmit call
Date: Tue, 27 Dec 2016 15:39:08 +0200 [thread overview]
Message-ID: <20161227133911.14340-7-leon@kernel.org> (raw)
In-Reply-To: <20161227133911.14340-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
From: Feras Daoud <ferasda-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Add a detailed return code to dev_queue_xmit function when
calling to requeue packet via __skb_dequeue.
Signed-off-by: Feras Daoud <ferasda-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Signed-off-by: Erez Shitrit <erezsh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
drivers/infiniband/ulp/ipoib/ipoib_cm.c | 7 ++++---
drivers/infiniband/ulp/ipoib/ipoib_main.c | 8 +++++---
drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 6 ++++--
3 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
index 1c7a9a1..a720d2d 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
@@ -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);
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index 1090fe2..b5e1e4d 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -844,10 +844,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);
}
}
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
index fddff40..7c6c67b 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
@@ -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);
--
2.10.2
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-12-27 13:39 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-27 13:39 [PATCH rdma-next 0/9] IPoIB fixes for 4.11 Leon Romanovsky
[not found] ` <20161227133911.14340-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2016-12-27 13:39 ` [PATCH rdma-next 1/9] IB/ipoib: Add warning message when changing the MTU in UD over the max range Leon Romanovsky
2016-12-27 13:39 ` [PATCH rdma-next 2/9] IB/ipoib: Set device connection mode only when needed Leon Romanovsky
[not found] ` <20161227133911.14340-3-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2016-12-27 20:15 ` Yuval Shaia
2016-12-28 5:43 ` Leon Romanovsky
2016-12-27 13:39 ` [PATCH rdma-next 3/9] IB/ipoib: Fix deadlock over vlan_mutex Leon Romanovsky
2016-12-27 13:39 ` [PATCH rdma-next 4/9] IB/ipoib: Fix deadlock between rmmod and set_mode Leon Romanovsky
2016-12-27 13:39 ` [PATCH rdma-next 5/9] IB/ipoib: rtnl_unlock can not come after free_netdev Leon Romanovsky
[not found] ` <20161227133911.14340-6-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2016-12-28 12:05 ` Yuval Shaia
2016-12-27 13:39 ` Leon Romanovsky [this message]
[not found] ` <20161227133911.14340-7-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2016-12-28 12:11 ` [PATCH rdma-next 6/9] IB/ipoib: Add detailed error message to dev_queue_xmit call Yuval Shaia
2016-12-27 13:39 ` [PATCH rdma-next 7/9] IB/ipoib: Use debug prints instead of warnings in RNR WC status Leon Romanovsky
[not found] ` <20161227133911.14340-8-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2016-12-28 12:15 ` Yuval Shaia
2016-12-28 12:22 ` Leon Romanovsky
2016-12-27 13:39 ` [PATCH rdma-next 8/9] IB/ipoib: Replace list_del of the neigh->list with list_del_init Leon Romanovsky
[not found] ` <20161227133911.14340-9-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2016-12-28 13:01 ` Yuval Shaia
2016-12-27 13:39 ` [PATCH rdma-next 9/9] IB/ipoib: Change list_del to list_del_init in the tx object Leon Romanovsky
[not found] ` <20161227133911.14340-10-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2016-12-28 13:06 ` Yuval Shaia
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161227133911.14340-7-leon@kernel.org \
--to=leon-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=erezsh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=ferasda-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).