* [PATCH rdma-next v3 00/11] RAW format dumps through RDMAtool
@ 2020-06-23 11:30 Leon Romanovsky
2020-06-23 11:30 ` [PATCH mlx5-next v3 01/11] net/mlx5: Export resource dump interface Leon Romanovsky
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Leon Romanovsky @ 2020-06-23 11:30 UTC (permalink / raw)
To: Doug Ledford, Jason Gunthorpe
Cc: Leon Romanovsky, Jakub Kicinski, Lijun Ou, linux-rdma,
Maor Gottlieb, netdev, Potnuri Bharat Teja, Saeed Mahameed,
Weihang Li, Wei Hu(Xavier)
From: Leon Romanovsky <leonro@mellanox.com>
Changelog:
v3:
* Rewrote query interface in patch "RDMA: Add support to dump resource
tracker in RAW format"
v2:
https://lore.kernel.org/linux-rdma/20200616104006.2425549-1-leon@kernel.org
* Converted to specific nldev ops for RAW.
* Rebased on top of v5.8-rc1.
v1:
https://lore.kernel.org/linux-rdma/20200527135408.480878-1-leon@kernel.org
* Maor dropped controversial change to dummy interface.
v0:
https://lore.kernel.org/linux-rdma/20200513095034.208385-1-leon@kernel.org
------------------------------------------------------------------------------
Hi,
The following series adds support to get the RDMA resource data in RAW
format. The main motivation for doing this is to enable vendors to return
the entire QP/CQ/MR data without a need from the vendor to set each
field separately.
Thanks
Maor Gottlieb (11):
net/mlx5: Export resource dump interface
net/mlx5: Add support in query QP, CQ and MKEY segments
RDMA/core: Don't call fill_res_entry for PD
RDMA: Add dedicated MR resource tracker function
RDMA: Add a dedicated CQ resource tracker function
RDMA: Add dedicated QP resource tracker function
RDMA: Add dedicated CM_ID resource tracker function
RDMA: Add support to dump resource tracker in RAW format
RDMA/mlx5: Add support to get QP resource in RAW format
RDMA/mlx5: Add support to get CQ resource in RAW format
RDMA/mlx5: Add support to get MR resource in RAW format
drivers/infiniband/core/device.c | 10 +-
drivers/infiniband/core/nldev.c | 214 ++++++++++--------
drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 7 +-
drivers/infiniband/hw/cxgb4/provider.c | 11 +-
drivers/infiniband/hw/cxgb4/restrack.c | 24 +-
drivers/infiniband/hw/hns/hns_roce_device.h | 4 +-
drivers/infiniband/hw/hns/hns_roce_main.c | 2 +-
drivers/infiniband/hw/hns/hns_roce_restrack.c | 14 +-
drivers/infiniband/hw/mlx5/main.c | 7 +-
drivers/infiniband/hw/mlx5/mlx5_ib.h | 9 +-
drivers/infiniband/hw/mlx5/restrack.c | 105 +++++++--
.../mellanox/mlx5/core/diag/rsc_dump.c | 6 +
.../mellanox/mlx5/core/diag/rsc_dump.h | 33 +--
.../diag => include/linux/mlx5}/rsc_dump.h | 25 +-
include/rdma/ib_verbs.h | 13 +-
include/uapi/rdma/rdma_netlink.h | 8 +
16 files changed, 279 insertions(+), 213 deletions(-)
copy {drivers/net/ethernet/mellanox/mlx5/core/diag => include/linux/mlx5}/rsc_dump.h (68%)
--
2.26.2
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH mlx5-next v3 01/11] net/mlx5: Export resource dump interface
2020-06-23 11:30 [PATCH rdma-next v3 00/11] RAW format dumps through RDMAtool Leon Romanovsky
@ 2020-06-23 11:30 ` Leon Romanovsky
2020-06-23 11:30 ` [PATCH mlx5-next v3 02/11] net/mlx5: Add support in query QP, CQ and MKEY segments Leon Romanovsky
2020-06-23 14:19 ` [PATCH rdma-next v3 00/11] RAW format dumps through RDMAtool Jason Gunthorpe
2 siblings, 0 replies; 6+ messages in thread
From: Leon Romanovsky @ 2020-06-23 11:30 UTC (permalink / raw)
To: Doug Ledford, Jason Gunthorpe
Cc: Maor Gottlieb, Jakub Kicinski, linux-rdma, netdev, Saeed Mahameed
From: Maor Gottlieb <maorg@mellanox.com>
Export some of the resource dump API. mlx5_ib driver will use
it in downstream patches.
Signed-off-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
.../mellanox/mlx5/core/diag/rsc_dump.c | 3 ++
.../mellanox/mlx5/core/diag/rsc_dump.h | 33 +------------------
.../diag => include/linux/mlx5}/rsc_dump.h | 22 ++++---------
3 files changed, 10 insertions(+), 48 deletions(-)
copy {drivers/net/ethernet/mellanox/mlx5/core/diag => include/linux/mlx5}/rsc_dump.h (68%)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/diag/rsc_dump.c b/drivers/net/ethernet/mellanox/mlx5/core/diag/rsc_dump.c
index 17ab7efe693d..10218c2324cc 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/diag/rsc_dump.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/diag/rsc_dump.c
@@ -130,11 +130,13 @@ struct mlx5_rsc_dump_cmd *mlx5_rsc_dump_cmd_create(struct mlx5_core_dev *dev,
cmd->mem_size = key->size;
return cmd;
}
+EXPORT_SYMBOL(mlx5_rsc_dump_cmd_create);
void mlx5_rsc_dump_cmd_destroy(struct mlx5_rsc_dump_cmd *cmd)
{
kfree(cmd);
}
+EXPORT_SYMBOL(mlx5_rsc_dump_cmd_destroy);
int mlx5_rsc_dump_next(struct mlx5_core_dev *dev, struct mlx5_rsc_dump_cmd *cmd,
struct page *page, int *size)
@@ -155,6 +157,7 @@ int mlx5_rsc_dump_next(struct mlx5_core_dev *dev, struct mlx5_rsc_dump_cmd *cmd,
return more_dump;
}
+EXPORT_SYMBOL(mlx5_rsc_dump_next);
#define MLX5_RSC_DUMP_MENU_SEGMENT 0xffff
static int mlx5_rsc_dump_menu(struct mlx5_core_dev *dev)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/diag/rsc_dump.h b/drivers/net/ethernet/mellanox/mlx5/core/diag/rsc_dump.h
index 148270073e71..64c4956db6d2 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/diag/rsc_dump.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/diag/rsc_dump.h
@@ -4,41 +4,10 @@
#ifndef __MLX5_RSC_DUMP_H
#define __MLX5_RSC_DUMP_H
+#include <linux/mlx5/rsc_dump.h>
#include <linux/mlx5/driver.h>
#include "mlx5_core.h"
-enum mlx5_sgmt_type {
- MLX5_SGMT_TYPE_HW_CQPC,
- MLX5_SGMT_TYPE_HW_SQPC,
- MLX5_SGMT_TYPE_HW_RQPC,
- MLX5_SGMT_TYPE_FULL_SRQC,
- MLX5_SGMT_TYPE_FULL_CQC,
- MLX5_SGMT_TYPE_FULL_EQC,
- MLX5_SGMT_TYPE_FULL_QPC,
- MLX5_SGMT_TYPE_SND_BUFF,
- MLX5_SGMT_TYPE_RCV_BUFF,
- MLX5_SGMT_TYPE_SRQ_BUFF,
- MLX5_SGMT_TYPE_CQ_BUFF,
- MLX5_SGMT_TYPE_EQ_BUFF,
- MLX5_SGMT_TYPE_SX_SLICE,
- MLX5_SGMT_TYPE_SX_SLICE_ALL,
- MLX5_SGMT_TYPE_RDB,
- MLX5_SGMT_TYPE_RX_SLICE_ALL,
- MLX5_SGMT_TYPE_MENU,
- MLX5_SGMT_TYPE_TERMINATE,
-
- MLX5_SGMT_TYPE_NUM, /* Keep last */
-};
-
-struct mlx5_rsc_key {
- enum mlx5_sgmt_type rsc;
- int index1;
- int index2;
- int num_of_obj1;
- int num_of_obj2;
- int size;
-};
-
#define MLX5_RSC_DUMP_ALL 0xFFFF
struct mlx5_rsc_dump_cmd;
struct mlx5_rsc_dump;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/diag/rsc_dump.h b/include/linux/mlx5/rsc_dump.h
similarity index 68%
copy from drivers/net/ethernet/mellanox/mlx5/core/diag/rsc_dump.h
copy to include/linux/mlx5/rsc_dump.h
index 148270073e71..87415fa754fe 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/diag/rsc_dump.h
+++ b/include/linux/mlx5/rsc_dump.h
@@ -1,11 +1,10 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/* Copyright (c) 2019 Mellanox Technologies. */
-
-#ifndef __MLX5_RSC_DUMP_H
-#define __MLX5_RSC_DUMP_H
+/* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
+/* Copyright (c) 2020 Mellanox Technologies inc. */
#include <linux/mlx5/driver.h>
-#include "mlx5_core.h"
+
+#ifndef __MLX5_RSC_DUMP
+#define __MLX5_RSC_DUMP
enum mlx5_sgmt_type {
MLX5_SGMT_TYPE_HW_CQPC,
@@ -39,20 +38,11 @@ struct mlx5_rsc_key {
int size;
};
-#define MLX5_RSC_DUMP_ALL 0xFFFF
struct mlx5_rsc_dump_cmd;
-struct mlx5_rsc_dump;
-
-struct mlx5_rsc_dump *mlx5_rsc_dump_create(struct mlx5_core_dev *dev);
-void mlx5_rsc_dump_destroy(struct mlx5_core_dev *dev);
-
-int mlx5_rsc_dump_init(struct mlx5_core_dev *dev);
-void mlx5_rsc_dump_cleanup(struct mlx5_core_dev *dev);
struct mlx5_rsc_dump_cmd *mlx5_rsc_dump_cmd_create(struct mlx5_core_dev *dev,
struct mlx5_rsc_key *key);
void mlx5_rsc_dump_cmd_destroy(struct mlx5_rsc_dump_cmd *cmd);
-
int mlx5_rsc_dump_next(struct mlx5_core_dev *dev, struct mlx5_rsc_dump_cmd *cmd,
struct page *page, int *size);
-#endif
+#endif /* __MLX5_RSC_DUMP */
--
2.26.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH mlx5-next v3 02/11] net/mlx5: Add support in query QP, CQ and MKEY segments
2020-06-23 11:30 [PATCH rdma-next v3 00/11] RAW format dumps through RDMAtool Leon Romanovsky
2020-06-23 11:30 ` [PATCH mlx5-next v3 01/11] net/mlx5: Export resource dump interface Leon Romanovsky
@ 2020-06-23 11:30 ` Leon Romanovsky
2020-06-23 14:19 ` [PATCH rdma-next v3 00/11] RAW format dumps through RDMAtool Jason Gunthorpe
2 siblings, 0 replies; 6+ messages in thread
From: Leon Romanovsky @ 2020-06-23 11:30 UTC (permalink / raw)
To: Doug Ledford, Jason Gunthorpe
Cc: Maor Gottlieb, Jakub Kicinski, linux-rdma, netdev, Saeed Mahameed
From: Maor Gottlieb <maorg@mellanox.com>
Introduce new resource dump segments - PRM_QUERY_QP,
PRM_QUERY_CQ and PRM_QUERY_MKEY. These segments contains the resource
dump in PRM query format.
Signed-off-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
drivers/net/ethernet/mellanox/mlx5/core/diag/rsc_dump.c | 3 +++
include/linux/mlx5/rsc_dump.h | 3 +++
2 files changed, 6 insertions(+)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/diag/rsc_dump.c b/drivers/net/ethernet/mellanox/mlx5/core/diag/rsc_dump.c
index 10218c2324cc..4924a5658853 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/diag/rsc_dump.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/diag/rsc_dump.c
@@ -23,6 +23,9 @@ static const char *const mlx5_rsc_sgmt_name[] = {
MLX5_SGMT_STR_ASSING(SX_SLICE_ALL),
MLX5_SGMT_STR_ASSING(RDB),
MLX5_SGMT_STR_ASSING(RX_SLICE_ALL),
+ MLX5_SGMT_STR_ASSING(PRM_QUERY_QP),
+ MLX5_SGMT_STR_ASSING(PRM_QUERY_CQ),
+ MLX5_SGMT_STR_ASSING(PRM_QUERY_MKEY),
};
struct mlx5_rsc_dump {
diff --git a/include/linux/mlx5/rsc_dump.h b/include/linux/mlx5/rsc_dump.h
index 87415fa754fe..d11c0b228620 100644
--- a/include/linux/mlx5/rsc_dump.h
+++ b/include/linux/mlx5/rsc_dump.h
@@ -23,6 +23,9 @@ enum mlx5_sgmt_type {
MLX5_SGMT_TYPE_SX_SLICE_ALL,
MLX5_SGMT_TYPE_RDB,
MLX5_SGMT_TYPE_RX_SLICE_ALL,
+ MLX5_SGMT_TYPE_PRM_QUERY_QP,
+ MLX5_SGMT_TYPE_PRM_QUERY_CQ,
+ MLX5_SGMT_TYPE_PRM_QUERY_MKEY,
MLX5_SGMT_TYPE_MENU,
MLX5_SGMT_TYPE_TERMINATE,
--
2.26.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH rdma-next v3 00/11] RAW format dumps through RDMAtool
2020-06-23 11:30 [PATCH rdma-next v3 00/11] RAW format dumps through RDMAtool Leon Romanovsky
2020-06-23 11:30 ` [PATCH mlx5-next v3 01/11] net/mlx5: Export resource dump interface Leon Romanovsky
2020-06-23 11:30 ` [PATCH mlx5-next v3 02/11] net/mlx5: Add support in query QP, CQ and MKEY segments Leon Romanovsky
@ 2020-06-23 14:19 ` Jason Gunthorpe
2020-06-23 14:27 ` Leon Romanovsky
2 siblings, 1 reply; 6+ messages in thread
From: Jason Gunthorpe @ 2020-06-23 14:19 UTC (permalink / raw)
To: Leon Romanovsky
Cc: Doug Ledford, Leon Romanovsky, Jakub Kicinski, Lijun Ou,
linux-rdma, Maor Gottlieb, netdev, Potnuri Bharat Teja,
Saeed Mahameed, Weihang Li, Wei Hu(Xavier)
On Tue, Jun 23, 2020 at 02:30:32PM +0300, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@mellanox.com>
>
> Changelog:
> v3:
> * Rewrote query interface in patch "RDMA: Add support to dump resource
> tracker in RAW format"
> v2:
> https://lore.kernel.org/linux-rdma/20200616104006.2425549-1-leon@kernel.org
> * Converted to specific nldev ops for RAW.
> * Rebased on top of v5.8-rc1.
> v1:
> https://lore.kernel.org/linux-rdma/20200527135408.480878-1-leon@kernel.org
> * Maor dropped controversial change to dummy interface.
> v0:
> https://lore.kernel.org/linux-rdma/20200513095034.208385-1-leon@kernel.org
>
>
> Hi,
>
> The following series adds support to get the RDMA resource data in RAW
> format. The main motivation for doing this is to enable vendors to return
> the entire QP/CQ/MR data without a need from the vendor to set each
> field separately.
>
> Thanks
>
>
> Maor Gottlieb (11):
> net/mlx5: Export resource dump interface
> net/mlx5: Add support in query QP, CQ and MKEY segments
It looks OK can you apply these too the shared branch?
Thanks,
Jason
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH rdma-next v3 00/11] RAW format dumps through RDMAtool
2020-06-23 14:19 ` [PATCH rdma-next v3 00/11] RAW format dumps through RDMAtool Jason Gunthorpe
@ 2020-06-23 14:27 ` Leon Romanovsky
2020-06-23 17:04 ` Jason Gunthorpe
0 siblings, 1 reply; 6+ messages in thread
From: Leon Romanovsky @ 2020-06-23 14:27 UTC (permalink / raw)
To: Jason Gunthorpe
Cc: Doug Ledford, Jakub Kicinski, Lijun Ou, linux-rdma, Maor Gottlieb,
netdev, Potnuri Bharat Teja, Saeed Mahameed, Weihang Li,
Wei Hu(Xavier)
On Tue, Jun 23, 2020 at 11:19:57AM -0300, Jason Gunthorpe wrote:
> On Tue, Jun 23, 2020 at 02:30:32PM +0300, Leon Romanovsky wrote:
> > From: Leon Romanovsky <leonro@mellanox.com>
> >
> > Changelog:
> > v3:
> > * Rewrote query interface in patch "RDMA: Add support to dump resource
> > tracker in RAW format"
> > v2:
> > https://lore.kernel.org/linux-rdma/20200616104006.2425549-1-leon@kernel.org
> > * Converted to specific nldev ops for RAW.
> > * Rebased on top of v5.8-rc1.
> > v1:
> > https://lore.kernel.org/linux-rdma/20200527135408.480878-1-leon@kernel.org
> > * Maor dropped controversial change to dummy interface.
> > v0:
> > https://lore.kernel.org/linux-rdma/20200513095034.208385-1-leon@kernel.org
> >
> >
> > Hi,
> >
> > The following series adds support to get the RDMA resource data in RAW
> > format. The main motivation for doing this is to enable vendors to return
> > the entire QP/CQ/MR data without a need from the vendor to set each
> > field separately.
> >
> > Thanks
> >
> >
> > Maor Gottlieb (11):
> > net/mlx5: Export resource dump interface
> > net/mlx5: Add support in query QP, CQ and MKEY segments
>
> It looks OK can you apply these too the shared branch?
Thanks, applied.
608ca553c9a2 net/mlx5: Add support in query QP, CQ and MKEY segments
d63cc24933c7 net/mlx5: Export resource dump interface
>
> Thanks,
> Jason
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH rdma-next v3 00/11] RAW format dumps through RDMAtool
2020-06-23 14:27 ` Leon Romanovsky
@ 2020-06-23 17:04 ` Jason Gunthorpe
0 siblings, 0 replies; 6+ messages in thread
From: Jason Gunthorpe @ 2020-06-23 17:04 UTC (permalink / raw)
To: Leon Romanovsky
Cc: Doug Ledford, Jakub Kicinski, Lijun Ou, linux-rdma, Maor Gottlieb,
netdev, Potnuri Bharat Teja, Saeed Mahameed, Weihang Li,
Wei Hu(Xavier)
On Tue, Jun 23, 2020 at 05:27:27PM +0300, Leon Romanovsky wrote:
> On Tue, Jun 23, 2020 at 11:19:57AM -0300, Jason Gunthorpe wrote:
> > On Tue, Jun 23, 2020 at 02:30:32PM +0300, Leon Romanovsky wrote:
> > > From: Leon Romanovsky <leonro@mellanox.com>
> > >
> > > Changelog:
> > > v3:
> > > * Rewrote query interface in patch "RDMA: Add support to dump resource
> > > tracker in RAW format"
> > > v2:
> > > https://lore.kernel.org/linux-rdma/20200616104006.2425549-1-leon@kernel.org
> > > * Converted to specific nldev ops for RAW.
> > > * Rebased on top of v5.8-rc1.
> > > v1:
> > > https://lore.kernel.org/linux-rdma/20200527135408.480878-1-leon@kernel.org
> > > * Maor dropped controversial change to dummy interface.
> > > v0:
> > > https://lore.kernel.org/linux-rdma/20200513095034.208385-1-leon@kernel.org
> > >
> > >
> > > Hi,
> > >
> > > The following series adds support to get the RDMA resource data in RAW
> > > format. The main motivation for doing this is to enable vendors to return
> > > the entire QP/CQ/MR data without a need from the vendor to set each
> > > field separately.
> > >
> > > Thanks
> > >
> > >
> > > Maor Gottlieb (11):
> > > net/mlx5: Export resource dump interface
> > > net/mlx5: Add support in query QP, CQ and MKEY segments
> >
> > It looks OK can you apply these too the shared branch?
>
> Thanks, applied.
>
> 608ca553c9a2 net/mlx5: Add support in query QP, CQ and MKEY segments
> d63cc24933c7 net/mlx5: Export resource dump interface
Applied to for-next, thanks
Jason
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-06-23 17:04 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-23 11:30 [PATCH rdma-next v3 00/11] RAW format dumps through RDMAtool Leon Romanovsky
2020-06-23 11:30 ` [PATCH mlx5-next v3 01/11] net/mlx5: Export resource dump interface Leon Romanovsky
2020-06-23 11:30 ` [PATCH mlx5-next v3 02/11] net/mlx5: Add support in query QP, CQ and MKEY segments Leon Romanovsky
2020-06-23 14:19 ` [PATCH rdma-next v3 00/11] RAW format dumps through RDMAtool Jason Gunthorpe
2020-06-23 14:27 ` Leon Romanovsky
2020-06-23 17:04 ` 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).