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 C71DE456B8; Fri, 26 Jul 2024 16:13:37 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B7C7F42EE1; Fri, 26 Jul 2024 16:13:37 +0200 (CEST) Received: from mail-qk1-f175.google.com (mail-qk1-f175.google.com [209.85.222.175]) by mails.dpdk.org (Postfix) with ESMTP id 6241E42ED5 for ; Fri, 26 Jul 2024 16:13:36 +0200 (CEST) Received: by mail-qk1-f175.google.com with SMTP id af79cd13be357-7a1dfa92d8dso1647685a.2 for ; Fri, 26 Jul 2024 07:13:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1722003216; x=1722608016; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7V9GUgMeUOMMn3HzMRjrf/0bE/N2T9EzmZEdtWzZ70M=; b=hGZfz16WGBzTjufcLOlUNXlhfh26TpFVYGDDndNL0RTNUJQoSujIEYgadpFl39gCF6 7PH4BiCiGX6BmBtsoEGK1itBV1bhrHdxGGMn9nlZ98Lp5l0EK3S/v9TJ1YFklEfHgF/G egtQi2hh4wRr3aMeO5A61Zc8ZUX2+Jkq+g694= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722003216; x=1722608016; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7V9GUgMeUOMMn3HzMRjrf/0bE/N2T9EzmZEdtWzZ70M=; b=RRQ/AgPyZ/VPYBM6/Cn4FCo78Yyu2sqqNNi6dYJN6uzFq0dyKTNKm4MkZ28PHXSPgd szGNNwClLNigY8Jq22myz1LIpha2PhwmGQR3mfh7FjkWkDGmLQ4j1AKgGj+KSXgSQiOL eNlT2UEl+fWuCqXe33WGqvWQUIthrz6RAaz9QKtUYSO6GpVbEmm3Eu7vLnVEUx9TFFps Y6vpvwvGNq85AUE6Y+eK1hQQ5PA+LCU5EJsGkPljMJvoi35diXuqmEbqRgI3kYph2pUT PnM4AbIYFJhFugWlvMd1OuQ1xaIzKMBzNnt9+g3Jvmz1y0C74CgmmWlV8uKufzUOisnA zTXA== X-Gm-Message-State: AOJu0YwwfcDEsTF8J4l+emrDLcPb3UMKpfB1oYUcQHBbIl/ZnmHAwpcj eWw+HcqhyaDCbZu4Bjf4xKAbUAZvXtM/retK0Q9lDkcT+EwDflfU/mMFI1GQ5N8= X-Google-Smtp-Source: AGHT+IFLmwTb1znWtXy+IL9DntTWoS7LZ6h0p4zRWfNQ2V6osWZmm+e3F+t8k5D6Yy/uO6TC6q/Vog== X-Received: by 2002:a05:6214:d87:b0:6b9:3369:8427 with SMTP id 6a1803df08f44-6bb3e29ba81mr39633876d6.5.1722003215752; Fri, 26 Jul 2024 07:13:35 -0700 (PDT) Received: from localhost.unh.edu ([2606:4100:3880:1257::1003]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6bb3fb01b05sm16781266d6.134.2024.07.26.07.13.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jul 2024 07:13:35 -0700 (PDT) From: Nicholas Pratte To: 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, Nicholas Pratte Subject: [RFC PATCH v3 1/2] dts: add port config mtu options to testpmd shell Date: Fri, 26 Jul 2024 10:13:06 -0400 Message-ID: <20240726141307.14410-2-npratte@iol.unh.edu> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240726141307.14410-1-npratte@iol.unh.edu> References: <20240524183604.6925-1-npratte@iol.unh.edu> <20240726141307.14410-1-npratte@iol.unh.edu> MIME-Version: 1.0 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 Testpmd offers mtu configuration options that omit ethernet overhead calculations when set. This patch adds easy-of-use methods to leverage these runtime options. Bugzilla ID: 1421 Signed-off-by: Nicholas Pratte --- dts/framework/remote_session/testpmd_shell.py | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/dts/framework/remote_session/testpmd_shell.py b/dts/framework/remote_session/testpmd_shell.py index eda6eb320f..83f7961359 100644 --- a/dts/framework/remote_session/testpmd_shell.py +++ b/dts/framework/remote_session/testpmd_shell.py @@ -804,7 +804,25 @@ def show_port_stats(self, port_id: int) -> TestPmdPortStats: return TestPmdPortStats.parse(output) - def _close(self) -> None: + def configure_port_mtu(self, port_id: int, mtu_length: int) -> None: + """Set the MTU length on a designated port. + + Args: + port_id: The ID of the port being configured. + mtu_length: The length, in bytes, of the MTU being set. + """ + self.send_command(f"port config mtu {port_id} {mtu_length}") + + def configure_port_mtu_all(self, mtu_length: int) -> None: + """Set the MTU length on all designated ports. + + Args: + mtu_length: The MTU length to be set on all ports. + """ + for port in self.show_port_info_all(): + self.send_command(f"port config mtu {port.id} {mtu_length}") + + def close(self) -> None: """Overrides :meth:`~.interactive_shell.close`.""" self.stop() self.send_command("quit", "Bye...") -- 2.44.0