aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorHariprasad S <hariprasad@chelsio.com>2015-05-04 18:25:24 -0400
committerDoug Ledford <dledford@redhat.com>2015-05-05 13:21:27 -0400
commit179d03bbfd2ebc63934753a696467d28bf9f5b64 (patch)
tree3b0244ebaba6e3b17d7bacc4783786da88a6f5a7 /drivers/infiniband
parent0d0f738f6a11856a704dcd8fd3a008b200f17625 (diff)
iw_cxgb4: Remove negative advice dmesg warnings
Remove these log messages in favor of per-endpoint counters as well as device-global counters that can be inspected via debugfs. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/cxgb4/cm.c27
-rw-r--r--drivers/infiniband/hw/cxgb4/device.c7
-rw-r--r--drivers/infiniband/hw/cxgb4/iw_cxgb4.h7
3 files changed, 32 insertions, 9 deletions
diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c
index 3c3b00e4e7af..bb95a6c0477b 100644
--- a/drivers/infiniband/hw/cxgb4/cm.c
+++ b/drivers/infiniband/hw/cxgb4/cm.c
@@ -2058,9 +2058,12 @@ static int act_open_rpl(struct c4iw_dev *dev, struct sk_buff *skb)
2058 status, status2errno(status)); 2058 status, status2errno(status));
2059 2059
2060 if (is_neg_adv(status)) { 2060 if (is_neg_adv(status)) {
2061 dev_warn(&dev->rdev.lldi.pdev->dev, 2061 PDBG("%s Connection problems for atid %u status %u (%s)\n",
2062 "Connection problems for atid %u status %u (%s)\n", 2062 __func__, atid, status, neg_adv_str(status));
2063 atid, status, neg_adv_str(status)); 2063 ep->stats.connect_neg_adv++;
2064 mutex_lock(&dev->rdev.stats.lock);
2065 dev->rdev.stats.neg_adv++;
2066 mutex_unlock(&dev->rdev.stats.lock);
2064 return 0; 2067 return 0;
2065 } 2068 }
2066 2069
@@ -2566,9 +2569,13 @@ static int peer_abort(struct c4iw_dev *dev, struct sk_buff *skb)
2566 2569
2567 ep = lookup_tid(t, tid); 2570 ep = lookup_tid(t, tid);
2568 if (is_neg_adv(req->status)) { 2571 if (is_neg_adv(req->status)) {
2569 dev_warn(&dev->rdev.lldi.pdev->dev, 2572 PDBG("%s Negative advice on abort- tid %u status %d (%s)\n",
2570 "Negative advice on abort - tid %u status %d (%s)\n", 2573 __func__, ep->hwtid, req->status,
2571 ep->hwtid, req->status, neg_adv_str(req->status)); 2574 neg_adv_str(req->status));
2575 ep->stats.abort_neg_adv++;
2576 mutex_lock(&dev->rdev.stats.lock);
2577 dev->rdev.stats.neg_adv++;
2578 mutex_unlock(&dev->rdev.stats.lock);
2572 return 0; 2579 return 0;
2573 } 2580 }
2574 PDBG("%s ep %p tid %u state %u\n", __func__, ep, ep->hwtid, 2581 PDBG("%s ep %p tid %u state %u\n", __func__, ep, ep->hwtid,
@@ -3977,9 +3984,11 @@ static int peer_abort_intr(struct c4iw_dev *dev, struct sk_buff *skb)
3977 return 0; 3984 return 0;
3978 } 3985 }
3979 if (is_neg_adv(req->status)) { 3986 if (is_neg_adv(req->status)) {
3980 dev_warn(&dev->rdev.lldi.pdev->dev, 3987 PDBG("%s Negative advice on abort- tid %u status %d (%s)\n",
3981 "Negative advice on abort - tid %u status %d (%s)\n", 3988 __func__, ep->hwtid, req->status,
3982 ep->hwtid, req->status, neg_adv_str(req->status)); 3989 neg_adv_str(req->status));
3990 ep->stats.abort_neg_adv++;
3991 dev->rdev.stats.neg_adv++;
3983 kfree_skb(skb); 3992 kfree_skb(skb);
3984 return 0; 3993 return 0;
3985 } 3994 }
diff --git a/drivers/infiniband/hw/cxgb4/device.c b/drivers/infiniband/hw/cxgb4/device.c
index 1ffbd038c0ae..cf54d6922dc4 100644
--- a/drivers/infiniband/hw/cxgb4/device.c
+++ b/drivers/infiniband/hw/cxgb4/device.c
@@ -490,6 +490,7 @@ static int stats_show(struct seq_file *seq, void *v)
490 dev->rdev.stats.act_ofld_conn_fails); 490 dev->rdev.stats.act_ofld_conn_fails);
491 seq_printf(seq, "PAS_OFLD_CONN_FAILS: %10llu\n", 491 seq_printf(seq, "PAS_OFLD_CONN_FAILS: %10llu\n",
492 dev->rdev.stats.pas_ofld_conn_fails); 492 dev->rdev.stats.pas_ofld_conn_fails);
493 seq_printf(seq, "NEG_ADV_RCVD: %10llu\n", dev->rdev.stats.neg_adv);
493 seq_printf(seq, "AVAILABLE IRD: %10u\n", dev->avail_ird); 494 seq_printf(seq, "AVAILABLE IRD: %10u\n", dev->avail_ird);
494 return 0; 495 return 0;
495} 496}
@@ -561,10 +562,13 @@ static int dump_ep(int id, void *p, void *data)
561 cc = snprintf(epd->buf + epd->pos, space, 562 cc = snprintf(epd->buf + epd->pos, space,
562 "ep %p cm_id %p qp %p state %d flags 0x%lx " 563 "ep %p cm_id %p qp %p state %d flags 0x%lx "
563 "history 0x%lx hwtid %d atid %d " 564 "history 0x%lx hwtid %d atid %d "
565 "conn_na %u abort_na %u "
564 "%pI4:%d/%d <-> %pI4:%d/%d\n", 566 "%pI4:%d/%d <-> %pI4:%d/%d\n",
565 ep, ep->com.cm_id, ep->com.qp, 567 ep, ep->com.cm_id, ep->com.qp,
566 (int)ep->com.state, ep->com.flags, 568 (int)ep->com.state, ep->com.flags,
567 ep->com.history, ep->hwtid, ep->atid, 569 ep->com.history, ep->hwtid, ep->atid,
570 ep->stats.connect_neg_adv,
571 ep->stats.abort_neg_adv,
568 &lsin->sin_addr, ntohs(lsin->sin_port), 572 &lsin->sin_addr, ntohs(lsin->sin_port),
569 ntohs(mapped_lsin->sin_port), 573 ntohs(mapped_lsin->sin_port),
570 &rsin->sin_addr, ntohs(rsin->sin_port), 574 &rsin->sin_addr, ntohs(rsin->sin_port),
@@ -582,10 +586,13 @@ static int dump_ep(int id, void *p, void *data)
582 cc = snprintf(epd->buf + epd->pos, space, 586 cc = snprintf(epd->buf + epd->pos, space,
583 "ep %p cm_id %p qp %p state %d flags 0x%lx " 587 "ep %p cm_id %p qp %p state %d flags 0x%lx "
584 "history 0x%lx hwtid %d atid %d " 588 "history 0x%lx hwtid %d atid %d "
589 "conn_na %u abort_na %u "
585 "%pI6:%d/%d <-> %pI6:%d/%d\n", 590 "%pI6:%d/%d <-> %pI6:%d/%d\n",
586 ep, ep->com.cm_id, ep->com.qp, 591 ep, ep->com.cm_id, ep->com.qp,
587 (int)ep->com.state, ep->com.flags, 592 (int)ep->com.state, ep->com.flags,
588 ep->com.history, ep->hwtid, ep->atid, 593 ep->com.history, ep->hwtid, ep->atid,
594 ep->stats.connect_neg_adv,
595 ep->stats.abort_neg_adv,
589 &lsin6->sin6_addr, ntohs(lsin6->sin6_port), 596 &lsin6->sin6_addr, ntohs(lsin6->sin6_port),
590 ntohs(mapped_lsin6->sin6_port), 597 ntohs(mapped_lsin6->sin6_port),
591 &rsin6->sin6_addr, ntohs(rsin6->sin6_port), 598 &rsin6->sin6_addr, ntohs(rsin6->sin6_port),
diff --git a/drivers/infiniband/hw/cxgb4/iw_cxgb4.h b/drivers/infiniband/hw/cxgb4/iw_cxgb4.h
index d87e1650f643..97bb5550a6cf 100644
--- a/drivers/infiniband/hw/cxgb4/iw_cxgb4.h
+++ b/drivers/infiniband/hw/cxgb4/iw_cxgb4.h
@@ -137,6 +137,7 @@ struct c4iw_stats {
137 u64 tcam_full; 137 u64 tcam_full;
138 u64 act_ofld_conn_fails; 138 u64 act_ofld_conn_fails;
139 u64 pas_ofld_conn_fails; 139 u64 pas_ofld_conn_fails;
140 u64 neg_adv;
140}; 141};
141 142
142struct c4iw_hw_queue { 143struct c4iw_hw_queue {
@@ -814,6 +815,11 @@ struct c4iw_listen_ep {
814 int backlog; 815 int backlog;
815}; 816};
816 817
818struct c4iw_ep_stats {
819 unsigned connect_neg_adv;
820 unsigned abort_neg_adv;
821};
822
817struct c4iw_ep { 823struct c4iw_ep {
818 struct c4iw_ep_common com; 824 struct c4iw_ep_common com;
819 struct c4iw_ep *parent_ep; 825 struct c4iw_ep *parent_ep;
@@ -846,6 +852,7 @@ struct c4iw_ep {
846 unsigned int retry_count; 852 unsigned int retry_count;
847 int snd_win; 853 int snd_win;
848 int rcv_win; 854 int rcv_win;
855 struct c4iw_ep_stats stats;
849}; 856};
850 857
851static inline void print_addr(struct c4iw_ep_common *epc, const char *func, 858static inline void print_addr(struct c4iw_ep_common *epc, const char *func,