<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/net/core/skbuff.c, branch v3.2</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>net: correct comments of skb_shift</title>
<updated>2011-11-22T21:18:43+00:00</updated>
<author>
<name>Feng King</name>
<email>kinwin2008@gmail.com</email>
</author>
<published>2011-11-21T01:47:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=20e994a05b33b186a22a3b9e922df4cce644daac'/>
<id>20e994a05b33b186a22a3b9e922df4cce644daac</id>
<content type='text'>
when skb_shift, we want to shift paged data from skb to tgt frag area.
Original comments revert the shift order

Signed-off-by: Feng King &lt;kinwin2008@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
when skb_shift, we want to shift paged data from skb to tgt frag area.
Original comments revert the shift order

Signed-off-by: Feng King &lt;kinwin2008@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: Add back alignment for size for __alloc_skb</title>
<updated>2011-11-03T22:09:16+00:00</updated>
<author>
<name>Tony Lindgren</name>
<email>tony@atomide.com</email>
</author>
<published>2011-11-02T13:40:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=bc417e30f8dff6e8657005c4317cd71239e53375'/>
<id>bc417e30f8dff6e8657005c4317cd71239e53375</id>
<content type='text'>
Commit 87fb4b7b533073eeeaed0b6bf7c2328995f6c075 (net: more
accurate skb truesize) changed the alignment of size. This
can cause problems at least on some machines with NFS root:

Unhandled fault: alignment exception (0x801) at 0xc183a43a
Internal error: : 801 [#1] PREEMPT
Modules linked in:
CPU: 0    Not tainted  (3.1.0-08784-g5eeee4a #733)
pc : [&lt;c02fbba0&gt;]    lr : [&lt;c02fbb9c&gt;]    psr: 60000013
sp : c180fef8  ip : 00000000  fp : c181f580
r10: 00000000  r9 : c044b28c  r8 : 00000001
r7 : c183a3a0  r6 : c1835be0  r5 : c183a412  r4 : 000001f2
r3 : 00000000  r2 : 00000000  r1 : ffffffe6  r0 : c183a43a
Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 0005317f  Table: 10004000  DAC: 00000017
Process swapper (pid: 1, stack limit = 0xc180e270)
Stack: (0xc180fef8 to 0xc1810000)
fee0:                                                       00000024 00000000
ff00: 00000000 c183b9c0 c183b8e0 c044b28c c0507ccc c019dfc4 c180ff2c c0503cf8
ff20: c180ff4c c180ff4c 00000000 c1835420 c182c740 c18349c0 c05233c0 00000000
ff40: 00000000 c00e6bb8 c180e000 00000000 c04dd82c c0507e7c c050cc18 c183b9c0
ff60: c05233c0 00000000 00000000 c01f34f4 c0430d70 c019d364 c04dd898 c04dd898
ff80: c04dd82c c0507e7c c180e000 00000000 c04c584c c01f4918 c04dd898 c04dd82c
ffa0: c04ddd28 c180e000 00000000 c0008758 c181fa60 3231d82c 00000037 00000000
ffc0: 00000000 c04dd898 c04dd82c c04ddd28 00000013 00000000 00000000 00000000
ffe0: 00000000 c04b2224 00000000 c04b21a0 c001056c c001056c 00000000 00000000
Function entered at [&lt;c02fbba0&gt;] from [&lt;c019dfc4&gt;]
Function entered at [&lt;c019dfc4&gt;] from [&lt;c01f34f4&gt;]
Function entered at [&lt;c01f34f4&gt;] from [&lt;c01f4918&gt;]
Function entered at [&lt;c01f4918&gt;] from [&lt;c0008758&gt;]
Function entered at [&lt;c0008758&gt;] from [&lt;c04b2224&gt;]
Function entered at [&lt;c04b2224&gt;] from [&lt;c001056c&gt;]
Code: e1a00005 e3a01028 ebfa7cb0 e35a0000 (e5858028)

Here PC is at __alloc_skb and &amp;shinfo-&gt;dataref is unaligned because
skb-&gt;end can be unaligned without this patch.

As explained by Eric Dumazet &lt;eric.dumazet@gmail.com&gt;, this happens
only with SLOB, and not with SLAB or SLUB:

* Eric Dumazet &lt;eric.dumazet@gmail.com&gt; [111102 15:56]:
&gt;
&gt; Your patch is absolutely needed, I completely forgot about SLOB :(
&gt;
&gt; since, kmalloc(386) on SLOB gives exactly ksize=386 bytes, not nearest
&gt; power of two.
&gt;
&gt; [   60.305763] malloc(size=385)-&gt;ffff880112c11e38 ksize=386 -&gt; nsize=2
&gt; [   60.305921] malloc(size=385)-&gt;ffff88007c92ce28 ksize=386 -&gt; nsize=2
&gt; [   60.306898] malloc(size=656)-&gt;ffff88007c44ad28 ksize=656 -&gt; nsize=272
&gt; [   60.325385] malloc(size=656)-&gt;ffff88007c575868 ksize=656 -&gt; nsize=272
&gt; [   60.325531] malloc(size=656)-&gt;ffff88011c777230 ksize=656 -&gt; nsize=272
&gt; [   60.325701] malloc(size=656)-&gt;ffff880114011008 ksize=656 -&gt; nsize=272
&gt; [   60.346716] malloc(size=385)-&gt;ffff880114142008 ksize=386 -&gt; nsize=2
&gt; [   60.346900] malloc(size=385)-&gt;ffff88011c777690 ksize=386 -&gt; nsize=2

Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Acked-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit 87fb4b7b533073eeeaed0b6bf7c2328995f6c075 (net: more
accurate skb truesize) changed the alignment of size. This
can cause problems at least on some machines with NFS root:

Unhandled fault: alignment exception (0x801) at 0xc183a43a
Internal error: : 801 [#1] PREEMPT
Modules linked in:
CPU: 0    Not tainted  (3.1.0-08784-g5eeee4a #733)
pc : [&lt;c02fbba0&gt;]    lr : [&lt;c02fbb9c&gt;]    psr: 60000013
sp : c180fef8  ip : 00000000  fp : c181f580
r10: 00000000  r9 : c044b28c  r8 : 00000001
r7 : c183a3a0  r6 : c1835be0  r5 : c183a412  r4 : 000001f2
r3 : 00000000  r2 : 00000000  r1 : ffffffe6  r0 : c183a43a
Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 0005317f  Table: 10004000  DAC: 00000017
Process swapper (pid: 1, stack limit = 0xc180e270)
Stack: (0xc180fef8 to 0xc1810000)
fee0:                                                       00000024 00000000
ff00: 00000000 c183b9c0 c183b8e0 c044b28c c0507ccc c019dfc4 c180ff2c c0503cf8
ff20: c180ff4c c180ff4c 00000000 c1835420 c182c740 c18349c0 c05233c0 00000000
ff40: 00000000 c00e6bb8 c180e000 00000000 c04dd82c c0507e7c c050cc18 c183b9c0
ff60: c05233c0 00000000 00000000 c01f34f4 c0430d70 c019d364 c04dd898 c04dd898
ff80: c04dd82c c0507e7c c180e000 00000000 c04c584c c01f4918 c04dd898 c04dd82c
ffa0: c04ddd28 c180e000 00000000 c0008758 c181fa60 3231d82c 00000037 00000000
ffc0: 00000000 c04dd898 c04dd82c c04ddd28 00000013 00000000 00000000 00000000
ffe0: 00000000 c04b2224 00000000 c04b21a0 c001056c c001056c 00000000 00000000
Function entered at [&lt;c02fbba0&gt;] from [&lt;c019dfc4&gt;]
Function entered at [&lt;c019dfc4&gt;] from [&lt;c01f34f4&gt;]
Function entered at [&lt;c01f34f4&gt;] from [&lt;c01f4918&gt;]
Function entered at [&lt;c01f4918&gt;] from [&lt;c0008758&gt;]
Function entered at [&lt;c0008758&gt;] from [&lt;c04b2224&gt;]
Function entered at [&lt;c04b2224&gt;] from [&lt;c001056c&gt;]
Code: e1a00005 e3a01028 ebfa7cb0 e35a0000 (e5858028)

Here PC is at __alloc_skb and &amp;shinfo-&gt;dataref is unaligned because
skb-&gt;end can be unaligned without this patch.

As explained by Eric Dumazet &lt;eric.dumazet@gmail.com&gt;, this happens
only with SLOB, and not with SLAB or SLUB:

* Eric Dumazet &lt;eric.dumazet@gmail.com&gt; [111102 15:56]:
&gt;
&gt; Your patch is absolutely needed, I completely forgot about SLOB :(
&gt;
&gt; since, kmalloc(386) on SLOB gives exactly ksize=386 bytes, not nearest
&gt; power of two.
&gt;
&gt; [   60.305763] malloc(size=385)-&gt;ffff880112c11e38 ksize=386 -&gt; nsize=2
&gt; [   60.305921] malloc(size=385)-&gt;ffff88007c92ce28 ksize=386 -&gt; nsize=2
&gt; [   60.306898] malloc(size=656)-&gt;ffff88007c44ad28 ksize=656 -&gt; nsize=272
&gt; [   60.325385] malloc(size=656)-&gt;ffff88007c575868 ksize=656 -&gt; nsize=272
&gt; [   60.325531] malloc(size=656)-&gt;ffff88011c777230 ksize=656 -&gt; nsize=272
&gt; [   60.325701] malloc(size=656)-&gt;ffff880114011008 ksize=656 -&gt; nsize=272
&gt; [   60.346716] malloc(size=385)-&gt;ffff880114142008 ksize=386 -&gt; nsize=2
&gt; [   60.346900] malloc(size=385)-&gt;ffff88011c777690 ksize=386 -&gt; nsize=2

Signed-off-by: Tony Lindgren &lt;tony@atomide.com&gt;
Acked-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: add opaque struct around skb frag page</title>
<updated>2011-10-21T06:52:53+00:00</updated>
<author>
<name>Ian Campbell</name>
<email>Ian.Campbell@citrix.com</email>
</author>
<published>2011-10-19T23:01:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=a8605c6063f785858c1bc431d0bfe66c41e71cfa'/>
<id>a8605c6063f785858c1bc431d0bfe66c41e71cfa</id>
<content type='text'>
I've split this bit out of the skb frag destructor patch since it helps enforce
the use of the fragment API.

Signed-off-by: Ian Campbell &lt;ian.campbell@citrix.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I've split this bit out of the skb frag destructor patch since it helps enforce
the use of the fragment API.

Signed-off-by: Ian Campbell &lt;ian.campbell@citrix.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: Allow skb_recycle_check to be done in stages</title>
<updated>2011-10-19T19:59:45+00:00</updated>
<author>
<name>Andy Fleming</name>
<email>afleming@freescale.com</email>
</author>
<published>2011-10-13T04:33:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=3d153a7c8b23031df35e61377c0600a6c96a8b0b'/>
<id>3d153a7c8b23031df35e61377c0600a6c96a8b0b</id>
<content type='text'>
skb_recycle_check resets the skb if it's eligible for recycling.
However, there are times when a driver might want to optionally
manipulate the skb data with the skb before resetting the skb,
but after it has determined eligibility.  We do this by splitting the
eligibility check from the skb reset, creating two inline functions to
accomplish that task.

Signed-off-by: Andy Fleming &lt;afleming@freescale.com&gt;
Acked-by: David Daney &lt;david.daney@cavium.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
skb_recycle_check resets the skb if it's eligible for recycling.
However, there are times when a driver might want to optionally
manipulate the skb data with the skb before resetting the skb,
but after it has determined eligibility.  We do this by splitting the
eligibility check from the skb reset, creating two inline functions to
accomplish that task.

Signed-off-by: Andy Fleming &lt;afleming@freescale.com&gt;
Acked-by: David Daney &lt;david.daney@cavium.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: add skb frag size accessors</title>
<updated>2011-10-19T07:10:46+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2011-10-18T21:00:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=9e903e085262ffbf1fc44a17ac06058aca03524a'/>
<id>9e903e085262ffbf1fc44a17ac06058aca03524a</id>
<content type='text'>
To ease skb-&gt;truesize sanitization, its better to be able to localize
all references to skb frags size.

Define accessors : skb_frag_size() to fetch frag size, and
skb_frag_size_{set|add|sub}() to manipulate it.

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To ease skb-&gt;truesize sanitization, its better to be able to localize
all references to skb frags size.

Define accessors : skb_frag_size() to fetch frag size, and
skb_frag_size_{set|add|sub}() to manipulate it.

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: more accurate skb truesize</title>
<updated>2011-10-13T20:05:07+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2011-10-13T07:28:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=87fb4b7b533073eeeaed0b6bf7c2328995f6c075'/>
<id>87fb4b7b533073eeeaed0b6bf7c2328995f6c075</id>
<content type='text'>
skb truesize currently accounts for sk_buff struct and part of skb head.
kmalloc() roundings are also ignored.

Considering that skb_shared_info is larger than sk_buff, its time to
take it into account for better memory accounting.

This patch introduces SKB_TRUESIZE(X) macro to centralize various
assumptions into a single place.

At skb alloc phase, we put skb_shared_info struct at the exact end of
skb head, to allow a better use of memory (lowering number of
reallocations), since kmalloc() gives us power-of-two memory blocks.

Unless SLUB/SLUB debug is active, both skb-&gt;head and skb_shared_info are
aligned to cache lines, as before.

Note: This patch might trigger performance regressions because of
misconfigured protocol stacks, hitting per socket or global memory
limits that were previously not reached. But its a necessary step for a
more accurate memory accounting.

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
CC: Andi Kleen &lt;ak@linux.intel.com&gt;
CC: Ben Hutchings &lt;bhutchings@solarflare.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
skb truesize currently accounts for sk_buff struct and part of skb head.
kmalloc() roundings are also ignored.

Considering that skb_shared_info is larger than sk_buff, its time to
take it into account for better memory accounting.

This patch introduces SKB_TRUESIZE(X) macro to centralize various
assumptions into a single place.

At skb alloc phase, we put skb_shared_info struct at the exact end of
skb head, to allow a better use of memory (lowering number of
reallocations), since kmalloc() gives us power-of-two memory blocks.

Unless SLUB/SLUB debug is active, both skb-&gt;head and skb_shared_info are
aligned to cache lines, as before.

Note: This patch might trigger performance regressions because of
misconfigured protocol stacks, hitting per socket or global memory
limits that were previously not reached. But its a necessary step for a
more accurate memory accounting.

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
CC: Andi Kleen &lt;ak@linux.intel.com&gt;
CC: Ben Hutchings &lt;bhutchings@solarflare.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'master' of github.com:davem330/net</title>
<updated>2011-09-22T07:23:13+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2011-09-22T07:23:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=8decf868790b48a727d7e7ca164f2bcd3c1389c0'/>
<id>8decf868790b48a727d7e7ca164f2bcd3c1389c0</id>
<content type='text'>
Conflicts:
	MAINTAINERS
	drivers/net/Kconfig
	drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
	drivers/net/ethernet/broadcom/tg3.c
	drivers/net/wireless/iwlwifi/iwl-pci.c
	drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c
	drivers/net/wireless/rt2x00/rt2800usb.c
	drivers/net/wireless/wl12xx/main.c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Conflicts:
	MAINTAINERS
	drivers/net/Kconfig
	drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
	drivers/net/ethernet/broadcom/tg3.c
	drivers/net/wireless/iwlwifi/iwl-pci.c
	drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c
	drivers/net/wireless/rt2x00/rt2800usb.c
	drivers/net/wireless/wl12xx/main.c
</pre>
</div>
</content>
</entry>
<entry>
<title>net: copy userspace buffers on device forwarding</title>
<updated>2011-09-15T18:49:44+00:00</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2011-08-31T08:03:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=48c830120f2a20b44220aa26feda9ed15f49eaab'/>
<id>48c830120f2a20b44220aa26feda9ed15f49eaab</id>
<content type='text'>
dev_forward_skb loops an skb back into host networking
stack which might hang on the memory indefinitely.
In particular, this can happen in macvtap in bridged mode.
Copy the userspace fragments to avoid blocking the
sender in that case.

As this patch makes skb_copy_ubufs extern now,
I also added some documentation and made it clear
the SKBTX_DEV_ZEROCOPY flag automatically instead
of doing it in all callers. This can be made into a separate
patch if people feel it's worth it.

Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
dev_forward_skb loops an skb back into host networking
stack which might hang on the memory indefinitely.
In particular, this can happen in macvtap in bridged mode.
Copy the userspace fragments to avoid blocking the
sender in that case.

As this patch makes skb_copy_ubufs extern now,
I also added some documentation and made it clear
the SKBTX_DEV_ZEROCOPY flag automatically instead
of doing it in all callers. This can be made into a separate
patch if people feel it's worth it.

Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: convert core to skb paged frag APIs</title>
<updated>2011-08-25T00:52:11+00:00</updated>
<author>
<name>Ian Campbell</name>
<email>Ian.Campbell@citrix.com</email>
</author>
<published>2011-08-22T23:44:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=ea2ab69379a941c6f8884e290fdd28c93936a778'/>
<id>ea2ab69379a941c6f8884e290fdd28c93936a778</id>
<content type='text'>
Signed-off-by: Ian Campbell &lt;ian.campbell@citrix.com&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Cc: "Michał Mirosław" &lt;mirq-linux@rere.qmqm.pl&gt;
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Ian Campbell &lt;ian.campbell@citrix.com&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Cc: "Michał Mirosław" &lt;mirq-linux@rere.qmqm.pl&gt;
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: Preserve ooo_okay when copying skb header</title>
<updated>2011-08-20T21:20:49+00:00</updated>
<author>
<name>Changli Gao</name>
<email>xiaosuo@gmail.com</email>
</author>
<published>2011-08-19T04:44:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=6461be3a54f802e00d5dcba3537271f92a90eaf3'/>
<id>6461be3a54f802e00d5dcba3537271f92a90eaf3</id>
<content type='text'>
Signed-off-by: Changli Gao &lt;xiaosuo@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Changli Gao &lt;xiaosuo@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
