patch 'dts: fix topology capability comparison' has been queued to stable release 24.11.7

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Jun 11 15:20:20 CEST 2026


Hi,

FYI, your patch has been queued to stable release 24.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/26. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/9670af3a4d4ac489b46259be1cb158076e7cb260

Thanks.

Luca Boccassi

---
>From 9670af3a4d4ac489b46259be1cb158076e7cb260 Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas at monjalon.net>
Date: Sat, 6 Jun 2026 01:33:48 +0200
Subject: [PATCH] dts: fix topology capability comparison

[ upstream commit 5b6ebbaa6d6518c205ec04564911824b2aad2069 ]

TopologyCapability.__gt__() was delegating to __lt__(),
which caused infinite recursion when "other" is not a TopologyCapability:
other.__lt__(self) returns NotImplemented,
Python retries with self.__gt__(other),
and the cycle repeats.

dts/framework/testbed_model/capability.py", line 579, in __gt__
        return other < self
               ^^^^^^^^^^^^
    RecursionError: maximum recursion depth exceeded

Similarly, __le__() was delegating to "not __gt__()",
which returns True for non-comparable types instead of False.

Fix both by checking is_comparable_with() first
and comparing topology_type directly, consistent with __lt__().

Fixes: 039256daa8bf ("dts: add topology capability")

Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
---
 dts/framework/testbed_model/capability.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/dts/framework/testbed_model/capability.py b/dts/framework/testbed_model/capability.py
index 0d5f0e0b32..2cba776277 100644
--- a/dts/framework/testbed_model/capability.py
+++ b/dts/framework/testbed_model/capability.py
@@ -402,7 +402,9 @@ class TopologyCapability(Capability):
         Returns:
             :data:`True` if the instance's topology type is more complex than the compared object's.
         """
-        return other < self
+        if not self.is_comparable_with(other):
+            return False
+        return self.topology_type > other.topology_type
 
     def __le__(self, other) -> bool:
         """Compare the :attr:`~TopologyCapability.topology_type`s.
@@ -414,7 +416,9 @@ class TopologyCapability(Capability):
             :data:`True` if the instance's topology type is less complex or equal than
             the compared object's.
         """
-        return not self > other
+        if not self.is_comparable_with(other):
+            return False
+        return self.topology_type <= other.topology_type
 
     def __hash__(self):
         """Each instance is identified by :attr:`topology_type`."""
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-06-11 14:20:04.129325218 +0100
+++ 0071-dts-fix-topology-capability-comparison.patch	2026-06-11 14:20:01.282747635 +0100
@@ -1 +1 @@
-From 5b6ebbaa6d6518c205ec04564911824b2aad2069 Mon Sep 17 00:00:00 2001
+From 9670af3a4d4ac489b46259be1cb158076e7cb260 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5b6ebbaa6d6518c205ec04564911824b2aad2069 ]
+
@@ -24 +25,0 @@
-Cc: stable at dpdk.org
@@ -32 +33 @@
-index 960370fc72..96e1cd449f 100644
+index 0d5f0e0b32..2cba776277 100644
@@ -35 +36 @@
-@@ -574,7 +574,9 @@ class TopologyCapability(Capability):
+@@ -402,7 +402,9 @@ class TopologyCapability(Capability):
@@ -44 +45 @@
-     def __le__(self, other: Any) -> bool:
+     def __le__(self, other) -> bool:
@@ -46 +47 @@
-@@ -586,7 +588,9 @@ class TopologyCapability(Capability):
+@@ -414,7 +416,9 @@ class TopologyCapability(Capability):


More information about the stable mailing list