From 7956be9e19e8b19c34787d2e02110b0b1f81f0a9 Mon Sep 17 00:00:00 2001 From: Tilmann Date: Thu, 10 Oct 2024 10:59:40 +0200 Subject: [PATCH] tools: support 16bit interface IDs in topo files (#4636) Change the limit for interface IDs in topofiles from 12bit to 16bit. --- tools/topology/topo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/topology/topo.py b/tools/topology/topo.py index 9fb39e7ce0..2efbd2acb9 100644 --- a/tools/topology/topo.py +++ b/tools/topology/topo.py @@ -408,7 +408,7 @@ def __init__(self): def new(self): while True: - ifid = random.randrange(1, 4096) + ifid = random.randrange(1, 65536) if ifid in self._ifids: continue self.add(ifid) @@ -418,7 +418,7 @@ def add(self, ifid): if ifid in self._ifids: logging.critical("IFID %d already exists!" % ifid) exit(1) - if ifid < 1 or ifid > 4095: + if ifid < 1 or ifid > 65535: logging.critical("IFID %d is invalid!" % ifid) exit(1) self._ifids.add(ifid)