[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <377594eb-bdcf-3beb-f29c-aec5808eace5@tarent.de>
Date: Tue, 25 Apr 2023 18:34:41 +0200 (CEST)
From: Thorsten Glaser <t.glaser@...ent.de>
To: netdev@...r.kernel.org
Subject: minimum use of tc filter
Hi,
as some might recall, I’ve written a qdisc¹ which sort of
simulates 5G L4S conditions for one UE, that is, all
traffic passing it is shaped, delayed and ECN-marked as
if it were one 5G connection to one user equipment. The
traffic shaping is controlled from user space using pre‐
recorded (or generated) data rate patterns.
I would like to extend this to be able to simulate multiple
UEs, that is, simulate multiple 5G connections using separate
SIM cards and 5G modems, to (the same or different) base
stations. These are independent in theory, but I would like
to keep having a central framework for both reporting to and
getting rate adjustment and other configuration from user space
(because latency matters).
Therefore, I would like to make a variant of the qdisc that
has a fixed/configurable array of most of the existing qdisc’s
internal variables including FIFOs, which is not too difficult,
and use the tc filter command to split traffic into them.
Note that this is different from having child qdiscs attach to
classes. This is a nōn-hierarchical model with a fixed amount of
subclasses (should probably be a tc qdisc add option and malloc)
where all enqueueing/dequeueing/etc. is done within one and only
one qdisc.
I *think* this should be possible. The sch_prio qdisc already
creates its classes, which don’t need to be configured. Ideally,
I wouldn’t even need classes, just ask the filters on enqueue
to which minor to route the packet, then do the rest myself.
But, as usual, I’m running into the utter, absolute lack of
documentation. I *think* that Qdisc_class_ops are needed, but
which part of them? There is no documentation for the struct
members, and sch_api.c is also very *ahem* sparsely commented.
So my questions are:
• is what I want to do possible at all? straightforward or with
some amount of tricking the system (e.g. if the kernel creates
sub-pfifo_fast, just ignore them and never enqueue into them)?
• what things do I need to add to a qdisc so tc filter can be used
on it, how do I invoke that and obtain the result?
• what other expectations do I need to take care of (like that
“q->q.qlen must be valid” thing)?
• is anyone possibly interested in “hand-holding” me through this?
Thanks in advance,
//mirabilos
① https://github.com/tarent/sch_jens/blob/master/janz/sch_janz.c
now with documentation including a railroad diagram:
https://github.com/tarent/sch_jens/blob/master/janz/qdisc.md
--
Infrastrukturexperte • tarent solutions GmbH
Am Dickobskreuz 10, D-53121 Bonn • http://www.tarent.de/
Telephon +49 228 54881-393 • Fax: +49 228 54881-235
HRB AG Bonn 5168 • USt-ID (VAT): DE122264941
Geschäftsführer: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander Steeg
****************************************************
/⁀\ The UTF-8 Ribbon
╲ ╱ Campaign against Mit dem tarent-Newsletter nichts mehr verpassen:
╳ HTML eMail! Also, https://www.tarent.de/newsletter
╱ ╲ header encryption!
****************************************************
Powered by blists - more mailing lists