Skip to content

Commit

Permalink
Merge branch 'release/5.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
ljerezchaves committed Dec 10, 2022
2 parents 011b1a6 + e6dff17 commit ed26f3a
Show file tree
Hide file tree
Showing 71 changed files with 11,018 additions and 35,553 deletions.
150 changes: 150 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
set(NS3_OFSWITCH13
"OFF"
CACHE INTERNAL
"ON if OFSwitch13 is found."
)

# Check for BOOST dependency
check_include_files(
"boost/static_assert.hpp"
BOOST_STATIC_ASSERT_FOUND
LANGUAGE
CXX
)

if(NOT BOOST_STATIC_ASSERT_FOUND)
message(${HIGHLIGHTED_STATUS} "BOOST static assert was not found.")
message(${HIGHLIGHTED_STATUS} "Skipping OFSwitch13")
return()
endif()

# Check for BOFUSS dependency
set(NS3_OFSWITCH13_BOFUSS_PATH
./lib/ofsoftswitch13/
CACHE PATH
"The BOFUSS library path"
)
message(STATUS "Looking for BOFUSS library in ${NS3_OFSWITCH13_BOFUSS_PATH}")

# List of BOFUSS headers files required by OFSwtich13
set(NS3_OFSWITCH13_BOFUSS_HEADERS
include/openflow/openflow.h
udatapath/action_set.h
udatapath/datapath.h
udatapath/dp_actions.h
udatapath/dp_buffers.h
udatapath/dp_control.h
udatapath/dp_ports.h
udatapath/flow_table.h
udatapath/flow_entry.h
udatapath/group_table.h
udatapath/group_entry.h
udatapath/match_std.h
udatapath/meter_table.h
udatapath/meter_entry.h
udatapath/packet.h
udatapath/packet_handle_std.h
udatapath/pipeline.h
oflib/ofl-actions.h
oflib/ofl-messages.h
oflib/ofl-print.h
oflib/ofl-structs.h
oflib/oxm-match.h
lib/ofpbuf.h
lib/timeval.h
lib/vlog.h
utilities/dpctl.h
)

find_external_library(
DEPENDENCY_NAME BOFUSS
HEADER_NAMES ${NS3_OFSWITCH13_BOFUSS_HEADERS}
LIBRARY_NAME udatapath/libns3ofswitch13.a
SEARCH_PATHS ${NS3_OFSWITCH13_BOFUSS_PATH}
)

if(NOT BOFUSS_FOUND AND NOT ${BOFUSS_FOUND})
message(${HIGHLIGHTED_STATUS} "BOFUSS library was not found.")
message(${HIGHLIGHTED_STATUS} "Skipping OFSwitch13")
return()
endif()

# Enabling OFSwitch13 compilation
set(NS3_OFSWITCH13
"ON"
CACHE INTERNAL
"ON if OFSwitch13 is found."
)

include_directories(${BOFUSS_INCLUDE_DIRS})
add_definitions(-DNS3_OFSWITCH13)

# OFSwitch13 source files
set(source_files
model/ofswitch13-controller.cc
model/ofswitch13-device.cc
model/ofswitch13-interface.cc
model/ofswitch13-learning-controller.cc
model/ofswitch13-queue.cc
model/ofswitch13-priority-queue.cc
model/ofswitch13-port.cc
model/ofswitch13-socket-handler.cc
model/queue-tag.cc
model/tunnel-id-tag.cc
helper/ofswitch13-device-container.cc
helper/ofswitch13-external-helper.cc
helper/ofswitch13-helper.cc
helper/ofswitch13-internal-helper.cc
helper/ofswitch13-stats-calculator.cc
)

# OFSwitch13 header files
set(header_files
model/ofswitch13-controller.h
model/ofswitch13-device.h
model/ofswitch13-interface.h
model/ofswitch13-learning-controller.h
model/ofswitch13-queue.h
model/ofswitch13-priority-queue.h
model/ofswitch13-port.h
model/ofswitch13-socket-handler.h
model/queue-tag.h
model/tunnel-id-tag.h
helper/ofswitch13-device-container.h
helper/ofswitch13-external-helper.h
helper/ofswitch13-helper.h
helper/ofswitch13-internal-helper.h
helper/ofswitch13-stats-calculator.h
)

# OFSwitch13 test files
set(test_sources
)

# Library to link the OFSwitch13 module
set(libraries_to_link
${libcsma}
${libinternet}
${libapplications}
${libpoint-to-point}
${libvirtual-net-device}
${BOFUSS_LIBRARIES}
)

# Don't export BOFUSS library
set(NS3_OFSWITCH13_REEXPORT ${NS3_REEXPORT_THIRD_PARTY_LIBRARIES})
if(${NS3_REEXPORT_THIRD_PARTY_LIBRARIES})
message(STATUS "Using -DNS3_REEXPORT_THIRD_PARTY_LIBRARIES=OFF with OFSwitch13")
set(NS3_REEXPORT_THIRD_PARTY_LIBRARIES OFF)
endif()

# Build the OFSwitch13 module
build_lib(
LIBNAME ofswitch13
SOURCE_FILES ${source_files}
HEADER_FILES ${header_files}
LIBRARIES_TO_LINK ${libraries_to_link}
TEST_SOURCES ${test_sources}
)

set (NS3_REEXPORT_THIRD_PARTY_LIBRARIES ${NS3_OFSWITCH13_REEXPORT})
23 changes: 21 additions & 2 deletions RELEASE_NOTES
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,25 @@ OFSwitch13 release notes

