<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/include/net/netns, branch v2.6.26</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v2.6.26</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.26'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2008-04-15T07:36:08Z</updated>
<entry>
<title>[NETNS]: The generic per-net pointers.</title>
<updated>2008-04-15T07:36:08Z</updated>
<author>
<name>Pavel Emelyanov</name>
<email>xemul@openvz.org</email>
</author>
<published>2008-04-15T07:36:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=dec827d174d7f76c457238800183ca864a639365'/>
<id>urn:sha1:dec827d174d7f76c457238800183ca864a639365</id>
<content type='text'>
Add the elastic array of void * pointer to the struct net.
The access rules are simple:

 1. register the ops with register_pernet_gen_device to get
    the id of your private pointer
 2. call net_assign_generic() to put the private data on the
    struct net (most preferably this should be done in the
    -&gt;init callback of the ops registered)
 3. do not store any private reference on the net_generic array;
 4. do not change this pointer while the net is alive;
 5. use the net_generic() to get the pointer.

When adding a new pointer, I copy the old array, replace it
with a new one and schedule the old for kfree after an RCU
grace period.

Since the net_generic explores the net-&gt;gen array inside rcu
read section and once set the net-&gt;gen-&gt;ptr[x] pointer never 
changes, this grants us a safe access to generic pointers.

Quoting Paul: "... RCU is protecting -only- the net_generic 
structure that net_generic() is traversing, and the [pointer]
returned by net_generic() is protected by a reference counter 
in the upper-level struct net."

Signed-off-by: Pavel Emelyanov &lt;xemul@openvz.org&gt;
Acked-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[NETNS][DCCPV6]: Move the dccp_v6_ctl_sk on the struct net.</title>
<updated>2008-04-14T05:32:25Z</updated>
<author>
<name>Pavel Emelyanov</name>
<email>xemul@openvz.org</email>
</author>
<published>2008-04-14T05:32:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0204774191d3e7bc69e3ae6bbf328b635607505a'/>
<id>urn:sha1:0204774191d3e7bc69e3ae6bbf328b635607505a</id>
<content type='text'>
And replace all its usage with init_net's socket.

Signed-off-by: Pavel Emelyanov &lt;xemul@openvz.org&gt;
Acked-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[NETNS][DCCPV4]: Move the dccp_v4_ctl_sk on the struct net.</title>
<updated>2008-04-14T05:29:37Z</updated>
<author>
<name>Pavel Emelyanov</name>
<email>xemul@openvz.org</email>
</author>
<published>2008-04-14T05:29:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7b1cffa8c90269dc3dc721d084d1e0d742d87c31'/>
<id>urn:sha1:7b1cffa8c90269dc3dc721d084d1e0d742d87c31</id>
<content type='text'>
And replace all its usage with init_net's socket.

Signed-off-by: Pavel Emelyanov &lt;xemul@openvz.org&gt;
Acked-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[NETNS]: Add an empty netns_dccp structure on struct net.</title>
<updated>2008-04-14T05:28:42Z</updated>
<author>
<name>Pavel Emelyanov</name>
<email>xemul@openvz.org</email>
</author>
<published>2008-04-14T05:28:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=67019cc9ee3f4868c8e5e493b2873c4722306019'/>
<id>urn:sha1:67019cc9ee3f4868c8e5e493b2873c4722306019</id>
<content type='text'>
According to the overall struct net design, it will be
filled with DCCP-related members.

