Skip to content
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

Allow switch to start without JSON configuration #281

Merged
merged 1 commit into from Feb 1, 2017

Conversation

antoninbas
Copy link
Member

The target binaries can be started without an input JSON config by using
the --no-p4 command line flag. Until a config has been pushed to the
switch however, no traffic can be processed. The start_and_return method
was modified to block until a config is pushed. The virtual method that
needs to be implemented by switches was renamed
start_and_return_. Similarly the receive virtual method was also renamed
receive_. This means that existing target switches outside of this repo
will need to be updated.

The tools (e.g. runtime CLI) needed to be updated as a result to support
the empty config case.

The target binaries can be started without an input JSON config by using
the --no-p4 command line flag. Until a config has been pushed to the
switch however, no traffic can be processed. The start_and_return method
was modified to block until a config is pushed. The virtual method that
needs to be implemented by switches was renamed
start_and_return_. Similarly the receive virtual method was also renamed
receive_. This means that existing target switches outside of this repo
will need to be updated.

The tools (e.g. runtime CLI) needed to be updated as a result to support
the empty config case.
@codecov-io
Copy link

codecov-io commented Feb 1, 2017

Codecov Report

Merging #281 into master will increase coverage by 0.06%.

@@            Coverage Diff             @@
##           master     #281      +/-   ##
==========================================
+ Coverage   74.79%   74.85%   +0.06%     
==========================================
  Files         103      103              
  Lines        7589     7620      +31     
==========================================
+ Hits         5676     5704      +28     
- Misses       1913     1916       +3
Impacted Files Coverage Δ
include/bm/bm_sim/options_parse.h 33.33% <ø> (ø)
include/bm/bm_sim/switch.h 1.39% <100%> (ø)
src/bm_sim/options_parse.cpp 50% <41.66%> (-1.25%)
src/bm_sim/switch.cpp 66.5% <87.87%> (+5.86%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 28c988b...615d16a. Read the comment docs.

@antoninbas antoninbas merged commit 327a402 into master Feb 1, 2017
@antoninbas antoninbas deleted the switch-empty-config branch February 1, 2017 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants