From: Dean Marx <dmarx@iol.unh.edu>
To: probb@iol.unh.edu, npratte@iol.unh.edu, luca.vizzarro@arm.com,
yoan.picchi@foss.arm.com, Honnappa.Nagarahalli@arm.com,
paul.szczepanek@arm.com
Cc: dev@dpdk.org, Dean Marx <dmarx@iol.unh.edu>
Subject: [PATCH v1] dts: fix multicast set function in testpmd shell
Date: Thu, 16 Jan 2025 14:33:07 -0500 [thread overview]
Message-ID: <20250116193307.23213-1-dmarx@iol.unh.edu> (raw)
Fixes verification method in multicast set function by changing
the stats capture to use show_port_info_all(). This way, the
method will continue to work even after DTS lifts the restriction
on port topologies.
Fixes: abf8a3bc793b ("dts: add multicast set function to shell")
Signed-off-by: Dean Marx <dmarx@iol.unh.edu>
---
dts/framework/remote_session/testpmd_shell.py | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/dts/framework/remote_session/testpmd_shell.py b/dts/framework/remote_session/testpmd_shell.py
index d25952e2fa..37cd981264 100644
--- a/dts/framework/remote_session/testpmd_shell.py
+++ b/dts/framework/remote_session/testpmd_shell.py
@@ -1795,7 +1795,7 @@ def show_port_stats(self, port_id: int) -> TestPmdPortStats:
return TestPmdPortStats.parse(output)
- def set_multicast_all(self, on: bool, verify: bool = True):
+ def set_multicast_all(self, on: bool, verify: bool = True) -> None:
"""Turns multicast mode on/off for the specified port.
Args:
@@ -1809,9 +1809,8 @@ def set_multicast_all(self, on: bool, verify: bool = True):
"""
multicast_cmd_output = self.send_command(f"set allmulti all {'on' if on else 'off'}")
if verify:
- stats0 = self.show_port_info(port_id=0)
- stats1 = self.show_port_info(port_id=1)
- if on ^ (stats0.is_allmulticast_mode_enabled and stats1.is_allmulticast_mode_enabled):
+ port_stats = self.show_port_info_all()
+ if on ^ all(stats.is_allmulticast_mode_enabled for stats in port_stats):
self._logger.debug(
f"Failed to set multicast mode on all ports.: \n{multicast_cmd_output}"
)
--
2.44.0
reply other threads:[~2025-01-16 19:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250116193307.23213-1-dmarx@iol.unh.edu \
--to=dmarx@iol.unh.edu \
--cc=Honnappa.Nagarahalli@arm.com \
--cc=dev@dpdk.org \
--cc=luca.vizzarro@arm.com \
--cc=npratte@iol.unh.edu \
--cc=paul.szczepanek@arm.com \
--cc=probb@iol.unh.edu \
--cc=yoan.picchi@foss.arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).