From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B3BCFA034F; Mon, 29 Mar 2021 08:12:21 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 89DC240151; Mon, 29 Mar 2021 08:12:21 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 9AD8840042 for ; Mon, 29 Mar 2021 08:12:18 +0200 (CEST) IronPort-SDR: gtzOewTlrZWzR2bLPdKB/gcyqT1ytGDL4NvFB+6wSaiyOF0TPVwEg5opHnmzMkdjUAYTQdAru6 KEwU8GpphIEw== X-IronPort-AV: E=McAfee;i="6000,8403,9937"; a="189232479" X-IronPort-AV: E=Sophos;i="5.81,285,1610438400"; d="scan'208";a="189232479" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Mar 2021 23:12:16 -0700 IronPort-SDR: wqntryJBR8lUlMS/ep6TBq09h84Tdp8E0wZQbRVzCO9GoEWy5svdKJn+G/f06sHQhCuDOpv7D2 plGK1pnKgI3Q== X-IronPort-AV: E=Sophos;i="5.81,285,1610438400"; d="scan'208";a="454418220" Received: from unknown (HELO DPDK-CVL-tetser102.icx.intel.com) ([10.240.183.102]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Mar 2021 23:12:13 -0700 From: Liang Longfeng To: dts@dpdk.org Cc: Liang Longfeng , Ling Wei , Yang Lewei Date: Mon, 29 Mar 2021 14:48:57 +0000 Message-Id: <20210329144857.3332-1-longfengx.liang@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dts] [PATCH V1] doc and scripts: replace whitelist and blacklist X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Replace whitelist/blacklist to allowlist/blocklist in doc,test plans and scripts. Signed-off-by: Ling Wei Signed-off-by: Yang Lewei Signed-off-by: Liang Longfeng --- conf/pktgen.cfg | 6 +- doc/dts_gsg/intro.rst | 2 +- .../usage_of_create_eal_and_start_testpmd.rst | 2 +- executions/execution.cfg | 2 +- executions/execution_FVL.cfg | 2 +- executions/execution_smoke.cfg | 2 +- framework/dut.py | 2 +- framework/etgen.py | 8 +-- framework/project_dpdk.py | 28 ++++----- ..._test_plan.rst => blocklist_test_plan.rst} | 12 ++-- test_plans/eventdev_perf_test_plan.rst | 4 +- .../eventdev_pipeline_perf_test_plan.rst | 18 +++--- test_plans/index.rst | 2 +- test_plans/ip_pipeline_test_plan.rst | 2 +- test_plans/l3fwdacl_test_plan.rst | 2 +- test_plans/mac_filter_test_plan.rst | 4 +- test_plans/unit_tests_crc_test_plan.rst | 2 +- test_plans/unit_tests_dump_test_plan.rst | 4 +- ...te_blacklist.py => TestSuite_blocklist.py} | 52 ++++++++-------- tests/TestSuite_dcf_lifecycle.py | 34 +++++------ tests/TestSuite_eventdev_perf.py | 2 +- tests/TestSuite_eventdev_pipeline_perf.py | 2 +- tests/TestSuite_fdir.py | 2 +- tests/TestSuite_kni.py | 22 +++---- tests/TestSuite_mac_filter.py | 18 +++--- tests/TestSuite_nic_single_core_perf.py | 2 +- tests/TestSuite_pmd.py | 2 +- ...stSuite_runtime_vf_queue_number_maxinum.py | 60 +++++++++---------- tests/TestSuite_telemetry.py | 18 +++--- tests/TestSuite_unit_tests_dump.py | 8 +-- tests/TestSuite_vf_single_core_perf.py | 2 +- tests/perf_test_base.py | 38 ++++++------ 32 files changed, 183 insertions(+), 183 deletions(-) rename test_plans/{blacklist_test_plan.rst => blocklist_test_plan.rst} (95%) rename tests/{TestSuite_blacklist.py => TestSuite_blocklist.py} (72%) diff --git a/conf/pktgen.cfg b/conf/pktgen.cfg index 6e0825b7..17703eba 100644 --- a/conf/pktgen.cfg +++ b/conf/pktgen.cfg @@ -14,8 +14,8 @@ # example: core_mask=CORE_MASK_PIN # num -n: Number of memory channels # proc_type --proc-type: Type of this process -# pci_blacklist --pci-blacklist, -b: Add a PCI device in black list. -# pci_whitelist --pci-whitelist, -w: Add a PCI device in white list. +# pci_blocklist --pci-blocklist, -b: Add a PCI device in block list. +# pci_allowlist --pci-allowlist, -w: Add a PCI device in allow list. # file_prefix --file-prefix: Prefix for hugepage filenames # socket_memory --socket-mem: Memory to allocate on specific sockets # mapping_ports -m: Matrix for mapping ports to logical cores. @@ -56,4 +56,4 @@ ixia_ports= card=1,port=1; card=1,port=2; card=1,port=3; - card=1,port=4; \ No newline at end of file + card=1,port=4; diff --git a/doc/dts_gsg/intro.rst b/doc/dts_gsg/intro.rst index 7704cb55..e8753a03 100644 --- a/doc/dts_gsg/intro.rst +++ b/doc/dts_gsg/intro.rst @@ -117,7 +117,7 @@ Please see test cases, which are included in the DPDK compliance test suites: +---------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Timer | Shows how timer can be used in a RTE application. | +---------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | Blacklist/WhiteList | Tests Whitelist/Blacklist Features by Poll Mode Drivers. | + | Blocklist/AllowList | Tests Allowlist/Blocklist Features by Poll Mode Drivers. | +---------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | checksum_offload | Tests RX/TX L3/L4 Checksum offload features by Poll Mode Drivers | +---------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ diff --git a/doc/dts_gsg/usage_of_create_eal_and_start_testpmd.rst b/doc/dts_gsg/usage_of_create_eal_and_start_testpmd.rst index 52eec673..144f6112 100644 --- a/doc/dts_gsg/usage_of_create_eal_and_start_testpmd.rst +++ b/doc/dts_gsg/usage_of_create_eal_and_start_testpmd.rst @@ -65,7 +65,7 @@ create_eal_parameters function supports the following parameters: +---------------------------+---------------------------------------------------+------------------+ | port_options | other port options | | +---------------------------+---------------------------------------------------+------------------+ - | b_ports | PCI device in black list | | + | b_ports | PCI device in block list | | +---------------------------+---------------------------------------------------+------------------+ | no_pci | Disable PCI bug | | +---------------------------+---------------------------------------------------+------------------+ diff --git a/executions/execution.cfg b/executions/execution.cfg index 34ebc2bd..f572074f 100644 --- a/executions/execution.cfg +++ b/executions/execution.cfg @@ -8,7 +8,7 @@ test_suites= hello_world, multiprocess, timer, - blacklist, + blocklist, mac_filter, ieee1588, checksum_offload, diff --git a/executions/execution_FVL.cfg b/executions/execution_FVL.cfg index b9633492..b1cc02d1 100644 --- a/executions/execution_FVL.cfg +++ b/executions/execution_FVL.cfg @@ -23,7 +23,7 @@ test_suites= multiprocess, l2fwd, mac_filter, - blacklist, + blocklist, ipv4_reassembly, scatter, pmdrssreta, diff --git a/executions/execution_smoke.cfg b/executions/execution_smoke.cfg index 59a4075f..1568d40e 100644 --- a/executions/execution_smoke.cfg +++ b/executions/execution_smoke.cfg @@ -26,7 +26,7 @@ test_suites= pmd, checksum_offload, mac_filter, - blacklist + blocklist targets= x86_64-native-linuxapp-gcc parameters=nic_type=niantic:func=true diff --git a/framework/dut.py b/framework/dut.py index d31ba42c..6216166d 100644 --- a/framework/dut.py +++ b/framework/dut.py @@ -155,7 +155,7 @@ class Dut(Crb): w_pci_list.append('%s %s' % (allow_option, port)) w_pci_str = ' '.join(w_pci_list) - # deal with black ports + # deal with block ports b_pci_list = [] if 'b_ports' in config and len(config['b_ports']) != 0: for port in config['b_ports']: diff --git a/framework/etgen.py b/framework/etgen.py index 0ffe7b4c..acfa2960 100644 --- a/framework/etgen.py +++ b/framework/etgen.py @@ -54,7 +54,7 @@ class SoftwarePacketGenerator(): self.tester.send_expect("insmod igb_uio.ko", "#") bind_cmd = "" - white_list = "" + allow_list = "" ports = [] tx_ports = [] for (tx_port, rx_port, pcap_file) in portList: @@ -66,7 +66,7 @@ class SoftwarePacketGenerator(): for port in ports: bind_cmd += " %s" % self.tester.ports_info[port]['pci'] - white_list += " -w %s" % self.tester.ports_info[port]['pci'] + allow_list += " -w %s" % self.tester.ports_info[port]['pci'] self.tester.send_expect("./dpdk-devbind.py --bind=igb_uio %s" % bind_cmd, "#") @@ -109,9 +109,9 @@ class SoftwarePacketGenerator(): socket_mem = "--socket-mem 1024,1024" # current support version is dpdk v18.02 + pktgen v3.5.0 - pkt_cmd = "./pktgen -n 2 -c {CORE} --file-prefix=pktgen {WHITE} " \ + pkt_cmd = "./pktgen -n 2 -c {CORE} --file-prefix=pktgen {ALLOW} " \ "{MEM} -- -P -m \"{CORE_MAP}\" {PCAP}".format(CORE=cores_mask, - WHITE=white_list, MEM=socket_mem, CORE_MAP=map_cmd, PCAP=pcap_cmd) + ALLOW=allow_list, MEM=socket_mem, CORE_MAP=map_cmd, PCAP=pcap_cmd) self.tester.send_expect(pkt_cmd, "Pktgen:/>", 100) self.tester.send_expect("disable screen", "Pktgen:/>") diff --git a/framework/project_dpdk.py b/framework/project_dpdk.py index e05b6ccc..af74414e 100644 --- a/framework/project_dpdk.py +++ b/framework/project_dpdk.py @@ -619,34 +619,34 @@ class DPDKdut(Dut): folder, extra_options), "# ", 180) - def get_blacklist_string(self, target, nic): + def get_blocklist_string(self, target, nic): """ - Get black list command string. + Get block list command string. """ - get_blacklist_string = getattr(self, 'get_blacklist_string_%s' % self.get_os_type()) - return get_blacklist_string(target, nic) + get_blocklist_string = getattr(self, 'get_blocklist_string_%s' % self.get_os_type()) + return get_blocklist_string(target, nic) - def get_blacklist_string_linux(self, target, nic): + def get_blocklist_string_linux(self, target, nic): """ - Get black list command string on Linux. + Get block list command string on Linux. """ - blacklist = '' + blocklist = '' dutPorts = self.get_ports(nic) self.restore_interfaces() self.send_expect('insmod ./%s/kmod/igb_uio.ko' % target, '# ') self.bind_interfaces_linux() for port in range(0, len(self.ports_info)): if(port not in dutPorts): - blacklist += '-b %s ' % self.ports_info[port]['pci'] - return blacklist + blocklist += '-b %s ' % self.ports_info[port]['pci'] + return blocklist - def get_blacklist_string_freebsd(self, target, nic): + def get_blocklist_string_freebsd(self, target, nic): """ - Get black list command string on Freebsd. + Get block list command string on Freebsd. """ - blacklist = '' - # No blacklist option in FreeBSD - return blacklist + blocklist = '' + # No blocklist option in FreeBSD + return blocklist def get_def_rte_config(self, config): """ diff --git a/test_plans/blacklist_test_plan.rst b/test_plans/blocklist_test_plan.rst similarity index 95% rename from test_plans/blacklist_test_plan.rst rename to test_plans/blocklist_test_plan.rst index 02b3c2f1..a284448d 100644 --- a/test_plans/blacklist_test_plan.rst +++ b/test_plans/blocklist_test_plan.rst @@ -31,7 +31,7 @@ OF THE POSSIBILITY OF SUCH DAMAGE. ==================== -Port Blacklist Tests +Port Blocklist Tests ==================== Prerequisites @@ -47,7 +47,7 @@ to the device under test:: modprobe vfio-pci usertools/dpdk-devbind.py --bind=vfio-pci device_bus_id -Test Case: Testpmd with no blacklisted device +Test Case: Testpmd with no blocklisted device ============================================= Run testpmd in interactive mode and ensure that at least 2 ports @@ -86,10 +86,10 @@ are bound and available:: Initializing port 3... done: Link Up - speed 10000 Mbps - full-duplex -Test Case: Testpmd with one port blacklisted +Test Case: Testpmd with one port blocklisted ============================================ -Select first available port to be blacklisted and specify it with -b option. For the example above:: +Select first available port to be blocklisted and specify it with -b option. For the example above:: build/testpmd -c 3 -b 0000:01:00.0 -- -i @@ -120,10 +120,10 @@ only 3 ports are available now::: Initializing port 2... done: Link Up - speed 10000 Mbps - full-duplex -Test Case: Testpmd with all but one port blacklisted +Test Case: Testpmd with all but one port blocklisted ==================================================== -Blacklist all devices except the last one. +Blocklist all devices except the last one. For the example above::: build/testpmd -c 3 -b 0000:01:00.0 -b 0000:01:00.0 -b 0000:02:00.0 -- -i diff --git a/test_plans/eventdev_perf_test_plan.rst b/test_plans/eventdev_perf_test_plan.rst index 708be2bc..d5fe4ed9 100644 --- a/test_plans/eventdev_perf_test_plan.rst +++ b/test_plans/eventdev_perf_test_plan.rst @@ -56,7 +56,7 @@ Description: Execute performance test with Atomic_atq type of stage in multi-flo -l CORELIST : List of cores to run on The argument format is [-c2][,c3[-c4],...] where c1, c2, etc are core indexes between 0 and 24 - -w --pci-whitelist : Add a PCI device in white list. + -w --pci-allowlist : Add a PCI device in allow list. Only use the specified PCI devices. The argument format is <[domain:]bus:devid.func>. This option can be present several times (once per device). @@ -273,4 +273,4 @@ Description: Execute performance test with Ordered_queue type of stage in multi- 2. Use Ixia to send huge number of packets(with same 5-tuple and different 5-tuple) -3. Observe the speed of packets received(Rx-rate) on Ixia. \ No newline at end of file +3. Observe the speed of packets received(Rx-rate) on Ixia. diff --git a/test_plans/eventdev_pipeline_perf_test_plan.rst b/test_plans/eventdev_pipeline_perf_test_plan.rst index 0cd91104..abeab18d 100644 --- a/test_plans/eventdev_pipeline_perf_test_plan.rst +++ b/test_plans/eventdev_pipeline_perf_test_plan.rst @@ -56,7 +56,7 @@ Description: Execute performance test with Atomic_atq type of stage in multi-flo Parameters:: -c, COREMASK : Hexadecimal bitmask of cores to run on - -w, --pci-whitelist : Add a PCI device in white list. + -w, --pci-allowlist : Add a PCI device in allow list. Only use the specified PCI devices. The argument format is <[domain:]bus:devid.func>. This option can be present several times (once per device). @@ -80,7 +80,7 @@ Description: Execute performance test with Parallel_atq type of stage in multi-f Parameters:: -c, COREMASK : Hexadecimal bitmask of cores to run on - -w, --pci-whitelist : Add a PCI device in white list. + -w, --pci-allowlist : Add a PCI device in allow list. Only use the specified PCI devices. The argument format is <[domain:]bus:devid.func>. This option can be present several times (once per device). @@ -105,7 +105,7 @@ Description: Execute performance test with Ordered_atq type of stage in multi-fl Parameters:: -c, COREMASK : Hexadecimal bitmask of cores to run on - -w, --pci-whitelist : Add a PCI device in white list. + -w, --pci-allowlist : Add a PCI device in allow list. Only use the specified PCI devices. The argument format is <[domain:]bus:devid.func>. This option can be present several times (once per device). @@ -130,7 +130,7 @@ Description: Execute performance test with Atomic_atq type of stage in multi-flo Parameters:: -c, COREMASK : Hexadecimal bitmask of cores to run on - -w, --pci-whitelist : Add a PCI device in white list. + -w, --pci-allowlist : Add a PCI device in allow list. Only use the specified PCI devices. The argument format is <[domain:]bus:devid.func>. This option can be present several times (once per device). @@ -154,7 +154,7 @@ Description: Execute performance test with Parallel_atq type of stage in multi-f Parameters:: -c, COREMASK : Hexadecimal bitmask of cores to run on - -w, --pci-whitelist : Add a PCI device in white list. + -w, --pci-allowlist : Add a PCI device in allow list. Only use the specified PCI devices. The argument format is <[domain:]bus:devid.func>. This option can be present several times (once per device). @@ -179,7 +179,7 @@ Description: Execute performance test with Ordered_atq type of stage in multi-fl Parameters:: -c, COREMASK : Hexadecimal bitmask of cores to run on - -w, --pci-whitelist : Add a PCI device in white list. + -w, --pci-allowlist : Add a PCI device in allow list. Only use the specified PCI devices. The argument format is <[domain:]bus:devid.func>. This option can be present several times (once per device). @@ -204,7 +204,7 @@ Description: Execute performance test with Atomic_atq type of stage in multi-flo Parameters:: -c, COREMASK : Hexadecimal bitmask of cores to run on - -w, --pci-whitelist : Add a PCI device in white list. + -w, --pci-allowlist : Add a PCI device in allow list. Only use the specified PCI devices. The argument format is <[domain:]bus:devid.func>. This option can be present several times (once per device). @@ -228,7 +228,7 @@ Description: Execute performance test with Parallel_atq type of stage in multi-f Parameters:: -c, COREMASK : Hexadecimal bitmask of cores to run on - -w, --pci-whitelist : Add a PCI device in white list. + -w, --pci-allowlist : Add a PCI device in allow list. Only use the specified PCI devices. The argument format is <[domain:]bus:devid.func>. This option can be present several times (once per device). @@ -253,7 +253,7 @@ Description: Execute performance test with Ordered_atq type of stage in multi-fl Parameters:: -c, COREMASK : Hexadecimal bitmask of cores to run on - -w, --pci-whitelist : Add a PCI device in white list. + -w, --pci-allowlist : Add a PCI device in allow list. Only use the specified PCI devices. The argument format is <[domain:]bus:devid.func>. This option can be present several times (once per device). diff --git a/test_plans/index.rst b/test_plans/index.rst index 2be687a9..b2f1289e 100644 --- a/test_plans/index.rst +++ b/test_plans/index.rst @@ -38,7 +38,7 @@ The following are the test plans for the DPDK DTS automated test system. :numbered: ABI_stable_test_plan - blacklist_test_plan + blocklist_test_plan checksum_offload_test_plan cloud_filter_test_plan coremask_test_plan diff --git a/test_plans/ip_pipeline_test_plan.rst b/test_plans/ip_pipeline_test_plan.rst index 2a600ebc..0b6bb5bf 100644 --- a/test_plans/ip_pipeline_test_plan.rst +++ b/test_plans/ip_pipeline_test_plan.rst @@ -238,7 +238,7 @@ Test Case: vf l2fwd pipeline(pf bound to dpdk driver) ./build/ip_pipeline -c 0x3 -n 4 -w 0000:05:02.0 -w 0000:05:06.0 \ -w 0000:05:0a.0 -w 0000:05:0e.0 --file-prefix=vf --socket-mem 1024,1024 -- -s examples/vf.cli - The exact format of port whitelist: domain:bus:devid:func + The exact format of port allowlist: domain:bus:devid:func 5. Send packets at tester side with scapy:: diff --git a/test_plans/l3fwdacl_test_plan.rst b/test_plans/l3fwdacl_test_plan.rst index 525b5560..7079308c 100644 --- a/test_plans/l3fwdacl_test_plan.rst +++ b/test_plans/l3fwdacl_test_plan.rst @@ -48,7 +48,7 @@ address, source port, destination port and a protocol identifier. The ``l3fwd-acl`` application supports two types of rules: #. Route information which is used for L3 forwarding. -#. An access control list which defines the black list to block. +#. An access control list which defines the block list to block. The ``l3fwd-acl`` application needs to load ACL and route rules before running. Route rules are mandatory while ACL rules are optional. After diff --git a/test_plans/mac_filter_test_plan.rst b/test_plans/mac_filter_test_plan.rst index e8a4f665..a9695cfc 100644 --- a/test_plans/mac_filter_test_plan.rst +++ b/test_plans/mac_filter_test_plan.rst @@ -31,7 +31,7 @@ OF THE POSSIBILITY OF SUCH DAMAGE. ================== -Whitelisting Tests +Allowlisting Tests ================== If using vfio the kernel must be >= 3.6+ and VT-d must be enabled in bios.When @@ -198,4 +198,4 @@ Remove the multicast MAC address from the multicast filter:: Send a packet with multicast destination MAC address to port 0 -Verify that the packet was not received (Check for "received" in the output). There will be no output if the nic responds properly. \ No newline at end of file +Verify that the packet was not received (Check for "received" in the output). There will be no output if the nic responds properly. diff --git a/test_plans/unit_tests_crc_test_plan.rst b/test_plans/unit_tests_crc_test_plan.rst index 3f51b5a2..9a4c89ed 100644 --- a/test_plans/unit_tests_crc_test_plan.rst +++ b/test_plans/unit_tests_crc_test_plan.rst @@ -87,7 +87,7 @@ are initialized. Also, x86 specific crc implementation References: [1] Fast CRC Computation for Generic Polynomials Using PCLMULQDQ Instruction -http://www.intel.com/content/dam/www/public/us/en/documents/white-papers +http://www.intel.com/content/dam/www/public/us/en/documents/allow-papers /fast-crc-computation-generic-polynomials-pclmulqdq-paper.pdf [2] A PAINLESS GUIDE TO CRC ERROR DETECTION ALGORITHMS http://www.ross.net/crc/download/crc_v3.txt diff --git a/test_plans/unit_tests_dump_test_plan.rst b/test_plans/unit_tests_dump_test_plan.rst index 652344d1..8978fdf4 100644 --- a/test_plans/unit_tests_dump_test_plan.rst +++ b/test_plans/unit_tests_dump_test_plan.rst @@ -178,8 +178,8 @@ The steps to run the unit test manually are as follow:: # ./app/test/test -n 1 -c ffff -w|-b pci_address RTE>> dump_devargs -The final output of the test will be the pci address of white list -or black list. +The final output of the test will be the pci address of allow list +or block list. ============================= Unit Tests: Dump malloc stats diff --git a/tests/TestSuite_blacklist.py b/tests/TestSuite_blocklist.py similarity index 72% rename from tests/TestSuite_blacklist.py rename to tests/TestSuite_blocklist.py index d0173474..3692dfbb 100644 --- a/tests/TestSuite_blacklist.py +++ b/tests/TestSuite_blocklist.py @@ -31,25 +31,25 @@ """ DPDK Test suite. -Test device blacklisting. +Test device blocklisting. """ import utils from test_case import TestCase from pmd_output import PmdOutput from settings import DRIVERS -class TestBlackList(TestCase): +class TestBlockList(TestCase): def set_up_all(self): """ Run at the start of each test suite. - Blacklist Prerequisites. + Blocklist Prerequisites. Requirements: Two Ports """ self.ports = self.dut.get_ports(self.nic) self.verify(len(self.ports) >= 2, "Insufficient ports for testing") [arch, machine, self.env, toolchain] = self.target.split('-') - self.regexp_blacklisted_port = "Probe PCI driver: net.*%s \(%s\) device: .*%s \(socket [-0-9]+\)" + self.regexp_blocklisted_port = "Probe PCI driver: net.*%s \(%s\) device: .*%s \(socket [-0-9]+\)" self.pmdout = PmdOutput(self.dut) def set_up(self): @@ -59,59 +59,59 @@ class TestBlackList(TestCase): """ pass - def check_blacklisted_ports(self, output, ports, blacklisted=False): + def check_blocklisted_ports(self, output, ports, blocklisted=False): """ - Check if any of the ports in `ports` have been blacklisted, if so, raise + Check if any of the ports in `ports` have been blocklisted, if so, raise exception. - If `blacklisted` is True, then raise an exception if any of the ports - in `ports` have not been blacklisted. + If `blocklisted` is True, then raise an exception if any of the ports + in `ports` have not been blocklisted. """ for port in ports: # Look for the PCI ID of each card followed by - # "Device is blacklisted, not initializing" but avoid to consume more + # "Device is blocklisted, not initializing" but avoid to consume more # than one device. port_pci = self.dut.ports_info[port]['pci'] - regexp_blacklisted_port = self.regexp_blacklisted_port % ( + regexp_blocklisted_port = self.regexp_blocklisted_port % ( DRIVERS.get(self.nic), self.dut.ports_info[port]['type'], port_pci) - matching_ports = utils.regexp(output, regexp_blacklisted_port, True) - if blacklisted: + matching_ports = utils.regexp(output, regexp_blocklisted_port, True) + if blocklisted: self.verify(len(matching_ports) == 0, - "Blacklisted port is being initialized") + "Blocklisted port is being initialized") else: self.verify(len(matching_ports) == 1, - "Not blacklisted port is being blacklisted") + "Not blocklisted port is being blocklisted") - def test_bl_noblacklisted(self): + def test_bl_noblocklisted(self): """ - Run testpmd with no blacklisted device. + Run testpmd with no blocklisted device. """ out = self.pmdout.start_testpmd("Default") rexp = r"Link" match_status = utils.regexp(out, rexp, True) - self.check_blacklisted_ports(out, self.ports) + self.check_blocklisted_ports(out, self.ports) - def test_bl_oneportblacklisted(self): + def test_bl_oneportblocklisted(self): """ - Run testpmd with one port blacklisted. + Run testpmd with one port blocklisted. """ self.dut.kill_all() out = self.pmdout.start_testpmd("Default", eal_param="-b %s" % self.dut.ports_info[0]['pci']) - self.check_blacklisted_ports(out, self.ports[1:]) + self.check_blocklisted_ports(out, self.ports[1:]) - def test_bl_allbutoneportblacklisted(self): + def test_bl_allbutoneportblocklisted(self): """ - Run testpmd with all but one port blacklisted. + Run testpmd with all but one port blocklisted. """ self.dut.kill_all() - ports_to_blacklist = self.ports[:-1] + ports_to_blocklist = self.ports[:-1] cmdline = "" - for port in ports_to_blacklist: + for port in ports_to_blocklist: cmdline += " -b %s" % self.dut.ports_info[port]['pci'] out = self.pmdout.start_testpmd("Default", eal_param=cmdline) - blacklisted_ports = self.check_blacklisted_ports(out, - ports_to_blacklist, True) + blocklisted_ports = self.check_blocklisted_ports(out, + ports_to_blocklist, True) def tear_down(self): """ diff --git a/tests/TestSuite_dcf_lifecycle.py b/tests/TestSuite_dcf_lifecycle.py index 5ae6372f..b8645a61 100644 --- a/tests/TestSuite_dcf_lifecycle.py +++ b/tests/TestSuite_dcf_lifecycle.py @@ -244,13 +244,13 @@ class TestDcfLifeCycle(TestCase): port_obj.bind_driver(self.drivername) self.vf_ports_info = None - def vf_whitelist(self): + def vf_allowlist(self): pf1_vf0 = self.vf_ports_info[0].get('vfs_pci')[0] pf1_vf1 = self.vf_ports_info[0].get('vfs_pci')[1] pf1_vf2 = self.vf_ports_info[0].get('vfs_pci')[2] pf2_vf0 = self.vf_ports_info[1].get('vfs_pci')[0] \ if len(self.vf_ports_info) >= 2 else '' - whitelist = { + allowlist = { 'pf1_vf0_dcf': f"-w {pf1_vf0},cap=dcf", 'pf1_vf1_dcf': f"-w {pf1_vf1},cap=dcf", 'pf1_vf0_pf2_vf0_dcf': f"-w {pf1_vf0},cap=dcf -w {pf2_vf0},cap=dcf", @@ -259,7 +259,7 @@ class TestDcfLifeCycle(TestCase): 'pf2_vf0_dcf': f"-w {pf2_vf0},cap=dcf", 'pf1_vf0': f"-w {pf1_vf0}", } - return whitelist + return allowlist def vf_set_mac_addr(self, dut_port_id=0, vf_id=1): intf = self.dut.ports_info[dut_port_id]['port'].intf_name @@ -306,21 +306,21 @@ class TestDcfLifeCycle(TestCase): self.vf_dcf_testpmd = self.dut.apps_name['test-pmd'] def start_vf_dcf_testpmd(self, pmd_opiton): - whitelist_name, prefix = pmd_opiton + allowlist_name, prefix = pmd_opiton core_mask = utils.create_mask(self.core_pf) - whitelist = self.vf_whitelist().get(whitelist_name) + allowlist = self.vf_allowlist().get(allowlist_name) cmd = ( "{bin} " "-v " "-c {core_mask} " "-n {mem_channel} " - "{whitelist} " + "{allowlist} " "--file-prefix={prefix} " "-- -i ").format(**{ 'bin': ''.join(['./',self.vf_dcf_testpmd]), 'core_mask': core_mask, 'mem_channel': self.dut.get_memory_channels(), - 'whitelist': whitelist, + 'allowlist': allowlist, 'prefix': prefix, }) self.vf_dcf_pmd_start_output = self.d_con([cmd, "testpmd> ", 120]) self.is_vf_dcf_pmd_on = True @@ -365,21 +365,21 @@ class TestDcfLifeCycle(TestCase): self.vf_pmd2_session_name) def start_vf_testpmd2(self, pmd_opiton): - whitelist_name, prefix = pmd_opiton + allowlist_name, prefix = pmd_opiton core_mask = utils.create_mask(self.core_vf) - whitelist = self.vf_whitelist().get(whitelist_name) + allowlist = self.vf_allowlist().get(allowlist_name) cmd = ( "{bin} " "-v " "-c {core_mask} " "-n {mem_channel} " - "{whitelist} " + "{allowlist} " "--file-prefix={prefix} " "-- -i ").format(**{ 'bin': ''.join(['./',self.vf_testpmd2]), 'core_mask': core_mask, 'mem_channel': self.dut.get_memory_channels(), - 'whitelist': whitelist, + 'allowlist': allowlist, 'prefix': prefix, }) self.vf_pmd2_start_output = self.vf_pmd2_con([cmd, "testpmd> ", 120]) self.is_vf_pmd2_on = True @@ -1275,18 +1275,18 @@ class TestDcfLifeCycle(TestCase): def launch_dcf_testpmd(self): # launch testpmd on VF0 requesting for DCF funtionality core_mask = utils.create_mask(self.core_pf) - whitelist = self.vf_whitelist().get('pf1_vf0_dcf') + allowlist = self.vf_allowlist().get('pf1_vf0_dcf') cmd_dcf = ( "{bin} " "-v " "-c {core_mask} " "-n {mem_channel} " - "{whitelist} " + "{allowlist} " "--log-level=ice,7 -- -i --port-topology=loop ").format(**{ 'bin': ''.join(['./', self.vf_dcf_testpmd]), 'core_mask': core_mask, 'mem_channel': self.dut.get_memory_channels(), - 'whitelist': whitelist, }) + 'allowlist': allowlist, }) return self.d_con([cmd_dcf, "testpmd> ", 120]) def check_vf_driver(self): @@ -1358,19 +1358,19 @@ class TestDcfLifeCycle(TestCase): # re-launch AVF on VF0 core_mask = utils.create_mask(self.core_pf) - whitelist = self.vf_whitelist().get('pf1_vf0') + allowlist = self.vf_allowlist().get('pf1_vf0') cmd = ( "{bin} " "-v " "-c {core_mask} " "-n {mem_channel} " - "{whitelist} " + "{allowlist} " "--file-prefix={prefix} " "-- -i ").format(**{ 'bin': ''.join(['./', self.vf_dcf_testpmd]), 'core_mask': core_mask, 'mem_channel': self.dut.get_memory_channels(), - 'whitelist': whitelist, + 'allowlist': allowlist, 'prefix': 'vf0', }) avf_output = self.d_con([cmd, "testpmd> ", 120]) expected_strs = [ diff --git a/tests/TestSuite_eventdev_perf.py b/tests/TestSuite_eventdev_perf.py index 58f7fdad..fd142e89 100644 --- a/tests/TestSuite_eventdev_perf.py +++ b/tests/TestSuite_eventdev_perf.py @@ -81,7 +81,7 @@ class TestEventdevPerf(TestCase,IxiaPacketGenerator): self.perf_results = {'header': [], 'data': []} - self.blacklist = "" + self.blocklist = "" # Based on h/w type, choose how many ports to use self.dut_ports = self.dut.get_ports() diff --git a/tests/TestSuite_eventdev_pipeline_perf.py b/tests/TestSuite_eventdev_pipeline_perf.py index 6e1fc636..361b47ee 100644 --- a/tests/TestSuite_eventdev_pipeline_perf.py +++ b/tests/TestSuite_eventdev_pipeline_perf.py @@ -81,7 +81,7 @@ class TestEventdevPipelinePerf(TestCase,IxiaPacketGenerator): self.perf_results = {'header': [], 'data': []} - self.blacklist = "" + self.blocklist = "" # Based on h/w type, choose how many ports to use self.dut_ports = self.dut.get_ports() diff --git a/tests/TestSuite_fdir.py b/tests/TestSuite_fdir.py index 1b7ad0ae..007db26d 100644 --- a/tests/TestSuite_fdir.py +++ b/tests/TestSuite_fdir.py @@ -166,7 +166,7 @@ class TestFdir(TestCase, IxiaPacketGenerator): self.dut_tx_interface = self.tester.get_interface(self.dut_rx_port) self.path=self.dut.apps_name['test-pmd'] - self.blacklist = "" + self.blocklist = "" self.headers_size = HEADER_SIZE['eth'] + HEADER_SIZE[ 'ip'] + HEADER_SIZE['udp'] diff --git a/tests/TestSuite_kni.py b/tests/TestSuite_kni.py index 3535f52c..ba946140 100644 --- a/tests/TestSuite_kni.py +++ b/tests/TestSuite_kni.py @@ -469,11 +469,11 @@ class TestKni(TestCase): return len(cores) - def make_white_list(self, target, nic): + def make_allow_list(self, target, nic): """ - Create white list with ports. + Create allow list with ports. """ - white_list = [] + allow_list = [] dut_ports = self.dut.get_ports(self.nic) self.dut.restore_interfaces() allPort = self.dut.ports_info @@ -482,8 +482,8 @@ class TestKni(TestCase): "insmod ./" + self.target + "/kmod/igb_uio.ko", "#") for port in range(0, len(allPort)): if port in dut_ports: - white_list.append(allPort[port]['pci']) - return white_list + allow_list.append(allPort[port]['pci']) + return allow_list # # @@ -943,9 +943,9 @@ class TestKni(TestCase): 'wrpcap("%s", [Ether(src=srcmac, dst="ff:ff:ff:ff:ff:ff")/IP(len=46)/UDP()/("X"*18)])' % pcap) self.tester.scapy_execute() - white_list = self.make_white_list(self.target, self.nic) + allow_list = self.make_allow_list(self.target, self.nic) port_virtual_interaces = [] - for port in white_list: + for port in allow_list: information = self.dut.send_expect( "./usertools/dpdk-devbind.py --status | grep '%s'" % port, "# ") data = information.split(' ') @@ -987,7 +987,7 @@ class TestKni(TestCase): self.dut.send_expect("ifconfig br1 down", "# ") self.dut.send_expect("brctl delbr \"br1\"", "# ", 30) - for port in white_list: + for port in allow_list: self.dut.send_expect( "./usertools/dpdk-devbind.py -b igb_uio %s" % (port), "# ") self.result_table_print() @@ -1117,10 +1117,10 @@ class TestKni(TestCase): dut_ports = self.dut.get_ports(self.nic) - white_list = self.make_white_list(self.target, self.nic) + allow_list = self.make_allow_list(self.target, self.nic) port_virtual_interaces = [] - for port in white_list: + for port in allow_list: # Enables the interfaces information = self.dut.send_expect( @@ -1206,7 +1206,7 @@ class TestKni(TestCase): self.result_table_print() - for port in white_list: + for port in allow_list: self.dut.send_expect( "./usertools/dpdk-devbind.py -b %s %s" % (self.drivername, port), "# ") diff --git a/tests/TestSuite_mac_filter.py b/tests/TestSuite_mac_filter.py index e4917116..112914d6 100644 --- a/tests/TestSuite_mac_filter.py +++ b/tests/TestSuite_mac_filter.py @@ -31,7 +31,7 @@ """ DPDK Test suite. -Test the support of Whitelist Features by Poll Mode Drivers +Test the support of Allowlist Features by Poll Mode Drivers """ import utils @@ -46,7 +46,7 @@ class TestMacFilter(TestCase): def set_up_all(self): """ Run at the start of each test suite. - Whitelist Prerequisites: + Allowlist Prerequisites: Two Ports testpmd can normally started """ @@ -82,7 +82,7 @@ class TestMacFilter(TestCase): self.max_mac_addr = utils.regexp(out, "Maximum number of MAC addresses: ([0-9]+)") - def whitelist_send_packet(self, portid, destMac="00:11:22:33:44:55", count=-1): + def allowlist_send_packet(self, portid, destMac="00:11:22:33:44:55", count=-1): """ Send 1 packet to portid. """ @@ -107,7 +107,7 @@ class TestMacFilter(TestCase): self.dut.send_expect("clear port stats all", "testpmd> ") # send one packet with the portid MAC address - self.whitelist_send_packet(portid, self.dest) + self.allowlist_send_packet(portid, self.dest) # Niantic and FVL have different packet statistics when using the # "show port stats" command. Packets number is stripped from log. @@ -119,7 +119,7 @@ class TestMacFilter(TestCase): # send one packet to a different MAC address # new_mac = self.dut.get_mac_address(portid) - self.whitelist_send_packet(portid, fake_mac_addr) + self.allowlist_send_packet(portid, fake_mac_addr) out = self.dut.get_session_output() # check the packet DO NOT increase self.verify("received" not in out, @@ -128,7 +128,7 @@ class TestMacFilter(TestCase): # add the different MAC address self.dut.send_expect("mac_addr add %d" % portid + " %s" % fake_mac_addr, "testpmd>") # send again one packet to a different MAC address - self.whitelist_send_packet(portid, fake_mac_addr) + self.allowlist_send_packet(portid, fake_mac_addr) out = self.dut.get_session_output() cur_rxpkt = utils.regexp(out, "received ([0-9]+) packets") # check the packet increase @@ -138,7 +138,7 @@ class TestMacFilter(TestCase): # remove the fake MAC address self.dut.send_expect("mac_addr remove %d" % portid + " %s" % fake_mac_addr, "testpmd>") # send again one packet to a different MAC address - self.whitelist_send_packet(portid, fake_mac_addr) + self.allowlist_send_packet(portid, fake_mac_addr) out = self.dut.get_session_output() # check the packet increase self.verify("received" not in out, @@ -195,14 +195,14 @@ class TestMacFilter(TestCase): self.dut.send_expect("clear port stats all", "testpmd> ") self.dut.send_expect(f"mcast_addr add {portid:d} {mcast_addr}", "testpmd>") - self.whitelist_send_packet(portid, mcast_addr, count=1) + self.allowlist_send_packet(portid, mcast_addr, count=1) time.sleep(1) out = self.dut.get_session_output() self.verify("received" in out, "Packet has not been received when it should have on a broadcast address") self.dut.send_expect(f"mcast_addr remove {portid:d} {mcast_addr}", "testpmd>") - self.whitelist_send_packet(portid, mcast_addr, count=1) + self.allowlist_send_packet(portid, mcast_addr, count=1) time.sleep(1) out = self.dut.get_session_output() self.verify("received" not in out, diff --git a/tests/TestSuite_nic_single_core_perf.py b/tests/TestSuite_nic_single_core_perf.py index 8266506b..8522421e 100644 --- a/tests/TestSuite_nic_single_core_perf.py +++ b/tests/TestSuite_nic_single_core_perf.py @@ -212,7 +212,7 @@ class TestNicSingleCorePerf(TestCase): """ Single core Performance Benchmarking test """ - # ports whitelist + # ports allowlist eal_para = "" for i in range(port_num): eal_para += " -w " + self.dut.ports_info[i]['pci'] diff --git a/tests/TestSuite_pmd.py b/tests/TestSuite_pmd.py index bef74293..48d35831 100644 --- a/tests/TestSuite_pmd.py +++ b/tests/TestSuite_pmd.py @@ -74,7 +74,7 @@ class TestPmd(TestCase): self.perf_results = {'header': [], 'data': []} - self.blacklist = "" + self.blocklist = "" # Update config file and rebuild to get best perf on FVL self.dut.send_expect("sed -i -e 's/CONFIG_RTE_LIBRTE_I40E_16BYTE_RX_DESC=n/CONFIG_RTE_LIBRTE_I40E_16BYTE_RX_DESC=y/' ./config/common_base", "#", 20) diff --git a/tests/TestSuite_runtime_vf_queue_number_maxinum.py b/tests/TestSuite_runtime_vf_queue_number_maxinum.py index 54399064..8e93c208 100644 --- a/tests/TestSuite_runtime_vf_queue_number_maxinum.py +++ b/tests/TestSuite_runtime_vf_queue_number_maxinum.py @@ -44,7 +44,7 @@ from pmd_output import PmdOutput class TestRuntimeVfQnMaxinum(TestCase): supported_vf_driver = ['igb_uio', 'vfio-pci'] rss_key = '6EA6A420D5138E712433B813AE45B3C4BECB2B405F31AD6C331835372D15E2D5E49566EE0ED1962AFA1B7932F3549520FD71C75E' - max_white_per_testpmd = 18 + max_allow_per_testpmd = 18 def set_up_all(self): self.verify(self.nic in ["fortville_eagle", "fortville_spirit", "fortville_25g", "fortpark_TLV","fortpark_BASE-T"], @@ -147,28 +147,28 @@ class TestRuntimeVfQnMaxinum(TestCase): """ pf_eal_param = '-w {} --file-prefix=test1 --socket-mem 1024,1024'.format(self.pf_pci) self.pf_pmdout.start_testpmd(self.pf_pmdout.default_cores, eal_param=pf_eal_param) - vf1_white_index = 0 - vf1_white_list = '' + vf1_allow_index = 0 + vf1_allow_list = '' vf2_queue_number = 0 - vf3_white_index = 0 - vf3_white_list = '' + vf3_allow_index = 0 + vf3_allow_list = '' if self.nic in ['fortville_eagle']: left_queues = 384 - 65 - 32 * 4 - vf1_white_index = left_queues / 16 + vf1_allow_index = left_queues / 16 vf2_queue_number = left_queues % 16 elif self.nic in ['fortville_25g', 'fortville_spirit', 'fortpark_TLV',"fortpark_BASE-T"]: left_queues = 768 - 65 - 64 * 4 - vf1_white_index = left_queues / 16 + vf1_allow_index = left_queues / 16 vf2_queue_number = left_queues % 16 - # The white list max length is 18 - if vf1_white_index > self.max_white_per_testpmd: - vf3_white_index = vf1_white_index % self.max_white_per_testpmd - vf1_white_index = vf1_white_index - vf3_white_index + # The allow list max length is 18 + if vf1_allow_index > self.max_allow_per_testpmd: + vf3_allow_index = vf1_allow_index % self.max_allow_per_testpmd + vf1_allow_index = vf1_allow_index - vf3_allow_index self.vf3_session = self.dut.new_session() self.vf3_pmdout = PmdOutput(self.dut, self.vf3_session) - self.logger.info('vf2_queue_number: {}, vf3_white_index: {}'.format(vf2_queue_number, vf3_white_index)) + self.logger.info('vf2_queue_number: {}, vf3_allow_index: {}'.format(vf2_queue_number, vf3_allow_index)) if vf2_queue_number > 0: # The driver will alloc queues as power of 2, and queue must be equal or less than 16 @@ -179,25 +179,25 @@ class TestRuntimeVfQnMaxinum(TestCase): for vf in self.sriov_vfs_port_0: vf_pcis.append(vf.pci) vf_pcis.sort() - for pci in vf_pcis[:vf1_white_index]: - vf1_white_list = vf1_white_list + '-w {} '.format(pci) - for pci in vf_pcis[vf1_white_index:vf1_white_index+vf3_white_index]: - vf3_white_list = vf3_white_list + '-w {} '.format(pci) + for pci in vf_pcis[:vf1_allow_index]: + vf1_allow_list = vf1_allow_list + '-w {} '.format(pci) + for pci in vf_pcis[vf1_allow_index:vf1_allow_index+vf3_allow_index]: + vf3_allow_list = vf3_allow_list + '-w {} '.format(pci) - self.logger.info('vf1 white list: {}'.format(vf1_white_list)) - self.logger.info('vf3_white_list: {}'.format(vf3_white_list)) + self.logger.info('vf1 allow list: {}'.format(vf1_allow_list)) + self.logger.info('vf3_allow_list: {}'.format(vf3_allow_list)) self.logger.info('vf2_queue_number: {}'.format(vf2_queue_number)) - vf1_eal_param = '{} --file-prefix=vf1 --socket-mem 1024,1024'.format(vf1_white_list) + vf1_eal_param = '{} --file-prefix=vf1 --socket-mem 1024,1024'.format(vf1_allow_list) self.start_testpmd_multiple_times(self.vf1_pmdout, '--rxq=16 --txq=16', vf1_eal_param) - if vf3_white_index > 0: - vf3_eal_param = '{} --file-prefix=vf3 --socket-mem 1024,1024'.format(vf3_white_list) + if vf3_allow_index > 0: + vf3_eal_param = '{} --file-prefix=vf3 --socket-mem 1024,1024'.format(vf3_allow_list) self.start_testpmd_multiple_times(self.vf3_pmdout, '--rxq=16 --txq=16', vf3_eal_param) if vf2_queue_number > 0: vf2_eal_param = '-w {} --file-prefix=vf2 --socket-mem 1024,1024'.format( - vf_pcis[vf1_white_index+vf3_white_index]) + vf_pcis[vf1_allow_index+vf3_allow_index]) self.vf2_pmdout.start_testpmd(self.vf2_pmdout.default_cores, param='--rxq={0} --txq={0}'.format( vf2_queue_number), eal_param=vf2_eal_param) @@ -207,7 +207,7 @@ class TestRuntimeVfQnMaxinum(TestCase): if vf2_queue_number > 0: vf2_out = self.vf2_pmdout.execute_cmd('show port info all') self.verify('Max possible RX queues: 16' in vf2_out, 'vf2 max RX queues is not 16') - if vf3_white_index > 0: + if vf3_allow_index > 0: vf3_out = self.vf3_pmdout.execute_cmd('show port info all') self.verify('Max possible RX queues: 16' in vf3_out, 'vf3 max RX queues is not 16') @@ -218,16 +218,16 @@ class TestRuntimeVfQnMaxinum(TestCase): vf2_out = self.vf2_pmdout.execute_cmd('start') self.verify('port 0: RX queue number: {0} Tx queue number: {0}'.format(vf2_queue_number) in vf2_out, 'vf2 actual RX/TX queues is not {}'.format(vf2_queue_number)) - if vf3_white_index > 0: + if vf3_allow_index > 0: vf3_out = self.vf3_pmdout.execute_cmd('start') self.verify('RX queue number: 16 Tx queue number: 16' in vf3_out, 'vf3 actual RX/TX queues is not 16') # Set all the ports share a same rss-hash key in testpmd vf1, vf3 - for i in range(vf1_white_index): + for i in range(vf1_allow_index): self.vf1_pmdout.execute_cmd('port config {} rss-hash-key ipv4 {}'.format(i, self.rss_key)) - for i in range(vf3_white_index): + for i in range(vf3_allow_index): self.vf3_pmdout.execute_cmd('port config {} rss-hash-key ipv4 {}'.format(i, self.rss_key)) # send packets to vf1/vf2, and check all the queues could receive packets @@ -235,22 +235,22 @@ class TestRuntimeVfQnMaxinum(TestCase): self.vf1_pmdout.execute_cmd('set promisc all on') if vf2_queue_number > 0: self.vf2_pmdout.execute_cmd('set promisc all on') - if vf3_white_index > 0: + if vf3_allow_index > 0: self.vf3_pmdout.execute_cmd('set promisc all on') self.send_packet('00:11:22:33:44:55', self.src_intf, 256) vf1_out = self.vf1_pmdout.execute_cmd('stop') if vf2_queue_number > 0: vf2_out = self.vf2_pmdout.execute_cmd('stop') - if vf3_white_index > 0: + if vf3_allow_index > 0: vf3_out = self.vf3_pmdout.execute_cmd('stop') # check all queues in vf1 can receive packets for i in range(16): - for j in range(vf1_white_index): + for j in range(vf1_allow_index): self.verify('Forward Stats for RX Port={:>2d}/Queue={:>2d}'.format(j, i) in vf1_out, 'Testpmd vf1 port {}, queue {} did not receive packet'.format(j, i)) - for m in range(vf3_white_index): + for m in range(vf3_allow_index): self.verify('Forward Stats for RX Port={:>2d}/Queue={:>2d}'.format(m, i) in vf3_out, 'Testpmd vf3 port {}, queue {} did not receive packet'.format(m, i)) diff --git a/tests/TestSuite_telemetry.py b/tests/TestSuite_telemetry.py index 7e474bc2..bf36e15b 100644 --- a/tests/TestSuite_telemetry.py +++ b/tests/TestSuite_telemetry.py @@ -222,7 +222,7 @@ class TestTelemetry(TestCase): # prepare telemetry tool self.rename_dpdk_telemetry_tool() - def get_whitelist(self, num=1, nic_types=2): + def get_allowlist(self, num=1, nic_types=2): self.used_ports = [] if len(self.dut_ports) < 4 or len(self.nic_grp) < nic_types: self.used_ports = self.dut_ports @@ -235,16 +235,16 @@ class TestTelemetry(TestCase): if info['pci'] not in pci_addrs: continue self.used_ports.append(index) - white_list = ' '.join(['-w ' + pci_addr for pci_addr in pci_addrs]) - return white_list + allow_list = ' '.join(['-w ' + pci_addr for pci_addr in pci_addrs]) + return allow_list - def start_telemetry_server(self, whitelist=None): + def start_telemetry_server(self, allowlist=None): if self.testpmd_status != 'close': return None # use dut first port's socket socket = self.dut.get_numa_id(0) config = "Default" - eal_option = '--telemetry ' + whitelist if whitelist else '--telemetry' + eal_option = '--telemetry ' + allowlist if allowlist else '--telemetry' output = self.testpmd.start_testpmd(config, eal_param=eal_option, socket=socket) @@ -498,8 +498,8 @@ class TestTelemetry(TestCase): self.verify(len(list(self.nic_grp.values())[0]) >= 2, msg) try: # check and verify error show on testpmd - whitelist = self.get_whitelist(num=2, nic_types=1) - self.start_telemetry_server(whitelist) + allowlist = self.get_allowlist(num=2, nic_types=1) + self.start_telemetry_server(allowlist) # check telemetry metric data self.check_metric_data() self.close_telemetry_server() @@ -527,8 +527,8 @@ class TestTelemetry(TestCase): pformat(self.nic_grp)]) self.verify(len(list(self.nic_grp.keys())) >= 2, msg) try: - whitelist = self.get_whitelist() - self.start_telemetry_server(whitelist) + allowlist = self.get_allowlist() + self.start_telemetry_server(allowlist) # check telemetry metric data self.check_metric_data() self.close_telemetry_server() diff --git a/tests/TestSuite_unit_tests_dump.py b/tests/TestSuite_unit_tests_dump.py index 336cce21..38b5fc48 100644 --- a/tests/TestSuite_unit_tests_dump.py +++ b/tests/TestSuite_unit_tests_dump.py @@ -208,8 +208,8 @@ class TestUnitTestsDump(TestCase): self.dut.send_expect(app_name + eal_params,"R.*T.*E.*>.*>", self.start_test_time) out = self.dut.send_expect("dump_devargs", "RTE>>", self.run_cmd_time * 2) self.dut.send_expect("quit", "# ") - black_str = " %s" % pci_address - self.verify(black_str in out, "Dump black list failed") + block_str = " %s" % pci_address + self.verify(block_str in out, "Dump block list failed") eal_params1 = self.dut.create_eal_parameters(cores=self.cores,ports=[pci_address]) app_name = self.dut.apps_name['test'] @@ -217,8 +217,8 @@ class TestUnitTestsDump(TestCase): out = self.dut.send_expect("dump_devargs", "RTE>>", self.run_cmd_time * 2) self.dut.send_expect("quit", "# ") - white_str = "[pci]: %s" % pci_address - self.verify(white_str in out, "Dump white list failed") + allow_str = "[pci]: %s" % pci_address + self.verify(allow_str in out, "Dump allow list failed") def test_dump_malloc_stats(self): """ diff --git a/tests/TestSuite_vf_single_core_perf.py b/tests/TestSuite_vf_single_core_perf.py index 05974eac..d40547cd 100644 --- a/tests/TestSuite_vf_single_core_perf.py +++ b/tests/TestSuite_vf_single_core_perf.py @@ -222,7 +222,7 @@ class TestVfSingleCorePerf(TestCase): """ Single core Performance Benchmarking test """ - # ports whitelist + # ports allowlist eal_para = "" for i in range(port_num): eal_para += " -w " + self.sriov_vfs_port[i][0].pci diff --git a/tests/perf_test_base.py b/tests/perf_test_base.py index 20f3e152..a00a6b05 100644 --- a/tests/perf_test_base.py +++ b/tests/perf_test_base.py @@ -135,7 +135,7 @@ class PerfTestBase(object): self.__vf_ports_info = None self.__is_bin_ps_on = None - self.__bin_ps_white_list = None + self.__bin_ps_allow_list = None self.__bin_ps_restart = True self.__pre_bin_ps_cmd = None self.__bin_ps_wait_up = 0 @@ -667,13 +667,13 @@ class PerfTestBase(object): "-n {mem_channel} " "--socket-mem={memsize} " "--file-prefix={prefix} " - "{whitelist} " + "{allowlist} " "-- -i ").format(**{ 'bin': self.__host_testpmd, 'core_mask': core_mask, 'mem_channel': self.dut.get_memory_channels(), 'memsize': mem_size, - 'whitelist': self.__get_testpmd_whitelist(), + 'allowlist': self.__get_testpmd_allowlist(), 'prefix': 'pf', }) self.__host_pmd_con([cmd, "testpmd> ", 120]) self.__is_pmd_on = True @@ -697,8 +697,8 @@ class PerfTestBase(object): self.__is_pmd_on = False def __get_topo_option(self): - port_num = len(re.findall('-w', self.__bin_ps_white_list)) \ - if self.__bin_ps_white_list else len(self.__valports) + port_num = len(re.findall('-w', self.__bin_ps_allow_list)) \ + if self.__bin_ps_allow_list else len(self.__valports) return 'loop' if port_num == 1 else 'chained' def __testpmd_start(self, mode, core_mask, config, frame_size): @@ -712,7 +712,7 @@ class PerfTestBase(object): "-v " "-c {cores} " "-n {channel} " - "{whitelist}" + "{allowlist}" "-- -i " "{config} " "{port_topo} " @@ -720,7 +720,7 @@ class PerfTestBase(object): 'bin': bin, 'cores': core_mask, 'channel': self.dut.get_memory_channels(), - 'whitelist': self.__bin_ps_white_list if self.__bin_ps_white_list else '', + 'allowlist': self.__bin_ps_allow_list if self.__bin_ps_allow_list else '', 'port_mask': utils.create_mask(self.__valports), 'config': _config, 'port_topo': port_topo, @@ -781,7 +781,7 @@ class PerfTestBase(object): "-v " "-c {cores} " "-n {channel} " - "{whitelist}" + "{allowlist}" "-- " "-p {port_mask} " "--config '{config}'" @@ -789,7 +789,7 @@ class PerfTestBase(object): 'bin': bin, 'cores': core_mask, 'channel': self.dut.get_memory_channels(), - 'whitelist': self.__bin_ps_white_list if self.__bin_ps_white_list else '', + 'allowlist': self.__bin_ps_allow_list if self.__bin_ps_allow_list else '', 'port_mask': utils.create_mask(self.__valports), 'config': config, }) suppored_nics = [ @@ -1339,8 +1339,8 @@ class PerfTestBase(object): return test_content - def __get_bin_ps_whitelist(self, port_list=None): - whitelist = '' + def __get_bin_ps_allowlist(self, port_list=None): + allowlist = '' if self.__mode is SUITE_TYPE.PF: if not port_list: return None @@ -1348,18 +1348,18 @@ class PerfTestBase(object): pci = self.dut.ports_info[port_index].get('pci') if not pci: continue - whitelist += '-w {} '.format(pci) + allowlist += '-w {} '.format(pci) else: - whitelist = ''.join(['-w {} '.format(pci) + allowlist = ''.join(['-w {} '.format(pci) for _, info in self.__vf_ports_info.items() for pci in info.get('vfs_pci')]) - return whitelist + return allowlist - def __get_testpmd_whitelist(self): - whitelist = ''.join(['-w {} '.format(info.get('pf_pci')) + def __get_testpmd_allowlist(self): + allowlist = ''.join(['-w {} '.format(info.get('pf_pci')) for _, info in self.__vf_ports_info.items()]) - return whitelist + return allowlist def __preset_port_list(self, test_content): port_list = test_content.get('port_list') @@ -1386,11 +1386,11 @@ class PerfTestBase(object): if self.__mode is SUITE_TYPE.VF: self.__vf_init() self.__vf_create() - self.__bin_ps_white_list = self.__get_bin_ps_whitelist() + self.__bin_ps_allow_list = self.__get_bin_ps_allowlist() if self.__pf_driver is not NIC_DRV.PCI_STUB: self.__start_host_testpmd() else: - self.__bin_ps_white_list = self.__get_bin_ps_whitelist(port_list) + self.__bin_ps_allow_list = self.__get_bin_ps_allowlist(port_list) # config streams self.__streams = self.__preset_streams() -- 2.17.1