All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Thorsten Glaser <t.glaser@tarent.de>, netdev@vger.kernel.org
Subject: Re: Intro into qdisc writing?
Date: Tue, 10 Aug 2021 10:34:32 +0200	[thread overview]
Message-ID: <d14be9a8-85b2-010e-16f3-cae1587f8471@gmail.com> (raw)
In-Reply-To: <1e2625bd-f0e5-b5cf-8f57-c58968a0d1e5@tarent.de>



On 8/10/21 5:17 AM, Thorsten Glaser wrote:
> Hi,
> 
> I hope this is the right place to ask this kind of questions,
> and not just send patches ☺
> 
> I’m currently working with a… network simulator of sorts, which
> has so far mostly used htb, netem, dualpi2 and fq_codel to do the
> various tricks needed for whatever they do, but now I have rather
> specific change requests (one of which I already implemented).
> 
> The next things on my list basically involve delaying all traffic
> or a subset of traffic for a certain amount of time (in the one‑ to
> two-digit millisecond ballpark, so rather long, in CPU time). I’ve
> seen the netem source use qdisc_watchdog_schedule_ns for this, but,
> unlike the functions I used in my earlier module changes, I cannot
> find any documentation for this.
> 
> Similarily, is there an intro of sorts for qdisc writing, the things
> to know, concepts, locking, whatever is needed?
> 
> My background is multi-decade low-level programmer, but so far only
> userland, libc variants and bootloaders, not kernel, and what bit of
> kernel I touched so far was in BSD land so any pointers welcome.
> 
> If it helps: while this is for a customer project, so far everything
> coming out of it is published under OSS licences; mostly at
> https://github.com/tarent/sch_jens/tree/master/sch_jens as regards
> the kernel module (and ../jens/ for the relayfs client example) but
> https://github.com/tarent/ECN-Bits has a related userspace project.
> 
> Thanks in advance,
> //mirabilos
> 

Instead of writing a new qdisc, you could simply use FQ packet scheduler,
and a eBPF program adjusting skb->tstamp depending on your needs.

https://legacy.netdevconf.info/0x14/session.html?talk-replacing-HTB-with-EDT-and-BPF

  reply	other threads:[~2021-08-10  8:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-10  3:17 Intro into qdisc writing? Thorsten Glaser
2021-08-10  8:34 ` Eric Dumazet [this message]
2021-08-10 10:22   ` Jesper Dangaard Brouer
2021-08-10 16:36     ` Thorsten Glaser
2021-10-18 18:06   ` Thorsten Glaser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d14be9a8-85b2-010e-16f3-cae1587f8471@gmail.com \
    --to=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=t.glaser@tarent.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.