Skip to content

Commit

Permalink
Revert "ipfix probe_ptree: test wip"
Browse files Browse the repository at this point in the history
This reverts commit ff74f68.
  • Loading branch information
eugeneia committed Aug 18, 2022
1 parent 56cdc1d commit 4fea4ea
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 26 deletions.
21 changes: 7 additions & 14 deletions src/program/ipfix/lib.lua
Expand Up @@ -370,11 +370,6 @@ function run_rss(config, inputs, outputs, duration, busywait, cpu, jit, log_date
end

function configure_rss_graph (config, inputs, outputs, log_date)
local input_type = 'pci'
if type(inputs) == 'string' then
input_type = 'pcap'
inputs = {inputs}
end
local graph = app_graph.new()
app_graph.app(graph, "rss", rss.rss, config)

Expand All @@ -383,15 +378,13 @@ function configure_rss_graph (config, inputs, outputs, log_date)
for n, input in ipairs(inputs) do
local suffix = #inputs > 1 and n or ''
local input_name = "input"..suffix
local in_link, in_app = in_apps[input_type](input)
if input_type == 'pci' then
table.insert(in_app_specs,
{ pciaddr = input.device,
name = input_name,
ifname = input.name or
(input.device:gsub("[:%.]", "_")),
ifalias = input.description })
end
local in_link, in_app = in_apps.pci(input)
table.insert(in_app_specs,
{ pciaddr = input.device,
name = input_name,
ifname = input.name or
(input.device:gsub("[:%.]", "_")),
ifalias = input.description })
app_graph.app(graph, input_name, unpack(in_app))
local link_name = "input"..suffix
if input.tag then
Expand Down
14 changes: 2 additions & 12 deletions src/program/ipfix/probe_ptree/probe_ptree.lua
Expand Up @@ -14,8 +14,6 @@ local probe_schema = 'snabb-snabbflow-v1'

local probe_cpuset = cpuset.new()

local TEST_in = nil

function setup_ipfix (conf)
-- yang.print_config_for_schema_by_name(probe_schema, conf, io.stdout)
return setup_workers(conf)
Expand All @@ -37,10 +35,9 @@ end
function run (args)
local name = assert(args[1])
local confpath = assert(args[2])
TEST_in = args[3]
-- print("Confpath is:", confpath)
local manager = start(name, confpath)
manager:main(TEST_in and 5)
manager:main()
end

local ipfix_default_config = lib.deepcopy(probe.probe_config)
Expand Down Expand Up @@ -156,10 +153,6 @@ function setup_workers (config)
config.instance = nil
config.add_packet_metadata = false

if TEST_in then
config.output_type = "pcap"
end

if true then -- use_maps=true
local maps = {}
for name, map in pairs(ipfix.maps) do
Expand Down Expand Up @@ -194,9 +187,6 @@ function setup_workers (config)
observation_domain = observation_domain + 1
iconfig.observation_domain = od
iconfig.output = "ipfixexport"..od
if TEST_in then
iconfig.output = iconfig.output..".pcap"
end
if ipfix.maps.log_directory then
iconfig.maps_logfile =
ipfix.maps.log_directory.."/"..od..".log"
Expand Down Expand Up @@ -254,7 +244,7 @@ function setup_workers (config)
class.order = nil
--print(class.name, class.filter, "continue="..tostring(class.continue))
end
workers["rss"..rssq] = probe.configure_rss_graph(rss_config, TEST_in or inputs, outputs, ipfix.log_date)
workers["rss"..rssq] = probe.configure_rss_graph(rss_config, inputs, outputs, ipfix.log_date)
end

-- for k,v in pairs(mellanox) do
Expand Down

0 comments on commit 4fea4ea

Please sign in to comment.