Message ID | 20190804080756.58364-1-galpress@amazon.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | [iproute2-next] rdma: Add driver QP type string | expand |
On Sun, Aug 04, 2019 at 11:07:56AM +0300, Gal Pressman wrote: > RDMA resource tracker now tracks driver QPs as well, add driver QP type > string to qp_types_to_str function. > > Signed-off-by: Gal Pressman <galpress@amazon.com> > --- > rdma/res.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > Thanks, Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
On 8/4/19 2:07 AM, Gal Pressman wrote: > RDMA resource tracker now tracks driver QPs as well, add driver QP type > string to qp_types_to_str function. "now" means which kernel release? Leon: should this be in master or -next? > > Signed-off-by: Gal Pressman <galpress@amazon.com> > --- > rdma/res.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/rdma/res.c b/rdma/res.c > index ef863f142eca..97a7b9640185 100644 > --- a/rdma/res.c > +++ b/rdma/res.c > @@ -148,9 +148,11 @@ const char *qp_types_to_str(uint8_t idx) > "UC", "UD", "RAW_IPV6", > "RAW_ETHERTYPE", > "UNKNOWN", "RAW_PACKET", > - "XRC_INI", "XRC_TGT" }; > + "XRC_INI", "XRC_TGT", > + [0xFF] = "DRIVER", > + }; > > - if (idx < ARRAY_SIZE(qp_types_str)) > + if (idx < ARRAY_SIZE(qp_types_str) && qp_types_str[idx]) > return qp_types_str[idx]; > return "UNKNOWN"; > } >
On 05/08/2019 22:08, David Ahern wrote: > On 8/4/19 2:07 AM, Gal Pressman wrote: >> RDMA resource tracker now tracks driver QPs as well, add driver QP type >> string to qp_types_to_str function. > > "now" means which kernel release? Leon: should this be in master or -next? Now means the patch is merged to RDMA's for-rc branch (5.3).
On Tue, Aug 06, 2019 at 09:41:37AM +0300, Gal Pressman wrote: > On 05/08/2019 22:08, David Ahern wrote: > > On 8/4/19 2:07 AM, Gal Pressman wrote: > >> RDMA resource tracker now tracks driver QPs as well, add driver QP type > >> string to qp_types_to_str function. > > > > "now" means which kernel release? Leon: should this be in master or -next? > > Now means the patch is merged to RDMA's for-rc branch (5.3). https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/infiniband?id=52e0a118a20308dd6aa531e20a5ab5907d2264c8 David, I think that it is better to apply this patch to iproute2-rc just to be on the same page with kernel patch. Thanks
On 8/4/19 2:07 AM, Gal Pressman wrote: > RDMA resource tracker now tracks driver QPs as well, add driver QP type > string to qp_types_to_str function. > > Signed-off-by: Gal Pressman <galpress@amazon.com> > --- > rdma/res.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > applied to iproute2-next. Thanks
diff --git a/rdma/res.c b/rdma/res.c index ef863f142eca..97a7b9640185 100644 --- a/rdma/res.c +++ b/rdma/res.c @@ -148,9 +148,11 @@ const char *qp_types_to_str(uint8_t idx) "UC", "UD", "RAW_IPV6", "RAW_ETHERTYPE", "UNKNOWN", "RAW_PACKET", - "XRC_INI", "XRC_TGT" }; + "XRC_INI", "XRC_TGT", + [0xFF] = "DRIVER", + }; - if (idx < ARRAY_SIZE(qp_types_str)) + if (idx < ARRAY_SIZE(qp_types_str) && qp_types_str[idx]) return qp_types_str[idx]; return "UNKNOWN"; }
RDMA resource tracker now tracks driver QPs as well, add driver QP type string to qp_types_to_str function. Signed-off-by: Gal Pressman <galpress@amazon.com> --- rdma/res.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)