scripts/nvmf_perf: add adq_configure_nic method
Configure NIC settings as per ADQ configuration guide. Change-Id: I957aada267474c2a1448c89a1b7c81d4dd261ca6 Signed-off-by: Karol Latecki <karol.latecki@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6263 Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Michal Berger <michalx.berger@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
3c09b2fb99
commit
2c5849c7be
@ -79,6 +79,7 @@ class Server:
|
||||
|
||||
def configure_adq(self):
|
||||
self.adq_load_modules()
|
||||
self.adq_configure_nic()
|
||||
|
||||
def adq_load_modules(self):
|
||||
self.log_print("Modprobing ADQ-related Linux modules...")
|
||||
@ -91,6 +92,35 @@ class Server:
|
||||
self.log_print("ERROR: failed to load module %s" % module)
|
||||
self.log_print("%s resulted in error: %s" % (e.cmd, e.output))
|
||||
|
||||
def adq_configure_nic(self):
|
||||
self.log_print("Configuring NIC port settings for ADQ testing...")
|
||||
|
||||
# Reload the driver first, to make sure any previous settings are re-set.
|
||||
try:
|
||||
self.exec_cmd(["sudo", "rmmod", "ice"])
|
||||
self.exec_cmd(["sudo", "modprobe", "ice"])
|
||||
except CalledProcessError as e:
|
||||
self.log_print("ERROR: failed to reload ice module!")
|
||||
self.log_print("%s resulted in error: %s" % (e.cmd, e.output))
|
||||
|
||||
nic_names = [self.get_nic_name_by_ip(n) for n in self.nic_ips]
|
||||
for nic in nic_names:
|
||||
self.log_print(nic)
|
||||
try:
|
||||
self.exec_cmd(["sudo", "ethtool", "-K", nic,
|
||||
"hw-tc-offload", "on"]) # Enable hardware TC offload
|
||||
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
|
||||
self.exec_cmd(["sudo", "ethtool", "--set-priv-flags", nic,
|
||||
"channel-pkt-inspect-optimize", "off"]) # Disable channel packet inspection optimization
|
||||
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))
|
||||
self.log_print("Please update your NIC driver and firmware versions and try again.")
|
||||
self.log_print(self.exec_cmd(["sudo", "ethtool", "-k", nic]))
|
||||
self.log_print(self.exec_cmd(["sudo", "ethtool", "--show-priv-flags", nic]))
|
||||
|
||||
|
||||
class Target(Server):
|
||||
def __init__(self, name, general_config, target_config):
|
||||
|
Loading…
Reference in New Issue
Block a user