<div dir="ltr">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. <div><br></div><div>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)?</div><div><br></div><div>Reviewed-by: Patrick Robb <<a href="mailto:probb@iol.unh.edu">probb@iol.unh.edu</a>> </div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Wed, Jan 15, 2025 at 11:30 AM Dean Marx <<a href="mailto:dmarx@iol.unh.edu">dmarx@iol.unh.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Add set multicast function for changing allmulticast mode<br>
within testpmd shell.<br>
<br>
Signed-off-by: Dean Marx <<a href="mailto:dmarx@iol.unh.edu" target="_blank">dmarx@iol.unh.edu</a>><br>
---<br>
 dts/framework/remote_session/testpmd_shell.py | 24 +++++++++++++++++++<br>
 1 file changed, 24 insertions(+)<br>
<br>
diff --git a/dts/framework/remote_session/testpmd_shell.py b/dts/framework/remote_session/testpmd_shell.py<br>
index aa55bd91d3..94ff14a0a6 100644<br>
--- a/dts/framework/remote_session/testpmd_shell.py<br>
+++ b/dts/framework/remote_session/testpmd_shell.py<br>
@@ -1795,6 +1795,30 @@ def show_port_stats(self, port_id: int) -> TestPmdPortStats:<br>
<br>
         return TestPmdPortStats.parse(output)<br>
<br>
+    def set_multicast_all(self, on: bool, verify: bool = True):<br>
+        """Turns multicast mode on/off for the specified port.<br>
+<br>
+        Args:<br>
+            on: If :data:`True`, turns multicast mode on, otherwise turns off.<br>
+            verify: If :data:`True` an additional command will be sent to verify<br>
+            that multicast mode is properly set. Defaults to :data:`True`.<br>
+<br>
+        Raises:<br>
+            InteractiveCommandExecutionError: If `verify` is :data:`True` and multicast<br>
+                mode is not properly set.<br>
+        """<br>
+        multicast_cmd_output = self.send_command(f"set allmulti all {'on' if on else 'off'}")<br>
+        if verify:<br>
+            stats0 = self.show_port_info(port_id=0)<br>
+            stats1 = self.show_port_info(port_id=1)<br>
+            if on ^ (stats0.is_allmulticast_mode_enabled and stats1.is_allmulticast_mode_enabled):<br>
+                self._logger.debug(<br>
+                    f"Failed to set multicast mode on all ports.: \n{multicast_cmd_output}"<br>
+                )<br>
+                raise InteractiveCommandExecutionError(<br>
+                    "Testpmd failed to set multicast mode on all ports."<br>
+                )<br>
+<br>
     @requires_stopped_ports<br>
     def csum_set_hw(<br>
         self, layers: ChecksumOffloadOptions, port_id: int, verify: bool = True<br>
-- <br>
2.44.0<br>
<br>
</blockquote></div>