* Use connection tracking to store private data for rate shaping algorithms?
@ 2010-11-30 15:18 Dirk
2010-12-09 11:00 ` Pablo Neira Ayuso
2010-12-16 12:31 ` Patrick McHardy
0 siblings, 2 replies; 3+ messages in thread
From: Dirk @ 2010-11-30 15:18 UTC (permalink / raw)
To: netfilter-devel
Hello,
We are developing some some more advanced TCP rate shaping algorithms
( http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1261834&tag=1 )
and would like to implement it as a (GPL) kernel module. The goal is
to have a high performant module that can 'shape' traffic for 10 000's
of hosts and users on individual base and also minimize shaping
overhead (drop/retransmits/latency) on the network.
Our current solution uses a custom developed iptables target that
already performs traffic policing for 10'000s of simultaneous users (
http://tnc2007.terena.org/programme/presentations/showbeb6.html ).
Since policing is not an ideal way to regulate bandwidth, we want to
improve it :-)
However, in order to function correctly, we need to keep some extra
information for each flow (both tcp and udp) through the device:
- few statistics (two 64bit integers)
- shaping/rate state information (four 64bit integers)
This information should be set/accessible from a kernel tc qdisc module.
My idea was to use the connection tracking framework to keep track of
connection states (which is also required by the algorithms) and
somehow extend it to also store the extra information.
I have found there is an extension infrastructure for nf_conntrack (
http://www.mail-archive.com/git-commits-head@vger.kernel.org/msg15798.html
), but it does not seem a module is intended to register itself
without modifying nf_ct_ext_id in /nf_conntrack_extend.h. Since that
would require a kernel recompile, it is not really an option.
Since we're not (yet) familiar with the connection tracking code: what
would be the best way to accomplish this?
Thanks in advance,
Dirk Janssens
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Use connection tracking to store private data for rate shaping algorithms?
2010-11-30 15:18 Use connection tracking to store private data for rate shaping algorithms? Dirk
@ 2010-12-09 11:00 ` Pablo Neira Ayuso
2010-12-16 12:31 ` Patrick McHardy
1 sibling, 0 replies; 3+ messages in thread
From: Pablo Neira Ayuso @ 2010-12-09 11:00 UTC (permalink / raw)
To: Dirk; +Cc: netfilter-devel
On 30/11/10 16:18, Dirk wrote:
> Hello,
>
>
> We are developing some some more advanced TCP rate shaping algorithms
> ( http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1261834&tag=1 )
> and would like to implement it as a (GPL) kernel module. The goal is
> to have a high performant module that can 'shape' traffic for 10 000's
> of hosts and users on individual base and also minimize shaping
> overhead (drop/retransmits/latency) on the network.
>
> Our current solution uses a custom developed iptables target that
> already performs traffic policing for 10'000s of simultaneous users (
> http://tnc2007.terena.org/programme/presentations/showbeb6.html ).
> Since policing is not an ideal way to regulate bandwidth, we want to
> improve it :-)
>
>
> However, in order to function correctly, we need to keep some extra
> information for each flow (both tcp and udp) through the device:
> - few statistics (two 64bit integers)
> - shaping/rate state information (four 64bit integers)
>
> This information should be set/accessible from a kernel tc qdisc module.
>
> My idea was to use the connection tracking framework to keep track of
> connection states (which is also required by the algorithms) and
> somehow extend it to also store the extra information.
>
> I have found there is an extension infrastructure for nf_conntrack (
> http://www.mail-archive.com/git-commits-head@vger.kernel.org/msg15798.html
> ), but it does not seem a module is intended to register itself
> without modifying nf_ct_ext_id in /nf_conntrack_extend.h. Since that
> would require a kernel recompile, it is not really an option.
>
> Since we're not (yet) familiar with the connection tracking code: what
> would be the best way to accomplish this?
Then, you should do similar to this patch to add a new ct extension in
kernel-space:
http://www.spinics.net/lists/netfilter-devel/msg15320.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Use connection tracking to store private data for rate shaping algorithms?
2010-11-30 15:18 Use connection tracking to store private data for rate shaping algorithms? Dirk
2010-12-09 11:00 ` Pablo Neira Ayuso
@ 2010-12-16 12:31 ` Patrick McHardy
1 sibling, 0 replies; 3+ messages in thread
From: Patrick McHardy @ 2010-12-16 12:31 UTC (permalink / raw)
To: Dirk; +Cc: netfilter-devel
Am 30.11.2010 16:18, schrieb Dirk:
> Hello,
>
>
> We are developing some some more advanced TCP rate shaping algorithms
> ( http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1261834&tag=1 )
> and would like to implement it as a (GPL) kernel module. The goal is
> to have a high performant module that can 'shape' traffic for 10 000's
> of hosts and users on individual base and also minimize shaping
> overhead (drop/retransmits/latency) on the network.
Sounds interesting.
> Our current solution uses a custom developed iptables target that
> already performs traffic policing for 10'000s of simultaneous users (
> http://tnc2007.terena.org/programme/presentations/showbeb6.html ).
> Since policing is not an ideal way to regulate bandwidth, we want to
> improve it :-)
>
>
> However, in order to function correctly, we need to keep some extra
> information for each flow (both tcp and udp) through the device:
> - few statistics (two 64bit integers)
> - shaping/rate state information (four 64bit integers)
>
> This information should be set/accessible from a kernel tc qdisc module.
>
> My idea was to use the connection tracking framework to keep track of
> connection states (which is also required by the algorithms) and
> somehow extend it to also store the extra information.
That sounds reasonable. I've implemented TCP rate control about 9
years ago and did the same.
> I have found there is an extension infrastructure for nf_conntrack (
> http://www.mail-archive.com/git-commits-head@vger.kernel.org/msg15798.html
> ), but it does not seem a module is intended to register itself
> without modifying nf_ct_ext_id in /nf_conntrack_extend.h. Since that
> would require a kernel recompile, it is not really an option.
>
> Since we're not (yet) familiar with the connection tracking code: what
> would be the best way to accomplish this?
You can't add data to the conntrack structure (neither directly nor
through extensions) without recompiling the kernel. I'd suggest to
use ct extensions, require a recompile for now and then merge your
module upstream once it's finished.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-12-16 12:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-30 15:18 Use connection tracking to store private data for rate shaping algorithms? Dirk
2010-12-09 11:00 ` Pablo Neira Ayuso
2010-12-16 12:31 ` Patrick McHardy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).