File tree Expand file tree Collapse file tree
tools/ft-orchestration/src/probe Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -112,6 +112,7 @@ def __init__(
112112 verbose : bool = False ,
113113 mtu : int = 2048 ,
114114 sudo : bool = False ,
115+ cache_size = None ,
115116 ** kwargs : dict ,
116117 ):
117118 interfaces_names = [ifc .name for ifc in interfaces ]
Original file line number Diff line number Diff line change @@ -88,6 +88,7 @@ def __init__(
8888 mtu ,
8989 active_timeout ,
9090 inactive_timeout ,
91+ cache_size ,
9192 ** kwargs ,
9293 ):
9394 """Initialize the local or remote probe interface as object
Original file line number Diff line number Diff line change @@ -121,13 +121,16 @@ def __init__(
121121 verbose : bool = False ,
122122 mtu : int = 2048 ,
123123 sudo : bool = False ,
124+ cache_size = None ,
124125 ** kwargs : dict ,
125126 ):
126127 interfaces_names = [ifc .name for ifc in interfaces ]
127128 self ._interfaces = interfaces_names
128129 self ._zero_copy = any (ifc .startswith ("zc:" ) for ifc in self ._interfaces )
129130 settings : NProbeSettings = NProbeSettings (
130- interface = interfaces_names [0 ], ** kwargs
131+ interface = interfaces_names [0 ],
132+ max_num_flows = 2 ** cache_size if cache_size else None ,
133+ ** kwargs ,
131134 )
132135 self ._executor = executor
133136
Original file line number Diff line number Diff line change @@ -183,6 +183,7 @@ def __init__(
183183 mtu : int = 2048 ,
184184 sudo : bool = False ,
185185 inactive_timeout : int = 50 ,
186+ cache_size = None ,
186187 ** kwargs : dict ,
187188 ):
188189 if len (interfaces ) > 1 :
@@ -206,7 +207,11 @@ def __init__(
206207 kwargs ["pcap" ] = YafSettings .PCAPOptions (** (kwargs .get ("pcap" , {})))
207208 kwargs ["tls" ] = YafSettings .TLSOptions (** (kwargs .get ("tls" , {})))
208209 kwargs ["log" ] = YafSettings .LoggingOptions (** (kwargs .get ("log" , {})))
209- self ._settings = YafSettings (idle_timeout = inactive_timeout , ** kwargs )
210+ self ._settings = YafSettings (
211+ idle_timeout = inactive_timeout ,
212+ maxflows = 2 ** cache_size if cache_size else None ,
213+ ** kwargs ,
214+ )
210215 self ._executor = executor
211216 if isinstance (executor , RemoteExecutor ):
212217 connection : Connection = executor .get_connection ()
You can’t perform that action at this time.
0 commit comments