<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/core/dst.c, branch linux-2.6.28.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.28.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.28.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2008-09-12T23:16:37Z</updated>
<entry>
<title>net: fix scheduling of dst_gc_task by __dst_free</title>
<updated>2008-09-12T23:16:37Z</updated>
<author>
<name>Benjamin Thery</name>
</author>
<published>2008-09-12T23:16:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f262b59becc3f557da6460232abac13706402849'/>
<id>urn:sha1:f262b59becc3f557da6460232abac13706402849</id>
<content type='text'>
The dst garbage collector dst_gc_task() may not be scheduled as we
expect it to be in __dst_free().

Indeed, when the dst_gc_timer was replaced by the delayed_work
dst_gc_work, the mod_timer() call used to schedule the garbage
collector at an earlier date was replaced by a schedule_delayed_work()
(see commit 86bba269d08f0c545ae76c90b56727f65d62d57f).

But, the behaviour of mod_timer() and schedule_delayed_work() is
different in the way they handle the delay. 

mod_timer() stops the timer and re-arm it with the new given delay,
whereas schedule_delayed_work() only check if the work is already
queued in the workqueue (and queue it (with delay) if it is not)
BUT it does NOT take into account the new delay (even if the new delay
is earlier in time).
schedule_delayed_work() returns 0 if it didn't queue the work,
but we don't check the return code in __dst_free().

If I understand the code in __dst_free() correctly, we want dst_gc_task
to be queued after DST_GC_INC jiffies if we pass the test (and not in
some undetermined time in the future), so I think we should add a call
to cancel_delayed_work() before schedule_delayed_work(). Patch below.

Or we should at least test the return code of schedule_delayed_work(),
and reset the values of dst_garbage.timer_inc and dst_garbage.timer_expires
back to their former values if schedule_delayed_work() failed.
Otherwise the subsequent calls to __dst_free will test the wrong values
and assume wrong thing about when the garbage collector is supposed to
be scheduled.

dst_gc_task() also calls schedule_delayed_work() without checking
its return code (or calling cancel_scheduled_work() first), but it
should fine there: dst_gc_task is the routine of the delayed_work, so
no dst_gc_work should be pending in the queue when it's running.
 
Signed-off-by: Benjamin Thery &lt;benjamin.thery@bull.net&gt;
Acked-by: Eric Dumazet &lt;dada1@cosmosbay.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[NET]: uninline dst_release</title>
<updated>2008-03-28T00:53:31Z</updated>
<author>
<name>Ilpo Järvinen</name>
</author>
<published>2008-03-28T00:53:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8d3308687f7f1eaa1bb5d202d14752d5f90068eb'/>
<id>urn:sha1:8d3308687f7f1eaa1bb5d202d14752d5f90068eb</id>
<content type='text'>
Codiff stats (allyesconfig, v2.6.24-mm1):
-16420  187 funcs, 103 +, 16523 -, diff: -16420 --- dst_release

Without number of debug related CONFIGs (v2.6.25-rc2-mm1):
-7257  186 funcs, 70 +, 7327 -, diff: -7257 --- dst_release
dst_release                   |  +40

Signed-off-by: Ilpo Järvinen &lt;ilpo.jarvinen@helsinki.fi&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[NET] NETNS: Omit net_device-&gt;nd_net without CONFIG_NET_NS.</title>
<updated>2008-03-25T19:39:53Z</updated>
<author>
<name>YOSHIFUJI Hideaki</name>
</author>
<published>2008-03-25T12:47:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c346dca10840a874240c78efe3f39acf4312a1f2'/>
<id>urn:sha1:c346dca10840a874240c78efe3f39acf4312a1f2</id>
<content type='text'>
Introduce per-net_device inlines: dev_net(), dev_net_set().
Without CONFIG_NET_NS, no namespace other than &amp;init_net exists.
Let's explicitly define them to help compiler optimizations.

