* [Cake] Cake - flow (or host) weight request - how to implement
@ 2023-09-27 17:48 Jan Rovner
2023-09-27 20:27 ` Stephen Hemminger
0 siblings, 1 reply; 3+ messages in thread
From: Jan Rovner @ 2023-09-27 17:48 UTC (permalink / raw)
To: cake
[-- Attachment #1.1: Type: text/plain, Size: 1610 bytes --]
Hello,
I am trying to experiment with sch_cake.c, my goal is to ad-hoc prioritize / deprioritize traffic served to specified a host(s). The prioritization would be controlled by an external system and it should handle well the situation where a host has active flow(s).
I've experimented with traffic shifting from tin to tin via fwmarks, it worked somehow, but there are issues related to losing flow's (cobalt) state.
Could you please propose a way how this could be done?
Each flow refences cake_host_table, which could be in theory modified (for example) like
struct cake_host {
u32 srchost_tag;
u32 dsthost_tag;
u16 srchost_bulk_flow_count;
u16 dsthost_bulk_flow_count;
??? srchost_weight; // default value = 1.0
??? dsthost_weight; // default value = 1.0
};
The weight fields could be then used in cobalt rate scheduling... weight could be an integer, enum, or decimal - but anything that could distinguish the traffic.
Thank you for any ideas.
Jan Rovner
Ing. Jan Rovner, Ph.D., jednatel společnosti
[cid:image001.jpg@01D9F17A.0DAF59C0]
e-mail: internet@diadema.cz<mailto:internet@diadema.cz>
www: http://internet.diadema.cz<http://internet.diadema.cz/>
telefon: +420 377 421 863, +420 603 484 742
Diadema Internet s.r.o.
zapsaná v obchodním rejstříku vedeném u Krajského soudu v Plzni, oddíl C, vložka 24294
se sídlem Morseova 1126/5, 301 00 Plzeň
IČO: 29093961, DIČ CZ29093961
Korespondenční a dodací adresa
Diadema Internet s.r.o.
Provozovna Plzeň-Lochotín
Alej Svobody 56, 323 00 Plzeň
[-- Attachment #1.2: Type: text/html, Size: 12544 bytes --]
[-- Attachment #2: image001.jpg --]
[-- Type: image/jpeg, Size: 2206 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Cake] Cake - flow (or host) weight request - how to implement
2023-09-27 17:48 [Cake] Cake - flow (or host) weight request - how to implement Jan Rovner
@ 2023-09-27 20:27 ` Stephen Hemminger
2023-09-27 20:44 ` Sebastian Moeller
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2023-09-27 20:27 UTC (permalink / raw)
To: Jan Rovner via Cake
On Wed, 27 Sep 2023 17:48:06 +0000
Jan Rovner via Cake <cake@lists.bufferbloat.net> wrote:
> Hello,
>
> I am trying to experiment with sch_cake.c, my goal is to ad-hoc prioritize / deprioritize traffic served to specified a host(s). The prioritization would be controlled by an external system and it should handle well the situation where a host has active flow(s).
Is it possible to use one or more existing BPF hooks to change DCSP bits for that paths you wish to adjust.
The point is that changes to upstream base code are hard to maintain, and that is what BPF initial hooks
were meant to provide.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Cake] Cake - flow (or host) weight request - how to implement
2023-09-27 20:27 ` Stephen Hemminger
@ 2023-09-27 20:44 ` Sebastian Moeller
0 siblings, 0 replies; 3+ messages in thread
From: Sebastian Moeller @ 2023-09-27 20:44 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Jan Rovner via Cake
Hi Stephen,
> On Sep 27, 2023, at 22:27, Stephen Hemminger via Cake <cake@lists.bufferbloat.net> wrote:
>
> On Wed, 27 Sep 2023 17:48:06 +0000
> Jan Rovner via Cake <cake@lists.bufferbloat.net> wrote:
>
>> Hello,
>>
>> I am trying to experiment with sch_cake.c, my goal is to ad-hoc prioritize / deprioritize traffic served to specified a host(s). The prioritization would be controlled by an external system and it should handle well the situation where a host has active flow(s).
>
> Is it possible to use one or more existing BPF hooks to change DCSP bits for that paths you wish to adjust.
> The point is that changes to upstream base code are hard to maintain, and that is what BPF initial hooks
> were meant to provide.
IIUC the OP wants not only to steer packets into a specific tier but really wants to move a hash-bins complete state between tiers (he talks about cobalt state). My (limited) understanding is that this would need changes to cake's kernel code, either by always keeping shadow cobalt state per hash-bin in all tiers or by implementing a state copy procedure...
Now, I am not sure how well moving flows around priority tiers is going to work on a timescale that preserving the cobalt state seems important and how to avoid re-ordering if a a flow is increased in priority while it still has queued packets in the lower priority tier (maybe the solution is moving both cobalt state and queued packets between tiers).
Regards
Sebastian
> _______________________________________________
> Cake mailing list
> Cake@lists.bufferbloat.net
> https://lists.bufferbloat.net/listinfo/cake
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-09-27 20:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-27 17:48 [Cake] Cake - flow (or host) weight request - how to implement Jan Rovner
2023-09-27 20:27 ` Stephen Hemminger
2023-09-27 20:44 ` Sebastian Moeller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox