Open-coded get_netdev implementation in MANA IB
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
Quoted 10 lines
Hi,
I looked again on the patch
3b73eb3a4acd("RDMA/mana_ib: Introducemana_ib_get_netdevhelper function") and wonder if it is correct thing to do.All new drivers shouldn't open-code
get_netdev()and use the helpersib_device_get_netdev()andib_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
Quoted 2 lines
Thanks
Quoted 9 lines · Konstantin Taranov
Quoted 9 lines
Hi,
I looked again on the patch
3b73eb3a4acd("RDMA/mana_ib: Introducemana_ib_get_netdevhelper function") and wonder if it is correct thing to do.All new drivers shouldn't open-code
get_netdev()and use the helpersib_device_get_netdev()andib_device_set_netdev()instead of storing netdev in the driver.
Quoted 6 lines
Quoted 1 line
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.
Quoted 3 lines
I sure can fix it and use
ib_device_get_netdevapi.Should I send it to the rdma-next on the top of the latest commit?
Yes, please.
Quoted 5 lines
Thanks
Quoted 2 lines
Thanks
Quoted 10 lines
Yes, the thing is that probably we were supposed to move to
ib_device_get_netdev()and don't invest time inmana_ib_get_netdev()helper at all.Quoted 3 lines
I sure can fix it and use
ib_device_get_netdevapi.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
Quoted 8 lines · Konstantin Taranov
Quoted 8 lines
Yes, the thing is that probably we were supposed to move to
ib_device_get_netdev()and don't invest time inmana_ib_get_netdev()helper at all.Quoted 3 lines
I sure can fix it and use
ib_device_get_netdevapi.Should I send it to the rdma-next on the top of the latest commit?
Quoted 7 lines
Quoted 2 lines
Yes, please.
Hi Leon,
While preparing the patch, I realized that
ib_device_get_netdevis not public and it is defined incore_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
Quoted 2 lines
Thanks