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 5399146054; Thu, 16 Jan 2025 06:16:27 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 095304025F; Thu, 16 Jan 2025 06:16:27 +0100 (CET) Received: from mail-pj1-f42.google.com (mail-pj1-f42.google.com [209.85.216.42]) by mails.dpdk.org (Postfix) with ESMTP id 960A940156 for ; Thu, 16 Jan 2025 06:16:25 +0100 (CET) Received: by mail-pj1-f42.google.com with SMTP id 98e67ed59e1d1-2ee76befe58so975351a91.2 for ; Wed, 15 Jan 2025 21:16:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1737004585; x=1737609385; darn=dpdk.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=SnHx5oDgcV3XGiWO38dMZ4QBRiQ9T2hVHg7d3D6JMA8=; b=HPfQLVie8kBnXkiaK1oG7vSuWD1Hv74Ywk5tGbYgTR5LR9feEW1l268xZNZDA5TXUA 69rtJMsZUd+Jzrb9/Lgm6umoOsTFypKvMrJ94lYl2ptkYuhc4h9VTIbbPM338LS8j+8p xchbGud0hc5P/vU73n9NLDCpJ1oVfrWdx75hs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737004585; x=1737609385; h=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=SnHx5oDgcV3XGiWO38dMZ4QBRiQ9T2hVHg7d3D6JMA8=; b=SenUI3DZCB2hVlMQL4fZ7RkQqq3s4y5Bzi2N23NeLoZJsukaSKTasymXesspE/JBzU 0hdg741KdSYzTBDAOT4ElR66HOrjRk6ciWzZLx+vIcKF4S8gLEZIXb0zKRv01q4y2R2s orL38BtssULlK30pL2xGdnYAjnd9YjzwK1etwtg7N+3jwlwoS+rUqtLMEnOxGxpmi5cs uIGsRb2P4SQLwA3ezQpQghCjPef9+qSzPL6Jv6XYKEBh2m5KJ1ymW2hEb8U8g4j/lz/9 pGGFOV5LXhN+3uqubkLtY/ceW9aZS4qUwJ29o8d9DI+GLUTvBkxCDBAUTE08KvQxc85i cS3g== X-Forwarded-Encrypted: i=1; AJvYcCV0hhs3uRPApFA5XWTzYHJniS3Pub9sf131F0paj0RgaKV6hvMnOFgT/7/78S3CG+drgkA=@dpdk.org X-Gm-Message-State: AOJu0YwywKYXqhFIPG/YdY2/xO1+duSI1041KbjKf6hAosD0/0mcO96P MFQOsVHtbSlPwId59CZTs6Oe53HU5fVLBfKV4+Xo0XnocYSbRSSu5xuUbH2k4sMCdmV9utL/1lU +gDJZoIVPETYmx4MYzs/tdxH6vPMtg2qStf7Rpw== X-Gm-Gg: ASbGnctv3AH+kXbQWQQAHGPT7NAqcWdAEZs+nWP5TPgcA0bmh90Me6XTi8nodF5KF/C jU/aapjEllPrZUBTIaEhdi+R94Rm/3xx8e4sC+Xbug7/NCLlYZdO+vA== X-Google-Smtp-Source: AGHT+IF6MUpo5p+l/s7YMxQA1z0pL3VhFI1LPYC7vxzuXCVwgRBAm8ozspdwlfbn+/HgX0ReU6VgkV9/XqKidMefflA= X-Received: by 2002:a17:90b:51c8:b0:2f4:4003:f3d4 with SMTP id 98e67ed59e1d1-2f548f5f883mr44980227a91.30.1737004584838; Wed, 15 Jan 2025 21:16:24 -0800 (PST) MIME-Version: 1.0 References: <20241010202104.15364-2-dmarx@iol.unh.edu> <20250115162959.12975-1-dmarx@iol.unh.edu> In-Reply-To: <20250115162959.12975-1-dmarx@iol.unh.edu> From: Patrick Robb Date: Thu, 16 Jan 2025 00:13:34 -0500 X-Gm-Features: AbW1kvYkhQb7o8E4hxrVhy5TGwONWGD2-szMdV5k3icn8ULWvC3jSP-W1uW_K-g Message-ID: Subject: Re: [PATCH v8 1/2] dts: add multicast set function to shell To: Dean Marx Cc: npratte@iol.unh.edu, luca.vizzarro@arm.com, yoan.picchi@foss.arm.com, Honnappa.Nagarahalli@arm.com, paul.szczepanek@arm.com, dev@dpdk.org Content-Type: multipart/alternative; boundary="00000000000040cd07062bcbe549" 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 --00000000000040cd07062bcbe549 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Dean. This looks good to me, though I agree Luca's point about show_port_info_all() is compelling. We are enforcing the paired topology today but may not always. I don't view it as something which should block the testsuite, but this is worth tracking. Can you make a Bugzilla ticket for this, and add to the minutes for the DTS meeting (either tomorrow or 2 weeks)? Reviewed-by: Patrick Robb On Wed, Jan 15, 2025 at 11:30=E2=80=AFAM Dean Marx wrot= e: > Add set multicast function for changing allmulticast mode > within testpmd shell. > > Signed-off-by: Dean Marx > --- > dts/framework/remote_session/testpmd_shell.py | 24 +++++++++++++++++++ > 1 file changed, 24 insertions(+) > > diff --git a/dts/framework/remote_session/testpmd_shell.py > b/dts/framework/remote_session/testpmd_shell.py > index aa55bd91d3..94ff14a0a6 100644 > --- a/dts/framework/remote_session/testpmd_shell.py > +++ b/dts/framework/remote_session/testpmd_shell.py > @@ -1795,6 +1795,30 @@ def show_port_stats(self, port_id: int) -> > TestPmdPortStats: > > return TestPmdPortStats.parse(output) > > + def set_multicast_all(self, on: bool, verify: bool =3D True): > + """Turns multicast mode on/off for the specified port. > + > + Args: > + on: If :data:`True`, turns multicast mode on, otherwise turn= s > off. > + verify: If :data:`True` an additional command will be sent t= o > verify > + that multicast mode is properly set. Defaults to :data:`True= `. > + > + Raises: > + InteractiveCommandExecutionError: If `verify` is :data:`True= ` > and multicast > + mode is not properly set. > + """ > + multicast_cmd_output =3D self.send_command(f"set allmulti all {'= on' > if on else 'off'}") > + if verify: > + stats0 =3D self.show_port_info(port_id=3D0) > + stats1 =3D self.show_port_info(port_id=3D1) > + if on ^ (stats0.is_allmulticast_mode_enabled and > stats1.is_allmulticast_mode_enabled): > + self._logger.debug( > + f"Failed to set multicast mode on all ports.: > \n{multicast_cmd_output}" > + ) > + raise InteractiveCommandExecutionError( > + "Testpmd failed to set multicast mode on all ports." > + ) > + > @requires_stopped_ports > def csum_set_hw( > self, layers: ChecksumOffloadOptions, port_id: int, verify: bool > =3D True > -- > 2.44.0 > > --00000000000040cd07062bcbe549 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Dean. This looks good to me, though I agree Luca's = point about show_port_info_all() is compelling. We are enforcing the paired= =C2=A0topology today but may not always.=C2=A0

I don'= ;t view=C2=A0it as something which should block the testsuite, but this is = worth tracking. Can you make a Bugzilla ticket for this, and add to the min= utes for the DTS meeting (either tomorrow=C2=A0or 2 weeks)?

<= /div>
Reviewed-by: Patrick Robb <probb@iol.unh.edu>=C2=A0

On Wed, Jan 15= , 2025 at 11:30=E2=80=AFAM Dean Marx <dmarx@iol.unh.edu> wrote:
Add set multicast function for changing allmulticast mo= de
within testpmd shell.

Signed-off-by: Dean Marx <dmarx@iol.unh.edu>
---
=C2=A0dts/framework/remote_session/testpmd_shell.py | 24 ++++++++++++++++++= +
=C2=A01 file changed, 24 insertions(+)

diff --git a/dts/framework/remote_session/testpmd_shell.py b/dts/framework/= remote_session/testpmd_shell.py
index aa55bd91d3..94ff14a0a6 100644
--- a/dts/framework/remote_session/testpmd_shell.py
+++ b/dts/framework/remote_session/testpmd_shell.py
@@ -1795,6 +1795,30 @@ def show_port_stats(self, port_id: int) -> TestPm= dPortStats:

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return TestPmdPortStats.parse(output)

+=C2=A0 =C2=A0 def set_multicast_all(self, on: bool, verify: bool =3D True)= :
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 """Turns multicast mode on/off = for the specified port.
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 Args:
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 on: If :data:`True`, turns multi= cast mode on, otherwise turns off.
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 verify: If :data:`True` an addit= ional command will be sent to verify
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 that multicast mode is properly = set. Defaults to :data:`True`.
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 Raises:
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 InteractiveCommandExecutionError= : If `verify` is :data:`True` and multicast
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 mode is not proper= ly set.
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 """
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 multicast_cmd_output =3D self.send_command(f&q= uot;set allmulti all {'on' if on else 'off'}")
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 if verify:
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 stats0 =3D self.show_port_info(p= ort_id=3D0)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 stats1 =3D self.show_port_info(p= ort_id=3D1)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if on ^ (stats0.is_allmulticast_= mode_enabled and stats1.is_allmulticast_mode_enabled):
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 self._logger.debug= (
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 f&qu= ot;Failed to set multicast mode on all ports.: \n{multicast_cmd_output}&quo= t;
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 )
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 raise InteractiveC= ommandExecutionError(
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &quo= t;Testpmd failed to set multicast mode on all ports."
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 )
+
=C2=A0 =C2=A0 =C2=A0@requires_stopped_ports
=C2=A0 =C2=A0 =C2=A0def csum_set_hw(
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0self, layers: ChecksumOffloadOptions, por= t_id: int, verify: bool =3D True
--
2.44.0

--00000000000040cd07062bcbe549--