* [patch 1/1] driver/net/benet: fix be_cmd_multicast_set() memcpy bug
From: Joe Jin @ 2010-12-06 13:00 UTC (permalink / raw)
To: sathyap, subbus, sarveshwarb, ajitk
Cc: netdev, linux-kernel, greg.marsden, guru.anbalagane, joe.jin
Hi,
Regarding benet be_cmd_multicast_set() function, now using
netdev_for_each_mc_addr() helper for mac address copy, but
when copying to req->mac[] did not increase of the index.
Cc: Sathya Perla <sathyap@serverengines.com>
Cc: Subbu Seetharaman <subbus@serverengines.com>
Cc: Sarveshwar Bandi <sarveshwarb@serverengines.com>
Cc: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
---
be_cmds.c | 2 +-
diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c
index 36eca1c..e4465d2 100644
--- a/drivers/net/benet/be_cmds.c
+++ b/drivers/net/benet/be_cmds.c
@@ -1235,7 +1235,7 @@ int be_cmd_multicast_set(struct be_adapter *adapter, u32 if_id,
i = 0;
netdev_for_each_mc_addr(ha, netdev)
- memcpy(req->mac[i].byte, ha->addr, ETH_ALEN);
+ memcpy(req->mac[i++].byte, ha->addr, ETH_ALEN);
} else {
req->promiscuous = 1;
}
--
Oracle <http://www.oracle.com>
Joe Jin | Team Leader, Software Development | +8610.8278.6295
ORACLE | Linux and Virtualization
Incubator Building 2-A ZPark | Beijing China, 100094
^ permalink raw reply related
* [PATCH] l2tp: Fix modalias of l2tp_ip
From: Michal Marek @ 2010-12-06 12:39 UTC (permalink / raw)
To: James Chapman; +Cc: David S. Miller, netdev, linux-kernel
Using the SOCK_DGRAM enum results in
"net-pf-2-proto-SOCK_DGRAM-type-115", so use the numeric value like it
is done in net/dccp.
Signed-off-by: Michal Marek <mmarek@suse.cz>
---
net/l2tp/l2tp_ip.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/net/l2tp/l2tp_ip.c b/net/l2tp/l2tp_ip.c
index 0bf6a59..522e219 100644
--- a/net/l2tp/l2tp_ip.c
+++ b/net/l2tp/l2tp_ip.c
@@ -674,4 +674,8 @@ MODULE_LICENSE("GPL");
MODULE_AUTHOR("James Chapman <jchapman@katalix.com>");
MODULE_DESCRIPTION("L2TP over IP");
MODULE_VERSION("1.0");
-MODULE_ALIAS_NET_PF_PROTO_TYPE(PF_INET, SOCK_DGRAM, IPPROTO_L2TP);
+
+/* Use the value of SOCK_DGRAM (2) directory, because __stringify does't like
+ * enums
+ */
+MODULE_ALIAS_NET_PF_PROTO_TYPE(PF_INET, 2, IPPROTO_L2TP);
--
1.7.3.1
^ permalink raw reply related
* Re: [PATCH] ipv6: add special mode forwarding=2 to send RS while configured as router
From: Thomas Graf @ 2010-12-06 11:26 UTC (permalink / raw)
To: netdev, davem, yoshfuji
In-Reply-To: <20101124180306.GA20862@srv03.cluenet.de>
On Wed, Nov 24, 2010 at 07:03:06PM +0100, Daniel Roesen wrote:
> On Fri, Sep 03, 2010 at 09:04:20AM -0400, Thomas Graf wrote:
> > Similar to accepting router advertisement, the IPv6 stack does not send router
> > solicitations if forwarding is enabled.
> >
> > This patch enables this behavior to be overruled by setting forwarding to the
> > special value 2.
>
> Wouldn't it be more elegant to use accept_ra=2 as trigger instead of a new special
> value for the forwarding option?
Two reasons: I didn't want to change the behaviour of an existing
configuration option on which someone may rely on and I wanted to
allow sending of RS while still allowing to disable accepting RAs.
^ permalink raw reply
* 2.6.32 bnx2: unable to handle kernel NULL pointer dereference at (null) on OOM
From: Frederik Himpe @ 2010-12-06 11:06 UTC (permalink / raw)
To: netdev
With kernel 2.6.32.15 I can reproducibly kill networking on a system
using the bnx2 driver by starting up memory hogs triggering the OOM
killer.
I could not find any indication in the 2.6.32 stable changelogs that
this is fixed in a later 2.6.32 update.
Here is the log including the OOM killer traces and the bnx2 null
pointer deference captured with netconsole:
Dec 5 19:26:19 node001.cvos.cluster [4445292.253420] IN invoked oom-killer: gfp_mask=0x280da, order=0, oom_adj=0
Dec 5 19:26:19 node001.cvos.cluster [4445292.253498] Pid: 30009, comm: IN Not tainted 2.6.32.15 #1
Dec 5 19:26:19 node001.cvos.cluster [4445292.253559] Call Trace:
Dec 5 19:26:19 node001.cvos.cluster [4445292.253624] [<ffffffff8106bd0c>] ? cpuset_print_task_mems_allowed+0x8c/0x97
Dec 5 19:26:19 node001.cvos.cluster [4445292.253690] [<ffffffff81080439>] oom_kill_process+0x84/0x291
Dec 5 19:26:19 node001.cvos.cluster [4445292.253753] [<ffffffff81080955>] ? select_bad_process+0xab/0xf0
Dec 5 19:26:19 node001.cvos.cluster [4445292.253816] [<ffffffff81080a1f>] __out_of_memory+0x85/0x94
Dec 5 19:26:19 node001.cvos.cluster [4445292.253878] [<ffffffff81080b76>] out_of_memory+0x148/0x17a
Dec 5 19:26:19 node001.cvos.cluster [4445292.253942] [<ffffffff81089bc0>] ? try_to_free_pages+0x69/0x6b
Dec 5 19:26:19 node001.cvos.cluster [4445292.254005] [<ffffffff81084017>] __alloc_pages_nodemask+0x4a4/0x593
Dec 5 19:26:19 node001.cvos.cluster [4445292.254071] [<ffffffff810a5793>] alloc_page_vma+0xc9/0xcb
Dec 5 19:26:19 node001.cvos.cluster [4445292.254134] [<ffffffff81086423>] ? lru_cache_add_lru+0x22/0x24
Dec 5 19:26:19 node001.cvos.cluster [4445292.254211] [<ffffffff8109420a>] handle_mm_fault+0x1cf/0x771
Dec 5 19:26:19 node001.cvos.cluster [4445292.254289] [<ffffffff81026078>] do_page_fault+0x233/0x24b
Dec 5 19:26:19 node001.cvos.cluster [4445292.254367] [<ffffffff8134573f>] page_fault+0x1f/0x30
Dec 5 19:26:19 node001.cvos.cluster [4445292.254444] Node 0
Dec 5 19:26:19 node001.cvos.cluster DMA per-cpu:
Dec 5 19:26:19 node001.cvos.cluster [4445292.254563] CPU 0: hi: 0, btch: 1 usd: 0
Dec 5 19:26:19 node001.cvos.cluster [4445292.254636] CPU 1: hi: 0, btch: 1 usd: 0
Dec 5 19:26:19 node001.cvos.cluster [4445292.254709] CPU 2: hi: 0, btch: 1 usd: 0
Dec 5 19:26:19 node001.cvos.cluster [4445292.254782] CPU 3: hi: 0, btch: 1 usd: 0
Dec 5 19:26:19 node001.cvos.cluster [4445292.254856] CPU 4: hi: 0, btch: 1 usd: 0
Dec 5 19:26:19 node001.cvos.cluster [4445292.254929] CPU 5: hi: 0, btch: 1 usd: 0
Dec 5 19:26:19 node001.cvos.cluster [4445292.255002] CPU 6: hi: 0, btch: 1 usd: 0
Dec 5 19:26:19 node001.cvos.cluster [4445292.255075] CPU 7: hi: 0, btch: 1 usd: 0
Dec 5 19:26:19 node001.cvos.cluster [4445292.255147] Node 0
Dec 5 19:26:19 node001.cvos.cluster DMA32 per-cpu:
Dec 5 19:26:19 node001.cvos.cluster [4445292.255266] CPU 0: hi: 186, btch: 31 usd: 28
Dec 5 19:26:19 node001.cvos.cluster [4445292.255339] CPU 1: hi: 186, btch: 31 usd: 47
Dec 5 19:26:19 node001.cvos.cluster [4445292.255413] CPU 2: hi: 186, btch: 31 usd: 119
Dec 5 19:26:19 node001.cvos.cluster [4445292.255485] CPU 3: hi: 186, btch: 31 usd: 171
Dec 5 19:26:19 node001.cvos.cluster [4445292.255558] CPU 4: hi: 186, btch: 31 usd: 111
Dec 5 19:26:19 node001.cvos.cluster [4445292.255631] CPU 5: hi: 186, btch: 31 usd: 128
Dec 5 19:26:19 node001.cvos.cluster [4445292.255704] CPU 6: hi: 186, btch: 31 usd: 76
Dec 5 19:26:19 node001.cvos.cluster [4445292.255777] CPU 7: hi: 186, btch: 31 usd: 128
Dec 5 19:26:19 node001.cvos.cluster [4445292.255849] Node 0
Dec 5 19:26:19 node001.cvos.cluster Normal per-cpu:
Dec 5 19:26:19 node001.cvos.cluster [4445292.255967] CPU 0: hi: 186, btch: 31 usd: 91
Dec 5 19:26:19 node001.cvos.cluster [4445292.256057] CPU 1: hi: 186, btch: 31 usd: 68
Dec 5 19:26:19 node001.cvos.cluster [4445292.256130] CPU 2: hi: 186, btch: 31 usd: 176
Dec 5 19:26:19 node001.cvos.cluster [4445292.256204] CPU 3: hi: 186, btch: 31 usd: 23
Dec 5 19:26:19 node001.cvos.cluster [4445292.256277] CPU 4: hi: 186, btch: 31 usd: 104
Dec 5 19:26:19 node001.cvos.cluster [4445292.256349] CPU 5: hi: 186, btch: 31 usd: 34
Dec 5 19:26:19 node001.cvos.cluster [4445292.256423] CPU 6: hi: 186, btch: 31 usd: 25
Dec 5 19:26:19 node001.cvos.cluster [4445292.256496] CPU 7: hi: 186, btch: 31 usd: 116
Dec 5 19:26:19 node001.cvos.cluster [4445292.256573] active_anon:1650726 inactive_anon:323194 isolated_anon:160
Dec 5 19:26:19 node001.cvos.cluster [4445292.256575] active_file:278 inactive_file:187 isolated_file:0
Dec 5 19:26:19 node001.cvos.cluster [4445292.256576] unevictable:3447 dirty:8 writeback:661 unstable:3
Dec 5 19:26:19 node001.cvos.cluster [4445292.256578] free:11853 slab_reclaimable:1635 slab_unreclaimable:3043
Dec 5 19:26:19 node001.cvos.cluster [4445292.256579] mapped:1332 shmem:0 pagetables:12323 bounce:0
Dec 5 19:26:19 node001.cvos.cluster [4445292.256949] Node 0
Dec 5 19:26:19 node001.cvos.cluster DMA free:15896kB min:20kB low:24kB high:28kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:15304kB mlocked:0kB dirty:0kB writeback:0kB mapped:0kB shmem:0kB slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB pagetables:0kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? yes
Dec 5 19:26:19 node001.cvos.cluster [4445292.257214] lowmem_reserve[]:
Dec 5 19:26:19 node001.cvos.cluster 0
Dec 5 19:26:19 node001.cvos.cluster 2999
Dec 5 19:26:19 node001.cvos.cluster 8049
Dec 5 19:26:19 node001.cvos.cluster 8049
Dec 5 19:26:19 node001.cvos.cluster
Dec 5 19:26:19 node001.cvos.cluster [4445292.257532] Node 0
Dec 5 19:26:19 node001.cvos.cluster DMA32 free:24400kB min:4272kB low:5340kB high:6408kB active_anon:2316300kB inactive_anon:578492kB active_file:428kB inactive_file:20kB unevictable:0kB isolated(anon):256kB isolated(file):0kB present:3071996kB mlocked:0kB dirty:8kB writeback:348kB mapped:156kB shmem:0kB slab_reclaimable:492kB slab_unreclaimable:564kB kernel_stack:16kB pagetables:16756kB unstable:4kB bounce:0kB writeback_tmp:0kB pages_scanned:217 all_unreclaimable? no
Dec 5 19:26:19 node001.cvos.cluster [4445292.257879] lowmem_reserve[]:
Dec 5 19:26:19 node001.cvos.cluster 0
Dec 5 19:26:19 node001.cvos.cluster 0
Dec 5 19:26:19 node001.cvos.cluster 5050
Dec 5 19:26:19 node001.cvos.cluster 5050
Dec 5 19:26:19 node001.cvos.cluster
Dec 5 19:26:19 node001.cvos.cluster [4445292.258210] Node 0
Dec 5 19:26:19 node001.cvos.cluster Normal free:7116kB min:7192kB low:8988kB high:10788kB active_anon:4286896kB inactive_anon:714540kB active_file:684kB inactive_file:496kB unevictable:13788kB isolated(anon):384kB isolated(file):0kB present:5171200kB mlocked:5528kB dirty:24kB writeback:1956kB mapped:5172kB shmem:0kB slab_reclaimable:6048kB slab_unreclaimable:11608kB kernel_stack:1624kB pagetables:32536kB unstable:8kB bounce:0kB writeback_tmp:0kB pages_scanned:2263 all_unreclaimable? no
Dec 5 19:26:19 node001.cvos.cluster [4445292.258477] lowmem_reserve[]:
Dec 5 19:26:19 node001.cvos.cluster 0
Dec 5 19:26:19 node001.cvos.cluster last message repeated 3 times
Dec 5 19:26:19 node001.cvos.cluster
Dec 5 19:26:19 node001.cvos.cluster [4445292.258795] Node 0
Dec 5 19:26:19 node001.cvos.cluster DMA:
Dec 5 19:26:19 node001.cvos.cluster 0*4kB
Dec 5 19:26:19 node001.cvos.cluster 1*8kB
Dec 5 19:26:19 node001.cvos.cluster 1*16kB
Dec 5 19:26:19 node001.cvos.cluster 2*32kB
Dec 5 19:26:19 node001.cvos.cluster 3*64kB
Dec 5 19:26:19 node001.cvos.cluster 2*128kB
Dec 5 19:26:19 node001.cvos.cluster 0*256kB
Dec 5 19:26:19 node001.cvos.cluster 0*512kB
Dec 5 19:26:19 node001.cvos.cluster 1*1024kB
Dec 5 19:26:19 node001.cvos.cluster 1*2048kB
Dec 5 19:26:19 node001.cvos.cluster 3*4096kB
Dec 5 19:26:19 node001.cvos.cluster = 15896kB
Dec 5 19:26:19 node001.cvos.cluster [4445292.265993] Node 0
Dec 5 19:26:19 node001.cvos.cluster DMA32:
Dec 5 19:26:19 node001.cvos.cluster 2*4kB
Dec 5 19:26:19 node001.cvos.cluster 3*8kB
Dec 5 19:26:19 node001.cvos.cluster 9*16kB
Dec 5 19:26:19 node001.cvos.cluster 7*32kB
Dec 5 19:26:19 node001.cvos.cluster 2*64kB
Dec 5 19:26:19 node001.cvos.cluster 3*128kB
Dec 5 19:26:19 node001.cvos.cluster 14*256kB
Dec 5 19:26:19 node001.cvos.cluster 10*512kB
Dec 5 19:26:19 node001.cvos.cluster 6*1024kB
Dec 5 19:26:19 node001.cvos.cluster 2*2048kB
Dec 5 19:26:19 node001.cvos.cluster 1*4096kB
Dec 5 19:26:19 node001.cvos.cluster = 23952kB
Dec 5 19:26:19 node001.cvos.cluster [4445292.266722] Node 0
Dec 5 19:26:19 node001.cvos.cluster Normal:
Dec 5 19:26:19 node001.cvos.cluster 31*4kB
Dec 5 19:26:19 node001.cvos.cluster 32*8kB
Dec 5 19:26:19 node001.cvos.cluster 46*16kB
Dec 5 19:26:19 node001.cvos.cluster 15*32kB
Dec 5 19:26:19 node001.cvos.cluster 6*64kB
Dec 5 19:26:19 node001.cvos.cluster 5*128kB
Dec 5 19:26:19 node001.cvos.cluster 2*256kB
Dec 5 19:26:19 node001.cvos.cluster 0*512kB
Dec 5 19:26:19 node001.cvos.cluster 0*1024kB
Dec 5 19:26:19 node001.cvos.cluster 0*2048kB
Dec 5 19:26:19 node001.cvos.cluster 1*4096kB
Dec 5 19:26:19 node001.cvos.cluster = 7228kB
Dec 5 19:26:19 node001.cvos.cluster [4445292.267449] 5337 total pagecache pages
Dec 5 19:26:19 node001.cvos.cluster [4445292.267520] 2009 pages in swap cache
Dec 5 19:26:19 node001.cvos.cluster [4445292.267591] Swap cache stats: add 15770704, delete 15768695, find 334248/348086
Dec 5 19:26:19 node001.cvos.cluster [4445292.267683] Free swap = 0kB
Dec 5 19:26:19 node001.cvos.cluster [4445292.267751] Total swap = 15639700kB
Dec 5 19:26:19 node001.cvos.cluster [4445292.309854] Out of memory: kill process 29969 (IN) score 1493120 or a child
Dec 5 19:26:19 node001.cvos.cluster [4445292.309942] Killed process 29969 (IN)
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.253420] IN invoked oom-killer: gfp_mask=0x280da, order=0, oom_adj=0
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.253494] IN cpuset=/ mems_allowed=0
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.253498] Pid: 30009, comm: IN Not tainted 2.6.32.15 #1
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.253559] Call Trace:
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.253624] [<ffffffff8106bd0c>] ? cpuset_print_task_mems_allowed+0x8c/0x97
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.253690] [<ffffffff81080439>] oom_kill_process+0x84/0x291
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.253753] [<ffffffff81080955>] ? select_bad_process+0xab/0xf0
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.253816] [<ffffffff81080a1f>] __out_of_memory+0x85/0x94
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.253878] [<ffffffff81080b76>] out_of_memory+0x148/0x17a
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.253942] [<ffffffff81089bc0>] ? try_to_free_pages+0x69/0x6b
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.254005] [<ffffffff81084017>] __alloc_pages_nodemask+0x4a4/0x593
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.254071] [<ffffffff810a5793>] alloc_page_vma+0xc9/0xcb
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.254134] [<ffffffff81086423>] ? lru_cache_add_lru+0x22/0x24
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.254211] [<ffffffff8109420a>] handle_mm_fault+0x1cf/0x771
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.254289] [<ffffffff81026078>] do_page_fault+0x233/0x24b
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.254367] [<ffffffff8134573f>] page_fault+0x1f/0x30
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.254442] Mem-Info:
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.254444] Node 0 DMA per-cpu:
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.254563] CPU 0: hi: 0, btch: 1 usd: 0
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.254636] CPU 1: hi: 0, btch: 1 usd: 0
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.254709] CPU 2: hi: 0, btch: 1 usd: 0
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.254782] CPU 3: hi: 0, btch: 1 usd: 0
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.254856] CPU 4: hi: 0, btch: 1 usd: 0
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.254929] CPU 5: hi: 0, btch: 1 usd: 0
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.255002] CPU 6: hi: 0, btch: 1 usd: 0
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.255075] CPU 7: hi: 0, btch: 1 usd: 0
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.255147] Node 0 DMA32 per-cpu:
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.255266] CPU 0: hi: 186, btch: 31 usd: 28
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.255339] CPU 1: hi: 186, btch: 31 usd: 47
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.255413] CPU 2: hi: 186, btch: 31 usd: 119
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.255485] CPU 3: hi: 186, btch: 31 usd: 171
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.255558] CPU 4: hi: 186, btch: 31 usd: 111
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.255631] CPU 5: hi: 186, btch: 31 usd: 128
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.255704] CPU 6: hi: 186, btch: 31 usd: 76
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.255777] CPU 7: hi: 186, btch: 31 usd: 128
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.255849] Node 0 Normal per-cpu:
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.255967] CPU 0: hi: 186, btch: 31 usd: 91
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.256057] CPU 1: hi: 186, btch: 31 usd: 68
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.256130] CPU 2: hi: 186, btch: 31 usd: 176
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.256204] CPU 3: hi: 186, btch: 31 usd: 23
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.256277] CPU 4: hi: 186, btch: 31 usd: 104
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.256349] CPU 5: hi: 186, btch: 31 usd: 34
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.256423] CPU 6: hi: 186, btch: 31 usd: 25
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.256496] CPU 7: hi: 186, btch: 31 usd: 116
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.256573] active_anon:1650726 inactive_anon:323194 isolated_anon:160
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.256575] active_file:278 inactive_file:187 isolated_file:0
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.256576] unevictable:3447 dirty:8 writeback:661 unstable:3
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.256578] free:11853 slab_reclaimable:1635 slab_unreclaimable:3043
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.256579] mapped:1332 shmem:0 pagetables:12323 bounce:0
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.256949] Node 0 DMA free:15896kB min:20kB low:24kB high:28kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:15304kB mlocked:0kB dirty:0kB writeback:0kB mapped:0kB shmem:0kB slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB pagetables:0kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? yes
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.257214] lowmem_reserve[]: 0 2999 8049 8049
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.257532] Node 0 DMA32 free:24400kB min:4272kB low:5340kB high:6408kB active_anon:2316300kB inactive_anon:578492kB active_file:428kB inactive_file:20kB unevictable:0kB isolated(anon):256kB isolated(file):0kB present:3071996kB mlocked:0kB dirty:8kB writeback:348kB mapped:156kB shmem:0kB slab_reclaimable:492kB slab_unreclaimable:564kB kernel_stack:16kB pagetables:16756kB unstable:4kB bounce:0kB writeback_tmp:0kB pages_scanned:217 all_unreclaimable? no
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.257879] lowmem_reserve[]: 0 0 5050 5050
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.258210] Node 0 Normal free:7116kB min:7192kB low:8988kB high:10788kB active_anon:4286896kB inactive_anon:714540kB active_file:684kB inactive_file:496kB unevictable:13788kB isolated(anon):384kB isolated(file):0kB present:5171200kB mlocked:5528kB dirty:24kB writeback:1956kB mapped:5172kB shmem:0kB slab_reclaimable:6048kB slab_unreclaimable:11608kB kernel_stack:1624kB pagetables:32536kB unstable:8kB bounce:0kB writeback_tmp:0kB pages_scanned:2263 all_unreclaimable? no
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.258477] lowmem_reserve[]: 0 0 0 0
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.258795] Node 0 DMA: 0*4kB 1*8kB 1*16kB 2*32kB 3*64kB 2*128kB 0*256kB 0*512kB 1*1024kB 1*2048kB 3*4096kB = 15896kB
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.265993] Node 0 DMA32: 2*4kB 3*8kB 9*16kB 7*32kB 2*64kB 3*128kB 14*256kB 10*512kB 6*1024kB 2*2048kB 1*4096kB = 23952kB
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.266722] Node 0 Normal: 31*4kB 32*8kB 46*16kB 15*32kB 6*64kB 5*128kB 2*256kB 0*512kB 0*1024kB 0*2048kB 1*4096kB = 7228kB
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.267449] 5337 total pagecache pages
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.267520] 2009 pages in swap cache
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.267591] Swap cache stats: add 15770704, delete 15768695, find 334248/348086
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.267683] Free swap = 0kB
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.267751] Total swap = 15639700kB
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.309843] 2097152 pages RAM
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.309846] 47211 pages reserved
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.309848] 5736 pages shared
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.309850] 2034961 pages non-shared
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.309854] Out of memory: kill process 29969 (IN) score 1493120 or a child
Dec 5 19:26:20 node001.cvos.cluster kernel: [4445292.309942] Killed process 29969 (IN)
Dec 5 19:27:37 node001.cvos.cluster nscd: nss_ldap: reconnected to LDAP server ldap://master/ after 1 attempt
Dec 5 19:29:38 node001.cvos.cluster [4445490.905133] IN invoked oom-killer: gfp_mask=0x280da, order=0, oom_adj=0
Dec 5 19:29:38 node001.cvos.cluster [4445490.905212] Pid: 30009, comm: IN Not tainted 2.6.32.15 #1
Dec 5 19:29:38 node001.cvos.cluster [4445490.905275] Call Trace:
Dec 5 19:29:38 node001.cvos.cluster [4445490.905341] [<ffffffff8106bd0c>] ? cpuset_print_task_mems_allowed+0x8c/0x97
Dec 5 19:29:38 node001.cvos.cluster [4445490.905409] [<ffffffff81080439>] oom_kill_process+0x84/0x291
Dec 5 19:29:38 node001.cvos.cluster [4445490.905472] [<ffffffff81080955>] ? select_bad_process+0xab/0xf0
Dec 5 19:29:38 node001.cvos.cluster [4445490.905548] [<ffffffff81080a1f>] __out_of_memory+0x85/0x94
Dec 5 19:29:38 node001.cvos.cluster [4445490.905614] [<ffffffff81080b76>] out_of_memory+0x148/0x17a
Dec 5 19:29:38 node001.cvos.cluster [4445490.905682] [<ffffffff81089bc0>] ? try_to_free_pages+0x69/0x6b
Dec 5 19:29:38 node001.cvos.cluster [4445490.905747] [<ffffffff81084017>] __alloc_pages_nodemask+0x4a4/0x593
Dec 5 19:29:38 node001.cvos.cluster [4445490.905815] [<ffffffff810a5793>] alloc_page_vma+0xc9/0xcb
Dec 5 19:29:38 node001.cvos.cluster [4445490.905881] [<ffffffff8109420a>] handle_mm_fault+0x1cf/0x771
Dec 5 19:29:38 node001.cvos.cluster [4445490.905959] [<ffffffff8100b9ae>] ? invalidate_interrupt0+0xe/0x20
Dec 5 19:29:38 node001.cvos.cluster [4445490.906038] [<ffffffff81026078>] do_page_fault+0x233/0x24b
Dec 5 19:29:38 node001.cvos.cluster [4445490.906116] [<ffffffff8134573f>] page_fault+0x1f/0x30
Dec 5 19:29:38 node001.cvos.cluster [4445490.906193] Node 0
Dec 5 19:29:38 node001.cvos.cluster DMA per-cpu:
Dec 5 19:29:38 node001.cvos.cluster [4445490.906311] CPU 0: hi: 0, btch: 1 usd: 0
Dec 5 19:29:38 node001.cvos.cluster [4445490.906384] CPU 1: hi: 0, btch: 1 usd: 0
Dec 5 19:29:38 node001.cvos.cluster [4445490.906457] CPU 2: hi: 0, btch: 1 usd: 0
Dec 5 19:29:38 node001.cvos.cluster [4445490.906530] CPU 3: hi: 0, btch: 1 usd: 0
Dec 5 19:29:38 node001.cvos.cluster [4445490.906603] CPU 4: hi: 0, btch: 1 usd: 0
Dec 5 19:29:38 node001.cvos.cluster [4445490.906676] CPU 5: hi: 0, btch: 1 usd: 0
Dec 5 19:29:38 node001.cvos.cluster [4445490.906749] CPU 6: hi: 0, btch: 1 usd: 0
Dec 5 19:29:38 node001.cvos.cluster [4445490.906821] CPU 7: hi: 0, btch: 1 usd: 0
Dec 5 19:29:38 node001.cvos.cluster [4445490.906894] Node 0
Dec 5 19:29:38 node001.cvos.cluster DMA32 per-cpu:
Dec 5 19:29:38 node001.cvos.cluster [4445490.907013] CPU 0: hi: 186, btch: 31 usd: 130
Dec 5 19:29:38 node001.cvos.cluster [4445490.907087] CPU 1: hi: 186, btch: 31 usd: 88
Dec 5 19:29:38 node001.cvos.cluster [4445490.907160] CPU 2: hi: 186, btch: 31 usd: 178
Dec 5 19:29:38 node001.cvos.cluster [4445490.907233] CPU 3: hi: 186, btch: 31 usd: 52
Dec 5 19:29:38 node001.cvos.cluster [4445490.907306] CPU 4: hi: 186, btch: 31 usd: 95
Dec 5 19:29:38 node001.cvos.cluster [4445490.907379] CPU 5: hi: 186, btch: 31 usd: 117
Dec 5 19:29:38 node001.cvos.cluster [4445490.907452] CPU 6: hi: 186, btch: 31 usd: 79
Dec 5 19:29:38 node001.cvos.cluster [4445490.907525] CPU 7: hi: 186, btch: 31 usd: 158
Dec 5 19:29:38 node001.cvos.cluster [4445490.907597] Node 0
Dec 5 19:29:38 node001.cvos.cluster Normal per-cpu:
Dec 5 19:29:38 node001.cvos.cluster [4445490.907716] CPU 0: hi: 186, btch: 31 usd: 65
Dec 5 19:29:38 node001.cvos.cluster [4445490.907789] CPU 1: hi: 186, btch: 31 usd: 132
Dec 5 19:29:38 node001.cvos.cluster [4445490.907862] CPU 2: hi: 186, btch: 31 usd: 98
Dec 5 19:29:38 node001.cvos.cluster [4445490.907935] CPU 3: hi: 186, btch: 31 usd: 86
Dec 5 19:29:38 node001.cvos.cluster [4445490.908009] CPU 4: hi: 186, btch: 31 usd: 99
Dec 5 19:29:38 node001.cvos.cluster [4445490.908082] CPU 5: hi: 186, btch: 31 usd: 70
Dec 5 19:29:38 node001.cvos.cluster [4445490.908155] CPU 6: hi: 186, btch: 31 usd: 163
Dec 5 19:29:38 node001.cvos.cluster [4445490.908228] CPU 7: hi: 186, btch: 31 usd: 153
Dec 5 19:29:38 node001.cvos.cluster [4445490.908305] active_anon:1649919 inactive_anon:323308 isolated_anon:0
Dec 5 19:29:38 node001.cvos.cluster [4445490.908306] active_file:146 inactive_file:147 isolated_file:0
Dec 5 19:29:38 node001.cvos.cluster [4445490.908308] unevictable:3447 dirty:1 writeback:6 unstable:0
Dec 5 19:29:38 node001.cvos.cluster [4445490.908309] free:11723 slab_reclaimable:1961 slab_unreclaimable:3022
Dec 5 19:29:38 node001.cvos.cluster [4445490.908311] mapped:1231 shmem:0 pagetables:12289 bounce:0
Dec 5 19:29:38 node001.cvos.cluster [4445490.908676] Node 0
Dec 5 19:29:38 node001.cvos.cluster DMA free:15896kB min:20kB low:24kB high:28kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:15304kB mlocked:0kB dirty:0kB writeback:0kB mapped:0kB shmem:0kB slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB pagetables:0kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? yes
Dec 5 19:29:38 node001.cvos.cluster [4445490.908933] lowmem_reserve[]:
Dec 5 19:29:38 node001.cvos.cluster 0
Dec 5 19:29:38 node001.cvos.cluster 2999
Dec 5 19:29:38 node001.cvos.cluster 8049
Dec 5 19:29:38 node001.cvos.cluster 8049
Dec 5 19:29:38 node001.cvos.cluster
Dec 5 19:29:38 node001.cvos.cluster [4445490.909248] Node 0
Dec 5 19:29:38 node001.cvos.cluster DMA32 free:24040kB min:4272kB low:5340kB high:6408kB active_anon:2315284kB inactive_anon:579132kB active_file:140kB inactive_file:128kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:3071996kB mlocked:0kB dirty:0kB writeback:20kB mapped:192kB shmem:0kB slab_reclaimable:364kB slab_unreclaimable:524kB kernel_stack:16kB pagetables:16688kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:225 all_unreclaimable? no
Dec 5 19:29:38 node001.cvos.cluster [4445490.909527] lowmem_reserve[]:
Dec 5 19:29:38 node001.cvos.cluster 0
Dec 5 19:29:38 node001.cvos.cluster 0
Dec 5 19:29:38 node001.cvos.cluster 5050
Dec 5 19:29:38 node001.cvos.cluster 5050
Dec 5 19:29:38 node001.cvos.cluster
Dec 5 19:29:38 node001.cvos.cluster [4445490.909840] Node 0
Dec 5 19:29:38 node001.cvos.cluster Normal free:6956kB min:7192kB low:8988kB high:10788kB active_anon:4284392kB inactive_anon:714100kB active_file:444kB inactive_file:460kB unevictable:13788kB isolated(anon):0kB isolated(file):0kB present:5171200kB mlocked:5528kB dirty:4kB writeback:4kB mapped:4732kB shmem:0kB slab_reclaimable:7480kB slab_unreclaimable:11564kB kernel_stack:1632kB pagetables:32468kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:2272 all_unreclaimable? no
Dec 5 19:29:38 node001.cvos.cluster [4445490.910106] lowmem_reserve[]:
Dec 5 19:29:38 node001.cvos.cluster 0
Dec 5 19:29:38 node001.cvos.cluster last message repeated 3 times
Dec 5 19:29:38 node001.cvos.cluster
Dec 5 19:29:38 node001.cvos.cluster [4445490.910418] Node 0
Dec 5 19:29:38 node001.cvos.cluster DMA:
Dec 5 19:29:38 node001.cvos.cluster 0*4kB
Dec 5 19:29:38 node001.cvos.cluster 1*8kB
Dec 5 19:29:38 node001.cvos.cluster 1*16kB
Dec 5 19:29:38 node001.cvos.cluster 2*32kB
Dec 5 19:29:38 node001.cvos.cluster 3*64kB
Dec 5 19:29:38 node001.cvos.cluster 2*128kB
Dec 5 19:29:38 node001.cvos.cluster 0*256kB
Dec 5 19:29:38 node001.cvos.cluster 0*512kB
Dec 5 19:29:38 node001.cvos.cluster 1*1024kB
Dec 5 19:29:38 node001.cvos.cluster 1*2048kB
Dec 5 19:29:38 node001.cvos.cluster 3*4096kB
Dec 5 19:29:38 node001.cvos.cluster = 15896kB
Dec 5 19:29:38 node001.cvos.cluster [4445490.911147] Node 0
Dec 5 19:29:38 node001.cvos.cluster DMA32:
Dec 5 19:29:38 node001.cvos.cluster 19*4kB
Dec 5 19:29:38 node001.cvos.cluster 3*8kB
Dec 5 19:29:38 node001.cvos.cluster 6*16kB
Dec 5 19:29:38 node001.cvos.cluster 45*32kB
Dec 5 19:29:38 node001.cvos.cluster 6*64kB
Dec 5 19:29:38 node001.cvos.cluster 3*128kB
Dec 5 19:29:38 node001.cvos.cluster 9*256kB
Dec 5 19:29:38 node001.cvos.cluster 10*512kB
Dec 5 19:29:38 node001.cvos.cluster 6*1024kB
Dec 5 19:29:38 node001.cvos.cluster 2*2048kB
Dec 5 19:29:38 node001.cvos.cluster 1*4096kB
Dec 5 19:29:38 node001.cvos.cluster = 24164kB
Dec 5 19:29:38 node001.cvos.cluster [4445490.911877] Node 0
Dec 5 19:29:38 node001.cvos.cluster Normal:
Dec 5 19:29:38 node001.cvos.cluster 100*4kB
Dec 5 19:29:38 node001.cvos.cluster 19*8kB
Dec 5 19:29:38 node001.cvos.cluster 15*16kB
Dec 5 19:29:38 node001.cvos.cluster 63*32kB
Dec 5 19:29:38 node001.cvos.cluster 1*64kB
Dec 5 19:29:38 node001.cvos.cluster 1*128kB
Dec 5 19:29:38 node001.cvos.cluster 1*256kB
Dec 5 19:29:38 node001.cvos.cluster 1*512kB
Dec 5 19:29:38 node001.cvos.cluster 1*1024kB
Dec 5 19:29:38 node001.cvos.cluster 1*2048kB
Dec 5 19:29:38 node001.cvos.cluster 0*4096kB
Dec 5 19:29:38 node001.cvos.cluster = 6840kB
Dec 5 19:29:38 node001.cvos.cluster [4445490.912610] 28387 total pagecache pages
Dec 5 19:29:38 node001.cvos.cluster [4445490.912681] 24865 pages in swap cache
Dec 5 19:29:38 node001.cvos.cluster [4445490.912752] Swap cache stats: add 16262569, delete 16237704, find 334415/348361
Dec 5 19:29:38 node001.cvos.cluster [4445490.912844] Free swap = 0kB
Dec 5 19:29:38 node001.cvos.cluster [4445490.912914] Total swap = 15639700kB
Dec 5 19:29:38 node001.cvos.cluster [4445490.953112] Out of memory: kill process 29986 (2986853) score 870776 or a child
Dec 5 19:29:38 node001.cvos.cluster [4445490.953213] Killed process 30011 (IN)
Dec 5 19:29:38 node001.cvos.cluster [4445491.020475] IN invoked oom-killer: gfp_mask=0x280da, order=0, oom_adj=0
Dec 5 19:29:38 node001.cvos.cluster [4445491.020584] Pid: 29979, comm: IN Not tainted 2.6.32.15 #1
Dec 5 19:29:38 node001.cvos.cluster [4445491.020662] Call Trace:
Dec 5 19:29:38 node001.cvos.cluster [4445491.020745] [<ffffffff8106bd0c>] ? cpuset_print_task_mems_allowed+0x8c/0x97
Dec 5 19:29:38 node001.cvos.cluster [4445491.020866] [<ffffffff81080439>] oom_kill_process+0x84/0x291
Dec 5 19:29:38 node001.cvos.cluster [4445491.020945] [<ffffffff81080955>] ? select_bad_process+0xab/0xf0
Dec 5 19:29:38 node001.cvos.cluster [4445491.021027] [<ffffffff81080a1f>] __out_of_memory+0x85/0x94
Dec 5 19:29:38 node001.cvos.cluster [4445491.021107] [<ffffffff81080b76>] out_of_memory+0x148/0x17a
Dec 5 19:29:38 node001.cvos.cluster [4445491.021187] [<ffffffff81089bc0>] ? try_to_free_pages+0x69/0x6b
Dec 5 19:29:38 node001.cvos.cluster [4445491.021268] [<ffffffff81084017>] __alloc_pages_nodemask+0x4a4/0x593
Dec 5 19:29:38 node001.cvos.cluster [4445491.021352] [<ffffffff810a5793>] alloc_page_vma+0xc9/0xcb
Dec 5 19:29:38 node001.cvos.cluster [4445491.021431] [<ffffffff81086423>] ? lru_cache_add_lru+0x22/0x24
Dec 5 19:29:38 node001.cvos.cluster [4445491.021512] [<ffffffff8109420a>] handle_mm_fault+0x1cf/0x771
Dec 5 19:29:38 node001.cvos.cluster [4445491.021593] [<ffffffff81026078>] do_page_fault+0x233/0x24b
Dec 5 19:29:38 node001.cvos.cluster [4445491.021676] [<ffffffff8134573f>] page_fault+0x1f/0x30
Dec 5 19:29:38 node001.cvos.cluster [4445491.021758] Node 0
Dec 5 19:29:38 node001.cvos.cluster DMA per-cpu:
Dec 5 19:29:38 node001.cvos.cluster [4445491.021890] CPU 0: hi: 0, btch: 1 usd: 0
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.905133] IN invoked oom-killer: gfp_mask=0x280da, order=0, oom_adj=0
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.905208] IN cpuset=/ mems_allowed=0
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.905212] Pid: 30009, comm: IN Not tainted 2.6.32.15 #1
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.905275] Call Trace:
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.905341] [<ffffffff8106bd0c>] ? cpuset_print_task_mems_allowed+0x8c/0x97
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.905409] [<ffffffff81080439>] oom_kill_process+0x84/0x291
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.905472] [<ffffffff81080955>] ? select_bad_process+0xab/0xf0
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.905548] [<ffffffff81080a1f>] __out_of_memory+0x85/0x94
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.905614] [<ffffffff81080b76>] out_of_memory+0x148/0x17a
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.905682] [<ffffffff81089bc0>] ? try_to_free_pages+0x69/0x6b
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.905747] [<ffffffff81084017>] __alloc_pages_nodemask+0x4a4/0x593
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.905815] [<ffffffff810a5793>] alloc_page_vma+0xc9/0xcb
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.905881] [<ffffffff8109420a>] handle_mm_fault+0x1cf/0x771
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.905959] [<ffffffff8100b9ae>] ? invalidate_interrupt0+0xe/0x20
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.906038] [<ffffffff81026078>] do_page_fault+0x233/0x24b
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.906116] [<ffffffff8134573f>] page_fault+0x1f/0x30
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.906190] Mem-Info:
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.906193] Node 0 DMA per-cpu:
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.906311] CPU 0: hi: 0, btch: 1 usd: 0
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.906384] CPU 1: hi: 0, btch: 1 usd: 0
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.906457] CPU 2: hi: 0, btch: 1 usd: 0
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.906530] CPU 3: hi: 0, btch: 1 usd: 0
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.906603] CPU 4: hi: 0, btch: 1 usd: 0
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.906676] CPU 5: hi: 0, btch: 1 usd: 0
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.906749] CPU 6: hi: 0, btch: 1 usd: 0
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.906821] CPU 7: hi: 0, btch: 1 usd: 0
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.906894] Node 0 DMA32 per-cpu:
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.907013] CPU 0: hi: 186, btch: 31 usd: 130
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.907087] CPU 1: hi: 186, btch: 31 usd: 88
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.907160] CPU 2: hi: 186, btch: 31 usd: 178
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.907233] CPU 3: hi: 186, btch: 31 usd: 52
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.907306] CPU 4: hi: 186, btch: 31 usd: 95
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.907379] CPU 5: hi: 186, btch: 31 usd: 117
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.907452] CPU 6: hi: 186, btch: 31 usd: 79
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.907525] CPU 7: hi: 186, btch: 31 usd: 158
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.907597] Node 0 Normal per-cpu:
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.907716] CPU 0: hi: 186, btch: 31 usd: 65
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.907789] CPU 1: hi: 186, btch: 31 usd: 132
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.907862] CPU 2: hi: 186, btch: 31 usd: 98
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.907935] CPU 3: hi: 186, btch: 31 usd: 86
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.908009] CPU 4: hi: 186, btch: 31 usd: 99
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.908082] CPU 5: hi: 186, btch: 31 usd: 70
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.908155] CPU 6: hi: 186, btch: 31 usd: 163
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.908228] CPU 7: hi: 186, btch: 31 usd: 153
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.908305] active_anon:1649919 inactive_anon:323308 isolated_anon:0
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.908306] active_file:146 inactive_file:147 isolated_file:0
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.908308] unevictable:3447 dirty:1 writeback:6 unstable:0
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.908309] free:11723 slab_reclaimable:1961 slab_unreclaimable:3022
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.908311] mapped:1231 shmem:0 pagetables:12289 bounce:0
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.908676] Node 0 DMA free:15896kB min:20kB low:24kB high:28kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:15304kB mlocked:0kB dirty:0kB writeback:0kB mapped:0kB shmem:0kB slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB pagetables:0kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? yes
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.908933] lowmem_reserve[]: 0 2999 8049 8049
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.909248] Node 0 DMA32 free:24040kB min:4272kB low:5340kB high:6408kB active_anon:2315284kB inactive_anon:579132kB active_file:140kB inactive_file:128kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:3071996kB mlocked:0kB dirty:0kB writeback:20kB mapped:192kB shmem:0kB slab_reclaimable:364kB slab_unreclaimable:524kB kernel_stack:16kB pagetables:16688kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:225 all_unreclaimable? no
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.909527] lowmem_reserve[]: 0 0 5050 5050
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.909840] Node 0 Normal free:6956kB min:7192kB low:8988kB high:10788kB active_anon:4284392kB inactive_anon:714100kB active_file:444kB inactive_file:460kB unevictable:13788kB isolated(anon):0kB isolated(file):0kB present:5171200kB mlocked:5528kB dirty:4kB writeback:4kB mapped:4732kB shmem:0kB slab_reclaimable:7480kB slab_unreclaimable:11564kB kernel_stack:1632kB pagetables:32468kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:2272 all_unreclaimable? no
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.910106] lowmem_reserve[]: 0 0 0 0
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.910418] Node 0 DMA: 0*4kB 1*8kB 1*16kB 2*32kB 3*64kB 2*128kB 0*256kB 0*512kB 1*1024kB 1*2048kB 3*4096kB = 15896kB
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.911147] Node 0 DMA32: 19*4kB 3*8kB 6*16kB 45*32kB 6*64kB 3*128kB 9*256kB 10*512kB 6*1024kB 2*2048kB 1*4096kB = 24164kB
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.911877] Node 0 Normal: 100*4kB 19*8kB 15*16kB 63*32kB 1*64kB 1*128kB 1*256kB 1*512kB 1*1024kB 1*2048kB 0*4096kB = 6840kB
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.912610] 28387 total pagecache pages
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.912681] 24865 pages in swap cache
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.912752] Swap cache stats: add 16262569, delete 16237704, find 334415/348361
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.912844] Free swap = 0kB
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.912914] Total swap = 15639700kB
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.953100] 2097152 pages RAM
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.953104] 47211 pages reserved
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.953106] 5570 pages shared
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.953107] 2034676 pages non-shared
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.953112] Out of memory: kill process 29986 (2986853) score 870776 or a child
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445490.953213] Killed process 30011 (IN)
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445491.020475] IN invoked oom-killer: gfp_mask=0x280da, order=0, oom_adj=0
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445491.020578] IN cpuset=/ mems_allowed=0
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445491.020584] Pid: 29979, comm: IN Not tainted 2.6.32.15 #1
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445491.020662] Call Trace:
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445491.020745] [<ffffffff8106bd0c>] ? cpuset_print_task_mems_allowed+0x8c/0x97
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445491.020866] [<ffffffff81080439>] oom_kill_process+0x84/0x291
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445491.020945] [<ffffffff81080955>] ? select_bad_process+0xab/0xf0
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445491.021027] [<ffffffff81080a1f>] __out_of_memory+0x85/0x94
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445491.021107] [<ffffffff81080b76>] out_of_memory+0x148/0x17a
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445491.021187] [<ffffffff81089bc0>] ? try_to_free_pages+0x69/0x6b
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445491.021268] [<ffffffff81084017>] __alloc_pages_nodemask+0x4a4/0x593
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445491.021352] [<ffffffff810a5793>] alloc_page_vma+0xc9/0xcb
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445491.021431] [<ffffffff81086423>] ? lru_cache_add_lru+0x22/0x24
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445491.021512] [<ffffffff8109420a>] handle_mm_fault+0x1cf/0x771
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445491.021593] [<ffffffff81026078>] do_page_fault+0x233/0x24b
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445491.021676] [<ffffffff8134573f>] page_fault+0x1f/0x30
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445491.021756] Mem-Info:
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445491.021758] Node 0 DMA per-cpu:
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445491.021890] CPU 0: hi: 0, btch: 1 usd: 0
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445491.021968] CPU 1: hi: 0, btch: 1 usd: 0
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445491.022070] BUG: unable to handle kernel NULL pointer dereference at (null)
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445491.022073] IP: [<ffffffff812527c8>] bnx2_poll_work+0x2a/0x989
Dec 5 19:29:38 node001.cvos.cluster kernel: [4445491.022081] PGD 234ca4067 PUD 224558067 PMD 0
--
Frederik Himpe
^ permalink raw reply
* [PATCH v2] via-rhine: hardware VLAN support
From: Roger Luethi @ 2010-12-06 10:59 UTC (permalink / raw)
To: netdev; +Cc: David S. Miller, Jesse Gross
This patch adds VLAN hardware support for Rhine chips.
The driver uses up to 3 additional bytes of buffer space when extracting
802.1Q headers; PKT_BUF_SZ should still be sufficient.
The initial code was provided by David Lv. I reworked it to use standard
kernel facilities. Coding style clean up mostly follows via-velocity.
Adapted to new interface for VLAN acceleration (per request of Jesse Gross).
Signed-off-by: David Lv <DavidLv@viatech.com.cn>
Signed-off-by: Roger Luethi <rl@hellgate.ch>
drivers/net/via-rhine.c | 326 +++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 312 insertions(+), 14 deletions(-)
diff --git a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c
index 4930f9d..5e7f069 100644
--- a/drivers/net/via-rhine.c
+++ b/drivers/net/via-rhine.c
@@ -30,8 +30,8 @@
*/
#define DRV_NAME "via-rhine"
-#define DRV_VERSION "1.4.3"
-#define DRV_RELDATE "2007-03-06"
+#define DRV_VERSION "1.5.0"
+#define DRV_RELDATE "2010-10-09"
/* A few user-configurable values.
@@ -100,6 +100,7 @@ static const int multicast_filter_limit = 32;
#include <linux/mii.h>
#include <linux/ethtool.h>
#include <linux/crc32.h>
+#include <linux/if_vlan.h>
#include <linux/bitops.h>
#include <linux/workqueue.h>
#include <asm/processor.h> /* Processor type for cache alignment. */
@@ -133,6 +134,9 @@ MODULE_PARM_DESC(debug, "VIA Rhine debug level (0-7)");
MODULE_PARM_DESC(rx_copybreak, "VIA Rhine copy breakpoint for copy-only-tiny-frames");
MODULE_PARM_DESC(avoid_D3, "Avoid power state D3 (work-around for broken BIOSes)");
+#define MCAM_SIZE 32
+#define VCAM_SIZE 32
+
/*
Theory of Operation
@@ -279,15 +283,16 @@ MODULE_DEVICE_TABLE(pci, rhine_pci_tbl);
/* Offsets to the device registers. */
enum register_offsets {
StationAddr=0x00, RxConfig=0x06, TxConfig=0x07, ChipCmd=0x08,
- ChipCmd1=0x09,
+ ChipCmd1=0x09, TQWake=0x0A,
IntrStatus=0x0C, IntrEnable=0x0E,
MulticastFilter0=0x10, MulticastFilter1=0x14,
RxRingPtr=0x18, TxRingPtr=0x1C, GFIFOTest=0x54,
- MIIPhyAddr=0x6C, MIIStatus=0x6D, PCIBusConfig=0x6E,
+ MIIPhyAddr=0x6C, MIIStatus=0x6D, PCIBusConfig=0x6E, PCIBusConfig1=0x6F,
MIICmd=0x70, MIIRegAddr=0x71, MIIData=0x72, MACRegEEcsr=0x74,
ConfigA=0x78, ConfigB=0x79, ConfigC=0x7A, ConfigD=0x7B,
RxMissed=0x7C, RxCRCErrs=0x7E, MiscCmd=0x81,
StickyHW=0x83, IntrStatus2=0x84,
+ CamMask=0x88, CamCon=0x92, CamAddr=0x93,
WOLcrSet=0xA0, PwcfgSet=0xA1, WOLcgSet=0xA3, WOLcrClr=0xA4,
WOLcrClr1=0xA6, WOLcgClr=0xA7,
PwrcsrSet=0xA8, PwrcsrSet1=0xA9, PwrcsrClr=0xAC, PwrcsrClr1=0xAD,
@@ -299,6 +304,40 @@ enum backoff_bits {
BackCaptureEffect=0x04, BackRandom=0x08
};
+/* Bits in the TxConfig (TCR) register */
+enum tcr_bits {
+ TCR_PQEN=0x01,
+ TCR_LB0=0x02, /* loopback[0] */
+ TCR_LB1=0x04, /* loopback[1] */
+ TCR_OFSET=0x08,
+ TCR_RTGOPT=0x10,
+ TCR_RTFT0=0x20,
+ TCR_RTFT1=0x40,
+ TCR_RTSF=0x80,
+};
+
+/* Bits in the CamCon (CAMC) register */
+enum camcon_bits {
+ CAMC_CAMEN=0x01,
+ CAMC_VCAMSL=0x02,
+ CAMC_CAMWR=0x04,
+ CAMC_CAMRD=0x08,
+};
+
+/* Bits in the PCIBusConfig1 (BCR1) register */
+enum bcr1_bits {
+ BCR1_POT0=0x01,
+ BCR1_POT1=0x02,
+ BCR1_POT2=0x04,
+ BCR1_CTFT0=0x08,
+ BCR1_CTFT1=0x10,
+ BCR1_CTSF=0x20,
+ BCR1_TXQNOBK=0x40, /* for VT6105 */
+ BCR1_VIDFR=0x80, /* for VT6105 */
+ BCR1_MED0=0x40, /* for VT6102 */
+ BCR1_MED1=0x80, /* for VT6102 */
+};
+
#ifdef USE_MMIO
/* Registers we check that mmio and reg are the same. */
static const int mmio_verify_registers[] = {
@@ -356,6 +395,11 @@ enum desc_status_bits {
DescOwn=0x80000000
};
+/* Bits in *_desc.*_length */
+enum desc_length_bits {
+ DescTag=0x00010000
+};
+
/* Bits in ChipCmd. */
enum chip_cmd_bits {
CmdInit=0x01, CmdStart=0x02, CmdStop=0x04, CmdRxOn=0x08,
@@ -365,6 +409,9 @@ enum chip_cmd_bits {
};
struct rhine_private {
+ /* Bit mask for configured VLAN ids */
+ unsigned long active_vlans[BITS_TO_LONGS(VLAN_N_VID)];
+
/* Descriptor rings */
struct rx_desc *rx_ring;
struct tx_desc *tx_ring;
@@ -405,6 +452,23 @@ struct rhine_private {
void __iomem *base;
};
+#define BYTE_REG_BITS_ON(x, p) do { iowrite8((ioread8((p))|(x)), (p)); } while (0)
+#define WORD_REG_BITS_ON(x, p) do { iowrite16((ioread16((p))|(x)), (p)); } while (0)
+#define DWORD_REG_BITS_ON(x, p) do { iowrite32((ioread32((p))|(x)), (p)); } while (0)
+
+#define BYTE_REG_BITS_IS_ON(x, p) (ioread8((p)) & (x))
+#define WORD_REG_BITS_IS_ON(x, p) (ioread16((p)) & (x))
+#define DWORD_REG_BITS_IS_ON(x, p) (ioread32((p)) & (x))
+
+#define BYTE_REG_BITS_OFF(x, p) do { iowrite8(ioread8((p)) & (~(x)), (p)); } while (0)
+#define WORD_REG_BITS_OFF(x, p) do { iowrite16(ioread16((p)) & (~(x)), (p)); } while (0)
+#define DWORD_REG_BITS_OFF(x, p) do { iowrite32(ioread32((p)) & (~(x)), (p)); } while (0)
+
+#define BYTE_REG_BITS_SET(x, m, p) do { iowrite8((ioread8((p)) & (~(m)))|(x), (p)); } while (0)
+#define WORD_REG_BITS_SET(x, m, p) do { iowrite16((ioread16((p)) & (~(m)))|(x), (p)); } while (0)
+#define DWORD_REG_BITS_SET(x, m, p) do { iowrite32((ioread32((p)) & (~(m)))|(x), (p)); } while (0)
+
+
static int mdio_read(struct net_device *dev, int phy_id, int location);
static void mdio_write(struct net_device *dev, int phy_id, int location, int value);
static int rhine_open(struct net_device *dev);
@@ -422,6 +486,14 @@ static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
static const struct ethtool_ops netdev_ethtool_ops;
static int rhine_close(struct net_device *dev);
static void rhine_shutdown (struct pci_dev *pdev);
+static void rhine_vlan_rx_add_vid(struct net_device *dev, unsigned short vid);
+static void rhine_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid);
+static void rhine_set_cam(void __iomem *ioaddr, int idx, u8 *addr);
+static void rhine_set_vlan_cam(void __iomem *ioaddr, int idx, u8 *addr);
+static void rhine_set_cam_mask(void __iomem *ioaddr, u32 mask);
+static void rhine_set_vlan_cam_mask(void __iomem *ioaddr, u32 mask);
+static void rhine_init_cam_filter(struct net_device *dev);
+static void rhine_update_vcam(struct net_device *dev);
#define RHINE_WAIT_FOR(condition) do { \
int i=1024; \
@@ -629,6 +701,8 @@ static const struct net_device_ops rhine_netdev_ops = {
.ndo_set_mac_address = eth_mac_addr,
.ndo_do_ioctl = netdev_ioctl,
.ndo_tx_timeout = rhine_tx_timeout,
+ .ndo_vlan_rx_add_vid = rhine_vlan_rx_add_vid,
+ .ndo_vlan_rx_kill_vid = rhine_vlan_rx_kill_vid,
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = rhine_poll,
#endif
@@ -795,6 +869,10 @@ static int __devinit rhine_init_one(struct pci_dev *pdev,
if (rp->quirks & rqRhineI)
dev->features |= NETIF_F_SG|NETIF_F_HW_CSUM;
+ if (pdev->revision >= VT6105M)
+ dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX |
+ NETIF_F_HW_VLAN_FILTER;
+
/* dev->name not defined before register_netdev()! */
rc = register_netdev(dev);
if (rc)
@@ -1040,6 +1118,167 @@ static void rhine_set_carrier(struct mii_if_info *mii)
netif_carrier_ok(mii->dev));
}
+/**
+ * rhine_set_cam - set CAM multicast filters
+ * @ioaddr: register block of this Rhine
+ * @idx: multicast CAM index [0..MCAM_SIZE-1]
+ * @addr: multicast address (6 bytes)
+ *
+ * Load addresses into multicast filters.
+ */
+static void rhine_set_cam(void __iomem *ioaddr, int idx, u8 *addr)
+{
+ int i;
+
+ iowrite8(CAMC_CAMEN, ioaddr + CamCon);
+ wmb();
+
+ /* Paranoid -- idx out of range should never happen */
+ idx &= (MCAM_SIZE - 1);
+
+ iowrite8((u8) idx, ioaddr + CamAddr);
+
+ for (i = 0; i < 6; i++, addr++)
+ iowrite8(*addr, ioaddr + MulticastFilter0 + i);
+ udelay(10);
+ wmb();
+
+ iowrite8(CAMC_CAMWR | CAMC_CAMEN, ioaddr + CamCon);
+ udelay(10);
+
+ iowrite8(0, ioaddr + CamCon);
+}
+
+/**
+ * rhine_set_vlan_cam - set CAM VLAN filters
+ * @ioaddr: register block of this Rhine
+ * @idx: VLAN CAM index [0..VCAM_SIZE-1]
+ * @addr: VLAN ID (2 bytes)
+ *
+ * Load addresses into VLAN filters.
+ */
+static void rhine_set_vlan_cam(void __iomem *ioaddr, int idx, u8 *addr)
+{
+ iowrite8(CAMC_CAMEN | CAMC_VCAMSL, ioaddr + CamCon);
+ wmb();
+
+ /* Paranoid -- idx out of range should never happen */
+ idx &= (VCAM_SIZE - 1);
+
+ iowrite8((u8) idx, ioaddr + CamAddr);
+
+ iowrite16(*((u16 *) addr), ioaddr + MulticastFilter0 + 6);
+ udelay(10);
+ wmb();
+
+ iowrite8(CAMC_CAMWR | CAMC_CAMEN, ioaddr + CamCon);
+ udelay(10);
+
+ iowrite8(0, ioaddr + CamCon);
+}
+
+/**
+ * rhine_set_cam_mask - set multicast CAM mask
+ * @ioaddr: register block of this Rhine
+ * @mask: multicast CAM mask
+ *
+ * Mask sets multicast filters active/inactive.
+ */
+static void rhine_set_cam_mask(void __iomem *ioaddr, u32 mask)
+{
+ iowrite8(CAMC_CAMEN, ioaddr + CamCon);
+ wmb();
+
+ /* write mask */
+ iowrite32(mask, ioaddr + CamMask);
+
+ /* disable CAMEN */
+ iowrite8(0, ioaddr + CamCon);
+}
+
+/**
+ * rhine_set_vlan_cam_mask - set VLAN CAM mask
+ * @ioaddr: register block of this Rhine
+ * @mask: VLAN CAM mask
+ *
+ * Mask sets VLAN filters active/inactive.
+ */
+static void rhine_set_vlan_cam_mask(void __iomem *ioaddr, u32 mask)
+{
+ iowrite8(CAMC_CAMEN | CAMC_VCAMSL, ioaddr + CamCon);
+ wmb();
+
+ /* write mask */
+ iowrite32(mask, ioaddr + CamMask);
+
+ /* disable CAMEN */
+ iowrite8(0, ioaddr + CamCon);
+}
+
+/**
+ * rhine_init_cam_filter - initialize CAM filters
+ * @dev: network device
+ *
+ * Initialize (disable) hardware VLAN and multicast support on this
+ * Rhine.
+ */
+static void rhine_init_cam_filter(struct net_device *dev)
+{
+ struct rhine_private *rp = netdev_priv(dev);
+ void __iomem *ioaddr = rp->base;
+
+ /* Disable all CAMs */
+ rhine_set_vlan_cam_mask(ioaddr, 0);
+ rhine_set_cam_mask(ioaddr, 0);
+
+ /* disable hardware VLAN support */
+ BYTE_REG_BITS_ON(TCR_PQEN, ioaddr + TxConfig);
+ BYTE_REG_BITS_OFF(BCR1_VIDFR, ioaddr + PCIBusConfig1);
+}
+
+/**
+ * rhine_update_vcam - update VLAN CAM filters
+ * @rp: rhine_private data of this Rhine
+ *
+ * Update VLAN CAM filters to match configuration change.
+ */
+static void rhine_update_vcam(struct net_device *dev)
+{
+ struct rhine_private *rp = netdev_priv(dev);
+ void __iomem *ioaddr = rp->base;
+ u16 vid;
+ u32 vCAMmask = 0; /* 32 vCAMs (6105M and better) */
+ unsigned int i = 0;
+
+ for_each_set_bit(vid, rp->active_vlans, VLAN_N_VID) {
+ rhine_set_vlan_cam(ioaddr, i, (u8 *)&vid);
+ vCAMmask |= 1 << i;
+ if (++i >= VCAM_SIZE)
+ break;
+ }
+ rhine_set_vlan_cam_mask(ioaddr, vCAMmask);
+}
+
+static void rhine_vlan_rx_add_vid(struct net_device *dev, unsigned short vid)
+{
+ struct rhine_private *rp = netdev_priv(dev);
+
+ spin_lock_irq(&rp->lock);
+ set_bit(vid, rp->active_vlans);
+ rhine_update_vcam(dev);
+ spin_unlock_irq(&rp->lock);
+}
+
+static void rhine_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid)
+{
+ struct rhine_private *rp = netdev_priv(dev);
+
+ spin_lock_irq(&rp->lock);
+ clear_bit(vid, rp->active_vlans);
+ rhine_update_vcam(dev);
+ spin_unlock_irq(&rp->lock);
+}
+
static void init_registers(struct net_device *dev)
{
struct rhine_private *rp = netdev_priv(dev);
@@ -1061,6 +1300,9 @@ static void init_registers(struct net_device *dev)
rhine_set_rx_mode(dev);
+ if (rp->pdev->revision >= VT6105M)
+ rhine_init_cam_filter(dev);
+
napi_enable(&rp->napi);
/* Enable interrupts by setting the interrupt mask. */
@@ -1276,16 +1518,28 @@ static netdev_tx_t rhine_start_tx(struct sk_buff *skb,
rp->tx_ring[entry].desc_length =
cpu_to_le32(TXDESC | (skb->len >= ETH_ZLEN ? skb->len : ETH_ZLEN));
+ if (unlikely(vlan_tx_tag_present(skb))) {
+ rp->tx_ring[entry].tx_status = cpu_to_le32((vlan_tx_tag_get(skb)) << 16);
+ /* request tagging */
+ rp->tx_ring[entry].desc_length |= cpu_to_le32(0x020000);
+ }
+ else
+ rp->tx_ring[entry].tx_status = 0;
+
/* lock eth irq */
spin_lock_irqsave(&rp->lock, flags);
wmb();
- rp->tx_ring[entry].tx_status = cpu_to_le32(DescOwn);
+ rp->tx_ring[entry].tx_status |= cpu_to_le32(DescOwn);
wmb();
rp->cur_tx++;
/* Non-x86 Todo: explicitly flush cache lines here. */
+ if (vlan_tx_tag_present(skb))
+ /* Tx queues are bits 7-0 (first Tx queue: bit 7) */
+ BYTE_REG_BITS_ON(1 << 7, ioaddr + TQWake);
+
/* Wake the potentially-idle transmit channel */
iowrite8(ioread8(ioaddr + ChipCmd1) | Cmd1TxDemand,
ioaddr + ChipCmd1);
@@ -1437,6 +1691,21 @@ static void rhine_tx(struct net_device *dev)
spin_unlock(&rp->lock);
}
+/**
+ * rhine_get_vlan_tci - extract TCI from Rx data buffer
+ * @skb: pointer to sk_buff
+ * @data_size: used data area of the buffer including CRC
+ *
+ * If hardware VLAN tag extraction is enabled and the chip indicates a 802.1Q
+ * packet, the extracted 802.1Q header (2 bytes TPID + 2 bytes TCI) is 4-byte
+ * aligned following the CRC.
+ */
+static inline u16 rhine_get_vlan_tci(struct sk_buff *skb, int data_size)
+{
+ u8 *trailer = (u8 *)skb->data + ((data_size + 3) & ~3) + 2;
+ return ntohs(*(u16 *)trailer);
+}
+
/* Process up to limit frames from receive ring */
static int rhine_rx(struct net_device *dev, int limit)
{
@@ -1454,6 +1723,7 @@ static int rhine_rx(struct net_device *dev, int limit)
for (count = 0; count < limit; ++count) {
struct rx_desc *desc = rp->rx_head_desc;
u32 desc_status = le32_to_cpu(desc->rx_status);
+ u32 desc_length = le32_to_cpu(desc->desc_length);
int data_size = desc_status >> 16;
if (desc_status & DescOwn)
@@ -1498,6 +1768,7 @@ static int rhine_rx(struct net_device *dev, int limit)
struct sk_buff *skb = NULL;
/* Length should omit the CRC */
int pkt_len = data_size - 4;
+ u16 vlan_tci = 0;
/* Check if the packet is long enough to accept without
copying to a minimally-sized skbuff. */
@@ -1532,7 +1803,14 @@ static int rhine_rx(struct net_device *dev, int limit)
rp->rx_buf_sz,
PCI_DMA_FROMDEVICE);
}
+
+ if (unlikely(desc_length & DescTag))
+ vlan_tci = rhine_get_vlan_tci(skb, data_size);
+
skb->protocol = eth_type_trans(skb, dev);
+
+ if (unlikely(desc_length & DescTag))
+ __vlan_hwaccel_put_tag(skb, vlan_tci);
netif_receive_skb(skb);
dev->stats.rx_bytes += pkt_len;
dev->stats.rx_packets++;
@@ -1596,6 +1874,11 @@ static void rhine_restart_tx(struct net_device *dev) {
iowrite8(ioread8(ioaddr + ChipCmd) | CmdTxOn,
ioaddr + ChipCmd);
+
+ if (rp->tx_ring[entry].desc_length & cpu_to_le32(0x020000))
+ /* Tx queues are bits 7-0 (first Tx queue: bit 7) */
+ BYTE_REG_BITS_ON(1 << 7, ioaddr + TQWake);
+
iowrite8(ioread8(ioaddr + ChipCmd1) | Cmd1TxDemand,
ioaddr + ChipCmd1);
IOSYNC;
@@ -1631,7 +1914,7 @@ static void rhine_error(struct net_device *dev, int intr_status)
}
if (intr_status & IntrTxUnderrun) {
if (rp->tx_thresh < 0xE0)
- iowrite8(rp->tx_thresh += 0x20, ioaddr + TxConfig);
+ BYTE_REG_BITS_SET((rp->tx_thresh += 0x20), 0x80, ioaddr + TxConfig);
if (debug > 1)
printk(KERN_INFO "%s: Transmitter underrun, Tx "
"threshold now %2.2x.\n",
@@ -1646,7 +1929,7 @@ static void rhine_error(struct net_device *dev, int intr_status)
(intr_status & (IntrTxAborted |
IntrTxUnderrun | IntrTxDescRace)) == 0) {
if (rp->tx_thresh < 0xE0) {
- iowrite8(rp->tx_thresh += 0x20, ioaddr + TxConfig);
+ BYTE_REG_BITS_SET((rp->tx_thresh += 0x20), 0x80, ioaddr + TxConfig);
}
if (debug > 1)
printk(KERN_INFO "%s: Unspecified error. Tx "
@@ -1688,7 +1971,8 @@ static void rhine_set_rx_mode(struct net_device *dev)
struct rhine_private *rp = netdev_priv(dev);
void __iomem *ioaddr = rp->base;
u32 mc_filter[2]; /* Multicast hash filter */
- u8 rx_mode; /* Note: 0x02=accept runt, 0x01=accept errs */
+ u8 rx_mode = 0x0C; /* Note: 0x02=accept runt, 0x01=accept errs */
+ struct netdev_hw_addr *ha;
if (dev->flags & IFF_PROMISC) { /* Set promiscuous. */
rx_mode = 0x1C;
@@ -1699,10 +1983,18 @@ static void rhine_set_rx_mode(struct net_device *dev)
/* Too many to match, or accept all multicasts. */
iowrite32(0xffffffff, ioaddr + MulticastFilter0);
iowrite32(0xffffffff, ioaddr + MulticastFilter1);
- rx_mode = 0x0C;
+ } else if (rp->pdev->revision >= VT6105M) {
+ int i = 0;
+ u32 mCAMmask = 0; /* 32 mCAMs (6105M and better) */
+ netdev_for_each_mc_addr(ha, dev) {
+ if (i == MCAM_SIZE)
+ break;
+ rhine_set_cam(ioaddr, i, ha->addr);
+ mCAMmask |= 1 << i;
+ i++;
+ }
+ rhine_set_cam_mask(ioaddr, mCAMmask);
} else {
- struct netdev_hw_addr *ha;
-
memset(mc_filter, 0, sizeof(mc_filter));
netdev_for_each_mc_addr(ha, dev) {
int bit_nr = ether_crc(ETH_ALEN, ha->addr) >> 26;
@@ -1711,9 +2003,15 @@ static void rhine_set_rx_mode(struct net_device *dev)
}
iowrite32(mc_filter[0], ioaddr + MulticastFilter0);
iowrite32(mc_filter[1], ioaddr + MulticastFilter1);
- rx_mode = 0x0C;
}
- iowrite8(rp->rx_thresh | rx_mode, ioaddr + RxConfig);
+ /* enable/disable VLAN receive filtering */
+ if (rp->pdev->revision >= VT6105M) {
+ if (dev->flags & IFF_PROMISC)
+ BYTE_REG_BITS_OFF(BCR1_VIDFR, ioaddr + PCIBusConfig1);
+ else
+ BYTE_REG_BITS_ON(BCR1_VIDFR, ioaddr + PCIBusConfig1);
+ }
+ BYTE_REG_BITS_ON(rx_mode, ioaddr + RxConfig);
}
static void netdev_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
@@ -1966,7 +2264,7 @@ static int rhine_resume(struct pci_dev *pdev)
if (!netif_running(dev))
return 0;
- if (request_irq(dev->irq, rhine_interrupt, IRQF_SHARED, dev->name, dev))
+ if (request_irq(dev->irq, rhine_interrupt, IRQF_SHARED, dev->name, dev))
printk(KERN_ERR "via-rhine %s: request_irq failed\n", dev->name);
ret = pci_set_power_state(pdev, PCI_D0);
^ permalink raw reply related
* [PATCH] Dot not insert RX urbs if EVENT_DEV_ASLEEP flag is set.
From: Indrek Peri @ 2010-12-06 10:24 UTC (permalink / raw)
To: dbrownell; +Cc: netdev, Indrek Peri
Signed-off-by: Indrek Peri <Indrek.Peri@Ericsson.com>
---
drivers/net/usb/usbnet.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index c04d49e..d83adcc 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -1172,7 +1172,8 @@ static void usbnet_bh (unsigned long param)
} else if (netif_running (dev->net) &&
netif_device_present (dev->net) &&
!timer_pending (&dev->delay) &&
- !test_bit (EVENT_RX_HALT, &dev->flags)) {
+ !test_bit (EVENT_RX_HALT, &dev->flags) &&
+ !test_bit (EVENT_DEV_ASLEEP, &dev->flags)) {
int temp = dev->rxq.qlen;
int qlen = RX_QLEN (dev);
--
1.7.0.3
^ permalink raw reply related
* [PATCH] Insert interrupt URB after resume, so that status transfers can flow.
From: Indrek Peri @ 2010-12-06 10:23 UTC (permalink / raw)
To: dbrownell; +Cc: netdev, Indrek Peri
Signed-off-by: Indrek Peri <Indrek.Peri@Ericsson.com>
---
drivers/net/usb/usbnet.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index c04d49e..eaa83f9 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -719,6 +719,7 @@ int usbnet_open (struct net_device *net)
/* start any status interrupt transfer */
if (dev->interrupt) {
+ usb_kill_urb(dev->interrupt); /* resume may add int urb */
retval = usb_submit_urb (dev->interrupt, GFP_KERNEL);
if (retval < 0) {
netif_err(dev, ifup, dev->net,
@@ -1495,6 +1496,17 @@ int usbnet_resume (struct usb_interface *intf)
spin_unlock_irq(&dev->txq.lock);
if (!(dev->txq.qlen >= TX_QLEN(dev)))
netif_start_queue(dev->net);
+
+ /* start any status interrupt transfer */
+ if (dev->interrupt) {
+ retval = usb_submit_urb(dev->interrupt, GFP_KERNEL);
+ if (retval < 0) {
+ netif_err(dev, ifup, dev->net,
+ "intr submit %d\n", retval);
+ return retval;
+ }
+ }
+
tasklet_schedule (&dev->bh);
}
return 0;
--
1.7.0.3
^ permalink raw reply related
* [PATCH 1/2] dccp: Policy-based packet dequeueing infrastructure
From: Gerrit Renker @ 2010-12-06 7:44 UTC (permalink / raw)
To: davem; +Cc: dccp, netdev, Tomasz Grobelny
In-Reply-To: <1291621444-5927-1-git-send-email-gerrit@erg.abdn.ac.uk>
From: Tomasz Grobelny <tomasz@grobelny.oswiecenia.net>
This patch adds a generic infrastructure for policy-based dequeueing of
TX packets and provides two policies:
* a simple FIFO policy (which is the default) and
* a priority based policy (set via socket options).
Both policies honour the tx_qlen sysctl for the maximum size of the write
queue (can be overridden via socket options).
The priority policy uses skb->priority internally to assign an u32 priority
identifier, using the same ranking as SO_PRIORITY. The skb->priority field
is set to 0 when the packet leaves DCCP. The priority is supplied as ancillary
data using cmsg(3), the patch also provides the requisite parsing routines.
Signed-off-by: Tomasz Grobelny <tomasz@grobelny.oswiecenia.net>
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
---
Documentation/networking/dccp.txt | 20 ++++++
include/linux/dccp.h | 21 ++++++
net/dccp/Makefile | 4 +-
net/dccp/dccp.h | 12 ++++
net/dccp/output.c | 7 +-
net/dccp/proto.c | 67 +++++++++++++++++++-
net/dccp/qpolicy.c | 126 +++++++++++++++++++++++++++++++++++++
7 files changed, 248 insertions(+), 9 deletions(-)
create mode 100644 net/dccp/qpolicy.c
--- a/Documentation/networking/dccp.txt
+++ b/Documentation/networking/dccp.txt
@@ -47,6 +47,26 @@ http://linux-net.osdl.org/index.php/DCCP_Testing#Experimental_DCCP_source_tree
Socket options
==============
+DCCP_SOCKOPT_QPOLICY_ID sets the dequeuing policy for outgoing packets. It takes
+a policy ID as argument and can only be set before the connection (i.e. changes
+during an established connection are not supported). Currently, two policies are
+defined: the "simple" policy (DCCPQ_POLICY_SIMPLE), which does nothing special,
+and a priority-based variant (DCCPQ_POLICY_PRIO). The latter allows to pass an
+u32 priority value as ancillary data to sendmsg(), where higher numbers indicate
+a higher packet priority (similar to SO_PRIORITY). This ancillary data needs to
+be formatted using a cmsg(3) message header filled in as follows:
+ cmsg->cmsg_level = SOL_DCCP;
+ cmsg->cmsg_type = DCCP_SCM_PRIORITY;
+ cmsg->cmsg_len = CMSG_LEN(sizeof(uint32_t)); /* or CMSG_LEN(4) */
+
+DCCP_SOCKOPT_QPOLICY_TXQLEN sets the maximum length of the output queue. A zero
+value is always interpreted as unbounded queue length. If different from zero,
+the interpretation of this parameter depends on the current dequeuing policy
+(see above): the "simple" policy will enforce a fixed queue size by returning
+EAGAIN, whereas the "prio" policy enforces a fixed queue length by dropping the
+lowest-priority packet first. The default value for this parameter is
+initialised from /proc/sys/net/dccp/default/tx_qlen.
+
DCCP_SOCKOPT_SERVICE sets the service. The specification mandates use of
service codes (RFC 4340, sec. 8.1.2); if this socket option is not set,
the socket will fall back to 0 (which means that no meaningful service code
--- a/net/dccp/dccp.h
+++ b/net/dccp/dccp.h
@@ -243,6 +243,18 @@ extern void dccp_reqsk_send_ack(struct sock *sk, struct sk_buff *skb,
extern void dccp_send_sync(struct sock *sk, const u64 seq,
const enum dccp_pkt_type pkt_type);
+/*
+ * TX Packet Dequeueing Interface
+ */
+extern void dccp_qpolicy_push(struct sock *sk, struct sk_buff *skb);
+extern bool dccp_qpolicy_full(struct sock *sk);
+extern void dccp_qpolicy_drop(struct sock *sk, struct sk_buff *skb);
+extern struct sk_buff *dccp_qpolicy_top(struct sock *sk);
+extern struct sk_buff *dccp_qpolicy_pop(struct sock *sk);
+
+/*
+ * TX Packet Output and TX Timers
+ */
extern void dccp_write_xmit(struct sock *sk);
extern void dccp_write_space(struct sock *sk);
extern void dccp_flush_write_queue(struct sock *sk, long *time_budget);
--- a/include/linux/dccp.h
+++ b/include/linux/dccp.h
@@ -197,6 +197,21 @@ enum dccp_feature_numbers {
DCCPF_MAX_CCID_SPECIFIC = 255,
};
+/* DCCP socket control message types for cmsg */
+enum dccp_cmsg_type {
+ DCCP_SCM_PRIORITY = 1,
+ DCCP_SCM_QPOLICY_MAX = 0xFFFF,
+ /* ^-- Up to here reserved exclusively for qpolicy parameters */
+ DCCP_SCM_MAX
+};
+
+/* DCCP priorities for outgoing/queued packets */
+enum dccp_packet_dequeueing_policy {
+ DCCPQ_POLICY_SIMPLE,
+ DCCPQ_POLICY_PRIO,
+ DCCPQ_POLICY_MAX
+};
+
/* DCCP socket options */
#define DCCP_SOCKOPT_PACKET_SIZE 1 /* XXX deprecated, without effect */
#define DCCP_SOCKOPT_SERVICE 2
@@ -210,6 +225,8 @@ enum dccp_feature_numbers {
#define DCCP_SOCKOPT_CCID 13
#define DCCP_SOCKOPT_TX_CCID 14
#define DCCP_SOCKOPT_RX_CCID 15
+#define DCCP_SOCKOPT_QPOLICY_ID 16
+#define DCCP_SOCKOPT_QPOLICY_TXQLEN 17
#define DCCP_SOCKOPT_CCID_RX_INFO 128
#define DCCP_SOCKOPT_CCID_TX_INFO 192
@@ -458,6 +475,8 @@ struct dccp_ackvec;
* @dccps_hc_rx_ccid - CCID used for the receiver (or receiving half-connection)
* @dccps_hc_tx_ccid - CCID used for the sender (or sending half-connection)
* @dccps_options_received - parsed set of retrieved options
+ * @dccps_qpolicy - TX dequeueing policy, one of %dccp_packet_dequeueing_policy
+ * @dccps_tx_qlen - maximum length of the TX queue
* @dccps_role - role of this sock, one of %dccp_role
* @dccps_hc_rx_insert_options - receiver wants to add options when acking
* @dccps_hc_tx_insert_options - sender wants to add options when sending
@@ -500,6 +519,8 @@ struct dccp_sock {
struct ccid *dccps_hc_rx_ccid;
struct ccid *dccps_hc_tx_ccid;
struct dccp_options_received dccps_options_received;
+ __u8 dccps_qpolicy;
+ __u32 dccps_tx_qlen;
enum dccp_role dccps_role:2;
__u8 dccps_hc_rx_insert_options:1;
__u8 dccps_hc_tx_insert_options:1;
--- a/net/dccp/output.c
+++ b/net/dccp/output.c
@@ -242,7 +242,7 @@ static void dccp_xmit_packet(struct sock *sk)
{
int err, len;
struct dccp_sock *dp = dccp_sk(sk);
- struct sk_buff *skb = skb_dequeue(&sk->sk_write_queue);
+ struct sk_buff *skb = dccp_qpolicy_pop(sk);
if (unlikely(skb == NULL))
return;
@@ -345,7 +345,7 @@ void dccp_write_xmit(struct sock *sk)
struct dccp_sock *dp = dccp_sk(sk);
struct sk_buff *skb;
- while ((skb = skb_peek(&sk->sk_write_queue))) {
+ while ((skb = dccp_qpolicy_top(sk))) {
int rc = ccid_hc_tx_send_packet(dp->dccps_hc_tx_ccid, sk, skb);
switch (ccid_packet_dequeue_eval(rc)) {
@@ -359,8 +359,7 @@ void dccp_write_xmit(struct sock *sk)
dccp_xmit_packet(sk);
break;
case CCID_PACKET_ERR:
- skb_dequeue(&sk->sk_write_queue);
- kfree_skb(skb);
+ dccp_qpolicy_drop(sk, skb);
dccp_pr_debug("packet discarded due to err=%d\n", rc);
}
}
--- a/net/dccp/proto.c
+++ b/net/dccp/proto.c
@@ -185,6 +185,7 @@ int dccp_init_sock(struct sock *sk, const __u8 ctl_sock_initialized)
dp->dccps_role = DCCP_ROLE_UNDEFINED;
dp->dccps_service = DCCP_SERVICE_CODE_IS_ABSENT;
dp->dccps_l_ack_ratio = dp->dccps_r_ack_ratio = 1;
+ dp->dccps_tx_qlen = sysctl_dccp_tx_qlen;
dccp_init_xmit_timers(sk);
@@ -532,6 +533,20 @@ static int do_dccp_setsockopt(struct sock *sk, int level, int optname,
case DCCP_SOCKOPT_RECV_CSCOV:
err = dccp_setsockopt_cscov(sk, val, true);
break;
+ case DCCP_SOCKOPT_QPOLICY_ID:
+ if (sk->sk_state != DCCP_CLOSED)
+ err = -EISCONN;
+ else if (val < 0 || val >= DCCPQ_POLICY_MAX)
+ err = -EINVAL;
+ else
+ dp->dccps_qpolicy = val;
+ break;
+ case DCCP_SOCKOPT_QPOLICY_TXQLEN:
+ if (val < 0)
+ err = -EINVAL;
+ else
+ dp->dccps_tx_qlen = val;
+ break;
default:
err = -ENOPROTOOPT;
break;
@@ -639,6 +654,12 @@ static int do_dccp_getsockopt(struct sock *sk, int level, int optname,
case DCCP_SOCKOPT_RECV_CSCOV:
val = dp->dccps_pcrlen;
break;
+ case DCCP_SOCKOPT_QPOLICY_ID:
+ val = dp->dccps_qpolicy;
+ break;
+ case DCCP_SOCKOPT_QPOLICY_TXQLEN:
+ val = dp->dccps_tx_qlen;
+ break;
case 128 ... 191:
return ccid_hc_rx_getsockopt(dp->dccps_hc_rx_ccid, sk, optname,
len, (u32 __user *)optval, optlen);
@@ -681,6 +702,43 @@ int compat_dccp_getsockopt(struct sock *sk, int level, int optname,
EXPORT_SYMBOL_GPL(compat_dccp_getsockopt);
#endif
+static int dccp_msghdr_parse(struct msghdr *msg, struct sk_buff *skb)
+{
+ struct cmsghdr *cmsg = CMSG_FIRSTHDR(msg);
+
+ /*
+ * Assign an (opaque) qpolicy priority value to skb->priority.
+ *
+ * We are overloading this skb field for use with the qpolicy subystem.
+ * The skb->priority is normally used for the SO_PRIORITY option, which
+ * is initialised from sk_priority. Since the assignment of sk_priority
+ * to skb->priority happens later (on layer 3), we overload this field
+ * for use with queueing priorities as long as the skb is on layer 4.
+ * The default priority value (if nothing is set) is 0.
+ */
+ skb->priority = 0;
+
+ for (; cmsg != NULL; cmsg = CMSG_NXTHDR(msg, cmsg)) {
+
+ if (!CMSG_OK(msg, cmsg))
+ return -EINVAL;
+
+ if (cmsg->cmsg_level != SOL_DCCP)
+ continue;
+
+ switch (cmsg->cmsg_type) {
+ case DCCP_SCM_PRIORITY:
+ if (cmsg->cmsg_len != CMSG_LEN(sizeof(__u32)))
+ return -EINVAL;
+ skb->priority = *(__u32 *)CMSG_DATA(cmsg);
+ break;
+ default:
+ return -EINVAL;
+ }
+ }
+ return 0;
+}
+
int dccp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
size_t len)
{
@@ -696,8 +754,7 @@ int dccp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
lock_sock(sk);
- if (sysctl_dccp_tx_qlen &&
- (sk->sk_write_queue.qlen >= sysctl_dccp_tx_qlen)) {
+ if (dccp_qpolicy_full(sk)) {
rc = -EAGAIN;
goto out_release;
}
@@ -725,7 +782,11 @@ int dccp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
if (rc != 0)
goto out_discard;
- skb_queue_tail(&sk->sk_write_queue, skb);
+ rc = dccp_msghdr_parse(msg, skb);
+ if (rc != 0)
+ goto out_discard;
+
+ dccp_qpolicy_push(sk, skb);
/*
* The xmit_timer is set if the TX CCID is rate-based and will expire
* when congestion control permits to release further packets into the
new file mode 100644
--- /dev/null
+++ b/net/dccp/qpolicy.c
@@ -0,0 +1,126 @@
+/*
+ * net/dccp/qpolicy.c
+ *
+ * Policy-based packet dequeueing interface for DCCP.
+ *
+ * Copyright (c) 2008 Tomasz Grobelny <tomasz@grobelny.oswiecenia.net>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License v2
+ * as published by the Free Software Foundation.
+ */
+#include "dccp.h"
+
+/*
+ * Simple Dequeueing Policy:
+ * If tx_qlen is different from 0, enqueue up to tx_qlen elements.
+ */
+static void qpolicy_simple_push(struct sock *sk, struct sk_buff *skb)
+{
+ skb_queue_tail(&sk->sk_write_queue, skb);
+}
+
+static bool qpolicy_simple_full(struct sock *sk)
+{
+ return dccp_sk(sk)->dccps_tx_qlen &&
+ sk->sk_write_queue.qlen >= dccp_sk(sk)->dccps_tx_qlen;
+}
+
+static struct sk_buff *qpolicy_simple_top(struct sock *sk)
+{
+ return skb_peek(&sk->sk_write_queue);
+}
+
+/*
+ * Priority-based Dequeueing Policy:
+ * If tx_qlen is different from 0 and the queue has reached its upper bound
+ * of tx_qlen elements, replace older packets lowest-priority-first.
+ */
+static struct sk_buff *qpolicy_prio_best_skb(struct sock *sk)
+{
+ struct sk_buff *skb, *best = NULL;
+
+ skb_queue_walk(&sk->sk_write_queue, skb)
+ if (best == NULL || skb->priority > best->priority)
+ best = skb;
+ return best;
+}
+
+static struct sk_buff *qpolicy_prio_worst_skb(struct sock *sk)
+{
+ struct sk_buff *skb, *worst = NULL;
+
+ skb_queue_walk(&sk->sk_write_queue, skb)
+ if (worst == NULL || skb->priority < worst->priority)
+ worst = skb;
+ return worst;
+}
+
+static bool qpolicy_prio_full(struct sock *sk)
+{
+ if (qpolicy_simple_full(sk))
+ dccp_qpolicy_drop(sk, qpolicy_prio_worst_skb(sk));
+ return false;
+}
+
+/**
+ * struct dccp_qpolicy_operations - TX Packet Dequeueing Interface
+ * @push: add a new @skb to the write queue
+ * @full: indicates that no more packets will be admitted
+ * @top: peeks at whatever the queueing policy defines as its `top'
+ */
+static struct dccp_qpolicy_operations {
+ void (*push) (struct sock *sk, struct sk_buff *skb);
+ bool (*full) (struct sock *sk);
+ struct sk_buff* (*top) (struct sock *sk);
+
+} qpol_table[DCCPQ_POLICY_MAX] = {
+ [DCCPQ_POLICY_SIMPLE] = {
+ .push = qpolicy_simple_push,
+ .full = qpolicy_simple_full,
+ .top = qpolicy_simple_top,
+ },
+ [DCCPQ_POLICY_PRIO] = {
+ .push = qpolicy_simple_push,
+ .full = qpolicy_prio_full,
+ .top = qpolicy_prio_best_skb,
+ },
+};
+
+/*
+ * Externally visible interface
+ */
+void dccp_qpolicy_push(struct sock *sk, struct sk_buff *skb)
+{
+ qpol_table[dccp_sk(sk)->dccps_qpolicy].push(sk, skb);
+}
+
+bool dccp_qpolicy_full(struct sock *sk)
+{
+ return qpol_table[dccp_sk(sk)->dccps_qpolicy].full(sk);
+}
+
+void dccp_qpolicy_drop(struct sock *sk, struct sk_buff *skb)
+{
+ if (skb != NULL) {
+ skb_unlink(skb, &sk->sk_write_queue);
+ kfree_skb(skb);
+ }
+}
+
+struct sk_buff *dccp_qpolicy_top(struct sock *sk)
+{
+ return qpol_table[dccp_sk(sk)->dccps_qpolicy].top(sk);
+}
+
+struct sk_buff *dccp_qpolicy_pop(struct sock *sk)
+{
+ struct sk_buff *skb = dccp_qpolicy_top(sk);
+
+ if (skb != NULL) {
+ /* Clear any skb fields that we used internally */
+ skb->priority = 0;
+ skb_unlink(skb, &sk->sk_write_queue);
+ }
+ return skb;
+}
--- a/net/dccp/Makefile
+++ b/net/dccp/Makefile
@@ -1,7 +1,7 @@
obj-$(CONFIG_IP_DCCP) += dccp.o dccp_ipv4.o
-dccp-y := ccid.o feat.o input.o minisocks.o options.o output.o proto.o timer.o
-
+dccp-y := ccid.o feat.o input.o minisocks.o options.o output.o proto.o timer.o \
+ qpolicy.o
#
# CCID algorithms to be used by dccp.ko
#
^ permalink raw reply
* net-next-2.6 [PATCH 0/2] dccp: Policy-based packet dequeueing interface
From: Gerrit Renker @ 2010-12-06 7:44 UTC (permalink / raw)
To: davem; +Cc: dccp, netdev
In-Reply-To: <dccp_net_next_2_6__packet_dequeueing_interface>
Hi Dave,
please find attached a self-contained 2-patch set by Tomasz which adds an API
to influence DCCP packet dequeueing. It evolved from discussions in 2008,
adding and adds basic building blocks for sending congestion controlled
multimedia packets that have a priority or a deadline attached to them.
Occasionally people still make new suggestions for such an API, apparently
overlooking the excellent work Tomasz has done and which has been in the
test tree for two years.
Patch #1: introduces the new policy-based packet dequeueing infrastructure.
Patch #2: adds parameter (sanity) checking of cmsg qpolicy parameters.
I have also placed this in into a fresh (today's) copy of net-next-2.6, on
git://eden-feed.erg.abdn.ac.uk/net-next-2.6 [subtree 'dccp']
The set is fully bisectable.
---
Documentation/networking/dccp.txt | 20 ++++++
include/linux/dccp.h | 21 ++++++
net/dccp/Makefile | 4 +-
net/dccp/dccp.h | 13 ++++
net/dccp/output.c | 7 +-
net/dccp/proto.c | 71 ++++++++++++++++++-
net/dccp/qpolicy.c | 137 +++++++++++++++++++++++++++++++++++++
7 files changed, 264 insertions(+), 9 deletions(-)
^ permalink raw reply
* Re: [PATCH net-next-2.6] pktgen: adding prefetchw() call
From: Eric Dumazet @ 2010-12-06 7:26 UTC (permalink / raw)
To: Junchang Wang
Cc: davem, robert.olsson, john.r.fastabend, andy.shevchenko, netdev
In-Reply-To: <20101206063349.GA6147@Desktop-Junchang>
Le lundi 06 décembre 2010 à 14:33 +0800, Junchang Wang a écrit :
> We know for sure pktgen is going to write skb->data right after
> *_alloc_skb, causing unnecessary cache misses.
>
> Idea is to add a prefetchw() call to prefetch the first cache line
> indicated by skb->data. On systems with Adjacent Cache Line Prefetch,
> it's probably two cache lines are prefetched.
> With this prefetch, pktgen on Intel SR1625 server with two E5530
> quad-core processors and a single ixgbe-based NIC went from 8.63Mpps
> to 9.03Mpps, with 4.6% improvement.
>
>
> Signed-off-by: Junchang Wang <junchangwang@gmail.com>
> ---
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
^ permalink raw reply
* [PATCH v2] net/r8169: Remove the firmware of RTL8111D
From: Hayes Wang @ 2010-12-06 7:11 UTC (permalink / raw)
To: romieu; +Cc: netdev, linux-kernel, Hayes Wang
Remove the firmware of RTL8111D from the kernel.
The binary file of firmware would be moved to linux-firmware repository.
The firmwares are rtl_nic/rtl8168d-1.fw and rtl_nic/rtl8168d-2.fw.
The driver would load the firmware through request_firmware. The driver
would just go along if the firmware couldn't be found. However, it is
suggested to be done with the suitable firmware.
Signed-off-by: Hayes Wang <hayeswang@realtek.com>
---
drivers/net/r8169.c | 796 ++++++++-------------------------------------------
1 files changed, 117 insertions(+), 679 deletions(-)
mode change 100644 => 100755 drivers/net/r8169.c
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
old mode 100644
new mode 100755
index 7d33ef4..e0df607
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -24,6 +24,7 @@
#include <linux/init.h>
#include <linux/dma-mapping.h>
#include <linux/pm_runtime.h>
+#include <linux/firmware.h>
#include <asm/system.h>
#include <asm/io.h>
@@ -1383,6 +1384,50 @@ static void rtl_phy_write(void __iomem *ioaddr, const struct phy_reg *regs, int
}
}
+#define PHY_READ 0x00000000
+#define PHY_DATA_OR 0x10000000
+#define PHY_DATA_AND 0x20000000
+#define PHY_BJMPN 0x30000000
+#define PHY_READ_EFUSE 0x40000000
+#define PHY_READ_MAC_BYTE 0x50000000
+#define PHY_WRITE_MAC_BYTE 0x60000000
+#define PHY_CLEAR_READCOUNT 0x70000000
+#define PHY_WRITE 0x80000000
+#define PHY_READCOUNT_EQ_SKIP 0x90000000
+#define PHY_COMP_EQ_SKIPN 0xA0000000
+#define PHY_COMP_NEQ_SKIPN 0xB0000000
+#define PHY_WRITE_PREVIOUS 0xC0000000
+#define PHY_SKIPN 0xD0000000
+#define PHY_DELAY_MS 0xE0000000
+#define PHY_WRITE_ERI_WORD 0xF0000000
+
+static void
+rtl_phy_write_fw(struct rtl8169_private *tp, const struct firmware *fw)
+{
+ void __iomem *ioaddr = tp->mmio_addr;
+ u32 *phytable = (u32 *)fw->data;
+ u32 action;
+ size_t len = fw->size / sizeof(*phytable);
+ u32 regno, data;
+
+ while (len-- > 0 && *phytable != 0) {
+ action = le32_to_cpu(*phytable);
+ regno = (action & 0x0FFF0000) >> 16;
+ data = action & 0x0000FFFF;
+
+ switch(action & 0xF0000000) {
+ case PHY_WRITE:
+ mdio_write(ioaddr, regno, data);
+ phytable++;
+ break;
+ default:
+ netif_err(tp, probe, tp->dev,
+ "Unknown action 0x%08x\n", action);
+ return;
+ }
+ }
+}
+
static void rtl8169s_hw_phy_config(void __iomem *ioaddr)
{
static const struct phy_reg phy_reg_init[] = {
@@ -1715,9 +1760,10 @@ static void rtl8168c_4_hw_phy_config(void __iomem *ioaddr)
rtl8168c_3_hw_phy_config(ioaddr);
}
-static void rtl8168d_1_hw_phy_config(void __iomem *ioaddr)
+static void rtl8168d_1_hw_phy_config(struct rtl8169_private *tp)
{
static const struct phy_reg phy_reg_init_0[] = {
+ /* Channel Estimation */
{ 0x1f, 0x0001 },
{ 0x06, 0x4064 },
{ 0x07, 0x2863 },
@@ -1734,379 +1780,41 @@ static void rtl8168d_1_hw_phy_config(void __iomem *ioaddr)
{ 0x12, 0xf49f },
{ 0x13, 0x070b },
{ 0x1a, 0x05ad },
- { 0x14, 0x94c0 }
- };
- static const struct phy_reg phy_reg_init_1[] = {
+ { 0x14, 0x94c0 },
+
+ /*
+ * Tx Error Issue
+ * enhance line driver power
+ */
{ 0x1f, 0x0002 },
{ 0x06, 0x5561 },
{ 0x1f, 0x0005 },
{ 0x05, 0x8332 },
- { 0x06, 0x5561 }
- };
- static const struct phy_reg phy_reg_init_2[] = {
- { 0x1f, 0x0005 },
- { 0x05, 0xffc2 },
- { 0x1f, 0x0005 },
- { 0x05, 0x8000 },
- { 0x06, 0xf8f9 },
- { 0x06, 0xfaef },
- { 0x06, 0x59ee },
- { 0x06, 0xf8ea },
- { 0x06, 0x00ee },
- { 0x06, 0xf8eb },
- { 0x06, 0x00e0 },
- { 0x06, 0xf87c },
- { 0x06, 0xe1f8 },
- { 0x06, 0x7d59 },
- { 0x06, 0x0fef },
- { 0x06, 0x0139 },
- { 0x06, 0x029e },
- { 0x06, 0x06ef },
- { 0x06, 0x1039 },
- { 0x06, 0x089f },
- { 0x06, 0x2aee },
- { 0x06, 0xf8ea },
- { 0x06, 0x00ee },
- { 0x06, 0xf8eb },
- { 0x06, 0x01e0 },
- { 0x06, 0xf87c },
- { 0x06, 0xe1f8 },
- { 0x06, 0x7d58 },
- { 0x06, 0x409e },
- { 0x06, 0x0f39 },
- { 0x06, 0x46aa },
- { 0x06, 0x0bbf },
- { 0x06, 0x8290 },
- { 0x06, 0xd682 },
- { 0x06, 0x9802 },
- { 0x06, 0x014f },
- { 0x06, 0xae09 },
- { 0x06, 0xbf82 },
- { 0x06, 0x98d6 },
- { 0x06, 0x82a0 },
- { 0x06, 0x0201 },
- { 0x06, 0x4fef },
- { 0x06, 0x95fe },
- { 0x06, 0xfdfc },
- { 0x06, 0x05f8 },
- { 0x06, 0xf9fa },
- { 0x06, 0xeef8 },
- { 0x06, 0xea00 },
- { 0x06, 0xeef8 },
- { 0x06, 0xeb00 },
- { 0x06, 0xe2f8 },
- { 0x06, 0x7ce3 },
- { 0x06, 0xf87d },
- { 0x06, 0xa511 },
- { 0x06, 0x1112 },
- { 0x06, 0xd240 },
- { 0x06, 0xd644 },
- { 0x06, 0x4402 },
- { 0x06, 0x8217 },
- { 0x06, 0xd2a0 },
- { 0x06, 0xd6aa },
- { 0x06, 0xaa02 },
- { 0x06, 0x8217 },
- { 0x06, 0xae0f },
- { 0x06, 0xa544 },
- { 0x06, 0x4402 },
- { 0x06, 0xae4d },
- { 0x06, 0xa5aa },
- { 0x06, 0xaa02 },
- { 0x06, 0xae47 },
- { 0x06, 0xaf82 },
- { 0x06, 0x13ee },
- { 0x06, 0x834e },
- { 0x06, 0x00ee },
- { 0x06, 0x834d },
- { 0x06, 0x0fee },
- { 0x06, 0x834c },
- { 0x06, 0x0fee },
- { 0x06, 0x834f },
- { 0x06, 0x00ee },
- { 0x06, 0x8351 },
- { 0x06, 0x00ee },
- { 0x06, 0x834a },
- { 0x06, 0xffee },
- { 0x06, 0x834b },
- { 0x06, 0xffe0 },
- { 0x06, 0x8330 },
- { 0x06, 0xe183 },
- { 0x06, 0x3158 },
- { 0x06, 0xfee4 },
- { 0x06, 0xf88a },
- { 0x06, 0xe5f8 },
- { 0x06, 0x8be0 },
- { 0x06, 0x8332 },
- { 0x06, 0xe183 },
- { 0x06, 0x3359 },
- { 0x06, 0x0fe2 },
- { 0x06, 0x834d },
- { 0x06, 0x0c24 },
- { 0x06, 0x5af0 },
- { 0x06, 0x1e12 },
- { 0x06, 0xe4f8 },
- { 0x06, 0x8ce5 },
- { 0x06, 0xf88d },
- { 0x06, 0xaf82 },
- { 0x06, 0x13e0 },
- { 0x06, 0x834f },
- { 0x06, 0x10e4 },
- { 0x06, 0x834f },
- { 0x06, 0xe083 },
- { 0x06, 0x4e78 },
- { 0x06, 0x009f },
- { 0x06, 0x0ae0 },
- { 0x06, 0x834f },
- { 0x06, 0xa010 },
- { 0x06, 0xa5ee },
- { 0x06, 0x834e },
- { 0x06, 0x01e0 },
- { 0x06, 0x834e },
- { 0x06, 0x7805 },
- { 0x06, 0x9e9a },
- { 0x06, 0xe083 },
- { 0x06, 0x4e78 },
- { 0x06, 0x049e },
- { 0x06, 0x10e0 },
- { 0x06, 0x834e },
- { 0x06, 0x7803 },
- { 0x06, 0x9e0f },
- { 0x06, 0xe083 },
- { 0x06, 0x4e78 },
- { 0x06, 0x019e },
- { 0x06, 0x05ae },
- { 0x06, 0x0caf },
- { 0x06, 0x81f8 },
- { 0x06, 0xaf81 },
- { 0x06, 0xa3af },
- { 0x06, 0x81dc },
- { 0x06, 0xaf82 },
- { 0x06, 0x13ee },
- { 0x06, 0x8348 },
- { 0x06, 0x00ee },
- { 0x06, 0x8349 },
- { 0x06, 0x00e0 },
- { 0x06, 0x8351 },
- { 0x06, 0x10e4 },
- { 0x06, 0x8351 },
- { 0x06, 0x5801 },
- { 0x06, 0x9fea },
- { 0x06, 0xd000 },
- { 0x06, 0xd180 },
- { 0x06, 0x1f66 },
- { 0x06, 0xe2f8 },
- { 0x06, 0xeae3 },
- { 0x06, 0xf8eb },
- { 0x06, 0x5af8 },
- { 0x06, 0x1e20 },
- { 0x06, 0xe6f8 },
- { 0x06, 0xeae5 },
- { 0x06, 0xf8eb },
- { 0x06, 0xd302 },
- { 0x06, 0xb3fe },
- { 0x06, 0xe2f8 },
- { 0x06, 0x7cef },
- { 0x06, 0x325b },
- { 0x06, 0x80e3 },
- { 0x06, 0xf87d },
- { 0x06, 0x9e03 },
- { 0x06, 0x7dff },
- { 0x06, 0xff0d },
- { 0x06, 0x581c },
- { 0x06, 0x551a },
- { 0x06, 0x6511 },
- { 0x06, 0xa190 },
- { 0x06, 0xd3e2 },
- { 0x06, 0x8348 },
- { 0x06, 0xe383 },
- { 0x06, 0x491b },
- { 0x06, 0x56ab },
- { 0x06, 0x08ef },
- { 0x06, 0x56e6 },
- { 0x06, 0x8348 },
- { 0x06, 0xe783 },
- { 0x06, 0x4910 },
- { 0x06, 0xd180 },
- { 0x06, 0x1f66 },
- { 0x06, 0xa004 },
- { 0x06, 0xb9e2 },
- { 0x06, 0x8348 },
- { 0x06, 0xe383 },
- { 0x06, 0x49ef },
- { 0x06, 0x65e2 },
- { 0x06, 0x834a },
- { 0x06, 0xe383 },
- { 0x06, 0x4b1b },
- { 0x06, 0x56aa },
- { 0x06, 0x0eef },
- { 0x06, 0x56e6 },
- { 0x06, 0x834a },
- { 0x06, 0xe783 },
- { 0x06, 0x4be2 },
- { 0x06, 0x834d },
- { 0x06, 0xe683 },
- { 0x06, 0x4ce0 },
- { 0x06, 0x834d },
- { 0x06, 0xa000 },
- { 0x06, 0x0caf },
- { 0x06, 0x81dc },
- { 0x06, 0xe083 },
- { 0x06, 0x4d10 },
- { 0x06, 0xe483 },
- { 0x06, 0x4dae },
- { 0x06, 0x0480 },
- { 0x06, 0xe483 },
- { 0x06, 0x4de0 },
- { 0x06, 0x834e },
- { 0x06, 0x7803 },
- { 0x06, 0x9e0b },
- { 0x06, 0xe083 },
- { 0x06, 0x4e78 },
- { 0x06, 0x049e },
- { 0x06, 0x04ee },
- { 0x06, 0x834e },
- { 0x06, 0x02e0 },
- { 0x06, 0x8332 },
- { 0x06, 0xe183 },
- { 0x06, 0x3359 },
- { 0x06, 0x0fe2 },
- { 0x06, 0x834d },
- { 0x06, 0x0c24 },
- { 0x06, 0x5af0 },
- { 0x06, 0x1e12 },
- { 0x06, 0xe4f8 },
- { 0x06, 0x8ce5 },
- { 0x06, 0xf88d },
- { 0x06, 0xe083 },
- { 0x06, 0x30e1 },
- { 0x06, 0x8331 },
- { 0x06, 0x6801 },
- { 0x06, 0xe4f8 },
- { 0x06, 0x8ae5 },
- { 0x06, 0xf88b },
- { 0x06, 0xae37 },
- { 0x06, 0xee83 },
- { 0x06, 0x4e03 },
- { 0x06, 0xe083 },
- { 0x06, 0x4ce1 },
- { 0x06, 0x834d },
- { 0x06, 0x1b01 },
- { 0x06, 0x9e04 },
- { 0x06, 0xaaa1 },
- { 0x06, 0xaea8 },
- { 0x06, 0xee83 },
- { 0x06, 0x4e04 },
- { 0x06, 0xee83 },
- { 0x06, 0x4f00 },
- { 0x06, 0xaeab },
- { 0x06, 0xe083 },
- { 0x06, 0x4f78 },
- { 0x06, 0x039f },
- { 0x06, 0x14ee },
- { 0x06, 0x834e },
- { 0x06, 0x05d2 },
- { 0x06, 0x40d6 },
- { 0x06, 0x5554 },
- { 0x06, 0x0282 },
- { 0x06, 0x17d2 },
- { 0x06, 0xa0d6 },
- { 0x06, 0xba00 },
- { 0x06, 0x0282 },
- { 0x06, 0x17fe },
- { 0x06, 0xfdfc },
- { 0x06, 0x05f8 },
- { 0x06, 0xe0f8 },
- { 0x06, 0x60e1 },
- { 0x06, 0xf861 },
- { 0x06, 0x6802 },
- { 0x06, 0xe4f8 },
- { 0x06, 0x60e5 },
- { 0x06, 0xf861 },
- { 0x06, 0xe0f8 },
- { 0x06, 0x48e1 },
- { 0x06, 0xf849 },
- { 0x06, 0x580f },
- { 0x06, 0x1e02 },
- { 0x06, 0xe4f8 },
- { 0x06, 0x48e5 },
- { 0x06, 0xf849 },
- { 0x06, 0xd000 },
- { 0x06, 0x0282 },
- { 0x06, 0x5bbf },
- { 0x06, 0x8350 },
- { 0x06, 0xef46 },
- { 0x06, 0xdc19 },
- { 0x06, 0xddd0 },
- { 0x06, 0x0102 },
- { 0x06, 0x825b },
- { 0x06, 0x0282 },
- { 0x06, 0x77e0 },
- { 0x06, 0xf860 },
- { 0x06, 0xe1f8 },
- { 0x06, 0x6158 },
- { 0x06, 0xfde4 },
- { 0x06, 0xf860 },
- { 0x06, 0xe5f8 },
- { 0x06, 0x61fc },
- { 0x06, 0x04f9 },
- { 0x06, 0xfafb },
- { 0x06, 0xc6bf },
- { 0x06, 0xf840 },
- { 0x06, 0xbe83 },
- { 0x06, 0x50a0 },
- { 0x06, 0x0101 },
- { 0x06, 0x071b },
- { 0x06, 0x89cf },
- { 0x06, 0xd208 },
- { 0x06, 0xebdb },
- { 0x06, 0x19b2 },
- { 0x06, 0xfbff },
- { 0x06, 0xfefd },
- { 0x06, 0x04f8 },
- { 0x06, 0xe0f8 },
- { 0x06, 0x48e1 },
- { 0x06, 0xf849 },
- { 0x06, 0x6808 },
- { 0x06, 0xe4f8 },
- { 0x06, 0x48e5 },
- { 0x06, 0xf849 },
- { 0x06, 0x58f7 },
- { 0x06, 0xe4f8 },
- { 0x06, 0x48e5 },
- { 0x06, 0xf849 },
- { 0x06, 0xfc04 },
- { 0x06, 0x4d20 },
- { 0x06, 0x0002 },
- { 0x06, 0x4e22 },
- { 0x06, 0x0002 },
- { 0x06, 0x4ddf },
- { 0x06, 0xff01 },
- { 0x06, 0x4edd },
- { 0x06, 0xff01 },
- { 0x05, 0x83d4 },
- { 0x06, 0x8000 },
- { 0x05, 0x83d8 },
- { 0x06, 0x8051 },
- { 0x02, 0x6010 },
- { 0x03, 0xdc00 },
- { 0x05, 0xfff6 },
- { 0x06, 0x00fc },
- { 0x1f, 0x0000 },
+ { 0x06, 0x5561 },
+
+ /*
+ * Can not link to 1Gbps with bad cable
+ * Decrease SNR threshold form 21.07dB to 19.04dB
+ */
+ { 0x1f, 0x0001 },
+ { 0x17, 0x0cc0 },
{ 0x1f, 0x0000 },
- { 0x0d, 0xf880 },
- { 0x1f, 0x0000 }
+ { 0x0d, 0xf880 }
};
+ void __iomem *ioaddr = tp->mmio_addr;
+ const struct firmware *fw;
rtl_phy_write(ioaddr, phy_reg_init_0, ARRAY_SIZE(phy_reg_init_0));
+ /*
+ * Rx Error Issue
+ * Fine Tune Switching regulator parameter
+ */
mdio_write(ioaddr, 0x1f, 0x0002);
mdio_plus_minus(ioaddr, 0x0b, 0x0010, 0x00ef);
mdio_plus_minus(ioaddr, 0x0c, 0xa200, 0x5d00);
- rtl_phy_write(ioaddr, phy_reg_init_1, ARRAY_SIZE(phy_reg_init_1));
-
if (rtl8168d_efuse_read(ioaddr, 0x01) == 0xb1) {
static const struct phy_reg phy_reg_init[] = {
{ 0x1f, 0x0002 },
@@ -2147,20 +1855,35 @@ static void rtl8168d_1_hw_phy_config(void __iomem *ioaddr)
rtl_phy_write(ioaddr, phy_reg_init, ARRAY_SIZE(phy_reg_init));
}
+ /* RSET couple improve */
mdio_write(ioaddr, 0x1f, 0x0002);
mdio_patch(ioaddr, 0x0d, 0x0300);
mdio_patch(ioaddr, 0x0f, 0x0010);
+ /* Fine tune PLL performance */
mdio_write(ioaddr, 0x1f, 0x0002);
mdio_plus_minus(ioaddr, 0x02, 0x0100, 0x0600);
mdio_plus_minus(ioaddr, 0x03, 0x0000, 0xe000);
- rtl_phy_write(ioaddr, phy_reg_init_2, ARRAY_SIZE(phy_reg_init_2));
+ mdio_write(ioaddr, 0x1F, 0x0005);
+ mdio_write(ioaddr, 0x05, 0x001B);
+ if (mdio_read(ioaddr, 0x06) == 0xBF00 &&
+ request_firmware(&fw, "rtl_nic/rtl8168d-1.fw", &tp->pci_dev->dev) == 0) {
+ rtl_phy_write_fw(tp, fw);
+ release_firmware(fw);
+ } else {
+ netif_warn(tp, probe, tp->dev, "unable to apply firmware patch\n");
+ }
+
+ mdio_write(ioaddr, 0x1f, 0x0000);
}
-static void rtl8168d_2_hw_phy_config(void __iomem *ioaddr)
+MODULE_FIRMWARE("rtl_nic/rtl8168d-1.fw");
+
+static void rtl8168d_2_hw_phy_config(struct rtl8169_private *tp)
{
static const struct phy_reg phy_reg_init_0[] = {
+ /* Channel Estimation */
{ 0x1f, 0x0001 },
{ 0x06, 0x4064 },
{ 0x07, 0x2863 },
@@ -2179,324 +1902,28 @@ static void rtl8168d_2_hw_phy_config(void __iomem *ioaddr)
{ 0x1a, 0x05ad },
{ 0x14, 0x94c0 },
+ /*
+ * Tx Error Issue
+ * enhance line driver power
+ */
{ 0x1f, 0x0002 },
{ 0x06, 0x5561 },
{ 0x1f, 0x0005 },
{ 0x05, 0x8332 },
- { 0x06, 0x5561 }
- };
- static const struct phy_reg phy_reg_init_1[] = {
- { 0x1f, 0x0005 },
- { 0x05, 0xffc2 },
- { 0x1f, 0x0005 },
- { 0x05, 0x8000 },
- { 0x06, 0xf8f9 },
- { 0x06, 0xfaee },
- { 0x06, 0xf8ea },
- { 0x06, 0x00ee },
- { 0x06, 0xf8eb },
- { 0x06, 0x00e2 },
- { 0x06, 0xf87c },
- { 0x06, 0xe3f8 },
- { 0x06, 0x7da5 },
- { 0x06, 0x1111 },
- { 0x06, 0x12d2 },
- { 0x06, 0x40d6 },
- { 0x06, 0x4444 },
- { 0x06, 0x0281 },
- { 0x06, 0xc6d2 },
- { 0x06, 0xa0d6 },
- { 0x06, 0xaaaa },
- { 0x06, 0x0281 },
- { 0x06, 0xc6ae },
- { 0x06, 0x0fa5 },
- { 0x06, 0x4444 },
- { 0x06, 0x02ae },
- { 0x06, 0x4da5 },
- { 0x06, 0xaaaa },
- { 0x06, 0x02ae },
- { 0x06, 0x47af },
- { 0x06, 0x81c2 },
- { 0x06, 0xee83 },
- { 0x06, 0x4e00 },
- { 0x06, 0xee83 },
- { 0x06, 0x4d0f },
- { 0x06, 0xee83 },
- { 0x06, 0x4c0f },
- { 0x06, 0xee83 },
- { 0x06, 0x4f00 },
- { 0x06, 0xee83 },
- { 0x06, 0x5100 },
- { 0x06, 0xee83 },
- { 0x06, 0x4aff },
- { 0x06, 0xee83 },
- { 0x06, 0x4bff },
- { 0x06, 0xe083 },
- { 0x06, 0x30e1 },
- { 0x06, 0x8331 },
- { 0x06, 0x58fe },
- { 0x06, 0xe4f8 },
- { 0x06, 0x8ae5 },
- { 0x06, 0xf88b },
- { 0x06, 0xe083 },
- { 0x06, 0x32e1 },
- { 0x06, 0x8333 },
- { 0x06, 0x590f },
- { 0x06, 0xe283 },
- { 0x06, 0x4d0c },
- { 0x06, 0x245a },
- { 0x06, 0xf01e },
- { 0x06, 0x12e4 },
- { 0x06, 0xf88c },
- { 0x06, 0xe5f8 },
- { 0x06, 0x8daf },
- { 0x06, 0x81c2 },
- { 0x06, 0xe083 },
- { 0x06, 0x4f10 },
- { 0x06, 0xe483 },
- { 0x06, 0x4fe0 },
- { 0x06, 0x834e },
- { 0x06, 0x7800 },
- { 0x06, 0x9f0a },
- { 0x06, 0xe083 },
- { 0x06, 0x4fa0 },
- { 0x06, 0x10a5 },
- { 0x06, 0xee83 },
- { 0x06, 0x4e01 },
- { 0x06, 0xe083 },
- { 0x06, 0x4e78 },
- { 0x06, 0x059e },
- { 0x06, 0x9ae0 },
- { 0x06, 0x834e },
- { 0x06, 0x7804 },
- { 0x06, 0x9e10 },
- { 0x06, 0xe083 },
- { 0x06, 0x4e78 },
- { 0x06, 0x039e },
- { 0x06, 0x0fe0 },
- { 0x06, 0x834e },
- { 0x06, 0x7801 },
- { 0x06, 0x9e05 },
- { 0x06, 0xae0c },
- { 0x06, 0xaf81 },
- { 0x06, 0xa7af },
- { 0x06, 0x8152 },
- { 0x06, 0xaf81 },
- { 0x06, 0x8baf },
- { 0x06, 0x81c2 },
- { 0x06, 0xee83 },
- { 0x06, 0x4800 },
- { 0x06, 0xee83 },
- { 0x06, 0x4900 },
- { 0x06, 0xe083 },
- { 0x06, 0x5110 },
- { 0x06, 0xe483 },
- { 0x06, 0x5158 },
- { 0x06, 0x019f },
- { 0x06, 0xead0 },
- { 0x06, 0x00d1 },
- { 0x06, 0x801f },
- { 0x06, 0x66e2 },
- { 0x06, 0xf8ea },
- { 0x06, 0xe3f8 },
- { 0x06, 0xeb5a },
- { 0x06, 0xf81e },
- { 0x06, 0x20e6 },
- { 0x06, 0xf8ea },
- { 0x06, 0xe5f8 },
- { 0x06, 0xebd3 },
- { 0x06, 0x02b3 },
- { 0x06, 0xfee2 },
- { 0x06, 0xf87c },
- { 0x06, 0xef32 },
- { 0x06, 0x5b80 },
- { 0x06, 0xe3f8 },
- { 0x06, 0x7d9e },
- { 0x06, 0x037d },
- { 0x06, 0xffff },
- { 0x06, 0x0d58 },
- { 0x06, 0x1c55 },
- { 0x06, 0x1a65 },
- { 0x06, 0x11a1 },
- { 0x06, 0x90d3 },
- { 0x06, 0xe283 },
- { 0x06, 0x48e3 },
- { 0x06, 0x8349 },
- { 0x06, 0x1b56 },
- { 0x06, 0xab08 },
- { 0x06, 0xef56 },
- { 0x06, 0xe683 },
- { 0x06, 0x48e7 },
- { 0x06, 0x8349 },
- { 0x06, 0x10d1 },
- { 0x06, 0x801f },
- { 0x06, 0x66a0 },
- { 0x06, 0x04b9 },
- { 0x06, 0xe283 },
- { 0x06, 0x48e3 },
- { 0x06, 0x8349 },
- { 0x06, 0xef65 },
- { 0x06, 0xe283 },
- { 0x06, 0x4ae3 },
- { 0x06, 0x834b },
- { 0x06, 0x1b56 },
- { 0x06, 0xaa0e },
- { 0x06, 0xef56 },
- { 0x06, 0xe683 },
- { 0x06, 0x4ae7 },
- { 0x06, 0x834b },
- { 0x06, 0xe283 },
- { 0x06, 0x4de6 },
- { 0x06, 0x834c },
- { 0x06, 0xe083 },
- { 0x06, 0x4da0 },
- { 0x06, 0x000c },
- { 0x06, 0xaf81 },
- { 0x06, 0x8be0 },
- { 0x06, 0x834d },
- { 0x06, 0x10e4 },
- { 0x06, 0x834d },
- { 0x06, 0xae04 },
- { 0x06, 0x80e4 },
- { 0x06, 0x834d },
- { 0x06, 0xe083 },
- { 0x06, 0x4e78 },
- { 0x06, 0x039e },
- { 0x06, 0x0be0 },
- { 0x06, 0x834e },
- { 0x06, 0x7804 },
- { 0x06, 0x9e04 },
- { 0x06, 0xee83 },
- { 0x06, 0x4e02 },
- { 0x06, 0xe083 },
- { 0x06, 0x32e1 },
- { 0x06, 0x8333 },
- { 0x06, 0x590f },
- { 0x06, 0xe283 },
- { 0x06, 0x4d0c },
- { 0x06, 0x245a },
- { 0x06, 0xf01e },
- { 0x06, 0x12e4 },
- { 0x06, 0xf88c },
- { 0x06, 0xe5f8 },
- { 0x06, 0x8de0 },
- { 0x06, 0x8330 },
- { 0x06, 0xe183 },
- { 0x06, 0x3168 },
- { 0x06, 0x01e4 },
- { 0x06, 0xf88a },
- { 0x06, 0xe5f8 },
- { 0x06, 0x8bae },
- { 0x06, 0x37ee },
- { 0x06, 0x834e },
- { 0x06, 0x03e0 },
- { 0x06, 0x834c },
- { 0x06, 0xe183 },
- { 0x06, 0x4d1b },
- { 0x06, 0x019e },
- { 0x06, 0x04aa },
- { 0x06, 0xa1ae },
- { 0x06, 0xa8ee },
- { 0x06, 0x834e },
- { 0x06, 0x04ee },
- { 0x06, 0x834f },
- { 0x06, 0x00ae },
- { 0x06, 0xabe0 },
- { 0x06, 0x834f },
- { 0x06, 0x7803 },
- { 0x06, 0x9f14 },
- { 0x06, 0xee83 },
- { 0x06, 0x4e05 },
- { 0x06, 0xd240 },
- { 0x06, 0xd655 },
- { 0x06, 0x5402 },
- { 0x06, 0x81c6 },
- { 0x06, 0xd2a0 },
- { 0x06, 0xd6ba },
- { 0x06, 0x0002 },
- { 0x06, 0x81c6 },
- { 0x06, 0xfefd },
- { 0x06, 0xfc05 },
- { 0x06, 0xf8e0 },
- { 0x06, 0xf860 },
- { 0x06, 0xe1f8 },
- { 0x06, 0x6168 },
- { 0x06, 0x02e4 },
- { 0x06, 0xf860 },
- { 0x06, 0xe5f8 },
- { 0x06, 0x61e0 },
- { 0x06, 0xf848 },
- { 0x06, 0xe1f8 },
- { 0x06, 0x4958 },
- { 0x06, 0x0f1e },
- { 0x06, 0x02e4 },
- { 0x06, 0xf848 },
- { 0x06, 0xe5f8 },
- { 0x06, 0x49d0 },
- { 0x06, 0x0002 },
- { 0x06, 0x820a },
- { 0x06, 0xbf83 },
- { 0x06, 0x50ef },
- { 0x06, 0x46dc },
- { 0x06, 0x19dd },
- { 0x06, 0xd001 },
- { 0x06, 0x0282 },
- { 0x06, 0x0a02 },
- { 0x06, 0x8226 },
- { 0x06, 0xe0f8 },
- { 0x06, 0x60e1 },
- { 0x06, 0xf861 },
- { 0x06, 0x58fd },
- { 0x06, 0xe4f8 },
- { 0x06, 0x60e5 },
- { 0x06, 0xf861 },
- { 0x06, 0xfc04 },
- { 0x06, 0xf9fa },
- { 0x06, 0xfbc6 },
- { 0x06, 0xbff8 },
- { 0x06, 0x40be },
- { 0x06, 0x8350 },
- { 0x06, 0xa001 },
- { 0x06, 0x0107 },
- { 0x06, 0x1b89 },
- { 0x06, 0xcfd2 },
- { 0x06, 0x08eb },
- { 0x06, 0xdb19 },
- { 0x06, 0xb2fb },
- { 0x06, 0xfffe },
- { 0x06, 0xfd04 },
- { 0x06, 0xf8e0 },
- { 0x06, 0xf848 },
- { 0x06, 0xe1f8 },
- { 0x06, 0x4968 },
- { 0x06, 0x08e4 },
- { 0x06, 0xf848 },
- { 0x06, 0xe5f8 },
- { 0x06, 0x4958 },
- { 0x06, 0xf7e4 },
- { 0x06, 0xf848 },
- { 0x06, 0xe5f8 },
- { 0x06, 0x49fc },
- { 0x06, 0x044d },
- { 0x06, 0x2000 },
- { 0x06, 0x024e },
- { 0x06, 0x2200 },
- { 0x06, 0x024d },
- { 0x06, 0xdfff },
- { 0x06, 0x014e },
- { 0x06, 0xddff },
- { 0x06, 0x0100 },
- { 0x05, 0x83d8 },
- { 0x06, 0x8000 },
- { 0x03, 0xdc00 },
- { 0x05, 0xfff6 },
- { 0x06, 0x00fc },
- { 0x1f, 0x0000 },
+ { 0x06, 0x5561 },
+
+ /*
+ * Can not link to 1Gbps with bad cable
+ * Decrease SNR threshold form 21.07dB to 19.04dB
+ */
+ { 0x1f, 0x0001 },
+ { 0x17, 0x0cc0 },
{ 0x1f, 0x0000 },
- { 0x0d, 0xf880 },
- { 0x1f, 0x0000 }
+ { 0x0d, 0xf880 }
};
+ void __iomem *ioaddr = tp->mmio_addr;
+ const struct firmware *fw;
rtl_phy_write(ioaddr, phy_reg_init_0, ARRAY_SIZE(phy_reg_init_0));
@@ -2540,19 +1967,30 @@ static void rtl8168d_2_hw_phy_config(void __iomem *ioaddr)
rtl_phy_write(ioaddr, phy_reg_init, ARRAY_SIZE(phy_reg_init));
}
+ /* Fine tune PLL performance */
mdio_write(ioaddr, 0x1f, 0x0002);
mdio_plus_minus(ioaddr, 0x02, 0x0100, 0x0600);
mdio_plus_minus(ioaddr, 0x03, 0x0000, 0xe000);
- mdio_write(ioaddr, 0x1f, 0x0001);
- mdio_write(ioaddr, 0x17, 0x0cc0);
-
+ /* Switching regulator Slew rate */
mdio_write(ioaddr, 0x1f, 0x0002);
mdio_patch(ioaddr, 0x0f, 0x0017);
- rtl_phy_write(ioaddr, phy_reg_init_1, ARRAY_SIZE(phy_reg_init_1));
+ mdio_write(ioaddr, 0x1F, 0x0005);
+ mdio_write(ioaddr, 0x05, 0x001B);
+ if (mdio_read(ioaddr, 0x06) == 0xB300 &&
+ request_firmware(&fw, "rtl_nic/rtl8168d-2.fw", &tp->pci_dev->dev) == 0) {
+ rtl_phy_write_fw(tp, fw);
+ release_firmware(fw);
+ } else {
+ netif_warn(tp, probe, tp->dev, "unable to apply firmware patch\n");
+ }
+
+ mdio_write(ioaddr, 0x1f, 0x0000);
}
+MODULE_FIRMWARE("rtl_nic/rtl8168d-2.fw");
+
static void rtl8168d_3_hw_phy_config(void __iomem *ioaddr)
{
static const struct phy_reg phy_reg_init[] = {
@@ -2688,10 +2126,10 @@ static void rtl_hw_phy_config(struct net_device *dev)
rtl8168cp_2_hw_phy_config(ioaddr);
break;
case RTL_GIGA_MAC_VER_25:
- rtl8168d_1_hw_phy_config(ioaddr);
+ rtl8168d_1_hw_phy_config(tp);
break;
case RTL_GIGA_MAC_VER_26:
- rtl8168d_2_hw_phy_config(ioaddr);
+ rtl8168d_2_hw_phy_config(tp);
break;
case RTL_GIGA_MAC_VER_27:
rtl8168d_3_hw_phy_config(ioaddr);
--
1.7.3.2
^ permalink raw reply related
* [PATCH net-next-2.6] pktgen: adding prefetchw() call
From: Junchang Wang @ 2010-12-06 6:33 UTC (permalink / raw)
To: davem, eric.dumazet, robert.olsson, john.r.fastabend,
andy.shevchenko
Cc: netdev
We know for sure pktgen is going to write skb->data right after
*_alloc_skb, causing unnecessary cache misses.
Idea is to add a prefetchw() call to prefetch the first cache line
indicated by skb->data. On systems with Adjacent Cache Line Prefetch,
it's probably two cache lines are prefetched.
With this prefetch, pktgen on Intel SR1625 server with two E5530
quad-core processors and a single ixgbe-based NIC went from 8.63Mpps
to 9.03Mpps, with 4.6% improvement.
Signed-off-by: Junchang Wang <junchangwang@gmail.com>
---
net/core/pktgen.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index 2953b2a..18fe20d 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -2660,6 +2660,7 @@ static struct sk_buff *fill_packet_ipv4(struct net_device *odev,
sprintf(pkt_dev->result, "No memory");
return NULL;
}
+ prefetchw(skb->data);
skb_reserve(skb, datalen);
@@ -3007,6 +3008,7 @@ static struct sk_buff *fill_packet_ipv6(struct net_device *odev,
sprintf(pkt_dev->result, "No memory");
return NULL;
}
+ prefetchw(skb->data);
skb_reserve(skb, 16);
--
--Junchang
^ permalink raw reply related
* Re: echo > 0 .../disable_ipv6 broken in 2.6.37-rc4
From: Eric W. Biederman @ 2010-12-06 5:51 UTC (permalink / raw)
To: Lorenzo Colitti; +Cc: netdev, Brian Haley, Mahesh Kelkar
In-Reply-To: <m1zksjka4x.fsf@fess.ebiederm.org>
ebiederm@xmission.com (Eric W. Biederman) writes:
> Lorenzo Colitti <lorenzo@google.com> writes:
>
>> On Sun, Dec 5, 2010 at 4:24 PM, Eric W. Biederman <ebiederm@xmission.com> wrote:
>>> In 2.6.37-rc4 ipv6 can be disabled not enabled.
>>> The last kernel I have tested and know this works on is 2.6.33.
>>
>> I'm pretty sure I could successfully re-enable IPv6 on non-loopback
>> interfaces (wlan0, eth0) on net-2.6 pulled a little after 2.6.37-rc1.
>> I didn't try lo though. Does re-enabling IPv6 on a "real" interface
>> still work?
>
> Interesting that case seems to work.
It isn't the address state remove on ifdown either.
Lorenzo reverting your patch 2de795707294972f6c34bae9de713e502c431296
has no affect so you are cleared.
Darn those were the easy possibilities, now I have to stop and actually
pay attention to what the code is doing to debug this.
Eric
^ permalink raw reply
* Re: kernel panic with time-stamping in phy devices (monitor mode)
From: Eric Dumazet @ 2010-12-06 4:50 UTC (permalink / raw)
To: Changli Gao; +Cc: netdev, Richard Cochran, Andrew Watts, David Miller, stable
In-Reply-To: <AANLkTinFEUd5vuBu98COXMRGMFcpwtu_dsw=_=cN6oZJ@mail.gmail.com>
Le lundi 06 décembre 2010 à 08:01 +0800, Changli Gao a écrit :
> How about using skb_headroom(skb) < ETH_HLEN ?
>
Yes, good idea, thanks !
[PATCH net-2.6] net: fix skb_defer_rx_timestamp()
After commit c1f19b51d1d8 (net: support time stamping in phy devices.),
kernel might crash if CONFIG_NETWORK_PHY_TIMESTAMPING=y and
skb_defer_rx_timestamp() handles a packet without an ethernet header.
Fixes kernel bugzilla #24102
Reference: https://bugzilla.kernel.org/show_bug.cgi?id=24102
Reported-and-tested-by: Andrew Watts <akwatts@ymail.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Changli Gao <xiaosuo@gmail.com>
Cc: stable@kernel.org
---
net/core/timestamping.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/net/core/timestamping.c b/net/core/timestamping.c
index 0ae6c22..c19bb4e 100644
--- a/net/core/timestamping.c
+++ b/net/core/timestamping.c
@@ -96,11 +96,13 @@ bool skb_defer_rx_timestamp(struct sk_buff *skb)
struct phy_device *phydev;
unsigned int type;
- skb_push(skb, ETH_HLEN);
+ if (skb_headroom(skb) < ETH_HLEN)
+ return false;
+ __skb_push(skb, ETH_HLEN);
type = classify(skb);
- skb_pull(skb, ETH_HLEN);
+ __skb_pull(skb, ETH_HLEN);
switch (type) {
case PTP_CLASS_V1_IPV4:
_______________________________________________
stable mailing list
stable@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/stable
^ permalink raw reply related
* Re: [PATCH] net/r8169: Remove the firmware of RTL8111D
From: Ben Hutchings @ 2010-12-06 4:38 UTC (permalink / raw)
To: Francois Romieu; +Cc: Hayes Wang, netdev, linux-kernel
In-Reply-To: <20101201080732.GA3234@electric-eye.fr.zoreil.com>
[-- Attachment #1: Type: text/plain, Size: 1031 bytes --]
On Wed, 2010-12-01 at 09:07 +0100, Francois Romieu wrote:
> Hayes Wang <hayeswang@realtek.com> :
> > Remove the firmware of RTL8111D from the kernel.
> > The binary file of firmware would be moved to linux-firmware repository.
>
> The driver can not simply go along when request_firmware fails. Though Ben's
> code did not take care of it, the driver should imho propagate some return
> code. Ben ?
[...]
Sorry I haven't been more responsive on this.
I have reports that the RTL8111D/8168D hardware can work without this
firmware, possibly with limited functionality or compatibility. (I
assume it is a patch for the original firmware loaded from ROM or
flash.) So I feel obliged to give users the choice to use the driver
without installing non-free firmware. If you want to make the warning
on failure of request_firmware() more explicit then that's OK with me.
If you make the failure fatal I will probably revert that in Debian.
Ben.
--
Ben Hutchings, Debian Developer and kernel team member
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply
* echo > 0 .../disable_ipv6 broken in 2.6.37-rc4
From: Eric W. Biederman @ 2010-12-06 0:24 UTC (permalink / raw)
To: netdev; +Cc: Brian Haley, Mahesh Kelkar, Lorenzo Colitti
In 2.6.37-rc4 ipv6 can be disabled not enabled.
The last kernel I have tested and know this works on is 2.6.33.
To reproduce:
~ # ip link set lo up
~ # ping6 ::1
PING ::1(::1) 56 data bytes
64 bytes from ::1: icmp_seq=1 ttl=64 time=0.026 ms
^C
--- ::1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 782ms
rtt min/avg/max/mdev = 0.026/0.026/0.026/0.000 ms
~ # echo 1 > /proc/sys/net/ipv6/conf/lo/disable_ipv6
~ # ping6 ::1
connect: Network is unreachable
~ # echo 0 > /proc/sys/net/ipv6/conf/lo/disable_ipv6
~ # ping6 ::1
connect: Network is unreachable
I intend to poke at this a little more but at the moment
I am drawing a blank at what is going on.
I have tried reverting the last change to the ipv6 logic
and that doesn't make a difference.
commit 64e724f62ab743d55229cd5e27ec8b068b68eb16
Author: Brian Haley <brian.haley@hp.com>
Date: Tue Jul 20 10:34:30 2010 +0000
ipv6: Don't add routes to ipv6 disabled interfaces.
If the interface has IPv6 disabled, don't add a multicast or
link-local route since we won't be adding a link-local address.
Reported-by: Mahesh Kelkar <maheshkelkar@gmail.com>
Signed-off-by: Brian Haley <brian.haley@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
I intend to keep poking at this but if anyone can figure this out
before I do I would be greatly appreciative.
Eric
^ permalink raw reply
* Re: echo > 0 .../disable_ipv6 broken in 2.6.37-rc4
From: Eric W. Biederman @ 2010-12-06 0:39 UTC (permalink / raw)
To: Lorenzo Colitti; +Cc: netdev, Brian Haley, Mahesh Kelkar
In-Reply-To: <AANLkTin4hO63J4thByJeG2SiGHn9ZqsbWKy1p_TEfeu_@mail.gmail.com>
Lorenzo Colitti <lorenzo@google.com> writes:
> On Sun, Dec 5, 2010 at 4:24 PM, Eric W. Biederman <ebiederm@xmission.com> wrote:
>> In 2.6.37-rc4 ipv6 can be disabled not enabled.
>> The last kernel I have tested and know this works on is 2.6.33.
>
> I'm pretty sure I could successfully re-enable IPv6 on non-loopback
> interfaces (wlan0, eth0) on net-2.6 pulled a little after 2.6.37-rc1.
> I didn't try lo though. Does re-enabling IPv6 on a "real" interface
> still work?
Interesting that case seems to work.
Eric
^ permalink raw reply
* Re: echo > 0 .../disable_ipv6 broken in 2.6.37-rc4
From: Lorenzo Colitti @ 2010-12-06 0:33 UTC (permalink / raw)
To: Eric W. Biederman; +Cc: netdev, Brian Haley, Mahesh Kelkar
In-Reply-To: <m17hfnlpe1.fsf@fess.ebiederm.org>
On Sun, Dec 5, 2010 at 4:24 PM, Eric W. Biederman <ebiederm@xmission.com> wrote:
> In 2.6.37-rc4 ipv6 can be disabled not enabled.
> The last kernel I have tested and know this works on is 2.6.33.
I'm pretty sure I could successfully re-enable IPv6 on non-loopback
interfaces (wlan0, eth0) on net-2.6 pulled a little after 2.6.37-rc1.
I didn't try lo though. Does re-enabling IPv6 on a "real" interface
still work?
^ permalink raw reply
* Re: kernel panic with time-stamping in phy devices (monitor mode)
From: Changli Gao @ 2010-12-06 0:01 UTC (permalink / raw)
To: Eric Dumazet; +Cc: Andrew Watts, Richard Cochran, netdev, David Miller, stable
In-Reply-To: <1291551879.2806.253.camel@edumazet-laptop>
On Sun, Dec 5, 2010 at 8:24 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> Le samedi 04 décembre 2010 à 12:46 -0800, Andrew Watts a écrit :
>
>> Eric, I echo the thanks on the lightning patch.
>> Impressive turnaround!
>>
>> There's an open bug report on the kernel's bugzilla
>> for 2.6.36 (#24102). What is the best way to tie these
>> together?
>
> Thanks Andy, here is the official patch submission I am going to make.
>
> [PATCH net-2.6] net: fix skb_defer_rx_timestamp()
>
> After commit c1f19b51d1d8 (net: support time stamping in phy devices.),
> kernel might crash if CONFIG_NETWORK_PHY_TIMESTAMPING=y and
> skb_defer_rx_timestamp() handles a packet without an ethernet header.
>
> Fixes kernel bugzilla #24102
>
> Reference: https://bugzilla.kernel.org/show_bug.cgi?id=24102
> Reported-and-tested-by: Andrew Watts <akwatts@ymail.com>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> Cc: Richard Cochran <richardcochran@gmail.com>
> Cc: stable@kernel.org
> ---
> net/core/timestamping.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/net/core/timestamping.c b/net/core/timestamping.c
> index 0ae6c22..c4fbf85 100644
> --- a/net/core/timestamping.c
> +++ b/net/core/timestamping.c
> @@ -96,11 +96,13 @@ bool skb_defer_rx_timestamp(struct sk_buff *skb)
> struct phy_device *phydev;
> unsigned int type;
>
> - skb_push(skb, ETH_HLEN);
> + if (skb->data - ETH_HLEN < skb->head)
> + return false;
How about using skb_headroom(skb) < ETH_HLEN ?
And I checked the code of skb_push(). If the headroom of a skb is less
than the requested, Linux will panic with a message titled
"skb_under_panic()". But I can't find this info in the Oops. Maybe the
Oops isn't complete.
--
Regards,
Changli Gao(xiaosuo@gmail.com)
^ permalink raw reply
* [PATCH] netfilter: fix the race when initializing nf_ct_expect_hash_rnd
From: Changli Gao @ 2010-12-05 16:26 UTC (permalink / raw)
To: Patrick McHardy; +Cc: netfilter-devel, David S. Miller, netdev, Changli Gao
Since nf_ct_expect_dst_hash() may be called without nf_conntrack_lock
locked, nf_ct_expect_hash_rnd should be initialized in the atomic way.
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
---
net/netfilter/nf_conntrack_expect.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/net/netfilter/nf_conntrack_expect.c b/net/netfilter/nf_conntrack_expect.c
index 46e8966..e2bb3ef 100644
--- a/net/netfilter/nf_conntrack_expect.c
+++ b/net/netfilter/nf_conntrack_expect.c
@@ -34,7 +34,6 @@ EXPORT_SYMBOL_GPL(nf_ct_expect_hsize);
static unsigned int nf_ct_expect_hash_rnd __read_mostly;
unsigned int nf_ct_expect_max __read_mostly;
-static int nf_ct_expect_hash_rnd_initted __read_mostly;
static struct kmem_cache *nf_ct_expect_cachep __read_mostly;
@@ -77,10 +76,13 @@ static unsigned int nf_ct_expect_dst_hash(const struct nf_conntrack_tuple *tuple
{
unsigned int hash;
- if (unlikely(!nf_ct_expect_hash_rnd_initted)) {
- get_random_bytes(&nf_ct_expect_hash_rnd,
- sizeof(nf_ct_expect_hash_rnd));
- nf_ct_expect_hash_rnd_initted = 1;
+ if (unlikely(!nf_ct_expect_hash_rnd)) {
+ unsigned int rand;
+
+ do {
+ get_random_bytes(&rand, sizeof(rand));
+ } while (!rand);
+ cmpxchg(&nf_ct_expect_hash_rnd, 0, rand);
}
hash = jhash2(tuple->dst.u3.all, ARRAY_SIZE(tuple->dst.u3.all),
^ permalink raw reply related
* Re: qlge warning
From: Ron Mercer @ 2010-12-05 22:27 UTC (permalink / raw)
To: Jarek Poplawski
Cc: Yinghai Lu, David Miller, NetDev, Ingo Molnar, Linux Driver
In-Reply-To: <4CF95995.1070506@gmail.com>
OK, I see the point. We are working on it.
Thanks
On Fri, Dec 03, 2010 at 12:56:53PM -0800, Jarek Poplawski wrote:
> It looks like cancel_delayed_work_sync in ql_adapter_down is illegal.
> We can't sync works with rtnl_lock while holding it in qlge_close.
>
> Maintainers CC'ed.
>
> Jarek P.
>
> Yinghai Lu wrote:
> > [ 290.233264] =======================================================
> > [ 290.251780] [ INFO: possible circular locking dependency detected ]
> > [ 290.271534] 2.6.37-rc4-tip-yh-05919-geb30094-dirty #308
> > [ 290.271775] -------------------------------------------------------
> > [ 290.291512] swapper/1 is trying to acquire lock:
> > [ 290.291725] ((&(&qdev->mpi_port_cfg_work)->work)){+.+...}, at:
> > [<ffffffff81096419>] wait_on_work+0x0/0xff
> > [ 290.311643]
> > [ 290.311644] but task is already holding lock:
> > [ 290.311915] (rtnl_mutex){+.+.+.}, at: [<ffffffff81bb094d>]
> > rtnl_lock+0x17/0x19
> > [ 290.331681]
> > [ 290.331682] which lock already depends on the new lock.
> > [ 290.331684]
> > [ 290.351491]
> > [ 290.351492] the existing dependency chain (in reverse order) is:
> > [ 290.351830]
> > [ 290.351831] -> #1 (rtnl_mutex){+.+.+.}:
> > [ 290.371562] [<ffffffff810ae6b6>] lock_acquire+0xca/0xf0
> > [ 290.371824] [<ffffffff81cdbf5d>] mutex_lock_nested+0x60/0x2b8
> > [ 290.391539] [<ffffffff81bb094d>] rtnl_lock+0x17/0x19
> > [ 290.411250] [<ffffffff818501ad>] ql_mpi_port_cfg_work+0x1f/0x1ad
> > [ 290.411606] [<ffffffff81095189>] process_one_work+0x234/0x3e8
> > [ 290.431282] [<ffffffff81095663>] worker_thread+0x17f/0x261
> > [ 290.431583] [<ffffffff8109a633>] kthread+0xa0/0xa8
> > [ 290.451279] [<ffffffff8103a914>] kernel_thread_helper+0x4/0x10
> > [ 290.451581]
> > [ 290.451582] -> #0 ((&(&qdev->mpi_port_cfg_work)->work)){+.+...}:
> > [ 290.471483] [<ffffffff810ada85>] __lock_acquire+0x113c/0x1813
> > [ 290.491177] [<ffffffff810ae6b6>] lock_acquire+0xca/0xf0
> > [ 290.491451] [<ffffffff8109646c>] wait_on_work+0x53/0xff
> > [ 290.511128] [<ffffffff810965da>] __cancel_work_timer+0xc2/0x102
> > [ 290.511434] [<ffffffff8109662c>] cancel_delayed_work_sync+0x12/0x14
> > [ 290.531233] [<ffffffff81847646>] ql_cancel_all_work_sync+0x64/0x68
> > [ 290.531563] [<ffffffff818499d5>] ql_adapter_down+0x23/0xf6
> > [ 290.551298] [<ffffffff81849ca7>] qlge_close+0x67/0x76
> > [ 290.571015] [<ffffffff81ba3853>] __dev_close+0x7b/0x89
> > [ 290.571297] [<ffffffff81ba5535>] __dev_change_flags+0xad/0x131
> > [ 290.590974] [<ffffffff81ba563a>] dev_change_flags+0x21/0x57
> > [ 290.591280] [<ffffffff827de30e>] ic_close_devs+0x2e/0x48
> > [ 290.610978] [<ffffffff827df332>] ip_auto_config+0xbc9/0xe84
> > [ 290.611280] [<ffffffff810002da>] do_one_initcall+0x57/0x135
> > [ 290.630977] [<ffffffff8278ef8a>] kernel_init+0x16c/0x1f6
> > [ 290.631263] [<ffffffff8103a914>] kernel_thread_helper+0x4/0x10
> > [ 290.651000]
> > [ 290.651001] other info that might help us debug this:
> > [ 290.651003]
> > [ 290.670829] 1 lock held by swapper/1:
> > [ 290.671013] #0: (rtnl_mutex){+.+.+.}, at: [<ffffffff81bb094d>]
> > rtnl_lock+0x17/0x19
> > [ 290.690819]
> > [ 290.690820] stack backtrace:
> > [ 290.691054] Pid: 1, comm: swapper Not tainted
> > 2.6.37-rc4-tip-yh-05919-geb30094-dirty #308
> > [ 290.710805] Call Trace:
> > [ 290.710938] [<ffffffff810aa296>] ? print_circular_bug+0xaf/0xbe
> > [ 290.730683] [<ffffffff810ada85>] ? __lock_acquire+0x113c/0x1813
> > [ 290.730955] [<ffffffff81095d70>] ? wait_on_cpu_work+0xdb/0x114
> > [ 290.750672] [<ffffffff81096419>] ? wait_on_work+0x0/0xff
> > [ 290.750939] [<ffffffff810ae6b6>] ? lock_acquire+0xca/0xf0
> > [ 290.770664] [<ffffffff81096419>] ? wait_on_work+0x0/0xff
> > [ 290.770920] [<ffffffff8109646c>] ? wait_on_work+0x53/0xff
> > [ 290.790575] [<ffffffff81096419>] ? wait_on_work+0x0/0xff
> > [ 290.790821] [<ffffffff810965da>] ? __cancel_work_timer+0xc2/0x102
> > [ 290.810559] [<ffffffff8109662c>] ? cancel_delayed_work_sync+0x12/0x14
> > [ 290.810855] [<ffffffff81847646>] ? ql_cancel_all_work_sync+0x64/0x68
> > [ 290.830594] [<ffffffff818499d5>] ? ql_adapter_down+0x23/0xf6
> > [ 290.830867] [<ffffffff81849ca7>] ? qlge_close+0x67/0x76
> > [ 290.850568] [<ffffffff81ba3853>] ? __dev_close+0x7b/0x89
> > [ 290.850829] [<ffffffff81ba5535>] ? __dev_change_flags+0xad/0x131
> > [ 290.870540] [<ffffffff81ba563a>] ? dev_change_flags+0x21/0x57
> > [ 290.870815] [<ffffffff827de30e>] ? ic_close_devs+0x2e/0x48
> > [ 290.890595] [<ffffffff827df332>] ? ip_auto_config+0xbc9/0xe84
> > [ 290.910247] [<ffffffff81cda1e3>] ? printk+0x41/0x43
> > [ 290.910488] [<ffffffff827de769>] ? ip_auto_config+0x0/0xe84
> > [ 290.910747] [<ffffffff810002da>] ? do_one_initcall+0x57/0x135
> > [ 290.930455] [<ffffffff8278ef8a>] ? kernel_init+0x16c/0x1f6
> > [ 290.930743] [<ffffffff8103a914>] ? kernel_thread_helper+0x4/0x10
> > [ 290.950419] [<ffffffff81cde23c>] ? restore_args+0x0/0x30
> > [ 290.970152] [<ffffffff8278ee1e>] ? kernel_init+0x0/0x1f6
> > [ 290.970398] [<ffffffff8103a910>] ? kernel_thread_helper+0x0/0x10
> > --
> > To unsubscribe from this list: send the line "unsubscribe netdev" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> >
>
^ permalink raw reply
* weird network problem - stalls, reload works
From: Michael Tokarev @ 2010-12-05 22:52 UTC (permalink / raw)
To: netdev
Hello.
I've a weird networking problem here, which I'm
trying to hunt for some time.
Small LAN, just 3 machines and a server, all in
single small room, all connected to a 100Mbps switch.
Sometimes, network between the (linux) server and
workstations just stops. It may happen after
transferring a few megabytes of data (rare), or
whole thing may work for several days or even
weeks in a row, but end result is the same: at
some point it stalls.
Reloading the interface in question, like this:
ifdown eth0; sleep 2; ifup eth0
restores the network back, till it breaks again.
Note here that, say, sleep 1 is not sufficient
to restore the functionality, it has little effect.
No sleep at all makes almost no difference, ie,
such reload does not help.
The stalls looks like the server is suffering from
massive packet loss in receive path. It does not
lose all packets, and the amount of lost packets
increases with time, in a timeframe of several
minutes.
Doing a data transfer from a client machine to this
linux box, it goes at full ~10MB/s speed, next when
the stall is about to happen the speed drops to 6MB/s,
4, 1MB/s, 600KB/s, till eventually the connection just
times out.
The interesting data point is that the NIC does not
generate any interrupts during such stalls, as if
there's no packets are coming from the network at
all - even if during that time, the client workstations
are sending ARP requests (if nothing more).
Here's how ping on the server looks like (pinging one
of the machine on the LAN):
64 bytes from 192.168.78.20: icmp_seq=1 ttl=128 time=5008 ms
64 bytes from 192.168.78.20: icmp_seq=2 ttl=128 time=5000 ms
64 bytes from 192.168.78.20: icmp_seq=3 ttl=128 time=6000 ms
64 bytes from 192.168.78.20: icmp_seq=4 ttl=128 time=7000 ms
64 bytes from 192.168.78.20: icmp_seq=5 ttl=128 time=7000 ms
64 bytes from 192.168.78.20: icmp_seq=6 ttl=128 time=7000 ms
64 bytes from 192.168.78.20: icmp_seq=7 ttl=128 time=7000 ms
64 bytes from 192.168.78.20: icmp_seq=8 ttl=128 time=7000 ms
64 bytes from 192.168.78.20: icmp_seq=9 ttl=128 time=7000 ms
64 bytes from 192.168.78.20: icmp_seq=10 ttl=128 time=7000 ms
64 bytes from 192.168.78.20: icmp_seq=11 ttl=128 time=7000 ms
64 bytes from 192.168.78.20: icmp_seq=12 ttl=128 time=6320 ms
64 bytes from 192.168.78.20: icmp_seq=13 ttl=128 time=6000 ms
64 bytes from 192.168.78.20: icmp_seq=14 ttl=128 time=6000 ms
64 bytes from 192.168.78.20: icmp_seq=15 ttl=128 time=6000 ms
64 bytes from 192.168.78.20: icmp_seq=16 ttl=128 time=6000 ms
64 bytes from 192.168.78.20: icmp_seq=17 ttl=128 time=6000 ms
64 bytes from 192.168.78.20: icmp_seq=18 ttl=128 time=6000 ms
64 bytes from 192.168.78.20: icmp_seq=19 ttl=128 time=7000 ms
64 bytes from 192.168.78.20: icmp_seq=20 ttl=128 time=7000 ms
64 bytes from 192.168.78.20: icmp_seq=21 ttl=128 time=7000 ms
64 bytes from 192.168.78.20: icmp_seq=22 ttl=128 time=7000 ms
64 bytes from 192.168.78.20: icmp_seq=23 ttl=128 time=7000 ms
64 bytes from 192.168.78.20: icmp_seq=24 ttl=128 time=6007 ms
64 bytes from 192.168.78.20: icmp_seq=25 ttl=128 time=6001 ms
64 bytes from 192.168.78.20: icmp_seq=26 ttl=128 time=6010 ms
64 bytes from 192.168.78.20: icmp_seq=27 ttl=128 time=5014 ms
64 bytes from 192.168.78.20: icmp_seq=28 ttl=128 time=5011 ms
64 bytes from 192.168.78.20: icmp_seq=29 ttl=128 time=5020 ms
64 bytes from 192.168.78.20: icmp_seq=30 ttl=128 time=5020 ms
64 bytes from 192.168.78.20: icmp_seq=31 ttl=128 time=6018 ms
64 bytes from 192.168.78.20: icmp_seq=32 ttl=128 time=7010 ms
64 bytes from 192.168.78.20: icmp_seq=33 ttl=128 time=7008 ms
64 bytes from 192.168.78.20: icmp_seq=34 ttl=128 time=7000 ms
64 bytes from 192.168.78.20: icmp_seq=35 ttl=128 time=7000 ms
It looks like the NIC does not deliver any packets by its
own, but notices something arrived when you actually try
to _send_ sometihng - hence the delays above, almost whole
seconds (since ping sends data with 1sec intervals).
Here's normal ping output right after "restarting" the interface:
64 bytes from 192.168.78.20: icmp_seq=1 ttl=128 time=0.161 ms
64 bytes from 192.168.78.20: icmp_seq=2 ttl=128 time=0.119 ms
64 bytes from 192.168.78.20: icmp_seq=3 ttl=128 time=0.117 ms
64 bytes from 192.168.78.20: icmp_seq=4 ttl=128 time=0.381 ms
64 bytes from 192.168.78.20: icmp_seq=5 ttl=128 time=0.131 ms
64 bytes from 192.168.78.20: icmp_seq=6 ttl=128 time=0.133 ms
And at restart, the following gets printed in dmesg:
[ 3439.360831] forcedeth 0000:00:0a.0: irq 47 for MSI/MSI-X
So far we tried to replace everything in this network:
started with the NIC on the server, all wires, the switch,
and even replaced the client computers (upgraded them from
some old to current hardware). Even changing the NIC on
the server did not help - rtl8139 behaves the same way,
but it needs a bit more time to trigger the issue.
The problem happens with several different kernels - at
least 2.6.27 triggers it, 2.6.32 and 2.6.35 all behaves
the same, 32 or 64bit.
The machine is based on Asus M2N-VM DVI motherboard, which
is nVidia MCP67-based system. The NIC is on-board forcedeth
(and as I mentioned above the same prob happens with rtl8139
card).
This machine has 2 more NICs inserted (used for WAN link and
for another tiny LAN segment) - these does not show the issue,
but they both run at 10Mbps, so maybe it needs 10x more time.
When the eth0 LAN segment stops working, the rest of the system
works just fine, including these 2 NICs and hard drives.
I also tried to disable MSI, loading forcedeth with msi=0, -
this results in usage of IO-APIC-fasteoi for the NIC instead
of usual PCI-MSI-edge, but does not change the situation.
So I'm quite stuck here, and don't know what to do next.
My next bet is to try another motherboard, in a hope that
this is just some broken interrupt controller, but it is
a bit too unreal...
Any hints on what to try are greatly apprecated...
Thanks!
/mjt
^ permalink raw reply
* Re: PCI: make pci_restore_state return void
From: Michael Ellerman @ 2010-12-05 22:46 UTC (permalink / raw)
To: Jon Mason
Cc: Jesse Barnes, linux-pci-u79uwXL29TY76Z2rM5mHXA, Jonathan Corbet,
linux-media-u79uwXL29TY76Z2rM5mHXA, Andrew Gallatin, Brice Goglin,
netdev-u79uwXL29TY76Z2rM5mHXA, Solarflare linux maintainers,
Steve Hodgson, Ben Hutchings, Stephen Hemminger, Ivo van Doorn,
Gertjan van Wingerde, linux-wireless-u79uwXL29TY76Z2rM5mHXA,
Brian King, Anil Ravindranath, linux-scsi-u79uwXL29TY76Z2rM5mHXA,
Jaya Kumar, boyod.yang-S9cbI//bT0v8C245oKUbwW/U75nxZMCp
In-Reply-To: <1291160606-31494-1-git-send-email-jon.mason-0FX2CSrisTk@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 550 bytes --]
On Tue, 2010-11-30 at 17:43 -0600, Jon Mason wrote:
> pci_restore_state only ever returns 0, thus there is no benefit in
> having it return any value. Also, a large majority of the callers do
> not check the return code of pci_restore_state. Make the
> pci_restore_state a void return and avoid the overhead.
It does kind of make me nervous that (basically) no one ever checks the
return code from the PCI config space accessors, even though in theory
they can fail. This code being but one example.
/end random comment :)
cheers
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply
* [PATCH] econet: Do the correct cleanup after an unprivileged SIOCSIFADDR.
From: Nelson Elhage @ 2010-12-05 22:45 UTC (permalink / raw)
To: David S. Miller, Phil Blundell; +Cc: netdev, Nelson Elhage, stable
We need to drop the mutex and do a dev_put, so set an error code and break like
the other paths, instead of returning directly.
Cc: stable@kernel.org
Signed-off-by: Nelson Elhage <nelhage@ksplice.com>
---
net/econet/af_econet.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/net/econet/af_econet.c b/net/econet/af_econet.c
index 13992e1..f180371 100644
--- a/net/econet/af_econet.c
+++ b/net/econet/af_econet.c
@@ -661,8 +661,10 @@ static int ec_dev_ioctl(struct socket *sock, unsigned int cmd, void __user *arg)
err = 0;
switch (cmd) {
case SIOCSIFADDR:
- if (!capable(CAP_NET_ADMIN))
- return -EPERM;
+ if (!capable(CAP_NET_ADMIN)) {
+ err = -EPERM;
+ break;
+ }
edev = dev->ec_ptr;
if (edev == NULL) {
--
1.7.1.31.g6297e
^ permalink raw reply related
* IPsecv6 tunnel mode fragmentation
From: Joy Latten @ 2010-12-05 22:18 UTC (permalink / raw)
To: netdev; +Cc: samudrala, rashmin
[-- Attachment #1: Type: text/plain, Size: 1520 bytes --]
We have come across an ipsec problem that I think was
noted a while back in the following link.
http://www.mail-archive.com/netdev@vger.kernel.org/msg61659.html
When an icmpv6 pkt-too-big message for a destination
is received, it is processed and the route's mtu is adjusted.
Transport mode uses "adjusted" mtu and works ok, but tunnel-mode
which has inner and outer iphdrs has problems.
ah and esp leave it to the ipv6 layer to fragment.
So, it seems esp/ah tunnel mode can produce an outgoing ipsec tunnel
mode pkt whose inner pkthdr has the dst with the adjusted mtu,
but inner pkt size larger than the adjusted mtu.
The outer pkthdr has tunnel's dst mtu which has not been
adjusted, since the pkt-too-big message was not for it.
So, ipv6 layer will use outer mtu to decide whether to fragment or not.
It doesn't appear to use the inner, "adjusted" mtu.
In the tcpdump attached below, since outer mtu is larger than the
outgoing pkt's size, it is not fragmented.
Thus lies the problem. So when the link with the "adjusted" mtu
gets the decrypted packet, the decrypted pkt may be too large for the
link's mtu. The "adjusted" mtu was never regarded when creating the pkt.
Hopefully, I have explained this clearly, if not
let me know. Should esp/ah pre-fragment... or should mtu of
inner pkt's dst be used for outer pkt? What's the best way to approach
this? Thanks for any info.
regards,
Joy
ipsec config:
target <-------> Secuity gateway <-----> host
(tunnel)
attachment is tcpdump from target.
[-- Attachment #2: target.bin --]
[-- Type: application/octet-stream, Size: 10236 bytes --]
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox