* Open-coded get_netdev implementation in MANA IB
@ 2024-06-17 11:56 Leon Romanovsky
2024-06-17 12:11 ` Konstantin Taranov
0 siblings, 1 reply; 5+ messages in thread
From: Leon Romanovsky @ 2024-06-17 11:56 UTC (permalink / raw)
To: Konstantin Taranov; +Cc: RDMA mailing list
Hi,
I looked again on the patch 3b73eb3a4acd ("RDMA/mana_ib: Introduce mana_ib_get_netdev helper function")
and wonder if it is correct thing to do.
All new drivers shouldn't open-code get_netdev() and use the helpers ib_device_get_netdev() and
ib_device_set_netdev() instead of storing netdev in the driver.
Can you please convert MANA IB driver to proper API usage?
Thanks
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: Open-coded get_netdev implementation in MANA IB
2024-06-17 11:56 Open-coded get_netdev implementation in MANA IB Leon Romanovsky
@ 2024-06-17 12:11 ` Konstantin Taranov
2024-06-17 12:38 ` Leon Romanovsky
0 siblings, 1 reply; 5+ messages in thread
From: Konstantin Taranov @ 2024-06-17 12:11 UTC (permalink / raw)
To: Leon Romanovsky; +Cc: RDMA mailing list
> Hi,
>
> I looked again on the patch 3b73eb3a4acd ("RDMA/mana_ib: Introduce
> mana_ib_get_netdev helper function") and wonder if it is correct thing to do.
>
> All new drivers shouldn't open-code get_netdev() and use the helpers
> ib_device_get_netdev() and
> ib_device_set_netdev() instead of storing netdev in the driver.
>
> Can you please convert MANA IB driver to proper API usage?
Hi Leon,
This helper was introduced to remove a boiler plate code which was getting
the netdev from gc->mana.driver_data. I sure can fix it and use ib_device_get_netdev api.
Should I send it to the rdma-next on the top of the latest commit?
Thanks
>
> Thanks
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Open-coded get_netdev implementation in MANA IB
2024-06-17 12:11 ` Konstantin Taranov
@ 2024-06-17 12:38 ` Leon Romanovsky
2024-06-19 14:14 ` Konstantin Taranov
0 siblings, 1 reply; 5+ messages in thread
From: Leon Romanovsky @ 2024-06-17 12:38 UTC (permalink / raw)
To: Konstantin Taranov; +Cc: RDMA mailing list
On Mon, Jun 17, 2024 at 12:11:50PM +0000, Konstantin Taranov wrote:
> > Hi,
> >
> > I looked again on the patch 3b73eb3a4acd ("RDMA/mana_ib: Introduce
> > mana_ib_get_netdev helper function") and wonder if it is correct thing to do.
> >
> > All new drivers shouldn't open-code get_netdev() and use the helpers
> > ib_device_get_netdev() and
> > ib_device_set_netdev() instead of storing netdev in the driver.
> >
> > Can you please convert MANA IB driver to proper API usage?
>
> Hi Leon,
>
> This helper was introduced to remove a boiler plate code which was getting
> the netdev from gc->mana.driver_data.
Yes, the thing is that probably we were supposed to move to
ib_device_get_netdev() and don't invest time in mana_ib_get_netdev()
helper at all.
> I sure can fix it and use ib_device_get_netdev api.
>
> Should I send it to the rdma-next on the top of the latest commit?
Yes, please.
>
> Thanks
>
> >
> > Thanks
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Open-coded get_netdev implementation in MANA IB
2024-06-17 12:38 ` Leon Romanovsky
@ 2024-06-19 14:14 ` Konstantin Taranov
2024-06-21 18:10 ` Leon Romanovsky
0 siblings, 1 reply; 5+ messages in thread
From: Konstantin Taranov @ 2024-06-19 14:14 UTC (permalink / raw)
To: Leon Romanovsky; +Cc: RDMA mailing list
> Yes, the thing is that probably we were supposed to move to
> ib_device_get_netdev() and don't invest time in mana_ib_get_netdev()
> helper at all.
>
> > I sure can fix it and use ib_device_get_netdev api.
> >
> > Should I send it to the rdma-next on the top of the latest commit?
>
> Yes, please.
>
Hi Leon,
While preparing the patch, I realized that ib_device_get_netdev is not public
and it is defined in core_priv.h. Should I move the declaration and export the symbol?
Thanks
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Open-coded get_netdev implementation in MANA IB
2024-06-19 14:14 ` Konstantin Taranov
@ 2024-06-21 18:10 ` Leon Romanovsky
0 siblings, 0 replies; 5+ messages in thread
From: Leon Romanovsky @ 2024-06-21 18:10 UTC (permalink / raw)
To: Konstantin Taranov; +Cc: RDMA mailing list
On Wed, Jun 19, 2024 at 02:14:15PM +0000, Konstantin Taranov wrote:
> > Yes, the thing is that probably we were supposed to move to
> > ib_device_get_netdev() and don't invest time in mana_ib_get_netdev()
> > helper at all.
> >
> > > I sure can fix it and use ib_device_get_netdev api.
> > >
> > > Should I send it to the rdma-next on the top of the latest commit?
> >
> > Yes, please.
> >
>
> Hi Leon,
>
> While preparing the patch, I realized that ib_device_get_netdev is not public
> and it is defined in core_priv.h. Should I move the declaration and export the symbol?
Let's keep it as is for now. I will try to return to this task after we
find a way to remove .get_netdev() callback from the drivers.
Sorry for wasting your time.
Thanks
>
> Thanks
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-06-21 18:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-17 11:56 Open-coded get_netdev implementation in MANA IB Leon Romanovsky
2024-06-17 12:11 ` Konstantin Taranov
2024-06-17 12:38 ` Leon Romanovsky
2024-06-19 14:14 ` Konstantin Taranov
2024-06-21 18:10 ` Leon Romanovsky
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).