<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/include/net/sock.h, branch linux-2.6.24.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.24.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.24.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2008-01-09T07:41:28Z</updated>
<entry>
<title>[SOCK]: Adds a rcu_dereference() in sk_filter</title>
<updated>2008-01-09T07:41:28Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2008-01-09T07:41:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9d3e44425e3498eb33f25d94392b4fd0d56a5176'/>
<id>urn:sha1:9d3e44425e3498eb33f25d94392b4fd0d56a5176</id>
<content type='text'>
It seems commit fda9ef5d679b07c9d9097aaf6ef7f069d794a8f9 introduced a RCU 
protection for sk_filter(), without a rcu_dereference()

Either we need a rcu_dereference(), either a comment should explain why we 
dont need it. I vote for the former.

Signed-off-by: Eric Dumazet &lt;dada1@cosmosbay.com&gt;
Acked-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>[TCP]: Fix TCP header misalignment</title>
<updated>2007-11-19T02:48:08Z</updated>
<author>
<name>Herbert Xu</name>
</author>
<published>2007-11-19T02:48:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=21df56c6e2372e09c916111efb6c14c372a5ab2e'/>
<id>urn:sha1:21df56c6e2372e09c916111efb6c14c372a5ab2e</id>
<content type='text'>
Indeed my previous change to alloc_pskb has made it possible
for the TCP header to be misaligned iff the MTU is not a multiple
of 4 (and less than a page).  So I suspect the optimised IPsec
MTU calculation is giving you just such an MTU :)

This patch fixes it by changing alloc_pskb to make sure that
the size is at least 32-bit aligned.  This does not cause the
problem fixed by the previous patch because max_header is always
32-bit aligned which means that in the SG/NOTSO case this will
be a no-op.

I thought about putting this in the callers but all the current
callers are from TCP.  If and when we get a non-TCP caller we
can always create a TCP wrapper for this function and move the
alignment over there.

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>[TCP]: Fix size calculation in sk_stream_alloc_pskb</title>
<updated>2007-11-14T23:45:21Z</updated>
<author>
<name>Herbert Xu</name>
</author>
<published>2007-11-14T23:45:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fb93134dfc2a6e6fbedc7c270a31da03fce88db9'/>
<id>urn:sha1:fb93134dfc2a6e6fbedc7c270a31da03fce88db9</id>
<content type='text'>
We round up the header size in sk_stream_alloc_pskb so that
TSO packets get zero tail room.  Unfortunately this rounding
up is not coordinated with the select_size() function used by
TCP to calculate the second parameter of sk_stream_alloc_pskb.

As a result, we may allocate more than a page of data in the
non-TSO case when exactly one page is desired.

In fact, rounding up the head room is detrimental in the non-TSO
case because it makes memory that would otherwise be available to
the payload head room.  TSO doesn't need this either, all it wants
is the guarantee that there is no tail room.

So this patch fixes this by adjusting the skb_reserve call so that
exactly the requested amount (which all callers have calculated in
a precise way) is made available as tail room.

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]: Define infrastructure to keep 'inuse' changes in an efficent SMP/NUMA way.</title>
<updated>2007-11-07T12:08:57Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2007-11-06T07:38:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=286ab3d46058840d68e5d7d52e316c1f7e98c59f'/>
<id>urn:sha1:286ab3d46058840d68e5d7d52e316c1f7e98c59f</id>
<content type='text'>
"struct proto" currently uses an array stats[NR_CPUS] to track change on
'inuse' sockets per protocol.

If NR_CPUS is big, this means we use a big memory area for this.
Moreover, all this memory area is located on a single node on NUMA
machines, increasing memory pressure on the boot node.

In this patch, I tried to :

- Keep a fast !CONFIG_SMP implementation
- Keep a fast CONFIG_SMP implementation for often used protocols
(tcp,udp,raw,...)
- Introduce a NUMA efficient implementation

Some helper macros are defined in include/net/sock.h
These macros take into account CONFIG_SMP

If a "struct proto" is declared without using DEFINE_PROTO_INUSE /
REF_PROTO_INUSE
macros, it will automatically use a default implementation, using a
dynamically allocated percpu zone.
This default implementation will be NUMA efficient, but might use 32/64
bytes per possible cpu
because of current alloc_percpu() implementation.
However it still should be better than previous implementation based on
stats[NR_CPUS] field.

