<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/netfilter/xt_cpu.c, branch v3.7.3</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/net/netfilter/xt_cpu.c?h=v3.7.3</id>
<link rel='self' href='https://git.amat.us/linux/atom/net/netfilter/xt_cpu.c?h=v3.7.3'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2011-01-18T05:33:54Z</updated>
<entry>
<title>netfilter: xtables: add missing aliases for autoloading via iptables</title>
<updated>2011-01-18T05:33:54Z</updated>
<author>
<name>Jan Engelhardt</name>
<email>jengelh@medozas.de</email>
</author>
<published>2011-01-18T05:30:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f1e231a356f90a67f8547c2881a62c92084683c6'/>
<id>urn:sha1:f1e231a356f90a67f8547c2881a62c92084683c6</id>
<content type='text'>
Signed-off-by: Jan Engelhardt &lt;jengelh@medozas.de&gt;
</content>
</entry>
<entry>
<title>netfilter: add xt_cpu match</title>
<updated>2010-07-23T10:59:36Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2010-07-23T10:59:36Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e8648a1fdb54da1f683784b36a17aa65ea56e931'/>
<id>urn:sha1:e8648a1fdb54da1f683784b36a17aa65ea56e931</id>
<content type='text'>
In some situations a CPU match permits a better spreading of
connections, or select targets only for a given cpu.

With Remote Packet Steering or multiqueue NIC and appropriate IRQ
affinities, we can distribute trafic on available cpus, per session.
(all RX packets for a given flow is handled by a given cpu)

Some legacy applications being not SMP friendly, one way to scale a
server is to run multiple copies of them.

Instead of randomly choosing an instance, we can use the cpu number as a
key so that softirq handler for a whole instance is running on a single
cpu, maximizing cache effects in TCP/UDP stacks.

Using NAT for example, a four ways machine might run four copies of
server application, using a separate listening port for each instance,
but still presenting an unique external port :

iptables -t nat -A PREROUTING -p tcp --dport 80 -m cpu --cpu 0 \
        -j REDIRECT --to-port 8080

iptables -t nat -A PREROUTING -p tcp --dport 80 -m cpu --cpu 1 \
        -j REDIRECT --to-port 8081

iptables -t nat -A PREROUTING -p tcp --dport 80 -m cpu --cpu 2 \
        -j REDIRECT --to-port 8082

iptables -t nat -A PREROUTING -p tcp --dport 80 -m cpu --cpu 3 \
        -j REDIRECT --to-port 8083

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
</content>
</entry>
</feed>
