Thread (91 messages) 91 messages, 5 authors, 2024-08-29

Re: [PATCH v3 04/12] net-shapers: implement NL set and delete operations

From: Paolo Abeni <pabeni@redhat.com>
Date: 2024-08-01 15:25:57

On 8/1/24 17:00, Jakub Kicinski wrote:
On Tue, 30 Jul 2024 22:39:47 +0200 Paolo Abeni wrote:
quoted
+	while (shaper) {
+		parent_handle = shaper->parent;
+		pscope = net_shaper_handle_scope(parent_handle);
+
+		ret = dev->netdev_ops->net_shaper_ops->delete(dev, handle,
+							      extack);
+		if (ret < 0)
+			return ret;
+
+		xa_lock(xa);
+		__xa_erase(xa, handle);
+		if (is_detached(handle))
+			idr_remove(&dev->net_shaper_data->detached_ids,
+				   net_shaper_handle_id(handle));
+		xa_unlock(xa);
+		kfree(shaper);
+		shaper = NULL;
IIUC child is the input / ingress node? 
Yes.
Does "deleting a queue" return it to the "implicit mux" at the
global level? 
Yes
If we look at the delegation use case - when queue
is "deleted" from a container-controlled mux it should go back to
the group created by the orchestrator, not "escpate" to global scope,
right?
When deleting a queue-level shaper, the orchestrator is "returning" the 
ownership of the queue from the container to the host. If the container 
wants to move the queue around e.g. from:

q1 ----- \
q2 - \SP1/ RR1
q3 - /        \
     q4 - \ RR2 -> RR(root)
     q5 - /    /
     q6 - \ RR3
     q7 - /

to:

q1 ----- \
q2 ----- RR1
q3 ---- /   \
     q4 - \ RR2 -> RR(root)
     q5 - /    /
     q6 - \ RR3
     q7 - /

It can do it with a group() operation:

group(inputs:[q2,q3],output:[RR1])

That will implicitly also delete SP1.

Side note, I just noticed that the current code is bugged WRT this last 
operation and will not delete SP1.

Cheers,

Paolo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help