Modified the naming scheme for hardware tables.
Because of historical string munging during the kernel build process if you named your hardware table hwtable-something, when it was built the filename would look appropriate, but the actual module info would change the internal name to be hwtable_something, thus after an insmod with the filename you could not perform an rmmod with the same filename. As a result the naming scheme has been changed to hwtable_NAME, NAME being the hardware the table supports. Further, include files in the hardware table should be prefixed with the folder name, e.g. #include "hwtable_NAME/my_header.h". Based on commits from David Erickson <derickso@stanford.edu>.
This commit is contained in:
1 parent
f68ad8aecb
commit
89d08b1a17
5 files changed
+10
-9
No files matched your search
+2
-2
@@ -17,7 +17,7 @@ hardware table module is loaded (and before it is unloaded) will take
|
||||
advantage of hardware switching features.
|
||||
|
||||
Creating a hardware table module is straightforward. Create a
|
||||
directory in the openflow source tree named datapath/hwtable-NAME,
|
||||
directory in the openflow source tree named datapath/hwtable_NAME,
|
||||
where NAME identifies the hardware that the module supports. Populate
|
||||
that directory with the C source files that comprise the module, plus
|
||||
a file named Modules.mk that specifies how to build the module. This
|
||||
@@ -33,6 +33,6 @@ the OpenFlow configure script command as the argument to
|
||||
|
||||
Each hardware table module's code is encapsulated in a directory, so
|
||||
it is easy to separate a hardware table implementation from OpenFlow.
|
||||
Simply package up the contents of the hwtable-NAME directory and
|
||||
Simply package up the contents of the hwtable_NAME directory and
|
||||
distribute it for builders to extract into their distribution
|
||||
directory.
|
||||
+1
-1
@@ -45,7 +45,7 @@ case "${enable_hw_tables}" in # (
|
||||
;;
|
||||
esac
|
||||
for d in $hw_tables; do
|
||||
mk=datapath/hwtable-$d/Modules.mk
|
||||
mk=datapath/hwtable_$d/Modules.mk
|
||||
if test ! -e $srcdir/$mk; then
|
||||
AC_MSG_ERROR([--enable-hw-tables=$d specified but $mk is missing])
|
||||
fi
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
# Specify the module to build.
|
||||
all_modules += hwtable-dummy
|
||||
|
||||
# Specify the source files that comprise the module.
|
||||
hwtable-dummy_sources = \
|
||||
hwtable-dummy/hwtable-dummy.c
|
||||
@@ -0,0 +1,7 @@
|
||||
# Specify the module to build.
|
||||
all_modules += hwtable_dummy
|
||||
|
||||
# Specify the source files that comprise the module.
|
||||
hwtable_dummy_sources = \
|
||||
hwtable_dummy/hwtable_dummy.c
|
||||
|
||||
File renamed without changes.
Reference in new issue
Block a user