Couple of high level comments:

1) Too many #ifdefs
   * Code is hard to read and maintain when every 10th line is #ifdef or #else
   * Are all #ifdef combinations tested? Or meant to be supported?
   * It seems that some design trade-offs would be needed for better code 
maintainability

2) Too many arch dependent #ifdefs
   * ARM_ARCH ifdefs and assembly in main .c / .h files should be replaced with 
arch specific functions defined under platform/linux-generic/arch/xxx. That's 
the only directory which should contain inline assembly.

3) Keep and improve modularity
   * #ifdef ODP_SCHEDULE_SCALABLE should not show up common pktio/queue/etc 
files. Only in makefiles and interface selection.
   * Main build time config options (config_internal.h) should be high level 
(== max number of XXX), not algorithmic details of one scheduler. Move those 
into local .c/.h files.
   * Keep definitions local when used only by one file. Check common headers 
before adding new definitions into common headers. E.g. CHECK_IS_POWER2 is 
already defined in odp_align_internal.h.
   * Improve e.g. queue interface modularity first with current code base. 
After that's done, hook the new scheduler to the interface.

4) Split 4/4 into couple of patches
   * First prepare the current code base with couple of patches
     * Proper interfaces / modifications for modularity (see previous bullet)
     * This enables us to see and test how current code base is impacted
     * Also git history is easier to work with when single patch does not touch 
many files / features
   * Bring in the new scheduler code as the last patch of the series


-Petri


Reply via email to