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 950DC48A0A; Tue, 28 Oct 2025 23:34:18 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 85B75402EE; Tue, 28 Oct 2025 23:34:18 +0100 (CET) Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) by mails.dpdk.org (Postfix) with ESMTP id 770194028D for ; Tue, 28 Oct 2025 23:34:17 +0100 (CET) Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-26d0fbe238bso47107215ad.3 for ; Tue, 28 Oct 2025 15:34:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1761690856; x=1762295656; 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=A0dCC/9J7tsQMLa5yIpilUQW2NEY3ws9rgp06m+MEAY=; b=gjjNJpclrsWuKEtzii/UgD7N3iNIVDWznuVYc8i8716h5CBNu6xdnxHRM5O50zNn6W 3Vfd+b6aUanVT5lMRbBbhx0WWqMeLShKoklFu7qDsOilRGdeTMfljkQZdxvjovu953eX qQiJxs6wZpDbm1II8UPHagf9ED8LCwTIYqZGE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761690856; x=1762295656; 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=A0dCC/9J7tsQMLa5yIpilUQW2NEY3ws9rgp06m+MEAY=; b=ZPDhqHGMEGiyDXbhxgX+DFvxG/BIy/beqGnvyqG05nUNYE/CCdYwHvjPCCUBLIEoGl uhc1jTITInFBf2wMLRR7NAvsd+jR81Xx9wMpO903wC1/tJM9esRajaGcKsfIq8yTr+0T 5Dr+IOuadzxQXmpmMBifR8O1zJsf0p0ghNIhDKxr8OsMKG7PaCYoZ84+duEW3uS83PvT 0lrisffzQPDGVRGr6KWZQtFYcF81DWFxT5Nf8kJMhyVHEUMfY3W8a4znWaiy0qFwH6qK 5nrylqPrfck31sXG66vBv5JjjDhqhHN5b8Ay+PsvN13mVSn2WU9Uk/gMWEGqPy2os+qp 3srQ== X-Gm-Message-State: AOJu0YxdPRjv6ez3eEeC2czmNbik9FV32ZHccOCwRpFgCCYWwPioLY6r cUzkxA/K2QAU33tlHI+p61mfm73JCvSWk/uo/QrD0Iu0IEM1+fSa16fRnP3ch1fxmZ54KY9LKvY +9/mY6KBP3OEzTLc+ZvYA0EGN60n9talpmex/VTYxhg== X-Gm-Gg: ASbGncsoh0wK65tLBytBjUTevXdOUcNg0lSETZyC7v2GAdDhxeWgNoke2zm5nc0GkPj WM7sAr/ju2hgaCvRSAqEYwqW+hb1Nnhah4vS94cXoT/MFyX8DjHlYBkUJkLHQJ/V3DrI7GFvPR/ Ekf1VnFfbpKwv/10G/oXdq5mnpswJUds1ebJJZiaxcaEB6+f3VXR2KWkd3qRiUACXXllgYf/G1J jWB3+kN/z3Q3bt1E1KuKaeF0wW6p9QPMTC5PNhpNU6J5Y4+y4wx0oOPwTibzY1Yck4O9lc4Z0un b6eYENvhqo1aHdQSxw== X-Google-Smtp-Source: AGHT+IEsypHOLm+6/XMVe4vaxE3XY8HYf7SAl6QAWJOTPcaU0DNHvHuaJ4P1dQAZ+6vWWOIfo6EhXByIHF7Sv/mrYDo= X-Received: by 2002:a17:903:ac6:b0:290:b53b:745b with SMTP id d9443c01a7336-294deedabdfmr9382995ad.39.1761690856507; Tue, 28 Oct 2025 15:34:16 -0700 (PDT) MIME-Version: 1.0 References: <20250902114327.48185-1-abailey@iol.unh.edu> <20251028122240.112773-1-abailey@iol.unh.edu> <20251028122240.112773-4-abailey@iol.unh.edu> In-Reply-To: <20251028122240.112773-4-abailey@iol.unh.edu> From: Patrick Robb Date: Tue, 28 Oct 2025 18:33:18 -0400 X-Gm-Features: AWmQ_bkzvRPmvMMwOwnJsZzX-HpWE4rvxtWsRA_bheJ38cG2Fp_WrKi1X5_hEr8 Message-ID: Subject: Re: [PATCH v11 3/3] dts: add Rx Tx offload test suite To: Andrew Bailey Cc: dev@dpdk.org, luca.vizzarro@arm.com, dmarx@iol.unh.edu Content-Type: multipart/alternative; boundary="000000000000b4db6b06423f9dc6" 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 --000000000000b4db6b06423f9dc6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Applied to next-dts with a commit reword, thanks. On Tue, Oct 28, 2025 at 8:22=E2=80=AFAM Andrew Bailey = wrote: > Add mbuf_fast_free portion of rxtx offload testsuite from legacy dts > to next dts. The testsuite expects mbuf fast free to be enabled by > default and verifies configuration of this Tx offload capability. > > Signed-off-by: Andrew Bailey > --- > doc/api/dts/tests.TestSuite_rx_tx_offload.rst | 8 ++ > dts/tests/TestSuite_rx_tx_offload.py | 134 ++++++++++++++++++ > 2 files changed, 142 insertions(+) > create mode 100644 doc/api/dts/tests.TestSuite_rx_tx_offload.rst > create mode 100644 dts/tests/TestSuite_rx_tx_offload.py > > diff --git a/doc/api/dts/tests.TestSuite_rx_tx_offload.rst > b/doc/api/dts/tests.TestSuite_rx_tx_offload.rst > new file mode 100644 > index 0000000000..27834a74da > --- /dev/null > +++ b/doc/api/dts/tests.TestSuite_rx_tx_offload.rst > @@ -0,0 +1,8 @@ > +.. SPDX-License-Identifier: BSD-3-Clause > + > +rx_tx_offload Test Suite > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +.. automodule:: tests.TestSuite_rx_tx_offload > + :members: > + :show-inheritance: > diff --git a/dts/tests/TestSuite_rx_tx_offload.py > b/dts/tests/TestSuite_rx_tx_offload.py > new file mode 100644 > index 0000000000..b0da627d3c > --- /dev/null > +++ b/dts/tests/TestSuite_rx_tx_offload.py > @@ -0,0 +1,134 @@ > +# SPDX-License-Identifier: BSD-3-Clause > +# Copyright(c) 2025 University of New Hampshire > + > +"""RX TX offload test suite. > + > +Test the testpmd feature of configuring RX and TX offloads. > +""" > + > +from api.capabilities import ( > + LinkTopology, > + NicCapability, > + requires_link_topology, > + requires_nic_capability, > +) > +from api.test import verify > +from api.testpmd import TestPmd > +from api.testpmd.types import ( > + OffloadConfiguration, > + RxTxLiteralSwitch, > +) > +from framework.test_suite import TestSuite, func_test > + > + > +@requires_link_topology(LinkTopology.ONE_LINK) > +class TestRxTxOffload(TestSuite): > + """RX/TX offload test suite.""" > + > + def _check_config( > + self, > + testpmd: TestPmd, > + port_id: int, > + port_offload: str | None, > + rxtx: RxTxLiteralSwitch, > + /, > + queue_offload: list[str | None] | None =3D None, > + ) -> bool: > + config: OffloadConfiguration =3D > testpmd.get_offload_config(port_id, rxtx) > + if config.port_config.name !=3D port_offload: > + return False > + > + if queue_offload: > + for i, q in enumerate(config.queue_configs): > + if q.name !=3D queue_offload[i]: > + return False > + return True > + > + def _set_all_queues_mbuf_fast_free( > + self, > + testpmd: TestPmd, > + port_id: int, > + on: bool, > + num_queues: int, > + ) -> None: > + for i in range(num_queues): > + testpmd.set_queue_mbuf_fast_free(port_id, on, i) > + > + @requires_nic_capability(NicCapability.PORT_TX_OFFLOAD_MBUF_FAST_FRE= E) > + @func_test > + def test_mbuf_fast_free_configuration_per_port(self) -> None: > + """Ensure mbuf_fast_free can be configured with testpmd per port= . > + > + Steps: > + * Start up testpmd shell. > + * Toggle mbuf_fast_free off per port. > + * Toggle mbuf_fast_free on per port. > + > + Verify: > + * Mbuf_fast_free starts enabled. > + * Mbuf_fast_free can be configured off per port. > + * Mbuf_fast_free can be configured on per port. > + """ > + with TestPmd() as testpmd: > + port_id =3D 0 > + testpmd.start_all_ports() > + > + # Ensure MBUF_FAST_FREE is enabled by default and verify > + verify( > + self._check_config(testpmd, port_id, "MBUF_FAST_FREE", > "tx"), > + "MBUF_FAST_FREE disabled on port start.", > + ) > + # disable MBUF_FAST_FREE per port and verify > + testpmd.set_port_mbuf_fast_free(port_id, False) > + verify( > + self._check_config(testpmd, port_id, None, "tx"), > + "Failed to enable MBUF_FAST_FREE on port.", > + ) > + # Enable MBUF_FAST_FREE per port and verify > + testpmd.set_port_mbuf_fast_free(port_id, True) > + verify( > + self._check_config(testpmd, port_id, "MBUF_FAST_FREE", > "tx"), > + "Failed to disable MBUF_FAST_FREE on port.", > + ) > + > + > @requires_nic_capability(NicCapability.QUEUE_TX_OFFLOAD_MBUF_FAST_FREE) > + @func_test > + def test_mbuf_fast_free_configuration_per_queue(self) -> None: > + """Ensure mbuf_fast_free can be configured with testpmd. > + > + Steps: > + * Start up testpmd shell. > + * Toggle mbuf_fast_free off per queue. > + * Toggle mbuf_fast_free on per queue. > + > + Verify: > + * Mbuf_fast_free starts disabled. > + * Mbuf_fast_free can be configured off per queue. > + * Mbuf_fast_free can be configured on per queue. > + """ > + with TestPmd() as testpmd: > + port_id =3D 0 > + num_queues =3D 4 > + queue_off: list[str | None] | None =3D [None] * num_queues > + queue_on: list[str | None] | None =3D ["MBUF_FAST_FREE"] * > num_queues > + > + testpmd.set_ports_queues(num_queues) > + testpmd.start_all_ports() > + > + # Ensure mbuf_fast_free is enabled by default on port and > queues > + verify( > + self._check_config(testpmd, port_id, "MBUF_FAST_FREE", > "tx", queue_on), > + "MBUF_FAST_FREE disabled on queue start.", > + ) > + # Disable mbuf_fast_free per queue and verify > + self._set_all_queues_mbuf_fast_free(testpmd, port_id, False, > num_queues) > + verify( > + self._check_config(testpmd, port_id, "MBUF_FAST_FREE", > "tx", queue_off), > + "Failed to disable MBUF_FAST_FREE on all queues.", > + ) > + # Disable mbuf_fast_free per queue and verify > + self._set_all_queues_mbuf_fast_free(testpmd, port_id, True, > num_queues) > + verify( > + self._check_config(testpmd, port_id, "MBUF_FAST_FREE", > "tx", queue_on), > + "Failed to enable MBUF_FAST_FREE on all queues.", > + ) > -- > 2.50.1 > > --000000000000b4db6b06423f9dc6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Applied to next-dts with a commit reword, thanks.
On Tue, Oct 28, 2025 at 8:22=E2=80=AFAM Andrew Bailey <abailey@iol.unh.edu> wrote:
Add mbuf_fast_free po= rtion of rxtx offload testsuite from legacy dts
to next dts. The testsuite expects mbuf fast free to be enabled by
default and verifies configuration of this Tx offload capability.

Signed-off-by: Andrew Bailey <abailey@iol.unh.edu>
---
=C2=A0doc/api/dts/tests.TestSuite_rx_tx_offload.rst |=C2=A0 =C2=A08 ++
=C2=A0dts/tests/TestSuite_rx_tx_offload.py=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 | 134 ++++++++++++++++++
=C2=A02 files changed, 142 insertions(+)
=C2=A0create mode 100644 doc/api/dts/tests.TestSuite_rx_tx_offload.rst
=C2=A0create mode 100644 dts/tests/TestSuite_rx_tx_offload.py

diff --git a/doc/api/dts/tests.TestSuite_rx_tx_offload.rst b/doc/api/dts/te= sts.TestSuite_rx_tx_offload.rst
new file mode 100644
index 0000000000..27834a74da
--- /dev/null
+++ b/doc/api/dts/tests.TestSuite_rx_tx_offload.rst
@@ -0,0 +1,8 @@
+.. SPDX-License-Identifier: BSD-3-Clause
+
+rx_tx_offload Test Suite
+=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +
+.. automodule:: tests.TestSuite_rx_tx_offload
+=C2=A0 =C2=A0:members:
+=C2=A0 =C2=A0:show-inheritance:
diff --git a/dts/tests/TestSuite_rx_tx_offload.py b/dts/tests/TestSuite_rx_= tx_offload.py
new file mode 100644
index 0000000000..b0da627d3c
--- /dev/null
+++ b/dts/tests/TestSuite_rx_tx_offload.py
@@ -0,0 +1,134 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2025 University of New Hampshire
+
+"""RX TX offload test suite.
+
+Test the testpmd feature of configuring RX and TX offloads.
+"""
+
+from api.capabilities import (
+=C2=A0 =C2=A0 LinkTopology,
+=C2=A0 =C2=A0 NicCapability,
+=C2=A0 =C2=A0 requires_link_topology,
+=C2=A0 =C2=A0 requires_nic_capability,
+)
+from api.test import verify
+from api.testpmd import TestPmd
+from api.testpmd.types import (
+=C2=A0 =C2=A0 OffloadConfiguration,
+=C2=A0 =C2=A0 RxTxLiteralSwitch,
+)
+from framework.test_suite import TestSuite, func_test
+
+
+@requires_link_topology(LinkTopology.ONE_LINK)
+class TestRxTxOffload(TestSuite):
+=C2=A0 =C2=A0 """RX/TX offload test suite."""= ;
+
+=C2=A0 =C2=A0 def _check_config(
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 self,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 testpmd: TestPmd,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 port_id: int,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 port_offload: str | None,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 rxtx: RxTxLiteralSwitch,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 /,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 queue_offload: list[str | None] | None =3D Non= e,
+=C2=A0 =C2=A0 ) -> bool:
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 config: OffloadConfiguration =3D testpmd.get_o= ffload_config(port_id, rxtx)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 if config.port_config.name !=3D port_= offload:
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return False
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 if queue_offload:
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 for i, q in enumerate(config.que= ue_configs):
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if q.name !=3D queue_offlo= ad[i]:
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 retu= rn False
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 return True
+
+=C2=A0 =C2=A0 def _set_all_queues_mbuf_fast_free(
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 self,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 testpmd: TestPmd,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 port_id: int,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 on: bool,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 num_queues: int,
+=C2=A0 =C2=A0 ) -> None:
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 for i in range(num_queues):
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 testpmd.set_queue_mbuf_fast_free= (port_id, on, i)
+
+=C2=A0 =C2=A0 @requires_nic_capability(NicCapability.PORT_TX_OFFLOAD_MBUF_= FAST_FREE)
+=C2=A0 =C2=A0 @func_test
+=C2=A0 =C2=A0 def test_mbuf_fast_free_configuration_per_port(self) -> N= one:
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 """Ensure mbuf_fast_free can be= configured with testpmd per port.
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 Steps:
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 * Start up testpmd shell.
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 * Toggle mbuf_fast_free off per = port.
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 * Toggle mbuf_fast_free on per p= ort.
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 Verify:
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 * Mbuf_fast_free starts enabled.=
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 * Mbuf_fast_free can be configur= ed off per port.
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 * Mbuf_fast_free can be configur= ed on per port.
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 """
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 with TestPmd() as testpmd:
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 port_id =3D 0
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 testpmd.start_all_ports()
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # Ensure MBUF_FAST_FREE is enabl= ed by default and verify
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 verify(
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 self._check_config= (testpmd, port_id, "MBUF_FAST_FREE", "tx"),
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "MBUF_FAST_FR= EE disabled on port start.",
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 )
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # disable MBUF_FAST_FREE per por= t and verify
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 testpmd.set_port_mbuf_fast_free(= port_id, False)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 verify(
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 self._check_config= (testpmd, port_id, None, "tx"),
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "Failed to en= able MBUF_FAST_FREE on port.",
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 )
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # Enable MBUF_FAST_FREE per port= and verify
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 testpmd.set_port_mbuf_fast_free(= port_id, True)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 verify(
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 self._check_config= (testpmd, port_id, "MBUF_FAST_FREE", "tx"),
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "Failed to di= sable MBUF_FAST_FREE on port.",
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 )
+
+=C2=A0 =C2=A0 @requires_nic_capability(NicCapability.QUEUE_TX_OFFLOAD_MBUF= _FAST_FREE)
+=C2=A0 =C2=A0 @func_test
+=C2=A0 =C2=A0 def test_mbuf_fast_free_configuration_per_queue(self) -> = None:
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 """Ensure mbuf_fast_free can be= configured with testpmd.
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 Steps:
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 * Start up testpmd shell.
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 * Toggle mbuf_fast_free off per = queue.
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 * Toggle mbuf_fast_free on per q= ueue.
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 Verify:
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 * Mbuf_fast_free starts disabled= .
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 * Mbuf_fast_free can be configur= ed off per queue.
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 * Mbuf_fast_free can be configur= ed on per queue.
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 """
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 with TestPmd() as testpmd:
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 port_id =3D 0
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 num_queues =3D 4
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 queue_off: list[str | None] | No= ne =3D [None] * num_queues
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 queue_on: list[str | None] | Non= e =3D ["MBUF_FAST_FREE"] * num_queues
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 testpmd.set_ports_queues(num_que= ues)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 testpmd.start_all_ports()
+
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # Ensure mbuf_fast_free is enabl= ed by default on port and queues
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 verify(
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 self._check_config= (testpmd, port_id, "MBUF_FAST_FREE", "tx", queue_on), +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "MBUF_FAST_FR= EE disabled on queue start.",
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 )
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # Disable mbuf_fast_free per que= ue and verify
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 self._set_all_queues_mbuf_fast_f= ree(testpmd, port_id, False, num_queues)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 verify(
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 self._check_config= (testpmd, port_id, "MBUF_FAST_FREE", "tx", queue_off),<= br> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "Failed to di= sable MBUF_FAST_FREE on all queues.",
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 )
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # Disable mbuf_fast_free per que= ue and verify
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 self._set_all_queues_mbuf_fast_f= ree(testpmd, port_id, True, num_queues)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 verify(
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 self._check_config= (testpmd, port_id, "MBUF_FAST_FREE", "tx", queue_on), +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "Failed to en= able MBUF_FAST_FREE on all queues.",
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 )
--
2.50.1

--000000000000b4db6b06423f9dc6--