forked from snabbco/snabb
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Deprecate reconfigurable flag #903
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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 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 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 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 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 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 |
---|---|---|
|
@@ -102,7 +102,9 @@ function parse_args(args) | |
.." (valid values: flush, warn, off)") | ||
end | ||
end | ||
function handlers.reconfigurable() opts.reconfigurable = true end | ||
function handlers.reconfigurable() | ||
io.stderr:write("Warning: --reconfigurable flag has been deprecated.\n") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we adapt this note to somehow assure the user that --reconfigurable is always enabled so they can safely remove the flag from their scripts? This note says that it's deprecated but not what action they need to take. |
||
end | ||
function handlers.h() show_usage(0) end | ||
lib.dogetopt(args, handlers, "b:c:vD:yhir:n:", | ||
{ conf = "c", v4 = 1, v6 = 1, ["v4-pci"] = 1, ["v6-pci"] = 1, | ||
|
@@ -172,13 +174,7 @@ function run(args) | |
setup_fn, setup_args = setup.load_phy, { 'inetNic', 'b4sideNic' } | ||
end | ||
|
||
if opts.reconfigurable then | ||
setup.reconfigurable(scheduling, setup_fn, c, conf, unpack(setup_args)) | ||
else | ||
setup.apply_scheduling(scheduling) | ||
setup_fn(c, conf, unpack(setup_args)) | ||
end | ||
|
||
setup.reconfigurable(scheduling, setup_fn, c, conf, unpack(setup_args)) | ||
engine.configure(c) | ||
|
||
if opts.verbosity >= 2 then | ||
|
@@ -206,40 +202,26 @@ function run(args) | |
end | ||
csv:activate() | ||
end | ||
if opts.reconfigurable then | ||
local pids = engine.configuration.apps['leader'].arg.follower_pids | ||
for _,pid in ipairs(pids) do | ||
local function start_sampling() | ||
-- The worker will be fed its configuration by the | ||
-- leader, but we don't know when that will all be ready. | ||
-- Just retry if this doesn't succeed. | ||
if not pcall(add_csv_stats_for_pid, pid) then | ||
io.stderr:write("Waiting on follower "..pid.." to start ".. | ||
"before recording statistics...\n") | ||
timer.activate(timer.new('retry_csv', start_sampling, 2e9)) | ||
end | ||
end | ||
timer.activate(timer.new('spawn_csv_stats', start_sampling, 50e6)) | ||
end | ||
else | ||
add_csv_stats_for_pid(S.getpid()) | ||
local pids = engine.configuration.apps['leader'].arg.follower_pids | ||
for _,pid in ipairs(pids) do | ||
local function start_sampling() | ||
-- The worker will be fed its configuration by the | ||
-- leader, but we don't know when that will all be ready. | ||
-- Just retry if this doesn't succeed. | ||
if not pcall(add_csv_stats_for_pid, pid) then | ||
io.stderr:write("Waiting on follower "..pid.." to start ".. | ||
"before recording statistics...\n") | ||
timer.activate(timer.new('retry_csv', start_sampling, 2e9)) | ||
end | ||
end | ||
timer.activate(timer.new('spawn_csv_stats', start_sampling, 50e6)) | ||
end | ||
end | ||
|
||
if opts.ingress_drop_monitor then | ||
if opts.reconfigurable then | ||
io.stderr:write("Warning: Ingress drop monitor not yet supported ".. | ||
"in multiprocess mode.\n") | ||
else | ||
local mon = ingress_drop_monitor.new({action=opts.ingress_drop_monitor}) | ||
timer.activate(mon:timer()) | ||
end | ||
io.stderr:write("Warning: Ingress drop monitor not yet supported\n") | ||
end | ||
|
||
if not opts.reconfigurable then | ||
-- The leader does not need all the CPU, only the followers do. | ||
engine.busywait = true | ||
end | ||
if opts.duration then | ||
engine.main({duration=opts.duration, report={showlinks=true}}) | ||
else | ||
|
This file contains 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 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 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 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 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove this one entirely, as this is an internal script that's not user-facing.