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>.
advantage of hardware switching features.
Creating a hardware table module is straightforward. Create a
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
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
Each hardware table module's code is encapsulated in a directory, so
it is easy to separate a hardware table implementation from OpenFlow.
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.
distribute it for builders to extract into their distribution
directory.
;;
esac
for d in $hw_tables; do
;;
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
if test ! -e $srcdir/$mk; then
AC_MSG_ERROR([--enable-hw-tables=$d specified but $mk is missing])
fi
+++ /dev/null
-# 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
--- /dev/null
+# 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
+