From patchwork Thu May 19 08:51:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ling, WeiX" X-Patchwork-Id: 111402 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 98D60A0503; Thu, 19 May 2022 10:52:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9289F40222; Thu, 19 May 2022 10:52:51 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id E2A1340140 for ; Thu, 19 May 2022 10:52:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652950370; x=1684486370; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=5AAKqz7JBuKnZch+Ad8eKePTXhlRJBFRP+5hj+0lufk=; b=L4uqCYMuv4pC4UZ1Hnk6N3q7n93Ej/kTc3uY0zo2cWV005qwktjmtI77 YvD5/O2wrlDyrD7CSon/njbTyLr5zhIVzChd2fpALWzet2T2ODTkop69L hGVCJoaK08C7ulR0mJwteoPQsjtpMNKYIG5C51YuzCTNeXiDH7hLx9mh5 R2hsVFf5UcD5pWez3faiM0dwFugXEuwrXY9VwDnU5xNrwoSecThTa77G+ rS/oJBW5xfvGK4S+ejnYaelwexgOEx87RirlyJyqLYHaAuk3zM5KvAUEV TxhuX91/6tJ/4/dZ0TIQfSA8jhE3+vh/J0O8dIG0ym2jKNmTv6NV6o/RB w==; X-IronPort-AV: E=McAfee;i="6400,9594,10351"; a="270924542" X-IronPort-AV: E=Sophos;i="5.91,237,1647327600"; d="scan'208";a="270924542" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 May 2022 01:52:49 -0700 X-IronPort-AV: E=Sophos;i="5.91,237,1647327600"; d="scan'208";a="598444135" Received: from unknown (HELO localhost.localdomain) ([10.239.251.222]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 May 2022 01:52:47 -0700 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Subject: [dts][PATCH V2 1/2] test_plans/dpdk_gro_lib_test_plan: delete CBDMA related testcases Date: Thu, 19 May 2022 04:51:26 -0400 Message-Id: <20220519085126.2817429-1-weix.ling@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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 Delete CBDMA related testcases. Signed-off-by: Wei Ling --- test_plans/dpdk_gro_lib_test_plan.rst | 58 --------------------------- 1 file changed, 58 deletions(-) diff --git a/test_plans/dpdk_gro_lib_test_plan.rst b/test_plans/dpdk_gro_lib_test_plan.rst index 88ef971a..e90cf931 100644 --- a/test_plans/dpdk_gro_lib_test_plan.rst +++ b/test_plans/dpdk_gro_lib_test_plan.rst @@ -404,61 +404,3 @@ NIC2(In kernel) -> NIC1(DPDK) -> testpmd(csum fwd) -> Vhost -> Virtio-net Host side : taskset -c 35 ip netns exec ns1 iperf -c 1.1.1.2 -i 1 -t 60 -m -P 2 VM side: iperf -s - -Test Case6: DPDK GRO test with two queues and two CBDMA channels using tcp/ipv4 traffic -======================================================================================= - -Test flow -========= - -NIC2(In kernel) -> NIC1(DPDK) -> testpmd(csum fwd) -> Vhost -> Virtio-net - -1. Connect two nic port directly, put nic2 into another namesapce and turn on the tso of this nic port by below cmds:: - - ip netns del ns1 - ip netns add ns1 - ip link set enp26s0f0 netns ns1 # [enp216s0f0] is the name of nic2 - ip netns exec ns1 ifconfig enp26s0f0 1.1.1.8 up - ip netns exec ns1 ethtool -K enp26s0f0 tso on - -2. Bind cbdma port and nic1 to vfio-pci, launch vhost-user with testpmd and set flush interval to 1:: - - ./usertools/dpdk-devbind.py -b vfio-pci xx:xx.x - ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 29-31 -n 4 \ - --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=2,dmas=[txq0@80:04.0;txq1@80:04.1]' -- -i --txd=1024 --rxd=1024 --txq=2 --rxq=2 --nb-cores=2 - set fwd csum - stop - port stop 0 - port stop 1 - csum set tcp hw 0 - csum set ip hw 0 - csum set tcp hw 1 - csum set ip hw 1 - set port 0 gro on - set gro flush 1 - port start 0 - port start 1 - start - -3. Set up vm with virto device and using kernel virtio-net driver:: - - taskset -c 31 /home/qemu-install/qemu-4.2.1/bin/qemu-system-x86_64 -name us-vhost-vm1 \ - -cpu host -enable-kvm -m 2048 -object memory-backend-file,id=mem,size=2048M,mem-path=/mnt/huge,share=on \ - -numa node,memdev=mem \ - -mem-prealloc -monitor unix:/tmp/vm2_monitor.sock,server,nowait -netdev user,id=yinan,hostfwd=tcp:127.0.0.1:6005-:22 -device e1000,netdev=yinan \ - -smp cores=1,sockets=1 -drive file=/home/osimg/ubuntu2004.img \ - -chardev socket,id=char0,path=./vhost-net \ - -netdev type=vhost-user,id=mynet1,chardev=char0,vhostforce,queues=2 \ - -device virtio-net-pci,mac=52:54:00:00:00:01,netdev=mynet1,mrg_rxbuf=on,csum=on,gso=on,host_tso4=on,guest_tso4=on,mq=on,vectors=15 \ - -vnc :10 -daemonize - -4. In vm, config the virtio-net device with ip and turn the kernel gro off:: - - ifconfig ens4 1.1.1.2 up # [ens3] is the name of virtio-net - ethtool -L ens4 combined 2 - ethtool -K ens4 gro off - -5. Start iperf test, run iperf server at vm side and iperf client at host side, check throughput, should be larger than 10Gbits/sec:: - - Host side : taskset -c 35 ip netns exec ns1 iperf -c 1.1.1.2 -i 1 -t 60 -m -P 2 - VM side: iperf -s From patchwork Thu May 19 08:51:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ling, WeiX" X-Patchwork-Id: 111403 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B72E0A0503; Thu, 19 May 2022 10:53:01 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B2AB240156; Thu, 19 May 2022 10:53:01 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id AAADE40140 for ; Thu, 19 May 2022 10:52:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652950379; x=1684486379; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=jt7JuxBfRsOCmPL/XhPRK8j34WbD1nD3yA4OokrJNvk=; b=Nj2WA1gJRdZ1uIp9n6kHQvLzNcUTyMOj9GX9QnaKW62lK7Qa5pJoX9A2 Dkx4tlGLYgtOYy94RoM/y9JDujZ4sUe48WvDiVMIHKJpCadUpah9LHEFV X2BwdAsUHv9c7dZ2eXsl37NX6DQ2TK9gPqfWBItSSPmxUC9bSbv9U/7XI 1b1czltweEoETO6q7FQkgx1BSBI271jli8GI6vuttAQF0vu4dR0zZweEP RAch2D8VpAYrBgAhSEqliMC7CtoXaXy12p4UJos/fU8qF5YSHV3UyoOeG gNUUndhQ67q8LjDgL5mxEZ9vJeZbKFoWNVWxgvEUd9XYKX902q46V6MFt A==; X-IronPort-AV: E=McAfee;i="6400,9594,10351"; a="269688247" X-IronPort-AV: E=Sophos;i="5.91,237,1647327600"; d="scan'208";a="269688247" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 May 2022 01:52:58 -0700 X-IronPort-AV: E=Sophos;i="5.91,237,1647327600"; d="scan'208";a="598444200" Received: from unknown (HELO localhost.localdomain) ([10.239.251.222]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 May 2022 01:52:56 -0700 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Subject: [dts][PATCH V2 2/2] tests/dpdk_gro_lib: delete CBDMA related testcases and code Date: Thu, 19 May 2022 04:51:35 -0400 Message-Id: <20220519085135.2817489-1-weix.ling@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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 Delete CBDMA related testcases and code. Signed-off-by: Wei Ling Tested-by: Chenyu Huang Acked-by: Xingguang He --- tests/TestSuite_dpdk_gro_lib.py | 149 +++----------------------------- 1 file changed, 13 insertions(+), 136 deletions(-) diff --git a/tests/TestSuite_dpdk_gro_lib.py b/tests/TestSuite_dpdk_gro_lib.py index e19b3695..e1c095da 100644 --- a/tests/TestSuite_dpdk_gro_lib.py +++ b/tests/TestSuite_dpdk_gro_lib.py @@ -105,10 +105,6 @@ class TestDPDKGROLib(TestCase): self.prepare_dpdk() self.base_dir = self.dut.base_dir.replace("~", "/root") self.ports_socket = self.dut.get_numa_id(self.dut_ports[0]) - # get cbdma device - self.cbdma_dev_infos = [] - self.dmas_info = None - self.device_str = None def set_up(self): # @@ -119,59 +115,6 @@ class TestDPDKGROLib(TestCase): self.dut.send_expect("killall -s INT %s" % self.testpmd_name, "#") self.dut.send_expect("killall -s INT qemu-system-x86_64", "#") - def get_cbdma_ports_info_and_bind_to_dpdk(self, cbdma_num): - """ - get all cbdma ports - """ - out = self.dut.send_expect( - "./usertools/dpdk-devbind.py --status-dev dma", "# ", 30 - ) - device_info = out.split("\n") - for device in device_info: - pci_info = re.search("\s*(0000:\S*:\d*.\d*)", device) - if pci_info is not None: - dev_info = pci_info.group(1) - # the numa id of ioat dev, only add the device which - # on same socket with nic dev - bus = int(dev_info[5:7], base=16) - if bus >= 128: - cur_socket = 1 - else: - cur_socket = 0 - if self.ports_socket == cur_socket: - self.cbdma_dev_infos.append(pci_info.group(1)) - self.verify( - len(self.cbdma_dev_infos) >= cbdma_num, - "There no enough cbdma device to run this suite", - ) - used_cbdma = self.cbdma_dev_infos[0:cbdma_num] - dmas_info = "" - for dmas in used_cbdma: - number = used_cbdma.index(dmas) - dmas = "txq{}@{};".format(number, dmas) - dmas_info += dmas - self.dmas_info = dmas_info[:-1] - self.device_str = " ".join(self.cbdma_dev_infos) - self.dut.send_expect( - "./usertools/dpdk-devbind.py --force --bind=%s %s" - % (self.drivername, self.device_str), - "# ", - 60, - ) - - def bind_cbdma_device_to_kernel(self): - if self.device_str is not None: - self.dut.send_expect("modprobe ioatdma", "# ") - self.dut.send_expect( - "./usertools/dpdk-devbind.py -u %s" % self.device_str, "# ", 30 - ) - self.dut.send_expect( - "./usertools/dpdk-devbind.py --force --bind=ioatdma %s" - % self.device_str, - "# ", - 60, - ) - def launch_testpmd_gro_on(self, mode=1, queue=1): # # Launch the vhost sample with different parameters @@ -179,37 +122,19 @@ class TestDPDKGROLib(TestCase): # mode 2 : tcp traffic heavy mode # mode 3 : vxlan traffic light mode # mode 4 : tcp traffic flush 4 - # mode 5 : tcp traffice light mode with cdbma enable - if mode == 5: - self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=2) - eal_param = self.dut.create_eal_parameters( - cores=self.vhost_list, - vdevs=[ - "'net_vhost0,iface=%s/vhost-net,queues=%s,dmas=[%s]'" - % (self.base_dir, queue, self.dmas_info) - ], - ) - self.testcmd_start = ( - self.path + eal_param + " -- -i --txd=1024 --rxd=1024 --txq=2 --rxq=2" - ) - self.vhost_user = self.dut.new_session(suite="user") - self.vhost_user.send_expect(self.testcmd_start, "testpmd> ", 120) - else: - eal_param = self.dut.create_eal_parameters( - cores=self.vhost_list, - vdevs=[ - "net_vhost0,iface=%s/vhost-net,queues=%s" % (self.base_dir, queue) - ], - ports=[self.pci], - ) - self.testcmd_start = ( - self.path - + eal_param - + " -- -i --enable-hw-vlan-strip --tx-offloads=0x00 --txd=1024 --rxd=1024" - ) - self.vhost_user = self.dut.new_session(suite="user") - self.vhost_user.send_expect(self.testcmd_start, "testpmd> ", 120) - self.set_testpmd_params() + eal_param = self.dut.create_eal_parameters( + cores=self.vhost_list, + vdevs=["net_vhost0,iface=%s/vhost-net,queues=%s" % (self.base_dir, queue)], + ports=[self.pci], + ) + self.testcmd_start = ( + self.path + + eal_param + + " -- -i --enable-hw-vlan-strip --tx-offloads=0x00 --txd=1024 --rxd=1024" + ) + self.vhost_user = self.dut.new_session(suite="user") + self.vhost_user.send_expect(self.testcmd_start, "testpmd> ", 120) + self.set_testpmd_params() def set_testpmd_params(self, mode=1): # set testpmd params @@ -513,53 +438,6 @@ class TestDPDKGROLib(TestCase): self.quit_testpmd() self.dut.send_expect("killall -s INT qemu-system-x86_64", "#") - def test_vhost_gro_tcp_ipv4_with_cbdma_enable(self): - self.config_kernel_nic_host(0) - self.heavymode = 5 - self.launch_testpmd_gro_on(self.heavymode, queue=2) - self.start_vm(mode=5, queue=2) - time.sleep(5) - self.dut.get_session_output(timeout=2) - # Get the virtio-net device name - for port in self.vm1_dut.ports_info: - self.vm1_intf = port["intf"] - # Start the Iperf test - self.vm1_dut.send_expect("ifconfig -a", "#", 30) - self.vm1_dut.send_expect( - "ifconfig %s %s up" % (self.vm1_intf, self.virtio_ip1), "#", 10 - ) - self.vm1_dut.send_expect("ethtool -L %s combined 2" % self.vm1_intf, "#", 10) - self.vm1_dut.send_expect("ethtool -K %s gro off" % (self.vm1_intf), "#", 10) - self.set_testpmd_params() - self.vm1_dut.send_expect("iperf -s", "", 10) - self.dut.send_expect("rm /root/iperf_client.log", "#", 10) - out = self.dut.send_expect( - "ip netns exec ns1 iperf -c %s -i 1 -t 60 -m -P 2 > /root/iperf_client.log &" - % (self.virtio_ip1), - "", - 180, - ) - time.sleep(30) - print(out) - perfdata = self.iperf_result_verify("GRO lib") - print(("the GRO lib %s " % (self.output_result))) - # self.dut.send_expect('rm /root/iperf_client.log', '#', 10) - self.quit_testpmd() - self.dut.send_expect("killall -s INT qemu-system-x86_64", "#") - exp_perfdata = self.dut.send_expect( - "cat /root/dpdk_gro_lib_on_iperf_tc5.log", "#" - ) - self.verify( - "No such file or directory" not in exp_perfdata, - "Cannot find dpdk_gro_lib_on_iperf_tc5.log, please run test_vhost_gro_with_2queues_tcp_lightmode firstly", - ) - if exp_perfdata: - self.verify( - float(perfdata) > float(exp_perfdata), - "TestFailed: W/cbdma iperf data is %s Kbits/sec, W/O cbdma iperf data is %s Kbits/sec" - % (perfdata, exp_perfdata), - ) - def test_vhost_gro_with_2queues_tcp_lightmode(self): """ Test Case5: DPDK GRO test with 2 queues using tcp/ipv4 traffic @@ -626,7 +504,6 @@ class TestDPDKGROLib(TestCase): "# ", 30, ) - self.bind_cbdma_device_to_kernel() def tear_down_all(self): """