scripts/nvmf: disable channel packet inspection optimization after fio ramp time

A temporary workaround for issues seen when using "adq_enable"
is to set channel-pkt-inspect-optimize on before fio ramp_up and
turn it off when ramp_up is ending.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I74f71d11e3b9d1a064b36de8acc7a2a23f51a34b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9879
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Maciej Wawryk 2021-10-14 12:37:56 +02:00 committed by Tomasz Zawadzki
parent 6f2f94e634
commit ce7a40b6ee

View File

@ -189,8 +189,10 @@ class Server:
self.exec_cmd(["sudo", "ethtool", "--set-priv-flags", nic,
"channel-inline-flow-director", "on"]) # Enable Intel Flow Director
self.exec_cmd(["sudo", "ethtool", "--set-priv-flags", nic, "fw-lldp-agent", "off"]) # Disable LLDP
# As temporary workaround for ADQ, channel packet inspection optimization is turned on during connection establishment.
# Then turned off before fio ramp_up expires in ethtool_after_fio_ramp().
self.exec_cmd(["sudo", "ethtool", "--set-priv-flags", nic,
"channel-pkt-inspect-optimize", "off"]) # Disable channel packet inspection optimization
"channel-pkt-inspect-optimize", "on"])
except CalledProcessError as e:
self.log_print("ERROR: failed to configure NIC port using ethtool!")
self.log_print("%s resulted in error: %s" % (e.cmd, e.output))
@ -599,6 +601,14 @@ class Target(Server):
with open(os.path.join(results_dir, sar_file_name), "a") as f:
f.write("Total CPU used: " + str(sar_cpu_usage))
def ethtool_after_fio_ramp(self, fio_ramp_time):
time.sleep(fio_ramp_time//2)
nic_names = [self.get_nic_name_by_ip(n) for n in self.nic_ips]
for nic in nic_names:
self.log_print(nic)
self.exec_cmd(["sudo", "ethtool", "--set-priv-flags", nic,
"channel-pkt-inspect-optimize", "off"]) # Disable channel packet inspection optimization
def measure_pcm_memory(self, results_dir, pcm_file_name):
time.sleep(self.pcm_delay)
cmd = ["%s/pcm-memory.x" % self.pcm_dir, "%s" % self.pcm_interval, "-csv=%s/%s" % (results_dir, pcm_file_name)]
@ -1507,6 +1517,10 @@ if __name__ == "__main__":
t = threading.Thread(target=target_obj.measure_dpdk_memory, args=(args.results))
threads.append(t)
if target_obj.enable_adq:
ethtool_thread = threading.Thread(target=target_obj.ethtool_after_fio_ramp, args=(fio_ramp_time))
threads.append(ethtool_thread)
for t in threads:
t.start()
for t in threads: