File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -323,6 +323,9 @@ bool process_plugin_args(ipxp_conf_t &conf, IpfixprobeOptParser &parser)
323323 auto pipeline_dir = conf.telemetry_root_node ->addDir (" pipeline" );
324324 auto flowcache_dir = conf.telemetry_root_node ->addDir (" flowcache" );
325325 size_t pipeline_idx = 0 ;
326+ #ifdef WITH_CTT
327+ std::unordered_map<std::string, std::shared_ptr<CttController>> ctt_controllers;
328+ #endif /* WITH_CTT */
326329 for (auto &it : parser.m_input ) {
327330 InputPlugin *input_plugin = nullptr ;
328331 StoragePlugin *storage_plugin = nullptr ;
@@ -358,6 +361,14 @@ bool process_plugin_args(ipxp_conf_t &conf, IpfixprobeOptParser &parser)
358361 if (storage_plugin == nullptr ) {
359362 throw IPXPError (" invalid storage plugin " + storage_name);
360363 }
364+ #ifdef WITH_CTT
365+ const auto & [device, channel_id] = input_plugin->get_ctt_config ();
366+ const std::string key = device + std::to_string (channel_id/16 );
367+ if (ctt_controllers.find (key) == ctt_controllers.end ()) {
368+ ctt_controllers[key] = std::make_shared<CttController>(device, channel_id/16 );
369+ }
370+ storage_plugin->set_ctt_config (ctt_controllers[key]);
371+ #endif /* WITH_CTT */
361372 storage_plugin->set_queue (output_queue);
362373 storage_plugin->init (storage_params.c_str ());
363374 storage_plugin->set_telemetry_dir (pipeline_queue_dir);
You can’t perform that action at this time.
0 commit comments