diff mbox

IB/{ipoib,iser}: Consistent print format of vendor error

Message ID 20170905150919.12631-1-yuval.shaia@oracle.com (mailing list archive)
State Superseded
Headers show

Commit Message

Yuval Shaia Sept. 5, 2017, 3:09 p.m. UTC
Vendor error print should be consistent across protocols to avoid any
confusion.
This patch corrects that.

Suggested-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: Ajaykumar Hotchandani <ajaykumar.hotchandani@oracle.com>
Reviewed-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Acked-by: Wengang Wang <wen.gang.wang@oracle.com>
---
 drivers/infiniband/ulp/ipoib/ipoib_cm.c  | 10 +++++-----
 drivers/infiniband/ulp/ipoib/ipoib_ib.c  |  8 ++++----
 drivers/infiniband/ulp/iser/iser_verbs.c |  2 +-
 3 files changed, 10 insertions(+), 10 deletions(-)

Comments

Roi Dayan Sept. 6, 2017, 4:21 a.m. UTC | #1
On 05/09/2017 18:09, Yuval Shaia wrote:
> Vendor error print should be consistent across protocols to avoid any
> confusion.
> This patch corrects that.
> 
> Suggested-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
> Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
> Signed-off-by: Ajaykumar Hotchandani <ajaykumar.hotchandani@oracle.com>
> Reviewed-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
> Acked-by: Wengang Wang <wen.gang.wang@oracle.com>
> ---
>   drivers/infiniband/ulp/ipoib/ipoib_cm.c  | 10 +++++-----
>   drivers/infiniband/ulp/ipoib/ipoib_ib.c  |  8 ++++----
>   drivers/infiniband/ulp/iser/iser_verbs.c |  2 +-
>   3 files changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
> index 14b62f7472b4..fd302ba78869 100644
> --- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c
> +++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
> @@ -594,9 +594,9 @@ void ipoib_cm_handle_rx_wc(struct net_device *dev, struct ib_wc *wc)
>   	skb = rx_ring[wr_id].skb;
>   
>   	if (unlikely(wc->status != IB_WC_SUCCESS)) {
> -		ipoib_dbg(priv, "cm recv error "
> -			   "(status=%d, wrid=%d vend_err %x)\n",
> -			   wc->status, wr_id, wc->vendor_err);
> +		ipoib_dbg(priv,
> +			  "cm recv error (status=%d, wrid=%d vend_err 0x%x)\n",
> +			  wc->status, wr_id, wc->vendor_err);
>   		++dev->stats.rx_dropped;
>   		if (has_srq)
>   			goto repost;
> @@ -824,10 +824,10 @@ void ipoib_cm_handle_tx_wc(struct net_device *dev, struct ib_wc *wc)
>   		struct ipoib_neigh *neigh;
>   
>   		if (wc->status != IB_WC_RNR_RETRY_EXC_ERR)
> -			ipoib_warn(priv, "failed cm send event (status=%d, wrid=%d vend_err %x)\n",
> +			ipoib_warn(priv, "failed cm send event (status=%d, wrid=%d vend_err 0x%x)\n",
>   				   wc->status, wr_id, wc->vendor_err);
>   		else
> -			ipoib_dbg(priv, "failed cm send event (status=%d, wrid=%d vend_err %x)\n",
> +			ipoib_dbg(priv, "failed cm send event (status=%d, wrid=%d vend_err 0x%x)\n",
>   				  wc->status, wr_id, wc->vendor_err);
>   
>   		spin_lock_irqsave(&priv->lock, flags);
> diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
> index 2e075377242e..eb62f9d29103 100644
> --- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c
> +++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
> @@ -192,8 +192,8 @@ static void ipoib_ib_handle_rx_wc(struct net_device *dev, struct ib_wc *wc)
>   
>   	if (unlikely(wc->status != IB_WC_SUCCESS)) {
>   		if (wc->status != IB_WC_WR_FLUSH_ERR)
> -			ipoib_warn(priv, "failed recv event "
> -				   "(status=%d, wrid=%d vend_err %x)\n",
> +			ipoib_warn(priv,
> +				   "failed recv event (status=%d, wrid=%d vend_err 0x%x)\n",
>   				   wc->status, wr_id, wc->vendor_err);
>   		ipoib_ud_dma_unmap_rx(priv, priv->rx_ring[wr_id].mapping);
>   		dev_kfree_skb_any(skb);
> @@ -414,8 +414,8 @@ static void ipoib_ib_handle_tx_wc(struct net_device *dev, struct ib_wc *wc)
>   	if (wc->status != IB_WC_SUCCESS &&
>   	    wc->status != IB_WC_WR_FLUSH_ERR) {
>   		struct ipoib_qp_state_validate *qp_work;
> -		ipoib_warn(priv, "failed send event "
> -			   "(status=%d, wrid=%d vend_err %x)\n",
> +		ipoib_warn(priv,
> +			   "failed send event (status=%d, wrid=%d vend_err 0x%x)\n",
>   			   wc->status, wr_id, wc->vendor_err);
>   		qp_work = kzalloc(sizeof(*qp_work), GFP_ATOMIC);
>   		if (!qp_work)
> diff --git a/drivers/infiniband/ulp/iser/iser_verbs.c b/drivers/infiniband/ulp/iser/iser_verbs.c
> index 55a73b0ed4c6..fe58abcf65a2 100644
> --- a/drivers/infiniband/ulp/iser/iser_verbs.c
> +++ b/drivers/infiniband/ulp/iser/iser_verbs.c
> @@ -1146,7 +1146,7 @@ void iser_err_comp(struct ib_wc *wc, const char *type)
>   	if (wc->status != IB_WC_WR_FLUSH_ERR) {
>   		struct iser_conn *iser_conn = to_iser_conn(wc->qp->qp_context);
>   
> -		iser_err("%s failure: %s (%d) vend_err %x\n", type,
> +		iser_err("%s failure: %s (%d) vend_err 0x%x\n", type,
>   			 ib_wc_status_msg(wc->status), wc->status,
>   			 wc->vendor_err);
>   
> 

Acked-by: Roi Dayan <roid@mellanox.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sagi Grimberg Sept. 6, 2017, 9:31 a.m. UTC | #2
> diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
> index 14b62f7472b4..fd302ba78869 100644
> --- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c
> +++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
> @@ -594,9 +594,9 @@ void ipoib_cm_handle_rx_wc(struct net_device *dev, struct ib_wc *wc)
>   	skb = rx_ring[wr_id].skb;
>   
>   	if (unlikely(wc->status != IB_WC_SUCCESS)) {
> -		ipoib_dbg(priv, "cm recv error "
> -			   "(status=%d, wrid=%d vend_err %x)\n",
> -			   wc->status, wr_id, wc->vendor_err);
> +		ipoib_dbg(priv,
> +			  "cm recv error (status=%d, wrid=%d vend_err 0x%x)\n",
> +			  wc->status, wr_id, wc->vendor_err);

%#x might be a better way to go Yuval.

otherwise looks fine,

Reviewed-by: Sagi Grimberg <sagi@rimberg.me>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sagi Grimberg Sept. 6, 2017, 10:20 a.m. UTC | #3
> diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
> index 14b62f7472b4..fd302ba78869 100644
> --- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c
> +++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
> @@ -594,9 +594,9 @@ void ipoib_cm_handle_rx_wc(struct net_device *dev, struct ib_wc *wc)
>   	skb = rx_ring[wr_id].skb;
>   
>   	if (unlikely(wc->status != IB_WC_SUCCESS)) {
> -		ipoib_dbg(priv, "cm recv error "
> -			   "(status=%d, wrid=%d vend_err %x)\n",
> -			   wc->status, wr_id, wc->vendor_err);
> +		ipoib_dbg(priv,
> +			  "cm recv error (status=%d, wrid=%d vend_err 0x%x)\n",

%#x would be better Yuval,

otherwise looks fine,

Acked-by: Sagi Grimberg <sagi@grimberg.me>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Yuval Shaia Sept. 26, 2017, 7:02 a.m. UTC | #4
On Wed, Sep 06, 2017 at 01:20:25PM +0300, Sagi Grimberg wrote:
> 
> > diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
> > index 14b62f7472b4..fd302ba78869 100644
> > --- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c
> > +++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
> > @@ -594,9 +594,9 @@ void ipoib_cm_handle_rx_wc(struct net_device *dev, struct ib_wc *wc)
> >   	skb = rx_ring[wr_id].skb;
> >   	if (unlikely(wc->status != IB_WC_SUCCESS)) {
> > -		ipoib_dbg(priv, "cm recv error "
> > -			   "(status=%d, wrid=%d vend_err %x)\n",
> > -			   wc->status, wr_id, wc->vendor_err);
> > +		ipoib_dbg(priv,
> > +			  "cm recv error (status=%d, wrid=%d vend_err 0x%x)\n",
> 
> %#x would be better Yuval,

Thanks,
Please check v1.

> 
> otherwise looks fine,
> 
> Acked-by: Sagi Grimberg <sagi@grimberg.me>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Yuval Shaia Sept. 26, 2017, 7:06 a.m. UTC | #5
On Wed, Sep 06, 2017 at 07:21:48AM +0300, Roi Dayan wrote:
> 
> 
> On 05/09/2017 18:09, Yuval Shaia wrote:
> > Vendor error print should be consistent across protocols to avoid any
> > confusion.
> > This patch corrects that.
> > 
> > Suggested-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
> > Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
> > Signed-off-by: Ajaykumar Hotchandani <ajaykumar.hotchandani@oracle.com>
> > Reviewed-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
> > Acked-by: Wengang Wang <wen.gang.wang@oracle.com>
> > ---
> >   drivers/infiniband/ulp/ipoib/ipoib_cm.c  | 10 +++++-----
> >   drivers/infiniband/ulp/ipoib/ipoib_ib.c  |  8 ++++----
> >   drivers/infiniband/ulp/iser/iser_verbs.c |  2 +-
> >   3 files changed, 10 insertions(+), 10 deletions(-)
> > 
> > diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
> > index 14b62f7472b4..fd302ba78869 100644
> > --- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c
> > +++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
> > @@ -594,9 +594,9 @@ void ipoib_cm_handle_rx_wc(struct net_device *dev, struct ib_wc *wc)
> >   	skb = rx_ring[wr_id].skb;
> >   	if (unlikely(wc->status != IB_WC_SUCCESS)) {
> > -		ipoib_dbg(priv, "cm recv error "
> > -			   "(status=%d, wrid=%d vend_err %x)\n",
> > -			   wc->status, wr_id, wc->vendor_err);
> > +		ipoib_dbg(priv,
> > +			  "cm recv error (status=%d, wrid=%d vend_err 0x%x)\n",
> > +			  wc->status, wr_id, wc->vendor_err);
> >   		++dev->stats.rx_dropped;
> >   		if (has_srq)
> >   			goto repost;
> > @@ -824,10 +824,10 @@ void ipoib_cm_handle_tx_wc(struct net_device *dev, struct ib_wc *wc)
> >   		struct ipoib_neigh *neigh;
> >   		if (wc->status != IB_WC_RNR_RETRY_EXC_ERR)
> > -			ipoib_warn(priv, "failed cm send event (status=%d, wrid=%d vend_err %x)\n",
> > +			ipoib_warn(priv, "failed cm send event (status=%d, wrid=%d vend_err 0x%x)\n",
> >   				   wc->status, wr_id, wc->vendor_err);
> >   		else
> > -			ipoib_dbg(priv, "failed cm send event (status=%d, wrid=%d vend_err %x)\n",
> > +			ipoib_dbg(priv, "failed cm send event (status=%d, wrid=%d vend_err 0x%x)\n",
> >   				  wc->status, wr_id, wc->vendor_err);
> >   		spin_lock_irqsave(&priv->lock, flags);
> > diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
> > index 2e075377242e..eb62f9d29103 100644
> > --- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c
> > +++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
> > @@ -192,8 +192,8 @@ static void ipoib_ib_handle_rx_wc(struct net_device *dev, struct ib_wc *wc)
> >   	if (unlikely(wc->status != IB_WC_SUCCESS)) {
> >   		if (wc->status != IB_WC_WR_FLUSH_ERR)
> > -			ipoib_warn(priv, "failed recv event "
> > -				   "(status=%d, wrid=%d vend_err %x)\n",
> > +			ipoib_warn(priv,
> > +				   "failed recv event (status=%d, wrid=%d vend_err 0x%x)\n",
> >   				   wc->status, wr_id, wc->vendor_err);
> >   		ipoib_ud_dma_unmap_rx(priv, priv->rx_ring[wr_id].mapping);
> >   		dev_kfree_skb_any(skb);
> > @@ -414,8 +414,8 @@ static void ipoib_ib_handle_tx_wc(struct net_device *dev, struct ib_wc *wc)
> >   	if (wc->status != IB_WC_SUCCESS &&
> >   	    wc->status != IB_WC_WR_FLUSH_ERR) {
> >   		struct ipoib_qp_state_validate *qp_work;
> > -		ipoib_warn(priv, "failed send event "
> > -			   "(status=%d, wrid=%d vend_err %x)\n",
> > +		ipoib_warn(priv,
> > +			   "failed send event (status=%d, wrid=%d vend_err 0x%x)\n",
> >   			   wc->status, wr_id, wc->vendor_err);
> >   		qp_work = kzalloc(sizeof(*qp_work), GFP_ATOMIC);
> >   		if (!qp_work)
> > diff --git a/drivers/infiniband/ulp/iser/iser_verbs.c b/drivers/infiniband/ulp/iser/iser_verbs.c
> > index 55a73b0ed4c6..fe58abcf65a2 100644
> > --- a/drivers/infiniband/ulp/iser/iser_verbs.c
> > +++ b/drivers/infiniband/ulp/iser/iser_verbs.c
> > @@ -1146,7 +1146,7 @@ void iser_err_comp(struct ib_wc *wc, const char *type)
> >   	if (wc->status != IB_WC_WR_FLUSH_ERR) {
> >   		struct iser_conn *iser_conn = to_iser_conn(wc->qp->qp_context);
> > -		iser_err("%s failure: %s (%d) vend_err %x\n", type,
> > +		iser_err("%s failure: %s (%d) vend_err 0x%x\n", type,
> >   			 ib_wc_status_msg(wc->status), wc->status,
> >   			 wc->vendor_err);
> > 
> 
> Acked-by: Roi Dayan <roid@mellanox.com>

Thanks,
Will appreciate your review for v1 as well.

> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
index 14b62f7472b4..fd302ba78869 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
@@ -594,9 +594,9 @@  void ipoib_cm_handle_rx_wc(struct net_device *dev, struct ib_wc *wc)
 	skb = rx_ring[wr_id].skb;
 
 	if (unlikely(wc->status != IB_WC_SUCCESS)) {
-		ipoib_dbg(priv, "cm recv error "
-			   "(status=%d, wrid=%d vend_err %x)\n",
-			   wc->status, wr_id, wc->vendor_err);
+		ipoib_dbg(priv,
+			  "cm recv error (status=%d, wrid=%d vend_err 0x%x)\n",
+			  wc->status, wr_id, wc->vendor_err);
 		++dev->stats.rx_dropped;
 		if (has_srq)
 			goto repost;
@@ -824,10 +824,10 @@  void ipoib_cm_handle_tx_wc(struct net_device *dev, struct ib_wc *wc)
 		struct ipoib_neigh *neigh;
 
 		if (wc->status != IB_WC_RNR_RETRY_EXC_ERR)
-			ipoib_warn(priv, "failed cm send event (status=%d, wrid=%d vend_err %x)\n",
+			ipoib_warn(priv, "failed cm send event (status=%d, wrid=%d vend_err 0x%x)\n",
 				   wc->status, wr_id, wc->vendor_err);
 		else
-			ipoib_dbg(priv, "failed cm send event (status=%d, wrid=%d vend_err %x)\n",
+			ipoib_dbg(priv, "failed cm send event (status=%d, wrid=%d vend_err 0x%x)\n",
 				  wc->status, wr_id, wc->vendor_err);
 
 		spin_lock_irqsave(&priv->lock, flags);
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
index 2e075377242e..eb62f9d29103 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
@@ -192,8 +192,8 @@  static void ipoib_ib_handle_rx_wc(struct net_device *dev, struct ib_wc *wc)
 
 	if (unlikely(wc->status != IB_WC_SUCCESS)) {
 		if (wc->status != IB_WC_WR_FLUSH_ERR)
-			ipoib_warn(priv, "failed recv event "
-				   "(status=%d, wrid=%d vend_err %x)\n",
+			ipoib_warn(priv,
+				   "failed recv event (status=%d, wrid=%d vend_err 0x%x)\n",
 				   wc->status, wr_id, wc->vendor_err);
 		ipoib_ud_dma_unmap_rx(priv, priv->rx_ring[wr_id].mapping);
 		dev_kfree_skb_any(skb);
@@ -414,8 +414,8 @@  static void ipoib_ib_handle_tx_wc(struct net_device *dev, struct ib_wc *wc)
 	if (wc->status != IB_WC_SUCCESS &&
 	    wc->status != IB_WC_WR_FLUSH_ERR) {
 		struct ipoib_qp_state_validate *qp_work;
-		ipoib_warn(priv, "failed send event "
-			   "(status=%d, wrid=%d vend_err %x)\n",
+		ipoib_warn(priv,
+			   "failed send event (status=%d, wrid=%d vend_err 0x%x)\n",
 			   wc->status, wr_id, wc->vendor_err);
 		qp_work = kzalloc(sizeof(*qp_work), GFP_ATOMIC);
 		if (!qp_work)
diff --git a/drivers/infiniband/ulp/iser/iser_verbs.c b/drivers/infiniband/ulp/iser/iser_verbs.c
index 55a73b0ed4c6..fe58abcf65a2 100644
--- a/drivers/infiniband/ulp/iser/iser_verbs.c
+++ b/drivers/infiniband/ulp/iser/iser_verbs.c
@@ -1146,7 +1146,7 @@  void iser_err_comp(struct ib_wc *wc, const char *type)
 	if (wc->status != IB_WC_WR_FLUSH_ERR) {
 		struct iser_conn *iser_conn = to_iser_conn(wc->qp->qp_context);
 
-		iser_err("%s failure: %s (%d) vend_err %x\n", type,
+		iser_err("%s failure: %s (%d) vend_err 0x%x\n", type,
 			 ib_wc_status_msg(wc->status), wc->status,
 			 wc->vendor_err);