netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH rdma-next 0/2] RoCE accelerator counters
@ 2020-01-15 14:54 Leon Romanovsky
  2020-01-15 14:54 ` [PATCH mlx5-next 1/2] net/mlx5: Add " Leon Romanovsky
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Leon Romanovsky @ 2020-01-15 14:54 UTC (permalink / raw)
  To: Doug Ledford, Jason Gunthorpe
  Cc: Leon Romanovsky, RDMA mailing list, Avihai Horon, Maor Gottlieb,
	Saeed Mahameed, linux-netdev

From: Leon Romanovsky <leonro@mellanox.com>

Hi,

Very small change, separated to two patches due to our shared methodology.

Thanks

Avihai Horon (1):
  IB/mlx5: Expose RoCE accelerator counters

Leon Romanovsky (1):
  net/mlx5: Add RoCE accelerator counters

 drivers/infiniband/hw/mlx5/main.c | 18 ++++++++++++++++++
 include/linux/mlx5/mlx5_ifc.h     | 17 +++++++++++++++--
 2 files changed, 33 insertions(+), 2 deletions(-)

--
2.20.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH mlx5-next 1/2] net/mlx5: Add RoCE accelerator counters
  2020-01-15 14:54 [PATCH rdma-next 0/2] RoCE accelerator counters Leon Romanovsky
@ 2020-01-15 14:54 ` Leon Romanovsky
  2020-01-15 14:54 ` [PATCH rdma-next 2/2] IB/mlx5: Expose " Leon Romanovsky
  2020-01-15 20:39 ` [PATCH rdma-next 0/2] " Jason Gunthorpe
  2 siblings, 0 replies; 6+ messages in thread
From: Leon Romanovsky @ 2020-01-15 14:54 UTC (permalink / raw)
  To: Doug Ledford, Jason Gunthorpe
  Cc: Leon Romanovsky, RDMA mailing list, Avihai Horon, Maor Gottlieb,
	Saeed Mahameed, linux-netdev

From: Leon Romanovsky <leonro@mellanox.com>

Add RoCE accelerator definitions.

Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
 include/linux/mlx5/mlx5_ifc.h | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/include/linux/mlx5/mlx5_ifc.h b/include/linux/mlx5/mlx5_ifc.h