Signed-off-by: YOSHIFUJI Hideaki &lt;yoshfuji@linux-ipv6.org&gt;
</content>
</entry>
<entry>
<title>[NETNS]: DST cleanup routines should be called inside namespace.</title>
<updated>2008-02-29T04:49:44Z</updated>
<author>
<name>Denis V. Lunev</name>
</author>
<published>2008-02-29T04:49:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9de8f76d200342f1e9495861c2c9ce87a6bc26d0'/>
<id>urn:sha1:9de8f76d200342f1e9495861c2c9ce87a6bc26d0</id>
<content type='text'>
Device inside the namespace can be started and downed. So, active routing
cache should be cleaned up on device stop.

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>[NETNS][DST] dst: pass the dst_ops as parameter to the gc functions</title>
<updated>2008-01-28T23:02:46Z</updated>
<author>
<name>Daniel Lezcano</name>
</author>
<published>2008-01-18T11:56:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=569d36452ee26c08523cc9f658901c5188640853'/>
<id>urn:sha1:569d36452ee26c08523cc9f658901c5188640853</id>
<content type='text'>
The garbage collection function receive the dst_ops structure as
parameter. This is useful for the next incoming patchset because it
will need the dst_ops (there will be several instances) and the
network namespace pointer (contained in the dst_ops).

The protocols which do not take care of the namespaces will not be
impacted by this change (expect for the function signature), they do
just ignore the parameter.

Signed-off-by: Daniel Lezcano &lt;dlezcano@fr.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[NET]: dst_ifdown() cleanup</title>
<updated>2008-01-28T22:57:05Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2007-12-11T10:00:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=64b7d96167977850f4a24e52dd0a76b03c6542cf'/>
<id>urn:sha1:64b7d96167977850f4a24e52dd0a76b03c6542cf</id>
<content type='text'>
This cleanup shrinks size of net/core/dst.o on i386 from 1299 to 1289 bytes.
(This is because dev_hold()/dev_put() are doing atomic_inc()/atomic_dec() and
force compiler to re-evaluate memory contents.)

Signed-off-by: Eric Dumazet &lt;dada1@cosmosbay.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[NET]: Multiple namespaces in the all dst_ifdown routines.</title>
<updated>2008-01-28T22:56:44Z</updated>
<author>
<name>Denis V. Lunev</name>
</author>
<published>2007-12-07T08:38:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5a3e55d68ec5baac578bf32ba67607088c763657'/>
<id>urn:sha1:5a3e55d68ec5baac578bf32ba67607088c763657</id>
<content type='text'>
Move dst entries to a namespace loopback to catch refcounting leaks.

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>[NET]: Eliminate duplicate copies of dst_discard</title>
<updated>2008-01-28T22:53:37Z</updated>
<author>
<name>Herbert Xu</name>
</author>
<published>2007-11-14T05:34:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=352e512c32b634768303a43768245a0363cebbe7'/>
<id>urn:sha1:352e512c32b634768303a43768245a0363cebbe7</id>
<content type='text'>
We have a number of copies of dst_discard scattered around the place
which all do the same thing, namely free a packet on the input or
output paths.

This patch deletes all of them except dst_discard and points all the
users to it.

The only non-trivial bit is decnet where it returns an error.
However, conceptually this is identical to the blackhole functions
used in IPv4 and IPv6 which do not return errors.  So they should
either all return errors or all return zero.  For now I've stuck with
the majority and picked zero as the return value.

It doesn't really matter in practice since few if any driver would
react differently depending on a zero return value or NET_RX_DROP.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[NET]: Removing duplicit #includes</title>
<updated>2007-11-07T12:11:44Z</updated>
<author>
<name>Jiri Olsa</name>
</author>
<published>2007-11-07T08:49:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=40208d71e0c6b5f912b185e637272b6481fcef3f'/>
<id>urn:sha1:40208d71e0c6b5f912b185e637272b6481fcef3f</id>
<content type='text'>
Removing duplicit #includes for net/

Signed-off-by: Jiri Olsa &lt;olsajiri@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[NET]: Make the loopback device per network namespace.</title>
<updated>2007-10-10T23:52:49Z</updated>
<author>
<name>Eric W. Biederman</name>
</author>
<published>2007-09-27T05:10:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2774c7aba6c97a2535be3309a2209770953780b3'/>
<id>urn:sha1:2774c7aba6c97a2535be3309a2209770953780b3</id>
<content type='text'>
This patch makes loopback_dev per network namespace.  Adding
code to create a different loopback device for each network
namespace and adding the code to free a loopback device
when a network namespace exits.

This patch modifies all users the loopback_dev so they
access it as init_net.loopback_dev, keeping all of the
code compiling and working.  A later pass will be needed to
update the users to use something other than the initial network
namespace.

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
