<div dir="ltr">Applied to next-dts, thanks.</div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Tue, Oct 28, 2025 at 8:22 AM Andrew Bailey <<a href="mailto:abailey@iol.unh.edu">abailey@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">Currently, there is no way in the testpmd shell class to set the mbuf<br>
fast free offload configuration for queues or ports. This prohibits any<br>
test suites to be written utilizing this offload configuration.<br>
Introduce methods that support calls to testpmd in order to allow<br>
the configuration of mbuf fast free.<br>
<br>
Signed-off-by: Andrew Bailey <<a href="mailto:abailey@iol.unh.edu" target="_blank">abailey@iol.unh.edu</a>><br>
---<br>
dts/api/testpmd/__init__.py | 60 +++++++++++++++++++++++++++++++++++++<br>
1 file changed, 60 insertions(+)<br>
<br>
diff --git a/dts/api/testpmd/__init__.py b/dts/api/testpmd/__init__.py<br>
index a060ab5639..9e9cbaf495 100644<br>
--- a/dts/api/testpmd/__init__.py<br>
+++ b/dts/api/testpmd/__init__.py<br>
@@ -1292,3 +1292,63 @@ def get_capabilities_physical_function(<br>
supported_capabilities.add(NicCapability.PHYSICAL_FUNCTION)<br>
else:<br>
unsupported_capabilities.add(NicCapability.PHYSICAL_FUNCTION)<br>
+<br>
+ @_requires_stopped_ports<br>
+ def set_port_mbuf_fast_free(<br>
+ self,<br>
+ port_id: int,<br>
+ on: bool,<br>
+ /,<br>
+ verify: bool = True,<br>
+ ) -> None:<br>
+ """Sets the mbuf_fast_free configuration for the Tx offload of a given port.<br>
+<br>
+ Args:<br>
+ port_id: The ID of the port to configure mbuf_fast_free on.<br>
+ on: If :data:`True` mbuf_fast_free will be enabled, disable it otherwise.<br>
+ verify: If :data:`True` the output of the command will be scanned in an attempt to<br>
+ verify that the mbuf_fast_free was set successfully.<br>
+<br>
+ Raises:<br>
+ InteractiveCommandExecutionError: If mbuf_fast_free could not be set successfully.<br>
+ """<br>
+ mbuf_output = self.send_command(<br>
+ f"port config {port_id} tx_offload mbuf_fast_free {"on" if on else "off"}"<br>
+ )<br>
+<br>
+ if verify and "Error" in mbuf_output:<br>
+ raise InteractiveCommandExecutionError(<br>
+ f"Unable to set mbuf_fast_free config on port {port_id}:\n{mbuf_output}"<br>
+ )<br>
+<br>
+ @_requires_stopped_ports<br>
+ def set_queue_mbuf_fast_free(<br>
+ self,<br>
+ port_id: int,<br>
+ on: bool,<br>
+ /,<br>
+ queue_id: int = 0,<br>
+ verify: bool = True,<br>
+ ) -> None:<br>
+ """Sets the Tx mbuf_fast_free configuration of the specified queue on a given port.<br>
+<br>
+ Args:<br>
+ port_id: The ID of the port containing the queues.<br>
+ on: If :data:`True` the mbuf_fast_free configuration will be enabled, otherwise<br>
+ disabled.<br>
+ queue_id: The ID of the queue to configure mbuf_fast_free on.<br>
+ verify: If :data:`True` the output of the command will be scanned in an attempt to<br>
+ verify that mbuf_fast_free was set successfully on all ports.<br>
+<br>
+ Raises:<br>
+ InteractiveCommandExecutionError: If all queues could not be set successfully.<br>
+ """<br>
+ toggle = "on" if on else "off"<br>
+ output = self.send_command(<br>
+ f"port {port_id} txq {queue_id} tx_offload mbuf_fast_free {toggle}"<br>
+ )<br>
+ if verify and "Error" in output:<br>
+ self._logger.debug(f"Set queue offload config error\n{output}")<br>
+ raise InteractiveCommandExecutionError(<br>
+ f"Failed to get offload config on port {port_id}, queue {queue_id}:\n{output}"<br>
+ )<br>
-- <br>
2.50.1<br>
<br>
</blockquote></div>