Skip to content

Commit

Permalink
Merge branch 'snabbflow-timeline-2023' into max-next
Browse files Browse the repository at this point in the history
  • Loading branch information
eugeneia committed Mar 15, 2023
2 parents 01481dc + 0916c24 commit 16c9aa8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 17 deletions.
5 changes: 0 additions & 5 deletions src/core/app.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ function timeline ()
timeline_log = timeline_mod.new("events.timeline")
timeline_mod.rate(timeline_log, 9) -- initially log events with rate >= 9
events = timeline_mod.load_events(timeline_log, "core.engine")
packet.initialize_events()
end
return timeline_log
end
Expand Down Expand Up @@ -268,8 +267,6 @@ end

-- Return the configuration actions needed to migrate from old config to new.
function compute_config_actions (old, new)
timeline() -- Ensure timeline is created and initialized

local actions = {}

-- First determine the links that are going away and remove them.
Expand Down Expand Up @@ -336,8 +333,6 @@ end

-- Update the active app network by applying the necessary actions.
function apply_config_actions (actions)
timeline() -- Ensure timeline is created and initialized

-- Table of functions that execute config actions
local ops = {}
-- As an efficiency hack, some apps rely on the fact that we add
Expand Down
4 changes: 1 addition & 3 deletions src/core/packet.lua
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,7 @@ function initialize (max_packets)
shm.unlink("engine/packets.freelist")
end
packets_fl = freelist_create("engine/packets.freelist", max_packets)
end

function initialize_events ()

if not events then
events = timeline.load_events(engine.timeline(), "core.packet")
end
Expand Down
6 changes: 2 additions & 4 deletions src/lib/ptree/worker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ local channel = require("lib.ptree.channel")
local action_codec = require("lib.ptree.action_codec")
local ptree_alarms = require("lib.ptree.alarms")
local timeline = require("core.timeline")
local events
local events = timeline.load_events(engine.timeline(), "core.engine")

local Worker = {}

Expand Down Expand Up @@ -105,9 +105,7 @@ function Worker:main ()

if not engine.auditlog_enabled then engine.enable_auditlog() end

if not events then
events = timeline.load_events(engine.timeline(), "core.engine")
end
engine.timeline()

engine.enable_tick()

Expand Down
6 changes: 1 addition & 5 deletions src/program/ipfix/probe/probe.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@ local long_opts = {
busywait ="b",
["real-time"] = "r",
["no-profile"] = "p",
["timeline"] = "t",
["test-pcap"] = "T"
}
local opt = "hn:brptT:"
local opt = "hn:brpT:"
local opt_handler = {}
local name
local busywait, real_time, profile = false, false, true
Expand All @@ -35,8 +34,6 @@ function opt_handler.n (arg) name = arg end
function opt_handler.b () busywait = true end
function opt_handler.r () real_time = true end
function opt_handler.p () profile = false end
local timeline = false
function opt_handler.t () timeline = true end
local pcap_input
function opt_handler.T (arg) pcap_input = arg end

Expand Down Expand Up @@ -100,7 +97,6 @@ function start (name, confpath)
busywait = busywait,
real_time = real_time,
profile = profile,
timeline = timeline,
group_freelist_size = update_group_freelist_size(
conf.snabbflow_config.rss.software_scaling.group_freelist_size
),
Expand Down

0 comments on commit 16c9aa8

Please sign in to comment.