index c6abaf4f1c55..73d1a6a049fb 100644
--- a/include/linux/mlx5/mlx5_ifc.h
+++ b/include/linux/mlx5/mlx5_ifc.h
@@ -1197,7 +1197,8 @@ struct mlx5_ifc_cmd_hca_cap_bits {
 	u8         reserved_at_130[0xa];
 	u8         log_max_ra_res_dc[0x6];
 
-	u8         reserved_at_140[0xa];
+	u8         reserved_at_140[0x9];
+	u8         roce_accl[0x1];
 	u8         log_max_ra_req_qp[0x6];
 	u8         reserved_at_150[0xa];
 	u8         log_max_ra_res_qp[0x6];
@@ -4746,7 +4747,19 @@ struct mlx5_ifc_query_q_counter_out_bits {
 
 	u8         req_cqe_flush_error[0x20];
 
-	u8         reserved_at_620[0x1e0];
+	u8         reserved_at_620[0x20];
+
+	u8         roce_adp_retrans[0x20];
+
+	u8         roce_adp_retrans_to[0x20];
+
+	u8         roce_slow_restart[0x20];
+
+	u8         roce_slow_restart_cnps[0x20];
+
+	u8         roce_slow_restart_trans[0x20];
+
+	u8         reserved_at_6e0[0x120];
 };
 
 struct mlx5_ifc_query_q_counter_in_bits {
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH rdma-next 2/2] IB/mlx5: Expose RoCE accelerator counters
  2020-01-15 14:54 [PATCH rdma-next 0/2] RoCE accelerator counters Leon Romanovsky
  2020-01-15 14:54 ` [PATCH mlx5-next 1/2] net/mlx5: Add " Leon Romanovsky
@ 2020-01-15 14:54 ` Leon Romanovsky
  2020-01-15 20:39 ` [PATCH rdma-next 0/2] " Jason Gunthorpe
  2 siblings, 0 replies; 6+ messages in thread
From: Leon Romanovsky @ 2020-01-15 14:54 UTC (permalink / raw)
  To: Doug Ledford, Jason Gunthorpe
  Cc: Leon Romanovsky, RDMA mailing list, Avihai Horon, Maor Gottlieb,
	Saeed Mahameed, linux-netdev

From: Avihai Horon <avihaih@mellanox.com>

Introduce the following RoCE accelerator counters:
* roce_adp_retrans - number of adaptive retransmission for RoCE traffic.
* roce_adp_retrans_to - number of times RoCE traffic reached time out
due to adaptive retransmission.
* roce_slow_restart - number of times RoCE slow restart was used.
* roce_slow_restart_cnps - number of times RoCE slow restart
generate CNP packets.
* roce_slow_restart_trans - number of times RoCE slow restart change
state to slow restart.

Signed-off-by: Avihai Horon <avihaih@mellanox.com>
Reviewed-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
 drivers/infiniband/hw/mlx5/main.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index 97bcf01960ae..5d41a2c69400 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -5370,6 +5370,14 @@ static const struct mlx5_ib_counter extended_err_cnts[] = {
 	INIT_Q_COUNTER(req_cqe_flush_error),
 };
 
+static const struct mlx5_ib_counter roce_accl_cnts[] = {
+	INIT_Q_COUNTER(roce_adp_retrans),
+	INIT_Q_COUNTER(roce_adp_retrans_to),
+	INIT_Q_COUNTER(roce_slow_restart),
+	INIT_Q_COUNTER(roce_slow_restart_cnps),
+	INIT_Q_COUNTER(roce_slow_restart_trans),
+};
+
 #define INIT_EXT_PPCNT_COUNTER(_name)		\
 	{ .name = #_name, .offset =	\
 	MLX5_BYTE_OFF(ppcnt_reg, \
@@ -5418,6 +5426,9 @@ static int __mlx5_ib_alloc_counters(struct mlx5_ib_dev *dev,
 	if (MLX5_CAP_GEN(dev->mdev, enhanced_error_q_counters))
 		num_counters += ARRAY_SIZE(extended_err_cnts);
 
+	if (MLX5_CAP_GEN(dev->mdev, roce_accl))
+		num_counters += ARRAY_SIZE(roce_accl_cnts);
+
 	cnts->num_q_counters = num_counters;
 
 	if (MLX5_CAP_GEN(dev->mdev, cc_query_allowed)) {
@@ -5478,6 +5489,13 @@ static void mlx5_ib_fill_counters(struct mlx5_ib_dev *dev,
 		}
 	}
 
+	if (MLX5_CAP_GEN(dev->mdev, roce_accl)) {
+		for (i = 0; i < ARRAY_SIZE(roce_accl_cnts); i++, j++) {
+			names[j] = roce_accl_cnts[i].name;
+			offsets[j] = roce_accl_cnts[i].offset;
+		}
+	}
+
 	if (MLX5_CAP_GEN(dev->mdev, cc_query_allowed)) {
 		for (i = 0; i < ARRAY_SIZE(cong_cnts); i++, j++) {
 			names[j] = cong_cnts[i].name;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH rdma-next 0/2] RoCE accelerator counters
  2020-01-15 14:54 [PATCH rdma-next 0/2] RoCE accelerator counters Leon Romanovsky
  2020-01-15 14:54 ` [PATCH mlx5-next 1/2] net/mlx5: Add " Leon Romanovsky
  2020-01-15 14:54 ` [PATCH rdma-next 2/2] IB/mlx5: Expose " Leon Romanovsky
@ 2020-01-15 20:39 ` Jason Gunthorpe
  2020-01-16  9:14   ` Leon Romanovsky
  2 siblings, 1 reply; 6+ messages in thread
From: Jason Gunthorpe @ 2020-01-15 20:39 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: Doug Ledford, Leon Romanovsky, RDMA mailing list, Avihai Horon,
	Maor Gottlieb, Saeed Mahameed, linux-netdev

On Wed, Jan 15, 2020 at 04:54:57PM +0200, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@mellanox.com>
> 
> Hi,
> 
> Very small change, separated to two patches due to our shared methodology.
> 
> Thanks
> 
> Avihai Horon (1):
>   IB/mlx5: Expose RoCE accelerator counters
> 
> Leon Romanovsky (1):
>   net/mlx5: Add RoCE accelerator counters

Looks fine to me, can you update the shared branch?

Thanks,
Jason

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH rdma-next 0/2] RoCE accelerator counters
  2020-01-15 20:39 ` [PATCH rdma-next 0/2] " Jason Gunthorpe
@ 2020-01-16  9:14   ` Leon Romanovsky
  2020-01-16 20:12     ` Jason Gunthorpe
  0 siblings, 1 reply; 6+ messages in thread
From: Leon Romanovsky @ 2020-01-16  9:14 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: Doug Ledford, RDMA mailing list, Avihai Horon, Maor Gottlieb,
	Saeed Mahameed, linux-netdev

On Wed, Jan 15, 2020 at 04:39:29PM -0400, Jason Gunthorpe wrote:
> On Wed, Jan 15, 2020 at 04:54:57PM +0200, Leon Romanovsky wrote:
> > From: Leon Romanovsky <leonro@mellanox.com>
> >
> > Hi,
> >
> > Very small change, separated to two patches due to our shared methodology.
> >
> > Thanks
> >
> > Avihai Horon (1):
> >   IB/mlx5: Expose RoCE accelerator counters
> >
> > Leon Romanovsky (1):
> >   net/mlx5: Add RoCE accelerator counters
>
> Looks fine to me, can you update the shared branch?

Thanks, applied
8cbf17c14f9b net/mlx5: Add RoCE accelerator counters

>
> Thanks,
> Jason

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH rdma-next 0/2] RoCE accelerator counters
  2020-01-16  9:14   ` Leon Romanovsky
@ 2020-01-16 20:12     ` Jason Gunthorpe
  0 siblings, 0 replies; 6+ messages in thread
