ANLAB-KAIST / NBA

Network Balancing Act: A High-performance packet processing framework for heterogeneous processors

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Separate interface header files

hyeonseop-lee opened this issue · comments

Currently, elements are including declaration of base classes with relational path, like

#include "../../lib/element.hh"

which is not really efficient way to provide base class interface, so I suggest to separate header files into include directory.

Furthermore, abstraction of base classes is also needed. nba::Element and nba::Packet are major base classes that nba provides but their declarations need DPDK and all other nba environments that need to be compiled. Without these dependencies, it's get mush easier to compile and publish 3rd party element, including retro-click elements.

I'll materialize and push my idea shortly.

I suggest to split headers into "for internal framework" and "for element programmers".

Good point. I'll do the separation of internal headers and element API headers today.
This will be a labor-intensive work as the current NBA elements are strongly coupled with framework internals. Then I think proto37 can do the work much easier.

It's best way all header files not to have any dependencies other than c++ standard, but source files to have. But if it's not possible, we can just guarantee API headers not to have dependencies.

I suggest to put API headers in "/include/nba" and other headers in "/include/nba/core". Headers in "/include/nba" should not include any headers other than themselves or c++ standard. With this way, we also can resolve all relational header inclusions by adding "/include" as include directory on compilation.

I'm not really clear how to separate between internal and API headers; I'll try to manage some "labor-intensive work" following your hints.