Skip to content

Commit

Permalink
Recipes/SRIOVNetnsTcRecipe.py: dump tc rules after performance test
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Tluka <[email protected]>
  • Loading branch information
jtluka committed Oct 26, 2023
1 parent bb1df09 commit 9a7caa0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lnst/Recipes/ENRT/SRIOVNetnsTcRecipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from lnst.Recipes.ENRT.helpers import ip_endpoint_pairs
from lnst.Recipes.ENRT.BaremetalEnrtRecipe import BaremetalEnrtRecipe
from lnst.RecipeCommon.Ping.PingEndpoints import PingEndpoints
from lnst.RecipeCommon.Perf.Recipe import RecipeConf
from lnst.Recipes.ENRT.BaseEnrtRecipe import EnrtConfiguration
from lnst.Recipes.ENRT.ConfigMixins.OffloadSubConfigMixin import (
OffloadSubConfigMixin,
Expand Down Expand Up @@ -204,6 +205,17 @@ def test_wide_configuration(self):

return config

def perf_test(self, recipe_conf: RecipeConf):
result = super().perf_test(recipe_conf)
self._dump_tc_rules()

return result

def _dump_tc_rules(self):
for host in self.matched:
for dev in [host.eth0, host.vf_representor_eth0]:
host.run(f"tc -s filter show dev {dev.name} ingress")

def generate_test_wide_description(self, config: EnrtConfiguration):
desc = super().generate_test_wide_description(config)
for host in [self.matched.host1, self.matched.host2]:
Expand Down

0 comments on commit 9a7caa0

Please sign in to comment.