When a "struct proto" is changed to use the new macros, we use a single
static "int" percpu variable,
lowering the memory and cpu costs, still preserving NUMA efficiency.

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]: Forget the zero_it argument of sk_alloc()</title>
<updated>2007-11-01T07:39:31Z</updated>
<author>
<name>Pavel Emelyanov</name>
</author>
<published>2007-11-01T07:39:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6257ff2177ff02d7f260a7a501876aa41cb9a9f6'/>
<id>urn:sha1:6257ff2177ff02d7f260a7a501876aa41cb9a9f6</id>
<content type='text'>
Finally, the zero_it argument can be completely removed from
the callers and from the function prototype.

Besides, fix the checkpatch.pl warnings about using the
assignments inside if-s.

This patch is rather big, and it is a part of the previous one.
I splitted it wishing to make the patches more readable. Hope 
this particular split helped.

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>[NET]: Move the sock_copy() from the header</title>
<updated>2007-11-01T07:29:45Z</updated>
<author>
<name>Pavel Emelyanov</name>
</author>
<published>2007-11-01T07:29:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f1a6c4da14c365d3ee0b5de43a93f7470982637c'/>
<id>urn:sha1:f1a6c4da14c365d3ee0b5de43a93f7470982637c</id>
<content type='text'>
The sock_copy() call is not used outside the sock.c file,
so just move it into a sock.c

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>[NET]: Fix the race between sk_filter_(de|at)tach and sk_clone()</title>
<updated>2007-10-18T04:22:42Z</updated>
<author>
<name>Pavel Emelyanov</name>
</author>
<published>2007-10-18T04:22:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=47e958eac280c263397582d5581e868c3227a1bd'/>
<id>urn:sha1:47e958eac280c263397582d5581e868c3227a1bd</id>
<content type='text'>
The proposed fix is to delay the reference counter decrement
until the quiescent state pass. This will give sk_clone() a
chance to get the reference on the cloned filter.

Regular sk_filter_uncharge can happen from the sk_free() only
and there's no need in delaying the put - the socket is dead
anyway and is to be release itself.

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>[NET]: Move the filter releasing into a separate call</title>
<updated>2007-10-18T04:21:51Z</updated>
<author>
<name>Pavel Emelyanov</name>
</author>
<published>2007-10-18T04:21:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=309dd5fc872448e35634d510049642312ebc170d'/>
<id>urn:sha1:309dd5fc872448e35634d510049642312ebc170d</id>
<content type='text'>
This is done merely as a preparation for the fix.

The sk_filter_uncharge() unaccounts the filter memory and calls
the sk_filter_release(), which in turn decrements the refcount
anf frees the filter.

The latter function will be required separately.

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>[NET]: sparse warning fixes</title>
<updated>2007-10-10T23:54:48Z</updated>
<author>
<name>Stephen Hemminger</name>
</author>
<published>2007-10-09T08:59:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cfcabdcc2d5a810208e5bb3974121b7ed60119aa'/>
<id>urn:sha1:cfcabdcc2d5a810208e5bb3974121b7ed60119aa</id>
<content type='text'>
Fix a bunch of sparse warnings. Mostly about 0 used as
NULL pointer, and shadowed variable declarations.
One notable case was that hash size should have been unsigned.

Signed-off-by: Stephen Hemminger &lt;shemminger@linux-foundation.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[NET]: Make socket creation namespace safe.</title>
<updated>2007-10-10T23:49:07Z</updated>
<author>
<name>Eric W. Biederman</name>
</author>
<published>2007-10-09T06:24:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1b8d7ae42d02e483ad94035cca851e4f7fbecb40'/>
<id>urn:sha1:1b8d7ae42d02e483ad94035cca851e4f7fbecb40</id>
<content type='text'>
This patch passes in the namespace a new socket should be created in
and has the socket code do the appropriate reference counting.  By
virtue of this all socket create methods are touched.  In addition
the socket create methods are modified so that they will fail if
you attempt to create a socket in a non-default network namespace.

Failing if we attempt to create a socket outside of the default
network namespace ensures that as we incrementally make the network stack
network namespace aware we will not export functionality that someone
has not audited and made certain is network namespace safe.
Allowing us to partially enable network namespaces before all of the
exotic protocols are supported.

Any protocol layers I have missed will fail to compile because I now
pass an extra parameter into the socket creation code.

[ Integrated AF_IUCV build fixes from Andrew Morton... -DaveM ]

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>
