Permalink
Browse files

Initial import of xDPD code into the new repository

  • Loading branch information...
msune committed Apr 12, 2013
0 parents commit a706c143fa48bbf26b37d94b2f2cd9ffdd4e0512
Showing with 19,269 additions and 0 deletions.
  1. +35 −0 .gitignore
  2. +6 −0 AUTHORS
  3. +3 −0 COPYRIGHT
  4. +22 −0 Makefile.am
  5. +4 −0 autogen.sh
  6. 0 build/.dummy
  7. +197 −0 configure.ac
  8. +4 −0 doc/.gitignore
  9. +4 −0 doc/Makefile.am
  10. +1,678 −0 doc/doxyfile.conf
  11. +5 −0 src/Makefile.am
  12. +1 −0 src/xdpd/.gitignore
  13. +30 −0 src/xdpd/Makefile.am
  14. +3 −0 src/xdpd/fwd-modules/Makefile.am
  15. +21 −0 src/xdpd/fwd-modules/gnu_linux/Makefile.am
  16. +18 −0 src/xdpd/fwd-modules/gnu_linux/README
  17. +11 −0 src/xdpd/fwd-modules/gnu_linux/afa-imp/Makefile.am
  18. +519 −0 src/xdpd/fwd-modules/gnu_linux/afa-imp/forwarding_module.c
  19. +4 −0 src/xdpd/fwd-modules/gnu_linux/afa-imp/openflow/openflow12/Makefile.am
  20. +509 −0 src/xdpd/fwd-modules/gnu_linux/afa-imp/openflow/openflow12/of12_forwarding_module.cc
  21. +397 −0 src/xdpd/fwd-modules/gnu_linux/bg_taskmanager.c
  22. +41 −0 src/xdpd/fwd-modules/gnu_linux/bg_taskmanager.h
  23. +33 −0 src/xdpd/fwd-modules/gnu_linux/io/Makefile.am
  24. +262 −0 src/xdpd/fwd-modules/gnu_linux/io/bufferpool.cc
  25. +70 −0 src/xdpd/fwd-modules/gnu_linux/io/bufferpool.h
  26. +24 −0 src/xdpd/fwd-modules/gnu_linux/io/bufferpool_c_wrapper.cc
  27. +37 −0 src/xdpd/fwd-modules/gnu_linux/io/bufferpool_c_wrapper.h
  28. +97 −0 src/xdpd/fwd-modules/gnu_linux/io/datapacket_storage.cc
  29. +99 −0 src/xdpd/fwd-modules/gnu_linux/io/datapacket_storage.h
  30. +40 −0 src/xdpd/fwd-modules/gnu_linux/io/datapacket_storage_c_wrapper.cc
  31. +46 −0 src/xdpd/fwd-modules/gnu_linux/io/datapacket_storage_c_wrapper.h
  32. +299 −0 src/xdpd/fwd-modules/gnu_linux/io/datapacketx86.cc
  33. +176 −0 src/xdpd/fwd-modules/gnu_linux/io/datapacketx86.h
  34. +756 −0 src/xdpd/fwd-modules/gnu_linux/io/datapacketx86_c_wrapper.cc
  35. +264 −0 src/xdpd/fwd-modules/gnu_linux/io/datapacketx86_c_wrapper.h
  36. +282 −0 src/xdpd/fwd-modules/gnu_linux/io/iface_utils.cc
  37. +52 −0 src/xdpd/fwd-modules/gnu_linux/io/iface_utils.h
  38. +354 −0 src/xdpd/fwd-modules/gnu_linux/io/iomanager.cc
  39. +111 −0 src/xdpd/fwd-modules/gnu_linux/io/iomanager.h
  40. +30 −0 src/xdpd/fwd-modules/gnu_linux/io/iomanager_c_wrapper.cc
  41. +20 −0 src/xdpd/fwd-modules/gnu_linux/io/iomanager_c_wrapper.h
  42. +15 −0 src/xdpd/fwd-modules/gnu_linux/io/packet_classifiers/Makefile.am
  43. +21 −0 src/xdpd/fwd-modules/gnu_linux/io/packet_classifiers/packetclassifier.cc
  44. +150 −0 src/xdpd/fwd-modules/gnu_linux/io/packet_classifiers/packetclassifier.h
  45. +1,192 −0 src/xdpd/fwd-modules/gnu_linux/io/packet_classifiers/rofl_pktclassifier.cc
  46. +150 −0 src/xdpd/fwd-modules/gnu_linux/io/packet_classifiers/rofl_pktclassifier.h
  47. +19 −0 src/xdpd/fwd-modules/gnu_linux/io/ports/Makefile.am
  48. +75 −0 src/xdpd/fwd-modules/gnu_linux/io/ports/ioport.cc
  49. +136 −0 src/xdpd/fwd-modules/gnu_linux/io/ports/ioport.h
  50. +13 −0 src/xdpd/fwd-modules/gnu_linux/io/ports/mmap/Makefile.am
  51. +437 −0 src/xdpd/fwd-modules/gnu_linux/io/ports/mmap/ioport_mmap.cc
  52. +138 −0 src/xdpd/fwd-modules/gnu_linux/io/ports/mmap/ioport_mmap.h
  53. +310 −0 src/xdpd/fwd-modules/gnu_linux/io/ports/mmap/mmap_int.cc
  54. +115 −0 src/xdpd/fwd-modules/gnu_linux/io/ports/mmap/mmap_int.h
  55. +10 −0 src/xdpd/fwd-modules/gnu_linux/io/ports/mockup/Makefile.am
  56. +130 −0 src/xdpd/fwd-modules/gnu_linux/io/ports/mockup/ioport_mockup.cc
  57. +66 −0 src/xdpd/fwd-modules/gnu_linux/io/ports/mockup/ioport_mockup.h
  58. +14 −0 src/xdpd/fwd-modules/gnu_linux/io/scheduler/Makefile.am
  59. +242 −0 src/xdpd/fwd-modules/gnu_linux/io/scheduler/epoll_ioscheduler.cc
  60. +80 −0 src/xdpd/fwd-modules/gnu_linux/io/scheduler/epoll_ioscheduler.h
  61. +7 −0 src/xdpd/fwd-modules/gnu_linux/io/scheduler/ioscheduler.cc
  62. +35 −0 src/xdpd/fwd-modules/gnu_linux/io/scheduler/ioscheduler.h
  63. +23 −0 src/xdpd/fwd-modules/gnu_linux/ls_internal_state.h
  64. +12 −0 src/xdpd/fwd-modules/gnu_linux/pipeline-imp/Makefile.am
  65. +45 −0 src/xdpd/fwd-modules/gnu_linux/pipeline-imp/memory.c
  66. +442 −0 src/xdpd/fwd-modules/gnu_linux/pipeline-imp/packet.c
  67. +108 −0 src/xdpd/fwd-modules/gnu_linux/pipeline-imp/platform_hooks_of12.cc
  68. +39 −0 src/xdpd/fwd-modules/gnu_linux/pipeline-imp/pthread_atomic_operations.c
  69. +83 −0 src/xdpd/fwd-modules/gnu_linux/pipeline-imp/pthread_lock.c
  70. +11 −0 src/xdpd/fwd-modules/gnu_linux/processing/Makefile.am
  71. +161 −0 src/xdpd/fwd-modules/gnu_linux/processing/processingmanager.cc
  72. +105 −0 src/xdpd/fwd-modules/gnu_linux/processing/processingmanager.h
  73. +15 −0 src/xdpd/fwd-modules/gnu_linux/util/Makefile.am
  74. +179 −0 src/xdpd/fwd-modules/gnu_linux/util/ringbuffer.cc
  75. +134 −0 src/xdpd/fwd-modules/gnu_linux/util/ringbuffer.h
  76. +16 −0 src/xdpd/fwd-modules/gnu_linux/util/ringbuffer_c_wrapper.cc
  77. +21 −0 src/xdpd/fwd-modules/gnu_linux/util/ringbuffer_c_wrapper.h
  78. +168 −0 src/xdpd/fwd-modules/gnu_linux/util/safevector.h
  79. +18 −0 src/xdpd/fwd-modules/gnu_linux_dpdk/Makefile.am
  80. 0 src/xdpd/fwd-modules/stub/TODO
  81. +18 −0 src/xdpd/management/Makefile.am
  82. +7 −0 src/xdpd/management/adapter/cli/Makefile.am
  83. +16 −0 src/xdpd/management/adapter/cli/default-cli.cfg-sample
  84. +494 −0 src/xdpd/management/adapter/cli/xdpd_cli.cc
  85. +32 −0 src/xdpd/management/adapter/cli/xdpd_cli.h
  86. +146 −0 src/xdpd/management/port_manager.cc
  87. +85 −0 src/xdpd/management/port_manager.h
  88. +133 −0 src/xdpd/management/switch_manager.cc
  89. +138 −0 src/xdpd/management/switch_manager.h
  90. +15 −0 src/xdpd/openflow/Makefile.am
  91. +67 −0 src/xdpd/openflow/of_endpoint.h
  92. +14 −0 src/xdpd/openflow/openflow12/Makefile.am
  93. +1,189 −0 src/xdpd/openflow/openflow12/of12_endpoint.cc
  94. +351 −0 src/xdpd/openflow/openflow12/of12_endpoint.h
  95. +1,170 −0 src/xdpd/openflow/openflow12/of12_translation_utils.cc
  96. +81 −0 src/xdpd/openflow/openflow12/of12_translation_utils.h
  97. +142 −0 src/xdpd/openflow/openflow12/openflow12_switch.cc
  98. +77 −0 src/xdpd/openflow/openflow12/openflow12_switch.h
  99. +15 −0 src/xdpd/openflow/openflow_switch.cc
  100. +68 −0 src/xdpd/openflow/openflow_switch.h
  101. +107 −0 src/xdpd/xdpd.cc
  102. +86 −0 src/xdpd/xdpd.h
  103. +1 −0 test/.gitignore
  104. +6 −0 test/Makefile.am
  105. +5 −0 test/xdpd/Makefile.am
  106. +6 −0 test/xdpd/fwd-modules/Makefile.am
  107. +3 −0 test/xdpd/fwd-modules/gnu_linux/Makefile.am
  108. +120 −0 test/xdpd/fwd-modules/gnu_linux/regression/Makefile.am
  109. +58 −0 test/xdpd/fwd-modules/gnu_linux/regression/io/Makefile.am
  110. +317 −0 test/xdpd/fwd-modules/gnu_linux/regression/io/datapacketx86test.cc
  111. +383 −0 test/xdpd/fwd-modules/gnu_linux/regression/io/mmap_port_test.cc
  112. +15 −0 test/xdpd/fwd-modules/gnu_linux/regression/io/mmap_port_test.sh
  113. +128 −0 test/xdpd/fwd-modules/gnu_linux/regression/io/portmockuptest.cc
  114. +71 −0 test/xdpd/fwd-modules/gnu_linux/regression/of12_cmm_mockup.c
  115. +451 −0 test/xdpd/fwd-modules/gnu_linux/regression/pipeline_packet_mockup.c
  116. +80 −0 test/xdpd/fwd-modules/gnu_linux/regression/platform_hooks_of12_mockup.cc
  117. +44 −0 test/xdpd/fwd-modules/gnu_linux/regression/processing/Makefile.am
  118. +124 −0 test/xdpd/fwd-modules/gnu_linux/regression/processing/processingmanagertest.cc
  119. +22 −0 test/xdpd/fwd-modules/gnu_linux/regression/test_background_tasks.c
  120. +26 −0 test/xdpd/fwd-modules/gnu_linux/regression/test_launcher.sh
  121. +154 −0 test/xdpd/fwd-modules/gnu_linux/regression/test_mmapport.cc
  122. +134 −0 test/xdpd/fwd-modules/gnu_linux/regression/test_port_status.cc
  123. +296 −0 test/xdpd/fwd-modules/gnu_linux/regression/test_portmockup.cc
  124. +268 −0 test/xdpd/fwd-modules/gnu_linux/regression/test_portmockup_multiport.cc
  125. +136 −0 test/xdpd/fwd-modules/gnu_linux/regression/test_storage_packets_expiration.cc
  126. +5 −0 test/xdpd/fwd-modules/gnu_linux/unit/Makefile.am
  127. +9 −0 test/xdpd/fwd-modules/gnu_linux/unit/io/Makefile.am
  128. +135 −0 test/xdpd/fwd-modules/gnu_linux/unit/io/test_datapacket_storage.cc
  129. +13 −0 test/xdpd/fwd-modules/gnu_linux/unit/util/Makefile.am
  130. +191 −0 test/xdpd/fwd-modules/gnu_linux/unit/util/ringbuffertest.cc
  131. +3 −0 test/xdpd/fwd-modules/octeon5650/.gitignore
  132. +115 −0 test/xdpd/fwd-modules/octeon5650/circular_queue.c