Signed-off-by: Pavel Emelyanov &lt;xemul@openvz.org&gt;
Acked-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[NETNS]: Create tcp control socket in the each namespace.</title>
<updated>2008-04-03T21:31:33Z</updated>
<author>
<name>Denis V. Lunev</name>
<email>den@openvz.org</email>
</author>
<published>2008-04-03T21:31:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=046ee902357adc046d041441956ec7eeb30c77c4'/>
<id>urn:sha1:046ee902357adc046d041441956ec7eeb30c77c4</id>
<content type='text'>
Signed-off-by: Denis V. Lunev &lt;den@openvz.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[SOCK][NETNS]: Add the percpu prot_inuse counter in the struct net.</title>
<updated>2008-04-01T02:42:16Z</updated>
<author>
<name>Pavel Emelyanov</name>
<email>xemul@openvz.org</email>
</author>
<published>2008-04-01T02:42:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=70ee115942be6ce52ff10e5e813fb4da82cdb25a'/>
<id>urn:sha1:70ee115942be6ce52ff10e5e813fb4da82cdb25a</id>
<content type='text'>
Such an accounting would cost us two more dereferences to get the
percpu variable from the struct net, so I make sock_prot_inuse_get
and _add calls work differently depending on CONFIG_NET_NS - without
it old optimized routines are used.

The per-cpu counter for init_net is prepared in core_initcall, so
that even af_inet, that starts as fs_initcall, will already have the
init_net prepared.

Signed-off-by: Pavel Emelyanov &lt;xemul@openvz.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[NETNS]: Introduce a netns_core structure.</title>
<updated>2008-04-01T02:41:14Z</updated>
<author>
<name>Pavel Emelyanov</name>
<email>xemul@openvz.org</email>
</author>
<published>2008-04-01T02:41:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8efa6e93cb2666dceafc4844057fdcb9aa324fb7'/>
<id>urn:sha1:8efa6e93cb2666dceafc4844057fdcb9aa324fb7</id>
<content type='text'>
There's already some stuff on the struct net, that should better
be folded into netns_core structure. I'm making the per-proto inuse 
counter be per-net also, which is also a candidate for this, so 
introduce this structure and populate it a bit.

Signed-off-by: Pavel Emelyanov &lt;xemul@openvz.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[NETNS][ICMP]: Make ctl tables for ICMP sysctls per-net.</title>
<updated>2008-03-26T08:56:24Z</updated>
<author>
<name>Pavel Emelyanov</name>
<email>xemul@openvz.org</email>
</author>
<published>2008-03-26T08:56:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=68528f09980a60c8df046d16336333cac4fc0c32'/>
<id>urn:sha1:68528f09980a60c8df046d16336333cac4fc0c32</id>
<content type='text'>
Add some flesh to ipv4_sysctl_init_net and ipv4_sysctl_exit_net,
i.e. copy the table, alter .data pointers and register it per-net.

Other ipv4_table's sysctls are now global, but this is going to
change once sysctl permissions patches migrate from -mm tree to 
mainline in 2.6.26 merge window :)

Signed-off-by: Pavel Emelyanov &lt;xemul@openvz.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[NETNS][ICMP]: Move ICMP sysctls on struct net.</title>
<updated>2008-03-26T08:55:37Z</updated>
<author>
<name>Pavel Emelyanov</name>
<email>xemul@openvz.org</email>
</author>
<published>2008-03-26T08:55:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a24022e1887978decaa28fb11d1ddff63e31497f'/>
<id>urn:sha1:a24022e1887978decaa28fb11d1ddff63e31497f</id>
<content type='text'>
Initialization is moved to icmp_sk_init, all the places, that
refer to them use init_net for now.

Signed-off-by: Pavel Emelyanov &lt;xemul@openvz.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[NETNS][IPV6] mcast - handle several network namespace</title>
<updated>2008-03-07T19:16:55Z</updated>
<author>
<name>Daniel Lezcano</name>
<email>dlezcano@fr.ibm.com</email>
</author>
<published>2008-03-07T19:16:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b8ad0cbc58f703972e9e37c4e2a8081dd7e6a551'/>
<id>urn:sha1:b8ad0cbc58f703972e9e37c4e2a8081dd7e6a551</id>
<content type='text'>
This patch make use of the network namespace information at the right
places to handle the multicast for several network namespaces.  It
makes the socket control to be per namespace too.

Signed-off-by: Daniel Lezcano &lt;dlezcano@fr.ibm.com&gt;
Signed-off-by: Benjamin Thery &lt;benjamin.thery@bull.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
