-
Notifications
You must be signed in to change notification settings - Fork 139
[Update] Add Messaging Unit Tests and Fix Issue #293 Message Memory Leak #296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
60 commits
Select commit
Hold shift + click to select a range
1086843
[Update] Fixed Issue #293
25650cc
[Update] Deleted dead code
1a1b0b7
[Update] Abstracted SID so that it works with whatever SID given
4bcb953
[Update] Changed name
0c6a4b2
[Update] Changed dir name
9fbd366
[Update] Changed code in regards to PR #296 comments
894811f
[Update] Drop packets
def7da0
[Update] Sends more than one msg
7f77210
[Update] Working on making output cleaner as well as creating a struc…
d296564
[Update] Added checking of memory
23f3037
[Update] Added working struct. Working on cleaner output and automati…
b4dc99d
[Update] Added first Test
d27bf56
[Update] Working on Unit Tests
9a2730a
[Update] Verson 1 of Tests. Looking at messaging code now
74350ec
[Update] Testing fixed. Changing Verbosity
8183ad4
Delete Makefile
NoahChinitz f494289
Delete README.md
NoahChinitz 9f3f557
Delete go.sh
NoahChinitz 74eca8c
Delete test_messaging.c
NoahChinitz 25fc063
[Update] Ready for Review.
2ae757f
debug files
elliotthenne 23d7c55
[Update] Test Version 3.0
85ecb0d
restored old go.sh file
elliotthenne 76e6be9
[Update] Version 3.1 of Tests. Added destroy funciton
87cf62b
[Update] Fixed destroy function. Added NF to examples/Makefile. Still…
438c880
Hanging occurs when IID != SID
7d4bc26
Update launch.json
elliotthenne 2babee7
Merge branch 'vscode-debug' of https://github.com/elliotthenne/openNetVM
5379bc0
- Added GDB configuration for VSCode.
d0b7a37
Added function comments
9582113
[Update] fixed file according to PR comments
4832b0f
Delete launch.json
NoahChinitz 5b9896e
Delete tasks.json
NoahChinitz 3018dbb
Delete gdb.sh
NoahChinitz b648a13
[Update] Deleted unnecessary files
58243bf
Changed test making sure all messages have been dequeued
fd0ded8
[Update] cleaned up the tests
6ad66aa
[Update] Ran Linter and finalized tests
8ac16b8
[Update] Print out socket ID information for manager and network func…
be80138
Revert "[Update] Print out socket ID information for manager and netw…
f5213ff
[Update] Print out socket ID information for manager and network func…
b3381e8
[Updated] Fixed tests
46da274
[Update] added 4th test phase
0508402
Merge pull request #1 from NoahChinitzGWU/socket
NoahChinitz 0ade136
Revert "[Update] Print out socket ID information for manager and netw…
NoahChinitz 43ed023
Merge pull request #2 from NoahChinitzGWU/revert-1-socket
NoahChinitz b1df4b2
[Update] Changing Workflow
bf65e7e
Merge branch 'master' of https://github.com/NoahChinitzGWU/openNetVM
8b31047
[Update] Fixed Workflow to be cleaner and more organized
ad23d44
Update onvm/onvm_nflib/onvm_nflib.c
NoahChinitz 34c0d5c
Update examples/test_messaging/test_messaging.c
NoahChinitz 20bf351
Update examples/test_messaging/test_messaging.c
NoahChinitz 75045aa
Update examples/test_messaging/test_messaging.c
NoahChinitz f4160b9
Update examples/test_messaging/test_messaging.c
NoahChinitz 7f4f0c8
Update examples/test_messaging/test_messaging.c
NoahChinitz d5bbf68
[Update] Small fixes for merge
4aaeef6
deleted sleep call
e25f6e0
Merge branch 'develop' of https://github.com/sdnfv/openNetVM
466aa90
Update examples/test_messaging/README.md
NoahChinitz 3f89851
Update examples/test_messaging/README.md
twood02 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| # openNetVM | ||
| # https://github.com/sdnfv/openNetVM | ||
| # | ||
| # BSD LICENSE | ||
| # | ||
| # Copyright(c) | ||
| # 2015-2021 George Washington University | ||
| # 2015-2021 University of California Riverside | ||
| # All rights reserved. | ||
| # | ||
| # Redistribution and use in source and binary forms, with or without | ||
| # modification, are permitted provided that the following conditions | ||
| # are met: | ||
| # | ||
| # Redistributions of source code must retain the above copyright | ||
| # notice, this list of conditions and the following disclaimer. | ||
| # Redistributions in binary form must reproduce the above copyright | ||
| # notice, this list of conditions and the following disclaimer in | ||
| # the documentation and/or other materials provided with the | ||
| # distribution. | ||
| # The name of the author may not be used to endorse or promote | ||
| # products derived from this software without specific prior | ||
| # written permission. | ||
| # | ||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
| # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
| # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
| # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
| # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
| # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
| # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
| # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
| # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
| # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
|
||
| ifeq ($(RTE_SDK),) | ||
| $(error "Please define RTE_SDK environment variable") | ||
| endif | ||
|
|
||
|
|
||
| # Default target, can be overriden by command line or environment | ||
| include $(RTE_SDK)/mk/rte.vars.mk | ||
| RTE_TARGET ?= x86_64-native-linuxapp-gcc | ||
|
|
||
| # binary name | ||
| APP = test_messaging | ||
|
|
||
| # all source are stored in SRCS-y | ||
| SRCS-y := test_messaging.c | ||
|
|
||
| ONVM= $(SRCDIR)/../../onvm | ||
|
|
||
| CFLAGS += $(WERROR_FLAGS) -O3 $(USER_FLAGS) | ||
|
|
||
| CFLAGS += -I$(ONVM)/onvm_nflib | ||
| CFLAGS += -I$(ONVM)/lib | ||
| LDFLAGS += $(ONVM)/onvm_nflib/$(RTE_TARGET)/libonvm.a | ||
| LDFLAGS += $(ONVM)/lib/$(RTE_TARGET)/lib/libonvmhelper.a -lm | ||
|
|
||
| # workaround for a gcc bug with noreturn attribute | ||
| # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603 | ||
| ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y) | ||
| CFLAGS_main.o += -Wno-return-type | ||
| endif | ||
|
|
||
| include $(RTE_SDK)/mk/rte.extapp.mk |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| Test Messaging | ||
| == | ||
| This is an example NF that acts as a unit test for sending messsages from an NF to itself. | ||
| The NF runs the following unit tests: | ||
|
|
||
| 1. Send/Receive a single message and check for data correctness | ||
| 2. Send/Receive a batch of messages | ||
| 3. Send a batch of messages larger than the ring and verify there are no memory pool leaks | ||
|
|
||
| Each test is allowed to run for a maximum of 5 seconds. | ||
twood02 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| Compilation and Execution | ||
| -- | ||
| ``` | ||
| cd examples | ||
| make | ||
| cd test_messaging | ||
| ./go.sh SERVICE_ID | ||
| ``` | ||
|
|
||
| Config File Support | ||
| -- | ||
| This NF supports the NF generating arguments from a config file. For | ||
| additional reading, see [Examples.md](../../docs/Examples.md) | ||
|
|
||
| See `../example_config.json` for all possible options that can be set. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| #!/bin/bash | ||
|
|
||
| #The go.sh script is a convinient way to run start_nf.sh without specifying NF_NAME | ||
|
|
||
| NF_DIR=${PWD##*/} | ||
|
|
||
| if [ ! -f ../start_nf.sh ]; then | ||
| echo "ERROR: The ./go.sh script can only be used from the NF folder" | ||
| echo "If running from other directory use examples/start_nf.sh" | ||
| exit 1 | ||
| fi | ||
|
|
||
| # only check for running manager if not in Docker | ||
| if [[ -z $(pgrep -u root -f "/onvm/onvm_mgr/.*/onvm_mgr") ]] && ! grep -q "docker" /proc/1/cgroup | ||
| then | ||
| echo "NF cannot start without a running manager" | ||
| exit 1 | ||
| fi | ||
|
|
||
| ../start_nf.sh "$NF_DIR" "$@" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.