From: Jason Gunthorpe @ 2020-01-16 20:12 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: Doug Ledford, RDMA mailing list, Avihai Horon, Maor Gottlieb,
	Saeed Mahameed, linux-netdev

On Thu, Jan 16, 2020 at 11:14:30AM +0200, Leon Romanovsky wrote:
> On Wed, Jan 15, 2020 at 04:39:29PM -0400, Jason Gunthorpe wrote:
> > On Wed, Jan 15, 2020 at 04:54:57PM +0200, Leon Romanovsky wrote:
> > > From: Leon Romanovsky <leonro@mellanox.com>
> > >
> > > Hi,
> > >
> > > Very small change, separated to two patches due to our shared methodology.
> > >
> > > Thanks
> > >
> > > Avihai Horon (1):
> > >   IB/mlx5: Expose RoCE accelerator counters
> > >
> > > Leon Romanovsky (1):
> > >   net/mlx5: Add RoCE accelerator counters
> >
> > Looks fine to me, can you update the shared branch?
> 
> Thanks, applied
> 8cbf17c14f9b net/mlx5: Add RoCE accelerator counters

Okay, applied to for-next

Thanks,
Jason

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-01-16 20:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-15 14:54 [PATCH rdma-next 0/2] RoCE accelerator counters Leon Romanovsky
2020-01-15 14:54 ` [PATCH mlx5-next 1/2] net/mlx5: Add " Leon Romanovsky
2020-01-15 14:54 ` [PATCH rdma-next 2/2] IB/mlx5: Expose " Leon Romanovsky
2020-01-15 20:39 ` [PATCH rdma-next 0/2] " Jason Gunthorpe
2020-01-16  9:14   ` Leon Romanovsky
2020-01-16 20:12     ` Jason Gunthorpe

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).