mbox series

[RFC,v2,v2,00/29] Bus and device cleanup for 22.11

Message ID 20220709082644.664675-1-david.marchand@redhat.com (mailing list archive)
Headers
Series Bus and device cleanup for 22.11 |

Message

David Marchand July 9, 2022, 8:26 a.m. UTC
  This is a PoC for hiding the rte_bus, rte_driver and rte_device objects.
And mark associated driver only API as internal.

A good amount of the patches are preparation work on rte_bus.h,
rte_dev.h, rte_devargs.h and rte_eal.h headers, removing dependencies
between them. This is something I had in store for some time, maybe I
should have dropped it from the PoC, but I think those cleanups are
worth it in any case.

Then PCI bus specific handling are moved from unit tests and examples,
though there is still a special case left in testpmd that may require a
new API, to be discussed.

After this series, driver-only API headers for registering to buses are
not exported anymore, unless the enable_driver_sdk meson option is
selected.

New accessors for rte_bus, rte_driver and rte_device have been added,
marked with an experimental tag though we may declare them as stable
right away so that users can switch to them directly. That's also
something to agree on.

I simplified my series and switched to only update "external" users,
like app/ and examples/ files.
We need some checkpatch new checks to be sure we won't get some
driver-only headers included in these areas. That's something I'll work
on in the non RFC series.

"Internal" users are simply using the internal headers. That helps
greatly reducing the size of the changes.

Disclaimer: again, in this v2, this series is a bit rushed (I brute forced
compilation tests in GHA so that it passes between patches, but there still
may be something broken...).
Not surprisingly, the ABI check in the CI is expected to fail.


Comments welcome.

Changes since RFC v1:
- added two more cleanups (new patch 3 and 4) for unit test and examples
  relying on PCI specific info,
- went on with masking rte_driver and rte_device too,
  

Comments

Stephen Hemminger July 9, 2022, 4:30 p.m. UTC | #1
On Sat,  9 Jul 2022 10:26:15 +0200
David Marchand <david.marchand@redhat.com> wrote:

> This is a PoC for hiding the rte_bus, rte_driver and rte_device objects.
> And mark associated driver only API as internal.
> 
> A good amount of the patches are preparation work on rte_bus.h,
> rte_dev.h, rte_devargs.h and rte_eal.h headers, removing dependencies
> between them. This is something I had in store for some time, maybe I
> should have dropped it from the PoC, but I think those cleanups are
> worth it in any case.
> 
> Then PCI bus specific handling are moved from unit tests and examples,
> though there is still a special case left in testpmd that may require a
> new API, to be discussed.
> 
> After this series, driver-only API headers for registering to buses are
> not exported anymore, unless the enable_driver_sdk meson option is
> selected.
> 
> New accessors for rte_bus, rte_driver and rte_device have been added,
> marked with an experimental tag though we may declare them as stable
> right away so that users can switch to them directly. That's also
> something to agree on.
> 
> I simplified my series and switched to only update "external" users,
> like app/ and examples/ files.
> We need some checkpatch new checks to be sure we won't get some
> driver-only headers included in these areas. That's something I'll work
> on in the non RFC series.
> 
> "Internal" users are simply using the internal headers. That helps
> greatly reducing the size of the changes.
> 
> Disclaimer: again, in this v2, this series is a bit rushed (I brute forced
> compilation tests in GHA so that it passes between patches, but there still
> may be something broken...).
> Not surprisingly, the ABI check in the CI is expected to fail.
> 
> 
> Comments welcome.

Looks good to me, lots of work but will the separation internal
and external API's will help in future.
  
Bruce Richardson July 11, 2022, 8:38 a.m. UTC | #2
On Sat, Jul 09, 2022 at 10:26:15AM +0200, David Marchand wrote:
> This is a PoC for hiding the rte_bus, rte_driver and rte_device objects.
> And mark associated driver only API as internal.
> 
> A good amount of the patches are preparation work on rte_bus.h,
> rte_dev.h, rte_devargs.h and rte_eal.h headers, removing dependencies
> between them. This is something I had in store for some time, maybe I
> should have dropped it from the PoC, but I think those cleanups are
> worth it in any case.
> 
> Then PCI bus specific handling are moved from unit tests and examples,
> though there is still a special case left in testpmd that may require a
> new API, to be discussed.
> 
> After this series, driver-only API headers for registering to buses are
> not exported anymore, unless the enable_driver_sdk meson option is
> selected.
> 
> New accessors for rte_bus, rte_driver and rte_device have been added,
> marked with an experimental tag though we may declare them as stable
> right away so that users can switch to them directly. That's also
> something to agree on.
> 
Yes, I think we need to make them stable.

> I simplified my series and switched to only update "external" users,
> like app/ and examples/ files.
> We need some checkpatch new checks to be sure we won't get some
> driver-only headers included in these areas. That's something I'll work
> on in the non RFC series.
> 
> "Internal" users are simply using the internal headers. That helps
> greatly reducing the size of the changes.
> 
> Disclaimer: again, in this v2, this series is a bit rushed (I brute forced
> compilation tests in GHA so that it passes between patches, but there still
> may be something broken...).
> Not surprisingly, the ABI check in the CI is expected to fail.
> 
> 
> Comments welcome.
>
This is great cleanup. Thanks for all the work on it.

/Bruce