@@ -0,0 +1,35 @@
.*
*.o
*.lo
*.la
*.a
*.log
*.tmp
*.dis
*~
*.orig
*.swp
*.swo
*.m4
*.out
*.kdev4
Makefile.in
Makefile
.deps
.libs
autom4te.cache
config.*
configure
install-sh
ltmain.sh
missing
depcomp
libtool
m4
ar-lib
/build/*
/build-*
!.gitignore
@@ -0,0 +1,6 @@
(c) Copyright BISDN GmbH 2013
Marc Sune<marc.sune (at) bisdn.de>
Andreas Koepsel<andreas.koepsel (at) bisdn.de>
Victor Alvarez<victor.alvarez (at) bisdn.de>
Tobias Jungel<tobias.jungel (at) bisdn.de>
@@ -0,0 +1,3 @@
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
@@ -0,0 +1,22 @@
AUTOMAKE_OPTIONS = subdir-objects 1.5 foreign
MAINTAINERCLEANFILES = $(top_srcdir)/aclocal.m4 \
$(top_srcdir)/ar-lib \
$(top_srcdir)/config.guess \
$(top_srcdir)/config.sub \
$(top_srcdir)/configure \
$(top_srcdir)/depcomp \
$(top_srcdir)/install-sh \
$(top_srcdir)/ltmain.sh \
$(top_srcdir)/Makefile.in \
$(top_srcdir)/missing
SUBDIRS = src test
install-exec-hook:
@echo "Install"
uninstall-hook:
@echo "Uninstall"
maintainer-clean-local:
rm -rf $(top_srcdir)/m4
@@ -0,0 +1,4 @@
#!/bin/sh
export AUTOMAKE="automake --foreign -a"
autoreconf -f -i
No changes.
@@ -0,0 +1,197 @@
AC_INIT(xdpd, 0.2.11, rofl@bisdn.de, xdpd)
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AC_CONFIG_MACRO_DIR([m4])
AC_GNU_SOURCE
AC_PROG_INSTALL
AC_PROG_CC
AC_PROG_CXX
AC_PROG_LD
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
AUTOCONF_ENV="SHELL=/bin/sh"
LT_INIT
AC_ENABLE_STATIC
# default flags
CFLAGS="-Werror -Wall -Wl,-export-dynamic $CFLAGS"
CXXFLAGS="-Werror -Wall -Wl,-export-dynamic $CXXFLAGS"
AC_DEFINE(__STDC_FORMAT_MACROS)
# Check for debug mode - MUST BE THE FIRST CHECK
AC_MSG_CHECKING(whether to enable debug mode)
debug_default="no"
AC_ARG_ENABLE(debug,
AS_HELP_STRING([--enable-debug], [turn on debug mode [default=no]])
, , enable_debug=$debug_default)
if test "$enable_debug" = "yes"; then
CFLAGS="$CFLAGS -g -O0"
CXXFLAGS="$CXXFLAGS -g -O0 -fno-inline"
AC_DEFINE(DEBUG)
AC_MSG_RESULT(yes)
else
CFLAGS="$CFLAGS -O3" #--compiler-options -fno-strict-aliasing --compiler-options -fno-inline
CXXFLAGS="$CXXFLAGS -O3" #-fomit-frame-pointer"
AC_DEFINE(NDEBUG)
AC_MSG_RESULT(no)
fi
AM_CONDITIONAL(DEBUG, test "$enable_debug" = yes)
# Make verbosity
AC_MSG_CHECKING(whether to compile in verbose mode)
AC_ARG_ENABLE(verbose,
AS_HELP_STRING([--verbose], [turn on verbose mode [default=no]])
, verbose="yes", verbose="no")
if test "$verbose" = "yes"; then
AC_MSG_RESULT(yes)
AM_SILENT_RULES([no])
else
AC_MSG_RESULT(no)
# Silent build for automake >= 1.11
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
fi
# Check for profiling mode
AC_MSG_CHECKING(whether to enable profiling mode)
profile_default="no"
AC_ARG_ENABLE(profile,
AS_HELP_STRING([--enable-profile], [turn on profile mode [default=no]])
, , enable_profile=$profile_default)
if test "$enable_profile" = "yes"; then
CFLAGS="$( echo $CFLAGS | sed s/-fomit-frame-pointer//g )"
CXXFLAGS="$( echo $CXXFLAGS | sed s/-fomit-frame-pointer//g )"
CXXFLAGS="$CXXFLAGS -pg"
LDFLAGS="$LDFLAGS -pg"
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
##########################
#CHECKING Hardware FLAGS #
##########################
AC_MSG_CHECKING(hardware support to be compiled)
AC_ARG_ENABLE(gnu-linux,
AS_HELP_STRING([--enable-gnu-linux], [compile GNU/Linux hardware support [default=no]])
, , enable_gnu_linux="no")
AC_ARG_ENABLE(gnu-linux-dpdk,
AS_HELP_STRING([--enable-gnu-linux-dpdk], [compile GNU/Linux Intel DPDK support [default=no]])
, , enable_gnu_linux_dpdk="no")
AC_ARG_ENABLE(bcm,
AS_HELP_STRING([--enable-bcm], [compile Broadcom hardware support [default=no]])
, , enable_bcm="no")
AC_ARG_ENABLE(octeon,
AS_HELP_STRING([--enable-octeon], [compile OCTEON 5650 hardware support [default=no]])
, , enable_octeon="no")
#Make default GNU/Linux if not defined
if ( test "$enable_gnu_linux_dpdk" = "no" ) && ( test "$enable_gnu_linux" = "no" ) && ( test "$enable_bcm" = "no" ) && ( test "$enable_octeon" = "no" ); then
enable_gnu_linux="yes"
fi
#Settings conditionals
AM_CONDITIONAL([ENABLE_GNU_LINUX_SUPPORT],[test "$enable_gnu_linux" = "yes"])
AM_CONDITIONAL([ENABLE_GNU_LINUX_DPDK_SUPPORT],[test "$enable_gnu_linux_dpdk" = "yes"])
AM_CONDITIONAL([ENABLE_BCM_SUPPORT],[test "$enable_bcm" = "yes"])
AM_CONDITIONAL([ENABLE_OCTEON_SUPPORT],[test "$enable_octeon" = "yes"])
PLATFORM=gnu_linux
#Print messages
if ( test "$enable_gnu_linux" = "yes" );then
msg="$msg GNU/Linux"
AC_DEFINE(ENABLE_GNU_LINUX)
PLATFORM=gnu_linux
fi
if ( test "$enable_gnu_linux_dpdk" = "yes" );then
msg="$msg GNU/Linux Intel DPDK"
AC_DEFINE(ENABLE_GNU_LINUX_DPDK)
PLATFORM=gnu_linux_dpdk
fi
if( test "$enable_bcm" = "yes" );then
msg="$msg Broadcom"
AC_DEFINE(ENABLE_BCM)
PLATFORM=bcm
fi
if( test "$enable_octeon" = "yes" );then
msg="$msg OCTEON 5650"
AC_DEFINE(ENABLE_OCTEON5650)
PLATFORM=octeon5650
fi
AC_MSG_RESULT($msg)
AC_SUBST(PLATFORM)
# Makefiles for gnu_linux
AM_COND_IF(ENABLE_GNU_LINUX_SUPPORT,[AC_CONFIG_FILES([
src/xdpd/fwd-modules/gnu_linux/Makefile
src/xdpd/fwd-modules/gnu_linux/afa-imp/Makefile
src/xdpd/fwd-modules/gnu_linux/afa-imp/openflow/openflow12/Makefile
src/xdpd/fwd-modules/gnu_linux/io/Makefile
src/xdpd/fwd-modules/gnu_linux/io/packet_classifiers/Makefile
src/xdpd/fwd-modules/gnu_linux/io/ports/Makefile
src/xdpd/fwd-modules/gnu_linux/io/ports/mmap/Makefile
src/xdpd/fwd-modules/gnu_linux/io/ports/mockup/Makefile
src/xdpd/fwd-modules/gnu_linux/io/scheduler/Makefile
src/xdpd/fwd-modules/gnu_linux/pipeline-imp/Makefile
src/xdpd/fwd-modules/gnu_linux/processing/Makefile
src/xdpd/fwd-modules/gnu_linux/util/Makefile
])])
# Makefiles for gnu_linux_dpdk
AM_COND_IF(ENABLE_GNU_LINUX_DPDK_SUPPORT,[AC_CONFIG_FILES([
src/xdpd/fwd-modules/gnu_linux_dpdk/Makefile
])])
# Makefiles for octeon
AM_COND_IF(ENABLE_OCTEON_SUPPORT,[AC_CONFIG_FILES([
src/xdpd/fwd-modules/octeon5650/Makefile
])])
# TODO: make the configuration front ends configureable, as soon as we have more than the cli
AC_DEFINE(HAVE_CONFIG_CLI)
AM_CONDITIONAL(ENABLE_CONFIG_CLI,[true])
AM_COND_IF(ENABLE_CONFIG_CLI,[AC_CONFIG_FILES([
src/xdpd/management/adapter/cli/Makefile
])])
#Check libs used
AC_CHECK_LIB(pthread, pthread_kill,,AC_MSG_ERROR([pthread library not found]))
AC_CHECK_LIB(rt, clock_gettime,,[AC_MSG_ERROR([rt library not found])])
AC_CHECK_LIB(cli, cli_telnet_protocol,,[AC_MSG_ERROR([cli library not found])])
#AC_CHECK_LIB(rofl_pipeline, physical_switch_init,,[AC_MSG_ERROR([rofl_pipeline library not found])])
#AC_SEARCH_LIBS(physical_switch_init, lrofl_pipeline,,[AC_MSG_ERROR([rofl_pipeline library not found])],)
# AC_CONFIG_HEADERS([include/config.h])
AC_CONFIG_FILES([
Makefile
src/Makefile
src/xdpd/Makefile
src/xdpd/management/Makefile
src/xdpd/fwd-modules/Makefile
src/xdpd/openflow/Makefile
src/xdpd/openflow/openflow12/Makefile
test/Makefile
test/xdpd/Makefile
test/xdpd/fwd-modules/Makefile
test/xdpd/fwd-modules/gnu_linux/Makefile
test/xdpd/fwd-modules/gnu_linux/regression/Makefile
test/xdpd/fwd-modules/gnu_linux/regression/io/Makefile
test/xdpd/fwd-modules/gnu_linux/regression/processing/Makefile
test/xdpd/fwd-modules/gnu_linux/unit/Makefile
test/xdpd/fwd-modules/gnu_linux/unit/util/Makefile
test/xdpd/fwd-modules/gnu_linux/unit/io/Makefile
doc/Makefile
])
#test/unit/xdpd/fwd-modules/octeon5650/Makefile
AC_OUTPUT
@@ -0,0 +1,4 @@
*
!.gitignore
!Makefile.am
!doxyfile.conf
@@ -0,0 +1,4 @@
doc: all-local
all-local:
@DOXYGEN@ doxyfile.conf
Oops, something went wrong.

0 comments on commit a706c14

Please sign in to comment.