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 36791A0561; Fri, 5 Mar 2021 07:07:10 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0A8784068C; Fri, 5 Mar 2021 07:07:10 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 7880C40147 for ; Fri, 5 Mar 2021 07:07:08 +0100 (CET) IronPort-SDR: F4AcGRXfQZ4mJgsWNuNES4jpjZRZV6cWWRWorsBULZKxgSDAc98OOuWrrFjgWwjbbvfTEPEZn+ IhXc3fLtzuTQ== X-IronPort-AV: E=McAfee;i="6000,8403,9913"; a="187634695" X-IronPort-AV: E=Sophos;i="5.81,224,1610438400"; d="scan'208";a="187634695" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Mar 2021 22:07:07 -0800 IronPort-SDR: z7NBrT88aev7UU7iIjik1I8zyPZ/nvWx3DFSevH6lpsyY51zxfz0LOidzKxSK6INoVl2FyHpyv jbM77sdZMnsg== X-IronPort-AV: E=Sophos;i="5.81,224,1610438400"; d="scan'208";a="408161523" Received: from unknown (HELO localhost.localdomain) ([10.240.183.80]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Mar 2021 22:07:05 -0800 From: Xia Yan To: dts@dpdk.org Cc: Xia Yan Date: Fri, 5 Mar 2021 14:11:14 +0800 Message-Id: <20210305061114.20117-1-yanx.xia@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dts] [PATCH V2] tests/mtu_update: change ixgbe launch testpmd 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" launch testpmd with "--max-pkt-len=9500 --tx-offloads=0x8000 --enable-scatter -a" add ixgbe Signed-off-by: Xia Yan --- tests/TestSuite_mtu_update.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/TestSuite_mtu_update.py b/tests/TestSuite_mtu_update.py index 239272f2..5fa17c97 100644 --- a/tests/TestSuite_mtu_update.py +++ b/tests/TestSuite_mtu_update.py @@ -108,8 +108,12 @@ class TestMtuUpdate(TestCase): # The packet total size include ethernet header, ip header, and payload. # ethernet header length is 18 bytes, ip standard header length is 20 bytes. # pktlen = pktsize - ETHER_HEADER_LEN - max_pktlen = pktsize + ETHER_HEADER_LEN + VLAN * 2 - padding = max_pktlen - IP_HEADER_LEN - ETHER_HEADER_LEN + if self.kdriver == "ixgbe": + max_pktlen = pktsize + ETHER_HEADER_LEN + VLAN + padding = max_pktlen - IP_HEADER_LEN - ETHER_HEADER_LEN-VLAN + else: + max_pktlen = pktsize + ETHER_HEADER_LEN + VLAN * 2 + padding = max_pktlen - IP_HEADER_LEN - ETHER_HEADER_LEN out = self.send_scapy_packet(port_id, f'Ether(dst=dutmac, src="52:00:00:00:00:00")/IP()/Raw(load="\x50"*{padding})') return out @@ -222,18 +226,17 @@ class TestMtuUpdate(TestCase): """ Sends a packet of the given size into the testing machine. """ - if self.kdriver == "mlx5_core" or self.kdriver == "mlx4_core": + if self.kdriver == "mlx5_core" or self.kdriver == "mlx4_core" or self.kdriver == "ixgbe": # Mellanox will need extra options to start testpmd self.pmdout.start_testpmd("Default", "--max-pkt-len=9500 --tx-offloads=0x8000 --enable-scatter -a") else: self.pmdout.start_testpmd("Default") - + self.exec("port stop all") self.exec(f"port config mtu 0 {packet_size:d}") self.exec(f"port config mtu 1 {packet_size:d}") self.verify(int(self.pmdout.get_detail_from_port_info("MTU: ", "\d+", 0)) == packet_size, "MTU did not update") self.verify(int(self.pmdout.get_detail_from_port_info("MTU: ", "\d+", 1)) == packet_size, "MTU did not update") - self.exec("port start all") self.exec("set fwd mac") self.exec("start") -- 2.17.1