Skip to content

Commit 01823e7

Browse files
committed
ft-orchestration add rss-queues to yaf pcap
1 parent faa0c58 commit 01823e7

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

tools/ft-orchestration/src/probe/ipfixprobe.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ class IpfixprobeRawSettings(IpfixprobeSettings):
178178
queues_count: int = 1
179179

180180
# For interface setup defaults to number of cpus
181-
rss_queues: int = 0
181+
rss_queues: int = 1
182182

183183
def __post_init__(self):
184184
assert len(self.interfaces) > 0
@@ -205,7 +205,7 @@ class IpfixprobePcapSettings(IpfixprobeSettings):
205205
snaplen: Optional[int] = None
206206

207207
# For interface setup defaults to number of cpus
208-
rss_queues: int = 0
208+
rss_queues: int = 1
209209

210210
def __post_init__(self):
211211
assert len(self.interfaces) > 0
@@ -812,8 +812,6 @@ def __init__(
812812
super().__init__(
813813
executor, target, protocols, interfaces, verbose, self._settings, sudo
814814
)
815-
if self._settings.rss_queues == 0:
816-
self._settings.rss_queues = self.host_statistics.cpus
817815
self._mtu = mtu
818816

819817
def _prepare_cmd(
@@ -882,8 +880,6 @@ def __init__(
882880
super().__init__(
883881
executor, target, protocols, interfaces, verbose, self._settings, sudo
884882
)
885-
if self._settings.rss_queues == 0:
886-
self._settings.rss_queues = self.host_statistics.cpus
887883
self._mtu = mtu
888884

889885
def _prepare_cmd(

tools/ft-orchestration/src/probe/yaf.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ def __init__(
182182
sudo: bool = False,
183183
inactive_timeout: int = 50,
184184
cache_size=None,
185+
rss_queues: int = 1,
185186
**kwargs: dict,
186187
):
187188
if len(interfaces) > 1:
@@ -246,6 +247,7 @@ def __init__(
246247
self._cmd = None
247248
self.host_statistics = MpStat(stats_executor, "yaf")
248249
self._rsync = Rsync(executor)
250+
self._rss_queues_pcap = rss_queues
249251

250252
def _write_config(self, settings: YafSettings):
251253
def to_lua_literal(value) -> str:
@@ -309,6 +311,11 @@ def _before_start(self):
309311
executor=self._executor,
310312
sudo=self._sudo,
311313
).run()
314+
Tool(
315+
f"ethtool --set-channels {self._settings.input.inf} combined {self._rss_queues_pcap}",
316+
executor=self._executor,
317+
sudo=self._sudo,
318+
).run()
312319

313320
def start(self, start_stats: bool = True, stop_running: bool = True):
314321
"""

0 commit comments

Comments
 (0)