[dts][PATCH V1 2/6] tests/kernelpf_vf:add new suite to cover most of the basic vf cases
Tu, Lijuan
lijuan.tu at intel.com
Wed Jun 14 04:03:08 CEST 2023
> -----Original Message-----
> From: Zhimin Huang <zhiminx.huang at intel.com>
> Sent: Friday, June 9, 2023 2:28 AM
> To: dts at dpdk.org
> Cc: Huang, ZhiminX <zhiminx.huang at intel.com>
> Subject: [dts][PATCH V1 2/6] tests/kernelpf_vf:add new suite to cover most of
> the basic vf cases
>
> add kernelpf_vf new suite and refactor with func_test_base common module:
> cover kernelpf_iavf/vf_vlan/vf_macfilter/vf_rss/vf_xstats_check.
>
> Signed-off-by: Zhimin Huang <zhiminx.huang at intel.com>
> ---
> tests/TestSuite_kernelpf_vf.py | 1007 ++++++++++++++++++++++++++++++++
> 1 file changed, 1007 insertions(+)
> create mode 100644 tests/TestSuite_kernelpf_vf.py
>
......
> +
> + def test_vf_multicast(self):
> + self.rxtx_base.launch_testpmd()
> + self.rxtx_base.basic_multicast_check(
> + normal_mac=VF_MAC_ADDR, multicast_mac=MULTICAST_MAC_ADDR
> + )
> +
> + def test_vf_broadcast(self):
> + self.rxtx_base.launch_testpmd()
> + self.rxtx_base.basic_rx_check(packets_num=1,
> + packet_dst_mac=BROADCAST_MAC_ADDR)
I don't think it is a good idea to launch testpmd in every single case. It costs a lot of time.
A good suite and cases organization could avoid this and save a lot of execution time.
1. adjust test cases that could use same args for testpmd.
2. separate those testpmd with different args to other suites.
> +
> + def test_vf_queue_start_stop(self):
> + self.rxtx_base.launch_testpmd()
> + self.rxtx_base.basic_macfwd_check(
> + packet_num=4, dst_mac=VF_MAC_ADDR,
> rx_port=self.used_dut_rx_port
> + )
> + packets_captured, _, stats = self.rxtx_base.execute_fwd_check_process(
> + packets=self.rxtx_base.generate_random_packets(
> + dstmac=VF_MAC_ADDR, pktnum=4
> + ),
> + rx_port=self.used_dut_rx_port,
> + pmd_commands=["stop", "port 0 rxq 0 stop", "start"],
> + )
> + self.verify(
> + len(packets_captured) == 0
> + and stats[self.used_dut_rx_port]["TX-packets"] == 0,
> + "receive packet num is not match",
> + )
> + packets_captured, _, stats = self.rxtx_base.execute_fwd_check_process(
> + packets=self.rxtx_base.generate_random_packets(
> + dstmac=VF_MAC_ADDR, pktnum=4
> + ),
> + rx_port=self.used_dut_rx_port,
> + pmd_commands=["stop", "port 0 rxq 0 start", "port 1 txq 0 stop",
> "start"],
> + )
> + self.verify(
> + len(packets_captured) == 0
> + and stats[self.used_dut_rx_port]["TX-packets"] == 0,
> + "receive packet num is not match",
> + )
> + self.rxtx_base.basic_macfwd_check(
> + packet_num=4,
> + dst_mac=VF_MAC_ADDR,
> + rx_port=self.used_dut_rx_port,
> + pmd_commands=["stop", "port 1 txq 0 start", "start"],
> + )
> +
More information about the dts
mailing list