Re: [PATCH rdma-next] IB/rxe: Add port protocol stats

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 09, 2017 at 05:35:45PM +0000, Boyer, Andrew wrote:
>
> On 3/2/17, 3:15 AM, "linux-rdma-owner@xxxxxxxxxxxxxxx on behalf of Leon
> Romanovsky" <linux-rdma-owner@xxxxxxxxxxxxxxx on behalf of
> leon@xxxxxxxxxx> wrote:
>
> >From: Yonatan Cohen <yonatanc@xxxxxxxxxxxx>
> >
> >Expose new counters using the get_hw_stats callback.
> >We expose the following counters:
> >
> >+---------------------+----------------------------------------+
> >|      Name           |           Description                  |
> >|---------------------+----------------------------------------|
> >|sent_pkts            | number of sent pkts                    |
> >|---------------------+----------------------------------------|
> >|rcvd_pkts            | number of received packets             |
> >|---------------------+----------------------------------------|
> >|out_of_sequence      | number of errors due to packet         |
> >|                     | transport sequence number              |
> >|---------------------+----------------------------------------|
> >|duplicate_request    | number of received duplicated packets. |
> >|                     | A request that previously executed is  |
> >|                     | named duplicated.                      |
> >|---------------------+----------------------------------------|
> >|rcvd_rnr_err         | number of received RNR by completer    |
> >|---------------------+----------------------------------------|
> >|send_rnr_err         | number of sent RNR by responder        |
> >|---------------------+----------------------------------------|
> >|rcvd_seq_err         | number of out of sequence packets      |
> >|                     | received                               |
> >|---------------------+----------------------------------------|
> >|ack_deffered         | number of deferred handling of ack     |
> >|                     | packets.                               |
> >|---------------------+----------------------------------------|
> >|retry_exceeded_err   | number of times retry exceeded         |
> >|---------------------+----------------------------------------|
> >|completer_retry_err  | number of times completer decided to   |
> >|                     | retry                                  |
> >|---------------------+----------------------------------------|
> >|send_err             | number of failed send packet           |
> >+---------------------+----------------------------------------+
> >
> >Signed-off-by: Yonatan Cohen <yonatanc@xxxxxxxxxxxx>
> >Reviewed-by: Moni Shoua <monis@xxxxxxxxxxxx>
> >Signed-off-by: Leon Romanovsky <leon@xxxxxxxxxx>
> >
> >---
> > drivers/infiniband/sw/rxe/Makefile          |  3 +-
> > drivers/infiniband/sw/rxe/rxe_comp.c        | 12 +++++
> > drivers/infiniband/sw/rxe/rxe_hw_counters.c | 78
> >+++++++++++++++++++++++++++++
> > drivers/infiniband/sw/rxe/rxe_hw_counters.h | 61 ++++++++++++++++++++++
> > drivers/infiniband/sw/rxe/rxe_loc.h         |  2 +
> > drivers/infiniband/sw/rxe/rxe_recv.c        |  2 +
> > drivers/infiniband/sw/rxe/rxe_resp.c        |  5 ++
> > drivers/infiniband/sw/rxe/rxe_verbs.c       |  3 ++
> > drivers/infiniband/sw/rxe/rxe_verbs.h       |  8 +++
> > 9 files changed, 173 insertions(+), 1 deletion(-)
> > create mode 100644 drivers/infiniband/sw/rxe/rxe_hw_counters.c
> > create mode 100644 drivers/infiniband/sw/rxe/rxe_hw_counters.h
> >
> >diff --git a/drivers/infiniband/sw/rxe/rxe_comp.c
> >b/drivers/infiniband/sw/rxe/rxe_comp.c
> >index 4cd55d5617f7..85343f339624 100644
> >--- a/drivers/infiniband/sw/rxe/rxe_comp.c
> >+++ b/drivers/infiniband/sw/rxe/rxe_comp.c
> >@@ -685,6 +692,8 @@ int rxe_completer(void *arg)
> > 					/* tell the requester to retry the
> > 					 * send send queue next time around
> > 					 */
> >+					rxe_counter_inc(rxe,
> >+							RXE_CNT_COMP_RETRY);
> > 					qp->req.need_retry = 1;
> > 					rxe_run_task(&qp->req.task, 1);
> > 				}
>
> While here, fix ³send send queue² in comments?
>
> >diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.h
> >b/drivers/infiniband/sw/rxe/rxe_verbs.h
> >index e100c500ae85..3abe9ca97599 100644
> >--- a/drivers/infiniband/sw/rxe/rxe_verbs.h
> >+++ b/drivers/infiniband/sw/rxe/rxe_verbs.h
> >@@ -38,6 +38,7 @@
> > #include <rdma/rdma_user_rxe.h>
> > #include "rxe_pool.h"
> > #include "rxe_task.h"
> >+#include "rxe_hw_counters.h"
> >
> > static inline int pkey_match(u16 key1, u16 key2)
> > {
> >@@ -401,10 +402,17 @@ struct rxe_dev {
> > 	spinlock_t		mmap_offset_lock; /* guard mmap_offset */
> > 	int			mmap_offset;
> >
> >+	u64 stats_counters[RXE_NUM_OF_COUNTERS];
> >+
> > 	struct rxe_port		port;
> > 	struct list_head	list;
> > };
>
> Match indentation with other fields?
>
> Looks good otherwise.
> Reviewed-by: Andrew Boyer <andrew.boyer@xxxxxxxx>

Thanks for the review,
I'll post v1.

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

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux