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 E6F314600F; Tue, 7 Jan 2025 17:14:57 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EB92740BA4; Tue, 7 Jan 2025 17:14:56 +0100 (CET) Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com [209.85.208.179]) by mails.dpdk.org (Postfix) with ESMTP id 011FA40676 for ; Tue, 7 Jan 2025 17:14:56 +0100 (CET) Received: by mail-lj1-f179.google.com with SMTP id 38308e7fff4ca-30241e6b540so13075611fa.3 for ; Tue, 07 Jan 2025 08:14:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1736266495; x=1736871295; darn=dpdk.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=5lNjFrWM8FGpHVOfz+SWtnoCD1ySb9//WVOYiLHnhvY=; b=jr2gjn/Wh0g7hLV1O45I56EwXWWLivcjVvyEbn3Zt5PHm2da6a4CAPtO8uisrcUm03 1keDvISY5WRALjZmvOvMopRgUMhT7CQCzjJFTwe2tMxYtsFAQ0aE/UaYBkrMc/hLpAtA 6gI3TDWWLFzuw31379gZAs5XDpWkN/T+SREdE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736266495; x=1736871295; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5lNjFrWM8FGpHVOfz+SWtnoCD1ySb9//WVOYiLHnhvY=; b=MtRWxsk5uFLgMifpoU1EV1xQ9LYPV9ixhtPXz39T5xIh/9+wuIJ0RMdAiuaPnGgRFl fKbBmr9x/S8NMnJvKyLIGv+A+pp5O7ucfGFec0v/nAt0NSIf6jo/QP9UaT3oaQbEvwWu wxTc5y5fk2jX79ll2061+aAS3iWaa2ThnmjkiiVukiOU/VQJwMxPzDcJnOqLE4sGwEYn BDTpLu2gKLGh9welVrnF9zIHNRrTIuKdm//DFZHwibj8SDZKgI5x4D5oKTgW5P48TgtU Bg0TD2oPbFD7xEWfQbLAVEcURpTP/VlsdAPFZEN1mTVm/l+FpZV89QS/8LvxxDgtt/md ueLA== X-Gm-Message-State: AOJu0YwttNg9TygzUZRI2sda74RqPGd1DSy8GSRRG3gAbjc8/p2cs/Ld YVsp6QNe/xb/0WObbfUPlebXm7SKYCrUm1nEe199g1kZ5Eevgdg/SLhyvUdOUqu0saanEF9bQNP U5s+qSpCXaJy7nkpb7Ii8iakAsTyQkxTYGXVcvA== X-Gm-Gg: ASbGncuUPMS67dY/4MtyORiTTwJ8MumfvPDKwr50VkbhCNjsbUVea0ldm9/72JOKGQ4 /2KQk4pmKLiZeLge7+/R7NaBtX31fh8MzNvQcRV6infb47WTiZF9E5A== X-Google-Smtp-Source: AGHT+IE4lJbmzUEck3WDFKsaLGlRFsdpDrHyYbTdYzKHSqGvgXNljlIIiAZMj4f7/cmUcibFWgrUDigG3nFoOYG/U6k= X-Received: by 2002:a2e:a54b:0:b0:300:3a15:8f18 with SMTP id 38308e7fff4ca-30468421c77mr66689411fa.0.1736266495374; Tue, 07 Jan 2025 08:14:55 -0800 (PST) MIME-Version: 1.0 References: <20250107141125.2611481-1-luca.vizzarro@arm.com> In-Reply-To: <20250107141125.2611481-1-luca.vizzarro@arm.com> From: Nicholas Pratte Date: Tue, 7 Jan 2025 11:14:44 -0500 Message-ID: Subject: Re: [PATCH] dts: fix MTU set command To: Luca Vizzarro Cc: dev@dpdk.org, Patrick Robb , Paul Szczepanek Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Thanks Luca! Reviewed-by: Nicholas Pratte On Tue, Jan 7, 2025 at 9:13=E2=80=AFAM Luca Vizzarro wrote: > > There are some PMDs that in order to set a scatter-offload-compatible > MTU size, they need to have started at least once since the startup of > testpmd. This fixes the behaviour of the command to start and stop the > ports before changing the MTU to ensure this happened > > Fixes: 9910db35962b ("dts: add MTU config methods to testpmd shell") > > Signed-off-by: Luca Vizzarro > Reviewed-by: Paul Szczepanek > --- > Hi there, > > sending a fix discovered after running pmd_buffer_scatter on Mellanox. > Which should just skip, but the capability checks fail. > > Best, > Luca > --- > dts/framework/remote_session/testpmd_shell.py | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/dts/framework/remote_session/testpmd_shell.py b/dts/framewor= k/remote_session/testpmd_shell.py > index d187eaea94..c01ee74b21 100644 > --- a/dts/framework/remote_session/testpmd_shell.py > +++ b/dts/framework/remote_session/testpmd_shell.py > @@ -1836,13 +1836,16 @@ def csum_set_hw( > {port_id}:\n{= csum_output}""" > ) > > + @requires_started_ports > @requires_stopped_ports > def set_port_mtu(self, port_id: int, mtu: int, verify: bool =3D True= ) -> None: > """Change the MTU of a port using testpmd. > > Some PMDs require that the port be stopped before changing the M= TU, and it does no harm to > stop the port before configuring in cases where it isn't require= d, so ports are stopped > - prior to changing their MTU. > + prior to changing their MTU. On the other hand, some PMDs requir= e that the port had already > + been started once since testpmd startup. Therefore, ports are al= so started before stopping > + them to ensure this has happened. > > Args: > port_id: ID of the port to adjust the MTU on. > -- > 2.43.0 >