diff options
author | Bryan O'Sullivan <bos@pathscale.com> | 2006-07-01 07:36:09 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-01 12:56:01 -0400 |
commit | fba75200ad92892bf32d8d6f1443c6f1e4f48676 (patch) | |
tree | 289d5db3b7fc9f9ce4c49f9f1299bbf3985b87d4 /drivers/infiniband/hw/ipath/ipath_ud.c | |
parent | 85322947d761d08bd84165500f35b93c702aaaf3 (diff) |
[PATCH] IB/ipath: fixes to performance get counters for IB compliance
This patch fixes some problems uncovered during IB compliance testing to
return the right values for error counters returned by the Performance Get
Counters packet.
Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com>
Cc: "Michael S. Tsirkin" <mst@mellanox.co.il>
Cc: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_ud.c')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_ud.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_ud.c b/drivers/infiniband/hw/ipath/ipath_ud.c index 3b6d00b9b8be..4b0502907f3c 100644 --- a/drivers/infiniband/hw/ipath/ipath_ud.c +++ b/drivers/infiniband/hw/ipath/ipath_ud.c | |||
@@ -560,7 +560,16 @@ void ipath_ud_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, | |||
560 | spin_lock_irqsave(&rq->lock, flags); | 560 | spin_lock_irqsave(&rq->lock, flags); |
561 | if (rq->tail == rq->head) { | 561 | if (rq->tail == rq->head) { |
562 | spin_unlock_irqrestore(&rq->lock, flags); | 562 | spin_unlock_irqrestore(&rq->lock, flags); |
563 | dev->n_pkt_drops++; | 563 | /* |
564 | * Count VL15 packets dropped due to no receive buffer. | ||
565 | * Otherwise, count them as buffer overruns since usually, | ||
566 | * the HW will be able to receive packets even if there are | ||
567 | * no QPs with posted receive buffers. | ||
568 | */ | ||
569 | if (qp->ibqp.qp_num == 0) | ||
570 | dev->n_vl15_dropped++; | ||
571 | else | ||
572 | dev->rcv_errors++; | ||
564 | goto bail; | 573 | goto bail; |
565 | } | 574 | } |
566 | /* Silently drop packets which are too big. */ | 575 | /* Silently drop packets which are too big. */ |