* of c4iw_fill_res_qp_entry
@ 2024-10-04 14:16 Dr. David Alan Gilbert
2024-10-06 14:05 ` Leon Romanovsky
0 siblings, 1 reply; 5+ messages in thread
From: Dr. David Alan Gilbert @ 2024-10-04 14:16 UTC (permalink / raw)
To: maorg, bharat, jgg; +Cc: linux-rdma, linux-kernel
Hi,
One of my scripts noticed that c4iw_fill_res_qp_entry is not called
anywhere; It came from:
commit 5cc34116ccec60032dbaa92768f41e95ce2d8ec7
Author: Maor Gottlieb <maorg@mellanox.com>
Date: Tue Jun 23 14:30:38 2020 +0300
RDMA: Add dedicated QP resource tracker function
I was going to send a patch to deadcode it, but is it really a bug and
it should be assigned in c4iw_dev_ops in cxgb4/provider.c ?
(Note I know nothing about the innards of your driver, I'm just spotting
the unused function).
Thoughts?
Dave
--
-----Open up your eyes, open up your mind, open up your code -------
/ Dr. David Alan Gilbert | Running GNU/Linux | Happy \
\ dave @ treblig.org | | In Hex /
\ _________________________|_____ http://www.treblig.org |_______/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: of c4iw_fill_res_qp_entry
2024-10-04 14:16 of c4iw_fill_res_qp_entry Dr. David Alan Gilbert
@ 2024-10-06 14:05 ` Leon Romanovsky
2024-10-06 14:28 ` Dr. David Alan Gilbert
0 siblings, 1 reply; 5+ messages in thread
From: Leon Romanovsky @ 2024-10-06 14:05 UTC (permalink / raw)
To: Dr. David Alan Gilbert; +Cc: maorg, bharat, jgg, linux-rdma, linux-kernel
On Fri, Oct 04, 2024 at 02:16:08PM +0000, Dr. David Alan Gilbert wrote:
> Hi,
> One of my scripts noticed that c4iw_fill_res_qp_entry is not called
> anywhere; It came from:
>
> commit 5cc34116ccec60032dbaa92768f41e95ce2d8ec7
> Author: Maor Gottlieb <maorg@mellanox.com>
> Date: Tue Jun 23 14:30:38 2020 +0300
>
> RDMA: Add dedicated QP resource tracker function
>
> I was going to send a patch to deadcode it, but is it really a bug and
> it should be assigned in c4iw_dev_ops in cxgb4/provider.c ?
>
> (Note I know nothing about the innards of your driver, I'm just spotting
> the unused function).
It is a bug, something like that should be done.
diff --git a/drivers/infiniband/hw/cxgb4/provider.c b/drivers/infiniband/hw/cxgb4/provider.c
index 10a4c738b59f..e059f92d90fd 100644
--- a/drivers/infiniband/hw/cxgb4/provider.c
+++ b/drivers/infiniband/hw/cxgb4/provider.c
@@ -473,6 +473,7 @@ static const struct ib_device_ops c4iw_dev_ops = {
.fill_res_cq_entry = c4iw_fill_res_cq_entry,
.fill_res_cm_id_entry = c4iw_fill_res_cm_id_entry,
.fill_res_mr_entry = c4iw_fill_res_mr_entry,
+ .fill_res_qp_entry = c4iw_fill_res_qp_entry,
.get_dev_fw_str = get_dev_fw_str,
.get_dma_mr = c4iw_get_dma_mr,
.get_hw_stats = c4iw_get_mib,
(END)
>
> Thoughts?
>
> Dave
> --
> -----Open up your eyes, open up your mind, open up your code -------
> / Dr. David Alan Gilbert | Running GNU/Linux | Happy \
> \ dave @ treblig.org | | In Hex /
> \ _________________________|_____ http://www.treblig.org |_______/
>
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: of c4iw_fill_res_qp_entry
2024-10-06 14:05 ` Leon Romanovsky
@ 2024-10-06 14:28 ` Dr. David Alan Gilbert
2024-10-07 16:05 ` Leon Romanovsky
0 siblings, 1 reply; 5+ messages in thread
From: Dr. David Alan Gilbert @ 2024-10-06 14:28 UTC (permalink / raw)
To: Leon Romanovsky; +Cc: maorg, bharat, jgg, linux-rdma, linux-kernel
* Leon Romanovsky (leon@kernel.org) wrote:
> On Fri, Oct 04, 2024 at 02:16:08PM +0000, Dr. David Alan Gilbert wrote:
> > Hi,
> > One of my scripts noticed that c4iw_fill_res_qp_entry is not called
> > anywhere; It came from:
> >
> > commit 5cc34116ccec60032dbaa92768f41e95ce2d8ec7
> > Author: Maor Gottlieb <maorg@mellanox.com>
> > Date: Tue Jun 23 14:30:38 2020 +0300
> >
> > RDMA: Add dedicated QP resource tracker function
> >
> > I was going to send a patch to deadcode it, but is it really a bug and
> > it should be assigned in c4iw_dev_ops in cxgb4/provider.c ?
> >
> > (Note I know nothing about the innards of your driver, I'm just spotting
> > the unused function).
Thanks for the reply,
> It is a bug, something like that should be done.
Ah good I spotted; out of curiosity, what would be the symptom?
I don't have the hardware to test this, can I suggest that you send that patch?
Dave
> diff --git a/drivers/infiniband/hw/cxgb4/provider.c b/drivers/infiniband/hw/cxgb4/provider.c
> index 10a4c738b59f..e059f92d90fd 100644
> --- a/drivers/infiniband/hw/cxgb4/provider.c
> +++ b/drivers/infiniband/hw/cxgb4/provider.c
> @@ -473,6 +473,7 @@ static const struct ib_device_ops c4iw_dev_ops = {
> .fill_res_cq_entry = c4iw_fill_res_cq_entry,
> .fill_res_cm_id_entry = c4iw_fill_res_cm_id_entry,
> .fill_res_mr_entry = c4iw_fill_res_mr_entry,
> + .fill_res_qp_entry = c4iw_fill_res_qp_entry,
> .get_dev_fw_str = get_dev_fw_str,
> .get_dma_mr = c4iw_get_dma_mr,
> .get_hw_stats = c4iw_get_mib,
> (END)
>
>
> >
> > Thoughts?
> >
> > Dave
> > --
> > -----Open up your eyes, open up your mind, open up your code -------
> > / Dr. David Alan Gilbert | Running GNU/Linux | Happy \
> > \ dave @ treblig.org | | In Hex /
> > \ _________________________|_____ http://www.treblig.org |_______/
> >
>
--
-----Open up your eyes, open up your mind, open up your code -------
/ Dr. David Alan Gilbert | Running GNU/Linux | Happy \
\ dave @ treblig.org | | In Hex /
\ _________________________|_____ http://www.treblig.org |_______/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: of c4iw_fill_res_qp_entry
2024-10-06 14:28 ` Dr. David Alan Gilbert
@ 2024-10-07 16:05 ` Leon Romanovsky
2024-10-07 16:44 ` Dr. David Alan Gilbert
0 siblings, 1 reply; 5+ messages in thread
From: Leon Romanovsky @ 2024-10-07 16:05 UTC (permalink / raw)
To: Dr. David Alan Gilbert; +Cc: maorg, bharat, jgg, linux-rdma, linux-kernel
On Sun, Oct 06, 2024 at 02:28:20PM +0000, Dr. David Alan Gilbert wrote:
> * Leon Romanovsky (leon@kernel.org) wrote:
> > On Fri, Oct 04, 2024 at 02:16:08PM +0000, Dr. David Alan Gilbert wrote:
> > > Hi,
> > > One of my scripts noticed that c4iw_fill_res_qp_entry is not called
> > > anywhere; It came from:
> > >
> > > commit 5cc34116ccec60032dbaa92768f41e95ce2d8ec7
> > > Author: Maor Gottlieb <maorg@mellanox.com>
> > > Date: Tue Jun 23 14:30:38 2020 +0300
> > >
> > > RDMA: Add dedicated QP resource tracker function
> > >
> > > I was going to send a patch to deadcode it, but is it really a bug and
> > > it should be assigned in c4iw_dev_ops in cxgb4/provider.c ?
> > >
> > > (Note I know nothing about the innards of your driver, I'm just spotting
> > > the unused function).
>
> Thanks for the reply,
>
> > It is a bug, something like that should be done.
>
> Ah good I spotted; out of curiosity, what would be the symptom?
User will run "rdma resource show qp -d" and won't get any vendor
specific information.
>
> I don't have the hardware to test this, can I suggest that you send that patch?
Sure, will do.
>
> Dave
>
> > diff --git a/drivers/infiniband/hw/cxgb4/provider.c b/drivers/infiniband/hw/cxgb4/provider.c
> > index 10a4c738b59f..e059f92d90fd 100644
> > --- a/drivers/infiniband/hw/cxgb4/provider.c
> > +++ b/drivers/infiniband/hw/cxgb4/provider.c
> > @@ -473,6 +473,7 @@ static const struct ib_device_ops c4iw_dev_ops = {
> > .fill_res_cq_entry = c4iw_fill_res_cq_entry,
> > .fill_res_cm_id_entry = c4iw_fill_res_cm_id_entry,
> > .fill_res_mr_entry = c4iw_fill_res_mr_entry,
> > + .fill_res_qp_entry = c4iw_fill_res_qp_entry,
> > .get_dev_fw_str = get_dev_fw_str,
> > .get_dma_mr = c4iw_get_dma_mr,
> > .get_hw_stats = c4iw_get_mib,
> > (END)
> >
> >
> > >
> > > Thoughts?
> > >
> > > Dave
> > > --
> > > -----Open up your eyes, open up your mind, open up your code -------
> > > / Dr. David Alan Gilbert | Running GNU/Linux | Happy \
> > > \ dave @ treblig.org | | In Hex /
> > > \ _________________________|_____ http://www.treblig.org |_______/
> > >
> >
> --
> -----Open up your eyes, open up your mind, open up your code -------
> / Dr. David Alan Gilbert | Running GNU/Linux | Happy \
> \ dave @ treblig.org | | In Hex /
> \ _________________________|_____ http://www.treblig.org |_______/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: of c4iw_fill_res_qp_entry
2024-10-07 16:05 ` Leon Romanovsky
@ 2024-10-07 16:44 ` Dr. David Alan Gilbert
0 siblings, 0 replies; 5+ messages in thread
From: Dr. David Alan Gilbert @ 2024-10-07 16:44 UTC (permalink / raw)
To: Leon Romanovsky; +Cc: maorg, bharat, jgg, linux-rdma, linux-kernel
* Leon Romanovsky (leon@kernel.org) wrote:
> On Sun, Oct 06, 2024 at 02:28:20PM +0000, Dr. David Alan Gilbert wrote:
> > * Leon Romanovsky (leon@kernel.org) wrote:
> > > On Fri, Oct 04, 2024 at 02:16:08PM +0000, Dr. David Alan Gilbert wrote:
> > > > Hi,
> > > > One of my scripts noticed that c4iw_fill_res_qp_entry is not called
> > > > anywhere; It came from:
> > > >
> > > > commit 5cc34116ccec60032dbaa92768f41e95ce2d8ec7
> > > > Author: Maor Gottlieb <maorg@mellanox.com>
> > > > Date: Tue Jun 23 14:30:38 2020 +0300
> > > >
> > > > RDMA: Add dedicated QP resource tracker function
> > > >
> > > > I was going to send a patch to deadcode it, but is it really a bug and
> > > > it should be assigned in c4iw_dev_ops in cxgb4/provider.c ?
> > > >
> > > > (Note I know nothing about the innards of your driver, I'm just spotting
> > > > the unused function).
> >
> > Thanks for the reply,
> >
> > > It is a bug, something like that should be done.
> >
> > Ah good I spotted; out of curiosity, what would be the symptom?
>
> User will run "rdma resource show qp -d" and won't get any vendor
> specific information.
Oh OK, not terrible.
> >
> > I don't have the hardware to test this, can I suggest that you send that patch?
>
> Sure, will do.
Thanks!
Dave
> >
> > Dave
> >
> > > diff --git a/drivers/infiniband/hw/cxgb4/provider.c b/drivers/infiniband/hw/cxgb4/provider.c
> > > index 10a4c738b59f..e059f92d90fd 100644
> > > --- a/drivers/infiniband/hw/cxgb4/provider.c
> > > +++ b/drivers/infiniband/hw/cxgb4/provider.c
> > > @@ -473,6 +473,7 @@ static const struct ib_device_ops c4iw_dev_ops = {
> > > .fill_res_cq_entry = c4iw_fill_res_cq_entry,
> > > .fill_res_cm_id_entry = c4iw_fill_res_cm_id_entry,
> > > .fill_res_mr_entry = c4iw_fill_res_mr_entry,
> > > + .fill_res_qp_entry = c4iw_fill_res_qp_entry,
> > > .get_dev_fw_str = get_dev_fw_str,
> > > .get_dma_mr = c4iw_get_dma_mr,
> > > .get_hw_stats = c4iw_get_mib,
> > > (END)
> > >
> > >
> > > >
> > > > Thoughts?
> > > >
> > > > Dave
> > > > --
> > > > -----Open up your eyes, open up your mind, open up your code -------
> > > > / Dr. David Alan Gilbert | Running GNU/Linux | Happy \
> > > > \ dave @ treblig.org | | In Hex /
> > > > \ _________________________|_____ http://www.treblig.org |_______/
> > > >
> > >
> > --
> > -----Open up your eyes, open up your mind, open up your code -------
> > / Dr. David Alan Gilbert | Running GNU/Linux | Happy \
> > \ dave @ treblig.org | | In Hex /
> > \ _________________________|_____ http://www.treblig.org |_______/
>
--
-----Open up your eyes, open up your mind, open up your code -------
/ Dr. David Alan Gilbert | Running GNU/Linux | Happy \
\ dave @ treblig.org | | In Hex /
\ _________________________|_____ http://www.treblig.org |_______/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-10-07 16:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-04 14:16 of c4iw_fill_res_qp_entry Dr. David Alan Gilbert
2024-10-06 14:05 ` Leon Romanovsky
2024-10-06 14:28 ` Dr. David Alan Gilbert
2024-10-07 16:05 ` Leon Romanovsky
2024-10-07 16:44 ` Dr. David Alan Gilbert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox