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 ADCE945886; Wed, 28 Aug 2024 11:52:47 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 46E8B41132; Wed, 28 Aug 2024 11:52:47 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mails.dpdk.org (Postfix) with ESMTP id 8613740150 for ; Wed, 28 Aug 2024 11:52:46 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E0705DA7; Wed, 28 Aug 2024 02:53:11 -0700 (PDT) Received: from [10.57.17.80] (unknown [10.57.17.80]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 291C93F73B; Wed, 28 Aug 2024 02:52:44 -0700 (PDT) Message-ID: <7c2a0677-9815-4d6c-aeb8-6f35966db7d8@arm.com> Date: Wed, 28 Aug 2024 10:52:42 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH v3 2/2] dts: Initial Implementation For Jumbo Frames Test Suite To: Nicholas Pratte , probb@iol.unh.edu, dmarx@iol.unh.edu, jspewock@iol.unh.edu, luca.vizzarro@arm.com, yoan.picchi@foss.arm.com, Honnappa.Nagarahalli@arm.com, paul.szczepanek@arm.com, juraj.linkes@pantheon.tech Cc: dev@dpdk.org References: <20240524183604.6925-1-npratte@iol.unh.edu> <20240726141307.14410-1-npratte@iol.unh.edu> <20240726141307.14410-3-npratte@iol.unh.edu> Content-Language: en-US From: Alex Chapman In-Reply-To: <20240726141307.14410-3-npratte@iol.unh.edu> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Hi, Ive been looking into the MTU terminology and would just like to clarify some naming conventions and doc strings. On 7/26/24 15:13, Nicholas Pratte wrote: > +IP_HEADER_LEN = 20 > +ETHER_STANDARD_FRAME = 1500 > +ETHER_JUMBO_FRAME_MTU = 9000 For these constants, I am confused why one is "FRAME" and the other is "MTU". The value of 'ETHER_STANDARD_FRAME' is 1500 (the standard MTU size), it would make sense to rename it to 'ETHER_STANDARD_MTU', to keep naming consistent. If the value was 1518 instead of 1500, then `ETHER_STANDARD_FRAME` would be appropriate. > + def test_jumboframes_normal_nojumbo(self) -> None: > + """Assess the boundaries of packets sent less than or equal to the standard MTU length. > + > + PMDs are set to the standard MTU length of 1518 to assess behavior of sent packets less than > + or equal to this size. Sends two packets: one that is less than 1518 bytes, and another that > + is equal to 1518 bytes. The test case expects to receive both packets. > + > + Test: > + Start testpmd and send packets of sizes 1517 and 1518. > + """ > + with TestPmdShell( > + self.sut_node, tx_offloads=0x8000, mbuf_size=[9200], mbcache=200 > + ) as testpmd: > + testpmd.configure_port_mtu_all(ETHER_STANDARD_FRAME) > + testpmd.start() Renaming 'ETHER_STANDARD_FRAME' to 'ETHER_STANDARD_MTU' would reduce confusion here too. e.g. `testpmd.configure_port_mtu_all(ETHER_STANDARD_MTU)` Additionally, you state you are sending packets of sizes 1517 and 1518. but you then call: `self.send_packet_and_verify(ETHER_STANDARD_FRAME - 5)` `self.send_packet_and_verify(ETHER_STANDARD_FRAME)` Calculating to: `self.send_packet_and_verify(1495)` `self.send_packet_and_verify(1500)` Which is confusing. I believe this is because you are accounting for the 4 bytes of VLAN's in your calculations, but you might want to explain this. Overall very solid and clean test suite, just wanted to get clarification on a few areas 🙂. Alex