Hello,

I wonder if it is possible to update dummynet code multi-threading capable
practically?
My idea is below:
- A new sysctl tunable will be defined as
"net.inet.ip.dummynet.thread_count" (default 1)
- To distribute tasks along threads, each sched instance can be assigned to
different thread.
- By default, all schedulers assigned to thread 0 if no thread_id is set.
With a new option named "thr_id" affinity can be set. as below:
  ipfw sched 1 config type QFQ   (by defaut thr_id = 0)
  ipfw sched 2 config type QFQ thr_id 1
  ipfw sched 3 config type QFQ thr_id 2
  ipfw sched 4 config type FIFO thr_id 3
  ipfw sched 5 config type FIFO thr_id 3  ( sched 4 & 5 assigned to same
thread 3 )

I think this approach is more easy then completely rewrite or other
solutions.

What is the right way to do this? Where to start?
I read the explanations in /usr/src/sys/netpfil/ipfw/dummynet.txt

On this line below, multiple threads (count can be get from sysctl
"net.inet.ip.dummynet. thread_count" tunable)
https://github.com/freebsd/freebsd/blob/master/sys/netpfil/ipfw/ip_dummynet.c#L2556

Thanks
_______________________________________________
freebsd-ipfw@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ipfw
To unsubscribe, send any mail to "freebsd-ipfw-unsubscr...@freebsd.org"

Reply via email to