This file contains OFSwitch13 release notes (most recent releases first).

Release 5.1.0 (Dec 10, 2022)
============================

- Updating the build system to work with CMake to match ns-3.36.

- Updating the source code formatting to match ns-3.37.

- Updating the module documentation, removing outdated figures.

- New CSMA full-duplex patch for improved channel operation.

- Fixing errors when compiling the project with gcc 11.3.0 in Ubuntu 22.04.1.

- This version is compatible with ofsoftswitch13 library release v5.1.x and
ns-3 versions 3.36 and 3.37 (including patches). There is no backward
compatibility with older ns-3 versions.

- Compilation was tested in Ubuntu 22.04.1 LTS.


Release 5.0.1 (Dec 20, 2021)
============================
Expand All @@ -13,10 +32,10 @@ Release 5.0.1 (Dec 20, 2021)
- Removing DL library dependency to prevent issues with boost library.

- This version is compatible with ofsoftswitch13 library release v5.0.x and
ns-3 version 3.31 to 3.35 (including patch). There is no backward
ns-3 version 3.31 to 3.35 (including patches). There is no backward
compatibility with older ns-3 versions.

- Compilation was tested in Ubuntu 20.04.3.
- Compilation was tested in Ubuntu 20.04.3 LTS.


Release 5.0.0 (Dec 19, 2021)
Expand Down
53 changes: 28 additions & 25 deletions doc/Makefile
Original file line number Diff line number Diff line change
@@ -1,43 +1,46 @@
EPSTOPDF = epstopdf
DIA = dia
CONVERT = convert -density 250
CONVERT = convert

SOURCE = source
FIGURES = $(SOURCE)/figures

# specify eps figures from which .png and .pdf figures need to be built
# specify figures from which .png and .pdf figures need to be
# generated (all dia and eps figures)
IMAGES_EPS = \
$(FIGURES)/ofswitch13-controller.eps \
$(FIGURES)/ofswitch13-library.eps \
$(FIGURES)/ofswitch13-module.eps \
$(FIGURES)/ofswitch13-switch.eps \
$(FIGURES)/ofswitch13-controller.eps \
$(FIGURES)/ofswitch13-qos-topology.eps \
$(FIGURES)/ofswitch13-queue.eps \
$(FIGURES)/ofswitch13-switch.eps

# specify .png or .pdf figures that don't need to be built
IMAGES_NOBUILD =

# rescale pdf figures as necessary
$(FIGURES)/ofswitch13-module.pdf_width = 12cm
$(FIGURES)/ofswitch13-switch.pdf_width = 10cm
$(FIGURES)/ofswitch13-controller.pdf_width = 10cm
$(FIGURES)/ofswitch13-library.pdf_width = 14cm
$(FIGURES)/ofswitch13-module.pdf_width = 14cm
$(FIGURES)/ofswitch13-qos-topology.pdf_width = 12cm
$(FIGURES)/ofswitch13-queue.pdf_width = 10cm
$(FIGURES)/ofswitch13-switch.pdf_width = 10cm

IMAGES_BUILD = \
${IMAGES_EPS:.eps=.png} \
${IMAGES_EPS:.eps=.pdf}
IMAGES_PNG = ${IMAGES_EPS:.eps=.png}
IMAGES_PDF = ${IMAGES_EPS:.eps=.pdf}

IMAGES = $(IMAGES_NOBUILD) $(IMAGES_BUILD)
IMAGES = $(IMAGES_PNG) $(IMAGES_PDF)

RESCALE = ../../../utils/rescale-pdf.sh

%.eps : %.dia; $(DIA) -t eps $< -e $@
%.png : %.dia; $(DIA) -t png $< -e $@
%.png : %.eps; $(CONVERT) $< $@
%.eps : %.dia
@echo dia $(notdir $<)
@$(DIA) -t eps $< -e $@ >/dev/null

%.png : %.dia
@echo dia $(notdir $<)
@$(DIA) -t png $< -e $@ >/dev/null

%.png : %.eps
@echo convert $(notdir $<)
@$(CONVERT) $< $@ >/dev/null

%.pdf : %.eps
$(EPSTOPDF) $< -o=$@
@echo epstopdf $(notdir $<)
@$(EPSTOPDF) $< -o=$@ >/dev/null
@if test x$($@_width) != x; then $(RESCALE) $($@_width) $@ ; fi

# You can set these variables from the command line.
Expand All @@ -49,7 +52,7 @@ BUILDDIR = build
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SOURCE)
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SOURCE)

.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest

Expand All @@ -74,16 +77,16 @@ help:

clean:
-rm -rf $(BUILDDIR)/*
-rm -f $(IMAGES_BUILD)
-rm -f $(IMAGES)

images: $(IMAGES_NOBUILD) $(IMAGES_BUILD)
images: $(IMAGES)

frag: pickle
@if test ! -d $(BUILDDIR)/frag; then mkdir $(BUILDDIR)/frag; fi
pushd $(BUILDDIR)/frag && ../../pickle-to-xml.py ../pickle/index.fpickle > navigation.xml && popd
cp -r $(BUILDDIR)/pickle/_images $(BUILDDIR)/frag

html: $(IMAGES)
html: $(IMAGES)
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
Expand Down
Loading

0 comments on commit ed26f3a

Please sign in to comment.