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 60A28A00C3; Fri, 13 May 2022 11:13:25 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 569B040E64; Fri, 13 May 2022 11:13:25 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id C076040DDE for ; Fri, 13 May 2022 11:13:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652433204; x=1683969204; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=3m46P3kQDPGUYhU+Mf6E4cv+jrtHFyw+YyGYOEgG1DE=; b=YaUUONfaj5MiwNrltivKLEM1mWZN+R/QHNJyIGJN8jCGyrcwKdbDR+Bb UPbMwrPc1gQJGMNCPuSxj+968RvYis9iGrWtEWZizapmfWfIILtc+QKJl rvNEjDU57gGCNKi9lTHTZurhhxV207+y8GuXXpc9ewwWw1QAKbBUllDRO 7loVh6T32Xa8rkm/3pWuwONWpjk73NQlvXvHN7i3kj1eUGlCYIEt+991Q OMyRqpBpf4IrT1Kj2nwtPC2Q7bSCC5mVlyugjfB7u4FDDzf+2SuZ9gKi4 9pWdRXbP4y63hRp6AYKKn3zjv4Y+FuEANkKqvI+5VD5DVs6z7zGVYv5LD Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10345"; a="270393916" X-IronPort-AV: E=Sophos;i="5.91,221,1647327600"; d="scan'208";a="270393916" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 May 2022 02:13:22 -0700 X-IronPort-AV: E=Sophos;i="5.91,221,1647327600"; d="scan'208";a="659018276" Received: from shwdenpg560.ccr.corp.intel.com ([10.253.109.11]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 May 2022 02:13:21 -0700 From: "Li, WeiyuanX" To: dts@dpdk.org, yuan.peng@intel.com Cc: Weiyuan Li Subject: [dts][PATCH V2 1/2] tests/smoke_base modify ixgbe support vf jumbo verify. Date: Fri, 13 May 2022 17:13:08 +0800 Message-Id: <20220513091309.2890-1-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.34.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 From: Weiyuan Li the ixgbe NIC only supports one global MTU per physical port. So when the user sets different MTUs on PF and VF ports in one physical port, the real MTU for all these PF and VF ports is the largest value set. This behavior is based on the kernel driver behavior. So, modify script supports the verification packet sent is greater than PF MTU for ixgbe driver. Signed-off-by: Weiyuan Li --- v2: -Add comments to vf_smoke script. -Modify the general method to add PF MTU in smoke script. tests/smoke_base.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/tests/smoke_base.py b/tests/smoke_base.py index bb49c784..f1d1d193 100644 --- a/tests/smoke_base.py +++ b/tests/smoke_base.py @@ -51,12 +51,23 @@ class SmokeTest(object): setattr(self, name, kwargs[name]) def send_pkg_return_stats( - self, pkt_size=COMMON_PKT_LEN, l3_src=IPV4_SRC, l3_dst=IPV4_DST, rss=False + self, pkt_size=COMMON_PKT_LEN, l3_src=IPV4_SRC, l3_dst=IPV4_DST, rss=False, driver=None ): self.test_case.dut.send_expect("clear port stats all", "testpmd> ") l3_len = pkt_size - HEADER_SIZE["eth"] payload = pkt_size - HEADER_SIZE["eth"] - HEADER_SIZE["ip"] hash_flag = False + # For ixgbe, jumbo frame is not supported. MTU is determined by pf. + # so, testpmd max-pkt-len=9000 don't work. + # Although the user can set the MTU separately on PF and VF ports, + # the ixgbe NIC only supports one global MTU per physical port. + # So when the user sets different MTUs on PF and VF ports in one physical port, + # the real MTU for all these PF and VF ports is the largest value set. + # This behavior is based on the kernel driver behavior. + # The packet sent is greater than PF MTU 9000, the payload equal to 8083, + # PF received packet MTU = payload + IP, 8083 + 20 = 9001 + if driver == 'ixgbe': + payload = pkt_size - HEADER_SIZE["eth"] if rss: pkt = [] # generate PACKAGE_COUNT count package, the IP dst is random. @@ -113,14 +124,14 @@ class SmokeTest(object): return queues[0], stats return None, stats - def check_jumbo_frames(self): + def check_jumbo_frames(self, kdriver=None): """ The packet total size include ethernet header, ip header, and payload. ethernet header length is 18 bytes, ip standard header length is 20 bytes. The packet forwarded failed. """ pkg_size = JUMBO_FRAME_LENGTH + 1 - queues, stats = self.send_pkg_return_stats(pkg_size) + queues, stats = self.send_pkg_return_stats(pkg_size, driver=kdriver) if 1 != stats["RX-errors"] and 0 != stats["TX-packets"]: self.test_case.logger.info( "jumbo frame: The RX[{}] or TX[{}] packet error".format( -- 2.18.2