From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id DA14E9374 for ; Thu, 22 Oct 2015 03:02:34 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP; 21 Oct 2015 18:02:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,179,1444719600"; d="scan'208";a="816602815" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga001.fm.intel.com with ESMTP; 21 Oct 2015 18:02:33 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id t9M12VPe012539; Thu, 22 Oct 2015 09:02:31 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t9M12SYY015873; Thu, 22 Oct 2015 09:02:30 +0800 Received: (from yliu84x@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t9M12Su1015855; Thu, 22 Oct 2015 09:02:28 +0800 From: Yong Liu To: dts@dpdk.org Date: Thu, 22 Oct 2015 09:02:20 +0800 Message-Id: <1445475740-15671-4-git-send-email-yong.liu@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1445475740-15671-1-git-send-email-yong.liu@intel.com> References: <1445475740-15671-1-git-send-email-yong.liu@intel.com> Subject: [dts] [PATCH 3/3] tests: add l2fwd sample forwarding integrity check test X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Oct 2015 01:02:35 -0000 From: Marvin Liu Add new test case for check l2fwd sample forwarded packets. The case will meansure different core and queue configurations. Signed-off-by: Marvin Liu diff --git a/tests/TestSuite_l2fwd.py b/tests/TestSuite_l2fwd.py index 5c79cbf..e36bafb 100644 --- a/tests/TestSuite_l2fwd.py +++ b/tests/TestSuite_l2fwd.py @@ -113,7 +113,7 @@ class TestL2fwd(TestCase): self.dut.send_expect("fg", "l2fwd ", 5) self.dut.send_expect("^C", "# ", 5) - def test_port_testing(self): + def notest_port_testing(self): """ Check port forwarding. """ @@ -143,6 +143,33 @@ class TestL2fwd(TestCase): self.quit_l2fwd() + def test_l2fwd_integrity(self): + """ + Check port forwarding. + """ + # the cases use the first two ports + port_mask = dts.create_mask([self.dut_ports[0], self.dut_ports[1]]) + + core_mask = dts.create_mask(self.dut.get_core_list(self.core_config, + socket=self.ports_socket)) + for queues in self.test_queues: + + command_line = "./examples/l2fwd/build/app/l2fwd -n %d -c %s -- -q %s -p %s &" % \ + (self.dut.get_memory_channels(), core_mask, + str(queues['queues']), port_mask) + + self.dut.send_expect(command_line, "memory mapped", 60) + + tgen_input = [] + tx_port = self.tester.get_local_port(self.dut_ports[0]) + rx_port = self.tester.get_local_port(self.dut_ports[1]) + tgen_input.append((tx_port, rx_port)) + + result = self.tester.check_random_pkts(tgen_input, allow_miss=False) + self.verify(result != False, "Packet integrity check failed") + + self.quit_l2fwd() + def test_perf_l2fwd_performance(self): """ Benchmark performance for frame_sizes. -- 1.9.3