Skip to contentSkip to conversation

net: qrtr: ns: Raise node count limit to 512

PATCH Applied Youssef Samir 2 participants 2 messages Aug 2 – Aug 3 Stable branch

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 net: qrtr: ns: Raise node count limit to 512

The current node limit of 64 breaks the functionality for a number of AI200 deployments that have up to 384 nodes. Raise the limit to 512.

Also, the backport of commit 27d5e84e810b ("net: qrtr: ns: Limit the total number of nodes") to 5.10, 5.15 and 6.1 dropped the node_count-- hunk in ctrl_cmd_bye(). Add it back.

Fixes 27d5e84e810b ("net: qrtr: ns: Limit the total number of nodes")
(cherry picked from commit ff194cffd586cbd4cc49eccb002c65f2a902a277)

---
Changes in v2:
- Add the missing node_count--; hunk in ctrl_cmd_bye().
- Link to v1: https://lore.kernel.org/all/[email protected]

---
 net/qrtr/ns.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
net/qrtr/ns.c +3 -2
index 559aad0e3621..0b8958b45bf0 100644
@@ -79,11 +79,11 @@ struct qrtr_node {
  * requirements. If the requirement changes in the future, these values can be
  * increased.
  */
-#define QRTR_NS_MAX_NODES   64
+#define QRTR_NS_MAX_NODES   512
 #define QRTR_NS_MAX_SERVERS 256
 #define QRTR_NS_MAX_LOOKUPS 64
 
-static u8 node_count;
+static u16 node_count;
 
 static struct qrtr_node *node_get(unsigned int node_id)
 {
@@ -406,6 +406,7 @@ static int ctrl_cmd_bye(struct sockaddr_qrtr *from)
 delete_node:
 	xa_erase(&nodes, from->sq_node);
 	kfree(node);
+	node_count--;
 
 	return ret;
 }
Signature · 1 line
2.43.0
maintainer Applied
#1 lore raw
Quoted 6 lines · Youssef Samir

The current node limit of 64 breaks the functionality for a number of AI200 deployments that have up to 384 nodes. Raise the limit to 512.

Also, the backport of commit 27d5e84e810b ("net: qrtr: ns: Limit the total number of nodes") to 5.10, 5.15 and 6.1 dropped the node_count-- hunk in ctrl_cmd_bye(). Add it back.

Queued for 6.1, 5.15 and 5.10, thanks.

Signature · 2 lines
Thanks,
Sasha