* RE: e1000e failed to check map error
From: Allan, Bruce W @ 2013-03-01 17:13 UTC (permalink / raw)
To: Dave Jones, netdev@vger.kernel.org
In-Reply-To: <20130301053007.GA14474@redhat.com>
> -----Original Message-----
> From: netdev-owner@vger.kernel.org [mailto:netdev-
> owner@vger.kernel.org] On Behalf Of Dave Jones
> Sent: Thursday, February 28, 2013 9:30 PM
> To: netdev@vger.kernel.org
> Subject: e1000e failed to check map error
>
> Linus' current tree shows this shortly after boot for me..
>
> WARNING: at lib/dma-debug.c:933 check_unmap+0x407/0x8a0()
Thanks for the report Dave. I'll look into it.
Bruce.
^ permalink raw reply
* Re: [PATCH net-next] ipv4: correct dropwatch false positive in ip_local_deliver_finish
From: Neil Horman @ 2013-03-01 17:12 UTC (permalink / raw)
To: Eric Dumazet; +Cc: netdev, David S. Miller, William Reich
In-Reply-To: <1362155912.15793.56.camel@edumazet-glaptop>
On Fri, Mar 01, 2013 at 08:38:32AM -0800, Eric Dumazet wrote:
> On Fri, 2013-03-01 at 11:18 -0500, Neil Horman wrote:
> > I had a report recently of a user trying to use dropwatch to localise some frame
> > loss, and they were getting false positives. Turned out they were using a user
> > space SCTP stack that used raw sockets to grab frames. When we don't have a
> > registered protocol for a given packet, we record it as a drop, even if a raw
> > socket receieves the frame. We should only record the drop in the event a raw
> > socket doesnt exist to receive the frames
> >
> > Tested by the reported successfully
> >
> > Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> > Reported-by: William Reich <reich@ulticom.com>
> > Tested-by: William Reich <reich@ulticom.com>
> > CC: "David S. Miller" <davem@davemloft.net>
> > CC: William Reich <reich@ulticom.com>
> > ---
> > net/ipv4/ip_input.c | 6 ++++--
> > 1 file changed, 4 insertions(+), 2 deletions(-)
>
> Hmm, could you perhaps do the similar fix for IPv6 in the same patch ?
>
> Thanks !
>
Sure, give me a moment, and I'll respin it.
Neil
>
> --
> 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
* Fw: [Bug 54601] New: PPP regression on 3.2.39 stop work need restart server ont version 3.2.21 not found this problem.
From: Stephen Hemminger @ 2013-03-01 16:47 UTC (permalink / raw)
To: netdev
Begin forwarded message:
Date: Fri, 1 Mar 2013 01:24:14 -0800
From: "bugzilla-daemon@bugzilla.kernel.org" <bugzilla-daemon@bugzilla.kernel.org>
To: "stephen@networkplumber.org" <stephen@networkplumber.org>
Subject: [Bug 54601] New: PPP regression on 3.2.39 stop work need restart server ont version 3.2.21 not found this problem.
https://bugzilla.kernel.org/show_bug.cgi?id=54601
Summary: PPP regression on 3.2.39 stop work need restart server
ont version 3.2.21 not found this problem.
Product: Networking
Version: 2.5
Kernel Version: 3.2.39
Platform: All
OS/Version: Linux
Tree: Mainline
Status: NEW
Severity: high
Priority: P1
Component: Other
AssignedTo: shemminger@linux-foundation.org
ReportedBy: micron10@gmail.com
Regression: Yes
Hi
watch a problem with PPP after upgrade to version 3.2.39 ppp service stop work
2 hours after start with this crash :
[79619.180026] unregister_netdevice: waiting for ppp618 to become free. Usage
count = 562
[79629.320074] unregister_netdevice: waiting for ppp618 to become free. Usage
count = 529
[79639.460103] unregister_netdevice: waiting for ppp618 to become free. Usage
count = 506
[79649.600071] unregister_netdevice: waiting for ppp618 to become free. Usage
count = 486
[79659.740092] unregister_netdevice: waiting for ppp618 to become free. Usage
count = 465
[79669.880014] unregister_netdevice: waiting for ppp618 to become free. Usage
count = 444
[79680.020065] unregister_netdevice: waiting for ppp618 to become free. Usage
count = 422
[79690.160111] unregister_netdevice: waiting for ppp618 to become free. Usage
count = 402
[79700.300077] unregister_netdevice: waiting for ppp618 to become free. Usage
count = 379
[79710.440018] unregister_netdevice: waiting for ppp618 to become free. Usage
count = 355
[79720.580031] unregister_netdevice: waiting for ppp618 to become free. Usage
count = 334
[79730.720082] unregister_netdevice: waiting for ppp618 to become free. Usage
count = 313
[79740.860050] unregister_netdevice: waiting for ppp618 to become free. Usage
count = 291
[79751.000030] unregister_netdevice: waiting for ppp618 to become free. Usage
count = 268
[79761.140024] unregister_netdevice: waiting for ppp618 to become free. Usage
count = 247
[79771.280201] unregister_netdevice: waiting for ppp618 to become free. Usage
count = 223
[79781.420028] unregister_netdevice: waiting for ppp618 to become free. Usage
count = 202
[79791.560098] unregister_netdevice: waiting for ppp618 to become free. Usage
count = 180
[79801.700042] unregister_netdevice: waiting for ppp618 to become free. Usage
count = 159
[79804.410096] INFO: task pppd:31852 blocked for more than 120 seconds.
[79804.410098] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this
message.
[79804.410101] pppd D ffff88015fd0cd00 0 31852 31800 0x00000004
[79804.410111] ffff88010b69d600 0000000000000086 ffff88010b69d600
ffffffff8166e800
[79804.410114] ffff880159120ac0 0000000000004000 ffff88010ba75fd8
ffff88010ba75fd8
[79804.410117] 0000000000000246 ffffffff8166e800 000280da8107f173
0000000000000000
[79804.410119] Call Trace:
[79804.410128] [<ffffffff81082108>] ? release_pages+0x1d8/0x200
[79804.410150] [<ffffffff8107a0de>] ? find_get_pages+0x2e/0x120
[79804.410155] [<ffffffff811802b3>] ? cpumask_any_but+0x23/0x40
[79804.410167] [<ffffffff814831b8>] ? __mutex_lock_slowpath+0xc8/0x140
[79804.410170] [<ffffffff810218c5>] ? ptep_set_access_flags+0x25/0x30
[79804.410172] [<ffffffff81482d3a>] ? mutex_lock+0x1a/0x40
[79804.410176] [<ffffffffa0008624>] ? ppp_ioctl+0x2f4/0xf20 [ppp_generic]
[79804.410178] [<ffffffff8101e2b8>] ? do_page_fault+0x198/0x460
[79804.410181] [<ffffffff810c28be>] ? dput+0x1e/0x190
[79804.410190] [<ffffffff810be1bf>] ? do_vfs_ioctl+0x8f/0x530
[79804.410193] [<ffffffff810be6a9>] ? sys_ioctl+0x49/0x80
[79804.410195] [<ffffffff814848bb>] ? system_call_fastpath+0x16/0x1b
[79804.410198] INFO: task pppd:31869 blocked for more than 120 seconds.
[79804.410199] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this
message.
[79804.410201] pppd D ffff88015fc0cd00 0 31869 31800 0x00000004
[79804.410203] ffff88014b1deb80 0000000000000082 ffff88014b1deb80
ffffffff8166e800
[79804.410206] ffff8801591250a0 0000000000004000 ffff88015829ffd8
ffff88015829ffd8
[79804.410209] 0000000000000246 ffffffff8166e800 000280da8107f173
0000000000000000
[79804.410212] Call Trace:
[79804.410214] [<ffffffff81082108>] ? release_pages+0x1d8/0x200
[79804.410216] [<ffffffff8107a0de>] ? find_get_pages+0x2e/0x120
[79804.410218] [<ffffffff811802b3>] ? cpumask_any_but+0x23/0x40
[79804.410221] [<ffffffff814831b8>] ? __mutex_lock_slowpath+0xc8/0x140
[79804.410223] [<ffffffff810218c5>] ? ptep_set_access_flags+0x25/0x30
[79804.410226] [<ffffffff81482d3a>] ? mutex_lock+0x1a/0x40
[79804.410228] [<ffffffffa0008624>] ? ppp_ioctl+0x2f4/0xf20 [ppp_generic]
[79804.410249] [<ffffffff8101e2b8>] ? do_page_fault+0x198/0x460
[79804.410251] [<ffffffff810c28be>] ? dput+0x1e/0x190
[79804.410253] [<ffffffff810be1bf>] ? do_vfs_ioctl+0x8f/0x530
[79804.410256] [<ffffffff810be6a9>] ? sys_ioctl+0x49/0x80
[79804.410258] [<ffffffff814848bb>] ? system_call_fastpath+0x16/0x1b
[79804.410260] INFO: task pppd:31889 blocked for more than 120 seconds.
[79804.410261] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this
message.
[79804.410262] pppd D ffff88015fc0cd00 0 31889 31800 0x00000000
[79804.410275] ffff880159868ac0 0000000000000086 ffff880159868ac0
ffffffff8166e800
[79804.410277] ffff8801599ab060 0000000000004000 ffff88014ba51fd8
ffff88014ba51fd8
[79804.410280] 0000000000000246 ffffffff8166e800 000280da8107f173
0000000000000000
[79804.410290] Call Trace:
[79804.410292] [<ffffffff81082108>] ? release_pages+0x1d8/0x200
[79804.410295] [<ffffffff8107a0de>] ? find_get_pages+0x2e/0x120
[79804.410297] [<ffffffff811802b3>] ? cpumask_any_but+0x23/0x40
[79804.410300] [<ffffffff814831b8>] ? __mutex_lock_slowpath+0xc8/0x140
[79804.410302] [<ffffffff810218c5>] ? ptep_set_access_flags+0x25/0x30
[79804.410305] [<ffffffff81482d3a>] ? mutex_lock+0x1a/0x40
[79804.410318] [<ffffffffa0008624>] ? ppp_ioctl+0x2f4/0xf20 [ppp_generic]
[79804.410321] [<ffffffff8101e2b8>] ? do_page_fault+0x198/0x460
[79804.410322] [<ffffffff810c28be>] ? dput+0x1e/0x190
[79804.410325] [<ffffffff810be1bf>] ? do_vfs_ioctl+0x8f/0x530
[79804.410327] [<ffffffff810be6a9>] ? sys_ioctl+0x49/0x80
[79804.410330] [<ffffffff814848bb>] ? system_call_fastpath+0x16/0x1b
[79804.410334] INFO: task pppd:31890 blocked for more than 120 seconds.
[79804.410335] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this
message.
[79804.410337] pppd D ffff88015fd0cd00 0 31890 31800 0x00000000
[79804.410339] ffff88015986cb40 0000000000000082 ffff88015986cb40
ffffffff8166e800
[79804.410342] ffff8801599adb60 0000000000004000 ffff8801079d7fd8
ffff8801079d7fd8
[79804.410345] 0000000000000246 ffffffff8166e800 000280da8107f173
0000000000000000
[79804.410347] Call Trace:
[79804.410349] [<ffffffff81082108>] ? release_pages+0x1d8/0x200
[79804.410352] [<ffffffff810b94a7>] ? link_path_walk+0x67/0x850
[79804.410354] [<ffffffff8107a0de>] ? find_get_pages+0x2e/0x120
[79804.410368] [<ffffffff811802b3>] ? cpumask_any_but+0x23/0x40
[79804.410390] [<ffffffff814831b8>] ? __mutex_lock_slowpath+0xc8/0x140
[79804.410392] [<ffffffff810218c5>] ? ptep_set_access_flags+0x25/0x30
[79804.410394] [<ffffffff81482d3a>] ? mutex_lock+0x1a/0x40
[79804.410397] [<ffffffffa0008624>] ? ppp_ioctl+0x2f4/0xf20 [ppp_generic]
[79804.410399] [<ffffffff8101e2b8>] ? do_page_fault+0x198/0x460
[79804.410401] [<ffffffff810c28be>] ? dput+0x1e/0x190
[79804.410403] [<ffffffff810be1bf>] ? do_vfs_ioctl+0x8f/0x530
[79804.410407] [<ffffffff81009f94>] ? fpu_finit+0x14/0x30
[79804.410409] [<ffffffff810be6a9>] ? sys_ioctl+0x49/0x80
[79804.410411] [<ffffffff814848bb>] ? system_call_fastpath+0x16/0x1b
[79804.410413] INFO: task pppd:31897 blocked for more than 120 seconds.
[79804.410414] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this
message.
[79804.410419] pppd D ffff88015fd0cd00 0 31897 31800 0x00000004
[79804.410421] ffff88014b1deb80 0000000000000082 ffff88014b1deb80
ffffffff8166e800
[79804.410424] ffff88015901cb40 0000000000004000 ffff8801106dffd8
ffff8801106dffd8
[79804.410427] 0000000000000246 ffffffff8166e800 000280da8107f173
0000000000000000
[79804.410430] Call Trace:
[79804.410432] [<ffffffff81082108>] ? release_pages+0x1d8/0x200
[79804.410435] [<ffffffff8107a0de>] ? find_get_pages+0x2e/0x120
[79804.410437] [<ffffffff811802b3>] ? cpumask_any_but+0x23/0x40
[79804.410440] [<ffffffff814831b8>] ? __mutex_lock_slowpath+0xc8/0x140
[79804.410442] [<ffffffff810218c5>] ? ptep_set_access_flags+0x25/0x30
[79804.410444] [<ffffffff81482d3a>] ? mutex_lock+0x1a/0x40
[79804.410447] [<ffffffffa0008624>] ? ppp_ioctl+0x2f4/0xf20 [ppp_generic]
[79804.410453] [<ffffffff8101e2b8>] ? do_page_fault+0x198/0x460
[79804.410455] [<ffffffff810c28be>] ? dput+0x1e/0x190
[79804.410457] [<ffffffff810be1bf>] ? do_vfs_ioctl+0x8f/0x530
[79804.410459] [<ffffffff810be6a9>] ? sys_ioctl+0x49/0x80
[79804.410461] [<ffffffff814848bb>] ? system_call_fastpath+0x16/0x1b
[79804.410474] INFO: task pppd:31929 blocked for more than 120 seconds.
[79804.410476] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this
message.
[79804.410477] pppd D ffff88015fc0cd00 0 31929 31800 0x00000004
[79804.410480] ffff88014b1deb80 0000000000000086 ffff88014b1deb80
ffffffff8166e800
[79804.410483] ffff88014b192b00 0000000000004000 ffff88010d6fdfd8
ffff88010d6fdfd8
[79804.410486] 0000000000000246 ffffffff8166e800 000280da8107f173
0000000000000000
[79804.410488] Call Trace:
[79804.410490] [<ffffffff81082108>] ? release_pages+0x1d8/0x200
[79804.410493] [<ffffffff810b94a7>] ? link_path_walk+0x67/0x850
[79804.410495] [<ffffffff811802b3>] ? cpumask_any_but+0x23/0x40
[79804.410498] [<ffffffff814831b8>] ? __mutex_lock_slowpath+0xc8/0x140
[79804.410500] [<ffffffff810218c5>] ? ptep_set_access_flags+0x25/0x30
[79804.410502] [<ffffffff81482d3a>] ? mutex_lock+0x1a/0x40
[79804.410505] [<ffffffffa0008624>] ? ppp_ioctl+0x2f4/0xf20 [ppp_generic]
[79804.410507] [<ffffffff8101e2b8>] ? do_page_fault+0x198/0x460
[79804.410509] [<ffffffff810c28be>] ? dput+0x1e/0x190
[79804.410511] [<ffffffff810be1bf>] ? do_vfs_ioctl+0x8f/0x530
[79804.410513] [<ffffffff810be6a9>] ? sys_ioctl+0x49/0x80
[79804.410515] [<ffffffff814848bb>] ? system_call_fastpath+0x16/0x1b
[79804.410517] INFO: task pppd:31964 blocked for more than 120 seconds.
[79804.410519] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this
message.
[79804.410520] pppd D 0000000000000000 0 31964 31800 0x00000004
[79804.410522] ffffffff8160b020 0000000000000086 ffffffff8107e2a9
ffffffff8166e800
[79804.410525] ffff8801591260c0 0000000000004000 ffff88010b605fd8
ffff88010b605fd8
[79804.410528] 0000000000000246 ffffffff8166e800 000280da8107f173
0000000000000000
[79804.410530] Call Trace:
[79804.410533] [<ffffffff8107e2a9>] ? __alloc_pages_nodemask+0x109/0x7c0
[79804.410540] [<ffffffff81082108>] ? release_pages+0x1d8/0x200
[79804.410542] [<ffffffff8107a0de>] ? find_get_pages+0x2e/0x120
[79804.410544] [<ffffffff811802b3>] ? cpumask_any_but+0x23/0x40
[79804.410547] [<ffffffff814831b8>] ? __mutex_lock_slowpath+0xc8/0x140
[79804.410549] [<ffffffff810218c5>] ? ptep_set_access_flags+0x25/0x30
[79804.410551] [<ffffffff81482d3a>] ? mutex_lock+0x1a/0x40
[79804.410554] [<ffffffffa0008624>] ? ppp_ioctl+0x2f4/0xf20 [ppp_generic]
[79804.410556] [<ffffffff8101e2b8>] ? do_page_fault+0x198/0x460
[79804.410558] [<ffffffff810c28be>] ? dput+0x1e/0x190
[79804.410560] [<ffffffff810be1bf>] ? do_vfs_ioctl+0x8f/0x530
[79804.410562] [<ffffffff810be6a9>] ? sys_ioctl+0x49/0x80
[79804.410564] [<ffffffff814848bb>] ? system_call_fastpath+0x16/0x1b
[79804.410566] INFO: task pppd:31993 blocked for more than 120 seconds.
[79804.410568] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this
message.
[79804.410579] pppd D 0000000000000000 0 31993 31800 0x00000004
[79804.410582] ffffffff8160b020 0000000000000082 ffffffff8107e2a9
ffffffff8166e800
[79804.410585] ffff8801590eb5c0 0000000000004000 ffff880107981fd8
ffff880107981fd8
[79804.410588] 0000000000000246 ffffffff8166e800 000280da8107f173
0000000000000000
[79804.410590] Call Trace:
[79804.410593] [<ffffffff8107e2a9>] ? __alloc_pages_nodemask+0x109/0x7c0
[79804.410595] [<ffffffff81082108>] ? release_pages+0x1d8/0x200
[79804.410597] [<ffffffff810b94a7>] ? link_path_walk+0x67/0x850
[79804.410599] [<ffffffff8107a0de>] ? find_get_pages+0x2e/0x120
[79804.410601] [<ffffffff811802b3>] ? cpumask_any_but+0x23/0x40
[79804.410604] [<ffffffff814831b8>] ? __mutex_lock_slowpath+0xc8/0x140
[79804.410606] [<ffffffff810218c5>] ? ptep_set_access_flags+0x25/0x30
[79804.410608] [<ffffffff81482d3a>] ? mutex_lock+0x1a/0x40
[79804.410611] [<ffffffffa0008624>] ? ppp_ioctl+0x2f4/0xf20 [ppp_generic]
[79804.410613] [<ffffffff8101e2b8>] ? do_page_fault+0x198/0x460
[79804.410615] [<ffffffff810c28be>] ? dput+0x1e/0x190
[79804.410617] [<ffffffff810be1bf>] ? do_vfs_ioctl+0x8f/0x530
[79804.410619] [<ffffffff810be6a9>] ? sys_ioctl+0x49/0x80
[79804.410624] [<ffffffff814848bb>] ? system_call_fastpath+0x16/0x1b
[79804.410626] INFO: task pppd:31994 blocked for more than 120 seconds.
[79804.410627] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this
message.
[79804.410628] pppd D ffff88015fd0cd00 0 31994 31800 0x00000000
[79804.410631] ffff88015986cb40 0000000000000082 ffff88015986cb40
ffffffff8166e800
[79804.410634] ffff8801590eab00 0000000000004000 ffff880156d41fd8
ffff880156d41fd8
[79804.410637] 0000000000000246 ffffffff8166e800 000280da8107f173
0000000000000000
[79804.410639] Call Trace:
[79804.410641] [<ffffffff81082108>] ? release_pages+0x1d8/0x200
[79804.410643] [<ffffffff8107a0de>] ? find_get_pages+0x2e/0x120
[79804.410648] [<ffffffff811802b3>] ? cpumask_any_but+0x23/0x40
[79804.410651] [<ffffffff814831b8>] ? __mutex_lock_slowpath+0xc8/0x140
[79804.410653] [<ffffffff810218c5>] ? ptep_set_access_flags+0x25/0x30
[79804.410655] [<ffffffff81482d3a>] ? mutex_lock+0x1a/0x40
[79804.410658] [<ffffffffa0008624>] ? ppp_ioctl+0x2f4/0xf20 [ppp_generic]
[79804.410661] [<ffffffff8101e2b8>] ? do_page_fault+0x198/0x460
[79804.410663] [<ffffffff810c28be>] ? dput+0x1e/0x190
[79804.410678] [<ffffffff810be1bf>] ? do_vfs_ioctl+0x8f/0x530
[79804.410680] [<ffffffff810be6a9>] ? sys_ioctl+0x49/0x80
[79804.410683] [<ffffffff814848bb>] ? system_call_fastpath+0x16/0x1b
[79804.410684] INFO: task pppd:31999 blocked for more than 120 seconds.
[79804.410686] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this
message.
[79804.410687] pppd D 0000000000000001 0 31999 31800 0x00000000
[79804.410690] ffff88015986bb20 0000000000000082 0000000000002000
0000000000000000
[79804.410692] ffff8801590ec080 0000000000004000 ffff88010b9e9fd8
ffff88010b9e9fd8
[79804.410695] ffff88008c190500 ffff88010b9e9e88 00000010000000bb
ffff88008c190500
[79804.410698] Call Trace:
[79804.410701] [<ffffffff81375e48>] ? sock_recvmsg+0xf8/0x140
[79804.410703] [<ffffffff81375fd5>] ? sock_sendmsg+0xe5/0x120
[79804.410708] [<ffffffff81082108>] ? release_pages+0x1d8/0x200
[79804.410711] [<ffffffff81090cbe>] ? unmap_vmas+0x3fe/0x750
[79804.410714] [<ffffffff814831b8>] ? __mutex_lock_slowpath+0xc8/0x140
[79804.410717] [<ffffffff81482d3a>] ? mutex_lock+0x1a/0x40
[79804.410719] [<ffffffffa00083bb>] ? ppp_ioctl+0x8b/0xf20 [ppp_generic]
[79804.410722] [<ffffffff81484139>] ? _raw_spin_lock_bh+0x9/0x30
[79804.410725] [<ffffffff81045fb4>] ? bit_waitqueue+0x14/0xa0
[79804.410728] [<ffffffff810e3d30>] ? fsnotify_clear_marks_by_inode+0x20/0xd0
[79804.410730] [<ffffffff810be1bf>] ? do_vfs_ioctl+0x8f/0x530
[79804.410732] [<ffffffff810c296a>] ? dput+0xca/0x190
[79804.410735] [<ffffffff810af57e>] ? fput+0x15e/0x220
[79804.410737] [<ffffffff810be6a9>] ? sys_ioctl+0x49/0x80
[79804.410739] [<ffffffff814848bb>] ? system_call_fastpath+0x16/0x1b
[79811.840094] unregister_netdevice: waiting for ppp618 to become free. Usage
count = 138
[79821.980036] unregister_netdevice: waiting for ppp618 to become free. Usage
count = 117
[79832.120019] unregister_netdevice: waiting for ppp618 to become free. Usage
count = 96
[79842.260020] unregister_netdevice: waiting for ppp618 to become free. Usage
count = 74
[79852.400168] unregister_netdevice: waiting for ppp618 to become free. Usage
count = 52
[79862.540040] unregister_netdevice: waiting for ppp618 to become free. Usage
count = 30
[79872.680037] unregister_netdevice: waiting for ppp618 to become free. Usage
count = 9
After this crash from dmesg i kill alll pppd services but users can not hang
need to restart server to back in work state.
After rebuild and back to old kernel 3.2.21 it has no problema
I run 1000 pppoe connection to one PPP server.
Best regards,
m.
--
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
^ permalink raw reply
* Re: [PATCH net-next] ipv4: correct dropwatch false positive in ip_local_deliver_finish
From: Eric Dumazet @ 2013-03-01 16:38 UTC (permalink / raw)
To: Neil Horman; +Cc: netdev, David S. Miller, William Reich
In-Reply-To: <1362154680-4331-1-git-send-email-nhorman@tuxdriver.com>
On Fri, 2013-03-01 at 11:18 -0500, Neil Horman wrote:
> I had a report recently of a user trying to use dropwatch to localise some frame
> loss, and they were getting false positives. Turned out they were using a user
> space SCTP stack that used raw sockets to grab frames. When we don't have a
> registered protocol for a given packet, we record it as a drop, even if a raw
> socket receieves the frame. We should only record the drop in the event a raw
> socket doesnt exist to receive the frames
>
> Tested by the reported successfully
>
> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> Reported-by: William Reich <reich@ulticom.com>
> Tested-by: William Reich <reich@ulticom.com>
> CC: "David S. Miller" <davem@davemloft.net>
> CC: William Reich <reich@ulticom.com>
> ---
> net/ipv4/ip_input.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
Hmm, could you perhaps do the similar fix for IPv6 in the same patch ?
Thanks !
^ permalink raw reply
* Re: [PATCH net-next] ipv4: correct dropwatch false positive in ip_local_deliver_finish
From: Eric Dumazet @ 2013-03-01 16:37 UTC (permalink / raw)
To: Neil Horman; +Cc: netdev, David S. Miller, William Reich
In-Reply-To: <1362154680-4331-1-git-send-email-nhorman@tuxdriver.com>
On Fri, 2013-03-01 at 11:18 -0500, Neil Horman wrote:
> I had a report recently of a user trying to use dropwatch to localise some frame
> loss, and they were getting false positives. Turned out they were using a user
> space SCTP stack that used raw sockets to grab frames. When we don't have a
> registered protocol for a given packet, we record it as a drop, even if a raw
> socket receieves the frame. We should only record the drop in the event a raw
> socket doesnt exist to receive the frames
>
> Tested by the reported successfully
>
> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> Reported-by: William Reich <reich@ulticom.com>
> Tested-by: William Reich <reich@ulticom.com>
> CC: "David S. Miller" <davem@davemloft.net>
> CC: William Reich <reich@ulticom.com>
> ---
> net/ipv4/ip_input.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c
> index 87abd3e..2bdf802 100644
> --- a/net/ipv4/ip_input.c
> +++ b/net/ipv4/ip_input.c
> @@ -228,9 +228,11 @@ static int ip_local_deliver_finish(struct sk_buff *skb)
> icmp_send(skb, ICMP_DEST_UNREACH,
> ICMP_PROT_UNREACH, 0);
> }
> - } else
> + kfree_skb(skb);
> + } else {
> IP_INC_STATS_BH(net, IPSTATS_MIB_INDELIVERS);
> - kfree_skb(skb);
> + consume_skb(skb);
> + }
> }
> }
> out:
Acked-by: Eric Dumazet <edumazet@google.com>
^ permalink raw reply
* Re: upgrade to 3.8.1 : BUG Scheduling while atomic in bonding driver:
From: Eric Dumazet @ 2013-03-01 16:24 UTC (permalink / raw)
To: Linda Walsh; +Cc: Linux-Kernel, netdev, Jay Vosburgh, Jeff Kirsher
In-Reply-To: <513063B4.8070604@tlinx.org>
On Fri, 2013-03-01 at 00:15 -0800, Linda Walsh wrote:
> Just installed 3.8.1....
>
> Thought this had been fixed? Note it causes the kernel to
> show up as tainted after the 1st...
>
CC netdev & Jay Vosburgh & Jeff Kirsher
>
>
> As the system was coming up and initializing the bond0 driver:
>
>
> [ 19.847743] ixgbe 0000:06:00.0: registered PHC device on eth_s2_0
> [ 20.258245] BUG: scheduling while atomic: ifup-bonding/2003/0x00000002
> [ 20.264812] 4 locks held by ifup-bonding/2003:
> [ 20.269298] #0: (&buffer->mutex){......}, at: [<ffffffff811c401f>]
> sysfs_write_file+0x3f/0x150
> [ 20.278319] #1: (s_active#59){......}, at: [<ffffffff811c409b>]
> sysfs_write_file+0xbb/0x150
> [ 20.287088] #2: (rtnl_mutex){......}, at: [<ffffffff81590bf0>]
> rtnl_trylock+0x10/0x20
> [ 20.295373] #3: (&bond->lock){......}, at: [<ffffffff8145be6f>]
> bond_enslave+0x4ef/0xb80
> [ 20.303912] Modules linked in: iptable_filter kvm_intel kvm acpi_cpufreq
> mperf button processor mousedev iTCO_wdt
> [ 20.314695] Pid: 2003, comm: ifup-bonding Not tainted 3.8.1-Isht-Van #5
> [ 20.321340] Call Trace:
> [ 20.323833] [<ffffffff8162b029>] __schedule_bug+0x5e/0x6c
> [ 20.329356] [<ffffffff81634592>] __schedule+0x762/0x7f0
> [ 20.334701] [<ffffffff81634734>] schedule+0x24/0x70
> [ 20.339703] [<ffffffff816336f4>] schedule_hrtimeout_range_clock+0xa4/0x130
> [ 20.346699] [<ffffffff81068250>] ? update_rmtp+0x60/0x60
> [ 20.352130] [<ffffffff81068f9f>] ? hrtimer_start_range_ns+0xf/0x20
> [ 20.358434] [<ffffffff8163378e>] schedule_hrtimeout_range+0xe/0x10
> [ 20.364734] [<ffffffff8104ec1b>] usleep_range+0x3b/0x40
> [ 20.370082] [<ffffffff814b2d7c>] ixgbe_acquire_swfw_sync_X540+0xbc/0x100
> [ 20.376905] [<ffffffff814aeb0d>] ixgbe_read_phy_reg_generic+0x3d/0x140
> [ 20.383553] [<ffffffff814aedac>]
> ixgbe_get_copper_link_capabilities_generic+0x2c/0x60
> [ 20.391499] [<ffffffff8145be6f>] ? bond_enslave+0x4ef/0xb80
> [ 20.397194] [<ffffffff814a64e4>] ixgbe_get_settings+0x34/0x340
> [ 20.403148] [<ffffffff81586ab8>] __ethtool_get_settings+0x88/0x130
> [ 20.409448] [<ffffffff814568a3>] bond_update_speed_duplex+0x23/0x60
> [ 20.415833] [<ffffffff8145bed9>] bond_enslave+0x559/0xb80
> [ 20.421356] [<ffffffff8146454f>] bonding_store_slaves+0x16f/0x1c0
> [ 20.427569] [<ffffffff813bfb83>] dev_attr_store+0x13/0x30
> [ 20.433091] [<ffffffff811c40b4>] sysfs_write_file+0xd4/0x150
> [ 20.438872] [<ffffffff81154b81>] vfs_write+0xb1/0x190
> [ 20.444047] [<ffffffff81154ee0>] sys_write+0x50/0xa0
> [ 20.449137] [<ffffffff81637092>] system_call_fastpath+0x16/0x1b
> [ 20.455264] BUG: scheduling while atomic: ifup-bonding/2003/0x00000002
> [ 20.461851] 4 locks held by ifup-bonding/2003:
> [ 20.466334] #0: (&buffer->mutex){......}, at: [<ffffffff811c401f>]
> sysfs_write_file+0x3f/0x150
> [ 20.475356] #1: (s_active#59){......}, at: [<ffffffff811c409b>]
> sysfs_write_file+0xbb/0x150
> [ 20.484117] #2: (rtnl_mutex){......}, at: [<ffffffff81590bf0>]
> rtnl_trylock+0x10/0x20
> [ 20.492403] #3: (&bond->lock){......}, at: [<ffffffff8145be6f>]
> bond_enslave+0x4ef/0xb80
> [ 20.500902] Modules linked in: iptable_filter kvm_intel kvm acpi_cpufreq
> mperf button processor mousedev iTCO_wdt
> [ 20.511640] Pid: 2003, comm: ifup-bonding Tainted: G W
> 3.8.1-Isht-Van #5
> [ 20.519240] Call Trace:
> [ 20.521729] [<ffffffff8162b029>] __schedule_bug+0x5e/0x6c
> [ 20.527251] [<ffffffff81634592>] __schedule+0x762/0x7f0
> [ 20.532599] [<ffffffff81634734>] schedule+0x24/0x70
> [ 20.537599] [<ffffffff816336f4>] schedule_hrtimeout_range_clock+0xa4/0x130
> [ 20.544592] [<ffffffff81068250>] ? update_rmtp+0x60/0x60
> [ 20.550026] [<ffffffff81068250>] ? update_rmtp+0x60/0x60
> [ 20.555462] [<ffffffff81068f9f>] ? hrtimer_start_range_ns+0xf/0x20
> [ 20.561763] [<ffffffff8163378e>] schedule_hrtimeout_range+0xe/0x10
> [ 20.568064] [<ffffffff8104ec1b>] usleep_range+0x3b/0x40
> [ 20.573415] [<ffffffff814b2cae>] ixgbe_release_swfw_sync_X540+0x4e/0x60
> [ 20.580146] [<ffffffff814aebdd>] ixgbe_read_phy_reg_generic+0x10d/0x140
> [ 20.586960] [<ffffffff814aedac>]
> ixgbe_get_copper_link_capabilities_generic+0x2c/0x60
> [ 20.594908] [<ffffffff8145be6f>] ? bond_enslave+0x4ef/0xb80
> [ 20.600601] [<ffffffff814a64e4>] ixgbe_get_settings+0x34/0x340
> [ 20.606557] [<ffffffff81586ab8>] __ethtool_get_settings+0x88/0x130
> [ 20.612858] [<ffffffff814568a3>] bond_update_speed_duplex+0x23/0x60
> [ 20.619244] [<ffffffff8145bed9>] bond_enslave+0x559/0xb80
> [ 20.624767] [<ffffffff8146454f>] bonding_store_slaves+0x16f/0x1c0
> [ 20.630983] [<ffffffff813bfb83>] dev_attr_store+0x13/0x30
> [ 20.636503] [<ffffffff811c40b4>] sysfs_write_file+0xd4/0x150
> [ 20.642283] [<ffffffff81154b81>] vfs_write+0xb1/0x190
> [ 20.647462] [<ffffffff81154ee0>] sys_write+0x50/0xa0
> [ 20.652548] [<ffffffff81637092>] system_call_fastpath+0x16/0x1b
> [ 20.658696] bonding: bond0: enslaving eth_s2_0 as an active interface with a
> down link.
> [ 20.676577] bonding: bond0: Adding slave eth_s2_1.
> [ 20.743760] pps pps1: new PPS source ptp1
> [ 20.747792] ixgbe 0000:06:00.1: registered PHC device on eth_s2_1
> [ 21.150267] BUG: scheduling while atomic: ifup-bonding/2003/0x00000002
> [ 21.156836] 4 locks held by ifup-bonding/2003:
> [ 21.161319] #0: (&buffer->mutex){......}, at: [<ffffffff811c401f>]
> sysfs_write_file+0x3f/0x150
> [ 21.170388] #1: (s_active#59){......}, at: [<ffffffff811c409b>]
> sysfs_write_file+0xbb/0x150
> [ 21.179149] #2: (rtnl_mutex){......}, at: [<ffffffff81590bf0>]
> rtnl_trylock+0x10/0x20
> [ 21.187403] #3: (&bond->lock){......}, at: [<ffffffff8145be6f>]
> bond_enslave+0x4ef/0xb80
> [ 21.195904] Modules linked in: iptable_filter kvm_intel kvm acpi_cpufreq
> mperf button processor mousedev iTCO_wdt
> [ 21.206644] Pid: 2003, comm: ifup-bonding Tainted: G W
> 3.8.1-Isht-Van #5
> [ 21.214240] Call Trace:
> [ 21.216732] [<ffffffff8162b029>] __schedule_bug+0x5e/0x6c
> [ 21.222254] [<ffffffff81634592>] __schedule+0x762/0x7f0
> [ 21.227604] [<ffffffff81634734>] schedule+0x24/0x70
> [ 21.232606] [<ffffffff816336f4>] schedule_hrtimeout_range_clock+0xa4/0x130
> [ 21.239601] [<ffffffff81068250>] ? update_rmtp+0x60/0x60
> [ 21.245033] [<ffffffff81068f9f>] ? hrtimer_start_range_ns+0xf/0x20
> [ 21.251339] [<ffffffff8163378e>] schedule_hrtimeout_range+0xe/0x10
> [ 21.257635] [<ffffffff8104ec1b>] usleep_range+0x3b/0x40
> [ 21.262987] [<ffffffff814b2d7c>] ixgbe_acquire_swfw_sync_X540+0xbc/0x100
> [ 21.269811] [<ffffffff814aeb0d>] ixgbe_read_phy_reg_generic+0x3d/0x140
> [ 21.276461] [<ffffffff814aedac>]
> ixgbe_get_copper_link_capabilities_generic+0x2c/0x60
> [ 21.284409] [<ffffffff8145be6f>] ? bond_enslave+0x4ef/0xb80
> [ 21.290106] [<ffffffff814a64e4>] ixgbe_get_settings+0x34/0x340
> [ 21.296067] [<ffffffff81586ab8>] __ethtool_get_settings+0x88/0x130
> [ 21.302369] [<ffffffff814568a3>] bond_update_speed_duplex+0x23/0x60
> [ 21.308754] [<ffffffff8145bed9>] bond_enslave+0x559/0xb80
> [ 21.314278] [<ffffffff8146454f>] bonding_store_slaves+0x16f/0x1c0
> [ 21.320491] [<ffffffff813bfb83>] dev_attr_store+0x13/0x30
> [ 21.326009] [<ffffffff811c40b4>] sysfs_write_file+0xd4/0x150
> [ 21.331793] [<ffffffff81154b81>] vfs_write+0xb1/0x190
> [ 21.336964] [<ffffffff81154ee0>] sys_write+0x50/0xa0
> [ 21.342053] [<ffffffff81637092>] system_call_fastpath+0x16/0x1b
> [ 21.348191] BUG: scheduling while atomic: ifup-bonding/2003/0x00000002
> [ 21.354775] 4 locks held by ifup-bonding/2003:
> [ 21.359258] #0: (&buffer->mutex){......}, at: [<ffffffff811c401f>]
> sysfs_write_file+0x3f/0x150
> [ 21.368283] #1: (s_active#59){......}, at: [<ffffffff811c409b>]
> sysfs_write_file+0xbb/0x150
> [ 21.377104] #2: (rtnl_mutex){......}, at: [<ffffffff81590bf0>]
> rtnl_trylock+0x10/0x20
> [ 21.385343] #3: (&bond->lock){......}, at: [<ffffffff8145be6f>]
> bond_enslave+0x4ef/0xb80
> [ 21.393887] Modules linked in: iptable_filter kvm_intel kvm acpi_cpufreq
> mperf button processor mousedev iTCO_wdt
> [ 21.404575] Pid: 2003, comm: ifup-bonding Tainted: G W
> 3.8.1-Isht-Van #5
> [ 21.412176] Call Trace:
> [ 21.414666] [<ffffffff8162b029>] __schedule_bug+0x5e/0x6c
> [ 21.420188] [<ffffffff81634592>] __schedule+0x762/0x7f0
> [ 21.425536] [<ffffffff81634734>] schedule+0x24/0x70
> [ 21.430541] [<ffffffff816336f4>] schedule_hrtimeout_range_clock+0xa4/0x130
> [ 21.437532] [<ffffffff81068250>] ? update_rmtp+0x60/0x60
> [ 21.442967] [<ffffffff81068250>] ? update_rmtp+0x60/0x60
> [ 21.448407] [<ffffffff81068f9f>] ? hrtimer_start_range_ns+0xf/0x20
> [ 21.454712] [<ffffffff8163378e>] schedule_hrtimeout_range+0xe/0x10
> [ 21.461015] [<ffffffff8104ec1b>] usleep_range+0x3b/0x40
> [ 21.466370] [<ffffffff814b2cae>] ixgbe_release_swfw_sync_X540+0x4e/0x60
> [ 21.473105] [<ffffffff814aebdd>] ixgbe_read_phy_reg_generic+0x10d/0x140
> [ 21.479843] [<ffffffff814aedac>]
> ixgbe_get_copper_link_capabilities_generic+0x2c/0x60
> [ 21.487787] [<ffffffff8145be6f>] ? bond_enslave+0x4ef/0xb80
> [ 21.493513] [<ffffffff814a64e4>] ixgbe_get_settings+0x34/0x340
> [ 21.499468] [<ffffffff81586ab8>] __ethtool_get_settings+0x88/0x130
> [ 21.505767] [<ffffffff814568a3>] bond_update_speed_duplex+0x23/0x60
> [ 21.512153] [<ffffffff8145bed9>] bond_enslave+0x559/0xb80
> [ 21.517677] [<ffffffff8146454f>] bonding_store_slaves+0x16f/0x1c0
> [ 21.523889] [<ffffffff813bfb83>] dev_attr_store+0x13/0x30
> [ 21.529412] [<ffffffff811c40b4>] sysfs_write_file+0xd4/0x150
> [ 21.535193] [<ffffffff81154b81>] vfs_write+0xb1/0x190
> [ 21.540373] [<ffffffff81154ee0>] sys_write+0x50/0xa0
> [ 21.545463] [<ffffffff81637092>] system_call_fastpath+0x16/0x1b
> --
^ permalink raw reply
* rds doesn't limit allocations from userspace.
From: Dave Jones @ 2013-03-01 16:19 UTC (permalink / raw)
To: netdev; +Cc: venkat.x.venkatsubra, rds-devel
When fed mangled socket data, rds will trust what userspace gives it,
and tries to allocate enormous amounts of memory larger than what
kmalloc can satisfy.
WARNING: at mm/page_alloc.c:2393 __alloc_pages_nodemask+0xa0d/0xbe0()
Hardware name: GA-MA78GM-S2H
Modules linked in: vmw_vsock_vmci_transport vmw_vmci vsock fuse bnep dlci bridge 8021q garp stp mrp binfmt_misc l2tp_ppp l2tp_core rfcomm scsi_transport_iscsi nfnetlink hidp can_bcm can_raw rds rose appletalk ipt_ULOG atm af_rxrpc x25 pppoe pppox ipx af_key irda nfc phonet ppp_generic slhc caif_socket decnet caif crc_ccitt netrom ax25 llc2 can p8023 psnap p8022 llc lockd sunrpc ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 xt_conntrack nf_conntrack ip6table_filter ip6_tables snd_hda_codec_realtek snd_hda_intel snd_hda_codec snd_pcm btusb snd_page_alloc bluetooth microcode rfkill snd_timer usb_debug serio_raw pcspkr snd edac_core soundcore vhost_net r8169 tun macvtap mii macvlan kvm_amd kvm
Pid: 24652, comm: trinity-child2 Not tainted 3.8.0+ #65
Call Trace:
[<ffffffff81044155>] warn_slowpath_common+0x75/0xa0
[<ffffffff8104419a>] warn_slowpath_null+0x1a/0x20
[<ffffffff811444ad>] __alloc_pages_nodemask+0xa0d/0xbe0
[<ffffffff8100a196>] ? native_sched_clock+0x26/0x90
[<ffffffff810b2128>] ? trace_hardirqs_off_caller+0x28/0xc0
[<ffffffff810b21cd>] ? trace_hardirqs_off+0xd/0x10
[<ffffffff811861f8>] alloc_pages_current+0xb8/0x180
[<ffffffff8113eaaa>] __get_free_pages+0x2a/0x80
[<ffffffff811934fe>] kmalloc_order_trace+0x3e/0x1a0
[<ffffffff81193955>] __kmalloc+0x2f5/0x3a0
[<ffffffff8104df0c>] ? local_bh_enable_ip+0x7c/0xf0
[<ffffffffa0401ab3>] rds_message_alloc+0x23/0xb0 [rds]
[<ffffffffa04043a1>] rds_sendmsg+0x2b1/0x990 [rds]
[<ffffffff810b21cd>] ? trace_hardirqs_off+0xd/0x10
[<ffffffff81564620>] sock_sendmsg+0xb0/0xe0
[<ffffffff810b2052>] ? get_lock_stats+0x22/0x70
[<ffffffff810b24be>] ? put_lock_stats.isra.23+0xe/0x40
[<ffffffff81567f30>] sys_sendto+0x130/0x180
[<ffffffff810b872d>] ? trace_hardirqs_on+0xd/0x10
[<ffffffff816c547b>] ? _raw_spin_unlock_irq+0x3b/0x60
[<ffffffff816cd767>] ? sysret_check+0x1b/0x56
[<ffffffff810b8695>] ? trace_hardirqs_on_caller+0x115/0x1a0
[<ffffffff81341d8e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
[<ffffffff816cd742>] system_call_fastpath+0x16/0x1b
---[ end trace eed6ae990d018c8b ]---
^ permalink raw reply
* [PATCH net-next] ipv4: correct dropwatch false positive in ip_local_deliver_finish
From: Neil Horman @ 2013-03-01 16:18 UTC (permalink / raw)
To: netdev; +Cc: Neil Horman, David S. Miller, William Reich
I had a report recently of a user trying to use dropwatch to localise some frame
loss, and they were getting false positives. Turned out they were using a user
space SCTP stack that used raw sockets to grab frames. When we don't have a
registered protocol for a given packet, we record it as a drop, even if a raw
socket receieves the frame. We should only record the drop in the event a raw
socket doesnt exist to receive the frames
Tested by the reported successfully
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Reported-by: William Reich <reich@ulticom.com>
Tested-by: William Reich <reich@ulticom.com>
CC: "David S. Miller" <davem@davemloft.net>
CC: William Reich <reich@ulticom.com>
---
net/ipv4/ip_input.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c
index 87abd3e..2bdf802 100644
--- a/net/ipv4/ip_input.c
+++ b/net/ipv4/ip_input.c
@@ -228,9 +228,11 @@ static int ip_local_deliver_finish(struct sk_buff *skb)
icmp_send(skb, ICMP_DEST_UNREACH,
ICMP_PROT_UNREACH, 0);
}
- } else
+ kfree_skb(skb);
+ } else {
IP_INC_STATS_BH(net, IPSTATS_MIB_INDELIVERS);
- kfree_skb(skb);
+ consume_skb(skb);
+ }
}
}
out:
--
1.7.11.7
^ permalink raw reply related
* Re: tg3: regression of netdev stats
From: Michael Chan @ 2013-03-01 15:47 UTC (permalink / raw)
To: OGAWA Hirofumi; +Cc: nsujir, davem, netdev
In-Reply-To: <878v67xnkr.fsf@devron.myhome.or.jp>
On Fri, 2013-03-01 at 22:21 +0900, OGAWA Hirofumi wrote:
> Hi,
>
> f4a46d1f46a8fece34edd2023e054072b02e110d (tg3: Prevent spurious tx
> timeout by setting carrier off before tx disable.) seems to add the bug.
>
> On 3.8.1 (I didn't use 3.7.x series), "ifconfig" commands doesn't show
> any stats, i.e. all stats are zero.
No stats on an active device transmitting and receiving packets? I
don't seem to see the same problem, but we'll look into this further.
Thanks.
> And bisect points the above commit.
> In fact, reverting the above patch fixes the regression of netdev stats.
>
> This patch looks like strange, and I'm not sure what this want to do.
> Any ideas?
Every time we reset the device (ethtool, MTU change, etc), we need to
turn off all the tx queues before resetting. As soon as we turn off
these queues, if we don't turn off carrier, a tx timeout may be
triggered if it's been more than 5 seconds since the last transmit on
any of the tx queues. These tx timeouts cause unnecessary concern to
the user.
>
> Well, anyway, this is bug report.
>
> Thanks.
^ permalink raw reply
* [PATCH v2 net-next 3/4] mlx4: Remove driver specific fdb handlers.
From: Vlad Yasevich @ 2013-03-01 15:31 UTC (permalink / raw)
To: netdev; +Cc: john.r.fastabend, Vlad Yasevich, Amir Vadai, Yan Burman
In-Reply-To: <1362151906-20993-1-git-send-email-vyasevic@redhat.com>
Remove driver specific fdb hadlers since they are the same as
the default ones.
CC: Amir Vadai <amirv@mellanox.com>
CC: Yan Burman <yanb@mellanox.com>
Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
---
drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 76 ------------------------
1 files changed, 0 insertions(+), 76 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
index 5385474..5c1bb44 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_netdev.c
@@ -1925,79 +1925,6 @@ static int mlx4_en_set_features(struct net_device *netdev,
}
-static int mlx4_en_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
- struct net_device *dev,
- const unsigned char *addr, u16 flags)
-{
- struct mlx4_en_priv *priv = netdev_priv(dev);
- struct mlx4_dev *mdev = priv->mdev->dev;
- int err;
-
- if (!mlx4_is_mfunc(mdev))
- return -EOPNOTSUPP;
-
- /* Hardware does not support aging addresses, allow only
- * permanent addresses if ndm_state is given
- */
- if (ndm->ndm_state && !(ndm->ndm_state & NUD_PERMANENT)) {
- en_info(priv, "Add FDB only supports static addresses\n");
- return -EINVAL;
- }
-
- if (is_unicast_ether_addr(addr) || is_link_local_ether_addr(addr))
- err = dev_uc_add_excl(dev, addr);
- else if (is_multicast_ether_addr(addr))
- err = dev_mc_add_excl(dev, addr);
- else
- err = -EINVAL;
-
- /* Only return duplicate errors if NLM_F_EXCL is set */
- if (err == -EEXIST && !(flags & NLM_F_EXCL))
- err = 0;
-
- return err;
-}
-
-static int mlx4_en_fdb_del(struct ndmsg *ndm,
- struct nlattr *tb[],
- struct net_device *dev,
- const unsigned char *addr)
-{
- struct mlx4_en_priv *priv = netdev_priv(dev);
- struct mlx4_dev *mdev = priv->mdev->dev;
- int err;
-
- if (!mlx4_is_mfunc(mdev))
- return -EOPNOTSUPP;
-
- if (ndm->ndm_state && !(ndm->ndm_state & NUD_PERMANENT)) {
- en_info(priv, "Del FDB only supports static addresses\n");
- return -EINVAL;
- }
-
- if (is_unicast_ether_addr(addr) || is_link_local_ether_addr(addr))
- err = dev_uc_del(dev, addr);
- else if (is_multicast_ether_addr(addr))
- err = dev_mc_del(dev, addr);
- else
- err = -EINVAL;
-
- return err;
-}
-
-static int mlx4_en_fdb_dump(struct sk_buff *skb,
- struct netlink_callback *cb,
- struct net_device *dev, int idx)
-{
- struct mlx4_en_priv *priv = netdev_priv(dev);
- struct mlx4_dev *mdev = priv->mdev->dev;
-
- if (mlx4_is_mfunc(mdev))
- idx = ndo_dflt_fdb_dump(skb, cb, dev, idx);
-
- return idx;
-}
-
static const struct net_device_ops mlx4_netdev_ops = {
.ndo_open = mlx4_en_open,
.ndo_stop = mlx4_en_close,
@@ -2019,9 +1946,6 @@ static const struct net_device_ops mlx4_netdev_ops = {
#ifdef CONFIG_RFS_ACCEL
.ndo_rx_flow_steer = mlx4_en_filter_rfs,
#endif
- .ndo_fdb_add = mlx4_en_fdb_add,
- .ndo_fdb_del = mlx4_en_fdb_del,
- .ndo_fdb_dump = mlx4_en_fdb_dump,
};
int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port,
--
1.7.7.6
^ permalink raw reply related
* [PATCH v2 net-next 4/4] qlcnic: Use generic fdb handler when driver options are not enabled.
From: Vlad Yasevich @ 2013-03-01 15:31 UTC (permalink / raw)
To: netdev
Cc: john.r.fastabend, Vlad Yasevich, Jitendra Kalsaria, Sony Chacko,
linux-driver
In-Reply-To: <1362151906-20993-1-git-send-email-vyasevic@redhat.com>
Allow qlcnic to use the generic fdb handler when the driver options
are not enabled. Untill the driver is fully fixed, this allows
the use of the FDB interface with qlogic driver, but simply puts
the driver into promisc mode since the driver currently does not
support IFF_UNICAST_FLT.
CC: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Acked-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
CC: Sony Chacko <sony.chacko@qlogic.com>
CC: linux-driver@qlogic.com
Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
---
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 21 ++++++---------------
1 files changed, 6 insertions(+), 15 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
index 5d5fd06..d8dbf29 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
@@ -253,11 +253,8 @@ static int qlcnic_fdb_del(struct ndmsg *ndm, struct nlattr *tb[],
struct qlcnic_adapter *adapter = netdev_priv(netdev);
int err = -EOPNOTSUPP;
- if (!adapter->fdb_mac_learn) {
- pr_info("%s: Driver mac learn is enabled, FDB operation not allowed\n",
- __func__);
- return err;
- }
+ if (!adapter->fdb_mac_learn)
+ return ndo_dflt_fdb_del(ndm, tb, netdev, addr);
if (adapter->flags & QLCNIC_ESWITCH_ENABLED) {
if (is_unicast_ether_addr(addr))
@@ -277,11 +274,8 @@ static int qlcnic_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
struct qlcnic_adapter *adapter = netdev_priv(netdev);
int err = 0;
- if (!adapter->fdb_mac_learn) {
- pr_info("%s: Driver mac learn is enabled, FDB operation not allowed\n",
- __func__);
- return -EOPNOTSUPP;
- }
+ if (!adapter->fdb_mac_learn)
+ return ndo_dflt_fdb_add(ndm, tb, netdev, addr, flags);
if (!(adapter->flags & QLCNIC_ESWITCH_ENABLED)) {
pr_info("%s: FDB e-switch is not enabled\n", __func__);
@@ -306,11 +300,8 @@ static int qlcnic_fdb_dump(struct sk_buff *skb, struct netlink_callback *ncb,
{
struct qlcnic_adapter *adapter = netdev_priv(netdev);
- if (!adapter->fdb_mac_learn) {
- pr_info("%s: Driver mac learn is enabled, FDB operation not allowed\n",
- __func__);
- return -EOPNOTSUPP;
- }
+ if (!adapter->fdb_mac_learn)
+ return ndo_dflt_fdb_dump(skb, ncb, netdev, idx);
if (adapter->flags & QLCNIC_ESWITCH_ENABLED)
idx = ndo_dflt_fdb_dump(skb, ncb, netdev, idx);
--
1.7.7.6
^ permalink raw reply related
* [PATCH v2 net-next 2/4] ixgbe: Remove driver specific fdb handlers.
From: Vlad Yasevich @ 2013-03-01 15:31 UTC (permalink / raw)
To: netdev; +Cc: john.r.fastabend, Vlad Yasevich, Gregory Rose
In-Reply-To: <1362151906-20993-1-git-send-email-vyasevic@redhat.com>
Remove driver specific fdb handlers since they are the same
as the default ones.
CC: John Fastabend <john.r.fastabend@intel.com>
CC: Gregory Rose <gregory.v.rose@intel.com>
Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 42 +------------------------
1 files changed, 1 insertions(+), 41 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 68478d6..a202673 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -7007,7 +7007,7 @@ static int ixgbe_ndo_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
int err;
if (!(adapter->flags & IXGBE_FLAG_SRIOV_ENABLED))
- return -EOPNOTSUPP;
+ return ndo_dflt_fdb_add(ndm, tb, dev, addr, flags);
/* Hardware does not support aging addresses so if a
* ndm_state is given only allow permanent addresses
@@ -7038,44 +7038,6 @@ static int ixgbe_ndo_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
return err;
}
-static int ixgbe_ndo_fdb_del(struct ndmsg *ndm, struct nlattr *tb[],
- struct net_device *dev,
- const unsigned char *addr)
-{
- struct ixgbe_adapter *adapter = netdev_priv(dev);
- int err = -EOPNOTSUPP;
-
- if (ndm->ndm_state & NUD_PERMANENT) {
- pr_info("%s: FDB only supports static addresses\n",
- ixgbe_driver_name);
- return -EINVAL;
- }
-
- if (adapter->flags & IXGBE_FLAG_SRIOV_ENABLED) {
- if (is_unicast_ether_addr(addr))
- err = dev_uc_del(dev, addr);
- else if (is_multicast_ether_addr(addr))
- err = dev_mc_del(dev, addr);
- else
- err = -EINVAL;
- }
-
- return err;
-}
-
-static int ixgbe_ndo_fdb_dump(struct sk_buff *skb,
- struct netlink_callback *cb,
- struct net_device *dev,
- int idx)
-{
- struct ixgbe_adapter *adapter = netdev_priv(dev);
-
- if (adapter->flags & IXGBE_FLAG_SRIOV_ENABLED)
- idx = ndo_dflt_fdb_dump(skb, cb, dev, idx);
-
- return idx;
-}
-
static int ixgbe_ndo_bridge_setlink(struct net_device *dev,
struct nlmsghdr *nlh)
{
@@ -7171,8 +7133,6 @@ static const struct net_device_ops ixgbe_netdev_ops = {
.ndo_set_features = ixgbe_set_features,
.ndo_fix_features = ixgbe_fix_features,
.ndo_fdb_add = ixgbe_ndo_fdb_add,
- .ndo_fdb_del = ixgbe_ndo_fdb_del,
- .ndo_fdb_dump = ixgbe_ndo_fdb_dump,
.ndo_bridge_setlink = ixgbe_ndo_bridge_setlink,
.ndo_bridge_getlink = ixgbe_ndo_bridge_getlink,
};
--
1.7.7.6
^ permalink raw reply related
* [PATCH v2 net-next 1/4] net: generic fdb support for drivers without ndo_fdb_<op>
From: Vlad Yasevich @ 2013-03-01 15:31 UTC (permalink / raw)
To: netdev; +Cc: john.r.fastabend, Vlad Yasevich
In-Reply-To: <1362151906-20993-1-git-send-email-vyasevic@redhat.com>
If the driver does not support the ndo_op use the generic
handler for it. This should work in the majority of cases.
Eventually the fdb_dflt_add call gets translated into a
__dev_set_rx_mode() call which should handle hardware
support for filtering via the IFF_UNICAST_FLT flag.
Namely IFF_UNICAST_FLT indicates if the hardware can do
unicast address filtering. If no support is available
the device is put into promisc mode.
CC: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
---
include/linux/rtnetlink.h | 9 +++++
net/core/rtnetlink.c | 81 +++++++++++++++++++++++++++++++++++++++++---
2 files changed, 84 insertions(+), 6 deletions(-)
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
index 489dd7bb..f28544b 100644
--- a/include/linux/rtnetlink.h
+++ b/include/linux/rtnetlink.h
@@ -69,6 +69,15 @@ extern int ndo_dflt_fdb_dump(struct sk_buff *skb,
struct netlink_callback *cb,
struct net_device *dev,
int idx);
+extern int ndo_dflt_fdb_add(struct ndmsg *ndm,
+ struct nlattr *tb[],
+ struct net_device *dev,
+ const unsigned char *addr,
+ u16 flags);
+extern int ndo_dflt_fdb_del(struct ndmsg *ndm,
+ struct nlattr *tb[],
+ struct net_device *dev,
+ const unsigned char *addr);
extern int ndo_dflt_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq,
struct net_device *dev, u16 mode);
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index d8aa20f..56b0038 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -2049,6 +2049,38 @@ errout:
rtnl_set_sk_err(net, RTNLGRP_NEIGH, err);
}
+/**
+ * ndo_dflt_fdb_add - default netdevice operation to add an FDB entry
+ */
+int ndo_dflt_fdb_add(struct ndmsg *ndm,
+ struct nlattr *tb[],
+ struct net_device *dev,
+ const unsigned char *addr,
+ u16 flags)
+{
+ int err = -EINVAL;
+
+ /* If aging addresses are supported device will need to
+ * implement its own handler for this.
+ */
+ if (ndm->ndm_state && !(ndm->ndm_state & NUD_PERMANENT)) {
+ pr_info("%s: FDB only supports static addresses\n", dev->name);
+ return err;
+ }
+
+ if (is_unicast_ether_addr(addr) || is_link_local_ether_addr(addr))
+ err = dev_uc_add_excl(dev, addr);
+ else if (is_multicast_ether_addr(addr))
+ err = dev_mc_add_excl(dev, addr);
+
+ /* Only return duplicate errors if NLM_F_EXCL is set */
+ if (err == -EEXIST && !(flags & NLM_F_EXCL))
+ err = 0;
+
+ return err;
+}
+EXPORT_SYMBOL(ndo_dflt_fdb_add);
+
static int rtnl_fdb_add(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
{
struct net *net = sock_net(skb->sk);
@@ -2101,10 +2133,13 @@ static int rtnl_fdb_add(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
}
/* Embedded bridge, macvlan, and any other device support */
- if ((ndm->ndm_flags & NTF_SELF) && dev->netdev_ops->ndo_fdb_add) {
- err = dev->netdev_ops->ndo_fdb_add(ndm, tb,
- dev, addr,
- nlh->nlmsg_flags);
+ if ((ndm->ndm_flags & NTF_SELF)) {
+ if (dev->netdev_ops->ndo_fdb_add)
+ err = dev->netdev_ops->ndo_fdb_add(ndm, tb, dev, addr,
+ nlh->nlmsg_flags);
+ else
+ err = ndo_dflt_fdb_add(ndm, tb, dev, addr,
+ nlh->nlmsg_flags);
if (!err) {
rtnl_fdb_notify(dev, addr, RTM_NEWNEIGH);
@@ -2115,6 +2150,35 @@ out:
return err;
}
+/**
+ * ndo_dflt_fdb_del - default netdevice operation to delete an FDB entry
+ */
+int ndo_dflt_fdb_del(struct ndmsg *ndm,
+ struct nlattr *tb[],
+ struct net_device *dev,
+ const unsigned char *addr)
+{
+ int err = -EOPNOTSUPP;
+
+ /* If aging addresses are supported device will need to
+ * implement its own handler for this.
+ */
+ if (ndm->ndm_state & NUD_PERMANENT) {
+ pr_info("%s: FDB only supports static addresses\n", dev->name);
+ return -EINVAL;
+ }
+
+ if (is_unicast_ether_addr(addr) || is_link_local_ether_addr(addr))
+ err = dev_uc_del(dev, addr);
+ else if (is_multicast_ether_addr(addr))
+ err = dev_mc_del(dev, addr);
+ else
+ err = -EINVAL;
+
+ return err;
+}
+EXPORT_SYMBOL(ndo_dflt_fdb_del);
+
static int rtnl_fdb_del(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
{
struct net *net = sock_net(skb->sk);
@@ -2172,8 +2236,11 @@ static int rtnl_fdb_del(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
}
/* Embedded bridge, macvlan, and any other device support */
- if ((ndm->ndm_flags & NTF_SELF) && dev->netdev_ops->ndo_fdb_del) {
- err = dev->netdev_ops->ndo_fdb_del(ndm, tb, dev, addr);
+ if (ndm->ndm_flags & NTF_SELF) {
+ if (dev->netdev_ops->ndo_fdb_del)
+ err = dev->netdev_ops->ndo_fdb_del(ndm, tb, dev, addr);
+ else
+ err = ndo_dflt_fdb_del(ndm, tb, dev, addr);
if (!err) {
rtnl_fdb_notify(dev, addr, RTM_DELNEIGH);
@@ -2258,6 +2325,8 @@ static int rtnl_fdb_dump(struct sk_buff *skb, struct netlink_callback *cb)
if (dev->netdev_ops->ndo_fdb_dump)
idx = dev->netdev_ops->ndo_fdb_dump(skb, cb, dev, idx);
+ else
+ ndo_dflt_fdb_dump(skb, cb, dev, idx);
}
rcu_read_unlock();
--
1.7.7.6
^ permalink raw reply related
* [PATCH v2 net-next 0/4] Provide default fdb operation to allow mac filter setting
From: Vlad Yasevich @ 2013-03-01 15:31 UTC (permalink / raw)
To: netdev; +Cc: john.r.fastabend, Vlad Yasevich
This is a short series that now allows mac filter programming on any
card that support IFF_UNICAST_FLT by using the existing FDB interface.
Some existing drivers that had FDB functionality usually supported
it only in SR-IOV mode. Since that's not always enabled, and
we want to take advantage of IFF_UNICAST_FLT support, these drivers
have been converted to call the default handler when not in SRIOV mode.
Changes since v1:
- Restore ixgbe implementation of fdb_add since it needs to
enforce the limit of addresses in SR-IOV case.
Changes since RFC:
- Removed ixgbe and mlx versions of fdb calls as recommened.
- Added qlogic patch to use default calls when module parameter is
not turned on.
Vlad Yasevich (4):
net: generic fdb support for drivers without ndo_fdb_<op>
ixgbe: Remove driver specific fdb handlers.
mlx4: Remove driver specific fdb handlers.
qlcnic: Use generic fdb handler when driver options are not enabled.
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 42 +-----------
drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 76 --------------------
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 21 ++----
include/linux/rtnetlink.h | 9 +++
net/core/rtnetlink.c | 81 ++++++++++++++++++++--
5 files changed, 91 insertions(+), 138 deletions(-)
--
1.7.7.6
^ permalink raw reply
* [PATCH] l2tp: Restore socket refcount when sendmsg succeeds
From: Guillaume Nault @ 2013-03-01 15:02 UTC (permalink / raw)
To: James Chapman; +Cc: linux-kernel, netdev, David S. Miller
The sendmsg() syscall handler for PPPoL2TP doesn't decrease the socket
reference counter after successful transmissions. Any successful
sendmsg() call from userspace will then increase the reference counter
forever, thus preventing the kernel's session and tunnel data from
being freed later on.
The problem only happens when writing directly on L2TP sockets.
PPP sockets attached to L2TP are unaffected as the PPP subsystem
uses pppol2tp_xmit() which symmetrically increase/decrease reference
counters.
This patch adds the missing call to sock_put() before returning from
pppol2tp_sendmsg().
Cc: <stable@vger.kernel.org>
Signed-off-by: Guillaume Nault <g.nault@alphalink.fr>
---
net/l2tp/l2tp_ppp.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/l2tp/l2tp_ppp.c b/net/l2tp/l2tp_ppp.c
index 3f4e3af..6a53371 100644
--- a/net/l2tp/l2tp_ppp.c
+++ b/net/l2tp/l2tp_ppp.c
@@ -355,6 +355,7 @@ static int pppol2tp_sendmsg(struct kiocb *iocb, struct socket *sock, struct msgh
l2tp_xmit_skb(session, skb, session->hdr_len);
sock_put(ps->tunnel_sock);
+ sock_put(sk);
return error;
--
1.7.10.4
^ permalink raw reply related
* Re: [patch] sctp: use the passed in gfp flags instead GFP_KERNEL
From: Neil Horman @ 2013-03-01 14:35 UTC (permalink / raw)
To: Dan Carpenter
Cc: Vlad Yasevich, Sridhar Samudrala, David S. Miller, linux-sctp,
netdev, kernel-janitors
In-Reply-To: <20130301052743.GD2669@longonot.mountain>
On Fri, Mar 01, 2013 at 08:27:43AM +0300, Dan Carpenter wrote:
> This patch doesn't change how the code works because in the current
> kernel gfp is always GFP_KERNEL. But gfp was obviously intended
> instead of GFP_KERNEL.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/net/sctp/endpointola.c b/net/sctp/endpointola.c
> index 2b3ef03..12ed45d 100644
> --- a/net/sctp/endpointola.c
> +++ b/net/sctp/endpointola.c
> @@ -155,7 +155,7 @@ static struct sctp_endpoint *sctp_endpoint_init(struct sctp_endpoint *ep,
>
> /* SCTP-AUTH extensions*/
> INIT_LIST_HEAD(&ep->endpoint_shared_keys);
> - null_key = sctp_auth_shkey_create(0, GFP_KERNEL);
> + null_key = sctp_auth_shkey_create(0, gfp);
> if (!null_key)
> goto nomem;
>
>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
^ permalink raw reply
* Re: [PATCH net-next 2/4] ixgbe: Remove driver specific fdb handlers.
From: Vlad Yasevich @ 2013-03-01 14:35 UTC (permalink / raw)
To: John Fastabend; +Cc: netdev, Gregory Rose
In-Reply-To: <51304296.8080106@intel.com>
On 03/01/2013 12:54 AM, John Fastabend wrote:
> On 2/28/2013 3:13 PM, Vlad Yasevich wrote:
>> Remove driver specific fdb handlers since they are the same
>> as the default ones.
>>
>> CC: John Fastabend <john.r.fastabend@intel.com>
>> CC: CC: Gregory Rose <gregory.v.rose@intel.com>
>> Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
>> ---
>> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 81
>> -------------------------
>> 1 files changed, 0 insertions(+), 81 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
>> b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
>> index 68478d6..212b74e 100644
>> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
>> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
>> @@ -6998,84 +6998,6 @@ static int ixgbe_set_features(struct net_device
>> *netdev,
>> return 0;
>> }
>>
>> -static int ixgbe_ndo_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
>> - struct net_device *dev,
>> - const unsigned char *addr,
>> - u16 flags)
>> -{
>
> [...]
>
>> - if (is_unicast_ether_addr(addr) || is_link_local_ether_addr(addr)) {
>> - u32 rar_uc_entries = IXGBE_MAX_PF_MACVLANS;
>> -
>> - if (netdev_uc_count(dev) < rar_uc_entries)
>> - err = dev_uc_add_excl(dev, addr);
>> - else
>> - err = -ENOMEM;
>
> OK after talking with Greg I realized there is a problem with
> just removing the add routine.
>
> The problem with this is we lose the ability to indicate the
> hardware table is full and return ENOMEM. Although our set_rx_mode
> routine will put the device in promisc mode this won't forward
> packets from a VF to the PF in the SR-IOV case.
>
> So we either need to leave ixgbe_ndo_fdb_add() or let set_rx_mode
> return an -ENOMEM error. I believe in the first case we can still
> remove the dump and del cases.
>
> Sorry for the hassle took me a second review to catch it.
No problem. That was the reason I left it in the first version (because
of different error handling). I'll restore the add function.
-vlad
>
> .John
^ permalink raw reply
* tg3: regression of netdev stats
From: OGAWA Hirofumi @ 2013-03-01 13:21 UTC (permalink / raw)
To: nsujir, mchan, davem; +Cc: netdev
Hi,
f4a46d1f46a8fece34edd2023e054072b02e110d (tg3: Prevent spurious tx
timeout by setting carrier off before tx disable.) seems to add the bug.
On 3.8.1 (I didn't use 3.7.x series), "ifconfig" commands doesn't show
any stats, i.e. all stats are zero. And bisect points the above commit.
In fact, reverting the above patch fixes the regression of netdev stats.
This patch looks like strange, and I'm not sure what this want to do.
Any ideas?
Well, anyway, this is bug report.
Thanks.
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
^ permalink raw reply
* e1000e broken after resume on x230 [was: Uhhuh. NMI received for unknown reason 2c on CPU 0.]
From: Jiri Slaby @ 2013-03-01 12:51 UTC (permalink / raw)
To: Konstantin Khlebnikov, Borislav Petkov, Bjorn Helgaas,
Rafael J. Wysocki, lkml, e1000-devel, ML netdev
In-Reply-To: <511DF7B4.8060504@openvz.org>
On 02/15/2013 09:54 AM, Konstantin Khlebnikov wrote:
> Borislav Petkov wrote:
>> On Thu, Feb 14, 2013 at 10:17:46AM -0700, Bjorn Helgaas wrote:
>>> It's pretty late for v3.8, but let me know if you think they're
>>> critical.
>>
>> Ok, I meant those:
>>
>> http://marc.info/?l=linux-kernel&m=135984592927219
>>
>> They fix the link detection issue on my x230. So let's see. The first
>> one is:
>>
>> * https://patchwork.kernel.org/patch/2001211/ (e1000e: fix pci device
>> enable
>> counter balance)
>
> please use this instead:
Hi, I am a bit confused. Is this fixed in -next yet? And if so, is it
known which commit IDs are needed to fix the issue in 3.7 (see below)?
> [PATCH v2 1/7] e1000e: fix pci-device enable-counter balance
> https://lkml.org/lkml/2013/2/4/190
>
> from v2 patchset: https://lkml.org/lkml/2013/2/4/185
So this is now in -next as:
commit e34f7147d93afe5efc574734bbff6584c0cc4a02
Author: Konstantin Khlebnikov <khlebnikov@openvz.org>
Date: Mon Feb 25 09:19:04 2013 +0400
e1000e: fix pci-device enable-counter balance
>> I don't see that one in your tree.
>>
>> * pci-pm-clear-state_saved-during-suspend.patch
This is:
commit 82fee4d67ab86d6fe5eb0f9a9e988ca9d654d765
Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Date: Mon Feb 4 15:56:05 2013 +0400
PCI/PM: Clear state_saved during suspend
>> Rafael said this one is a real bugfix. Looks like e1000e maintainers are
>> picking that one?
>>
>> * pci-pm-fix-e1000e-runtime-suspend.patch
Is this one replaced by a different fix in the end? Which one? I don't
think it is in -next yet, right?
confused,
--
js
suse labs
^ permalink raw reply
* Re: [PATCH v6 00/46] CPU hotplug: stop_machine()-free CPU hotplug
From: Vincent Guittot @ 2013-03-01 12:05 UTC (permalink / raw)
To: Srivatsa S. Bhat
Cc: tglx, peterz, tj, oleg, paulmck, rusty, mingo, akpm, namhyung,
rostedt, wangyun, xiaoguangrong, rjw, sbw, fweisbec, linux,
nikunj, linux-pm, linux-arch, linux-arm-kernel, linuxppc-dev,
netdev, linux-doc, linux-kernel, walken
In-Reply-To: <20130218123714.26245.61816.stgit@srivatsabhat.in.ibm.com>
Hi Srivatsa,
I have run some tests with genload on my ARM platform but even with
the mainline the cpu_down is quite short and stable ( around 4ms )
with 5 or 2 online cores. The duration is similar with your patches
I have maybe not used the right option for genload ? I have used
genload -m 10 which seems to generate the most system time. Which
command have you used for your tests ?
Vincent
On 18 February 2013 13:38, Srivatsa S. Bhat
<srivatsa.bhat@linux.vnet.ibm.com> wrote:
> Hi,
>
> This patchset removes CPU hotplug's dependence on stop_machine() from the CPU
> offline path and provides an alternative (set of APIs) to preempt_disable() to
> prevent CPUs from going offline, which can be invoked from atomic context.
> The motivation behind the removal of stop_machine() is to avoid its ill-effects
> and thus improve the design of CPU hotplug. (More description regarding this
> is available in the patches).
>
> All the users of preempt_disable()/local_irq_disable() who used to use it to
> prevent CPU offline, have been converted to the new primitives introduced in the
> patchset. Also, the CPU_DYING notifiers have been audited to check whether
> they can cope up with the removal of stop_machine() or whether they need to
> use new locks for synchronization (all CPU_DYING notifiers looked OK, without
> the need for any new locks).
>
> Applies on current mainline (v3.8-rc7+).
>
> This patchset is available in the following git branch:
>
> git://github.com/srivatsabhat/linux.git stop-machine-free-cpu-hotplug-v6
>
>
> Overview of the patches:
> -----------------------
>
> Patches 1 to 7 introduce a generic, flexible Per-CPU Reader-Writer Locking
> scheme.
>
> Patch 8 uses this synchronization mechanism to build the
> get/put_online_cpus_atomic() APIs which can be used from atomic context, to
> prevent CPUs from going offline.
>
> Patch 9 is a cleanup; it converts preprocessor macros to static inline
> functions.
>
> Patches 10 to 43 convert various call-sites to use the new APIs.
>
> Patch 44 is the one which actually removes stop_machine() from the CPU
> offline path.
>
> Patch 45 decouples stop_machine() and CPU hotplug from Kconfig.
>
> Patch 46 updates the documentation to reflect the new APIs.
>
>
> Changes in v6:
> --------------
>
> * Fixed issues related to memory barriers, as pointed out by Paul and Oleg.
> * Fixed the locking issue related to clockevents_lock, which was being
> triggered when cpu idle was enabled.
> * Some code restructuring to improve readability and to enhance some fastpath
> optimizations.
> * Randconfig build-fixes, reported by Fengguang Wu.
>
>
> Changes in v5:
> --------------
> Exposed a new generic locking scheme: Flexible Per-CPU Reader-Writer locks,
> based on the synchronization schemes already discussed in the previous
> versions, and used it in CPU hotplug, to implement the new APIs.
>
> Audited the CPU_DYING notifiers in the kernel source tree and replaced
> usages of preempt_disable() with the new get/put_online_cpus_atomic() APIs
> where necessary.
>
>
> Changes in v4:
> --------------
> The synchronization scheme has been simplified quite a bit, which makes it
> look a lot less complex than before. Some highlights:
>
> * Implicit ACKs:
>
> The earlier design required the readers to explicitly ACK the writer's
> signal. The new design uses implicit ACKs instead. The reader switching
> over to rwlock implicitly tells the writer to stop waiting for that reader.
>
> * No atomic operations:
>
> Since we got rid of explicit ACKs, we no longer have the need for a reader
> and a writer to update the same counter. So we can get rid of atomic ops
> too.
>
> Changes in v3:
> --------------
> * Dropped the _light() and _full() variants of the APIs. Provided a single
> interface: get/put_online_cpus_atomic().
>
> * Completely redesigned the synchronization mechanism again, to make it
> fast and scalable at the reader-side in the fast-path (when no hotplug
> writers are active). This new scheme also ensures that there is no
> possibility of deadlocks due to circular locking dependency.
> In summary, this provides the scalability and speed of per-cpu rwlocks
> (without actually using them), while avoiding the downside (deadlock
> possibilities) which is inherent in any per-cpu locking scheme that is
> meant to compete with preempt_disable()/enable() in terms of flexibility.
>
> The problem with using per-cpu locking to replace preempt_disable()/enable
> was explained here:
> https://lkml.org/lkml/2012/12/6/290
>
> Basically we use per-cpu counters (for scalability) when no writers are
> active, and then switch to global rwlocks (for lock-safety) when a writer
> becomes active. It is a slightly complex scheme, but it is based on
> standard principles of distributed algorithms.
>
> Changes in v2:
> -------------
> * Completely redesigned the synchronization scheme to avoid using any extra
> cpumasks.
>
> * Provided APIs for 2 types of atomic hotplug readers: "light" (for
> light-weight) and "full". We wish to have more "light" readers than
> the "full" ones, to avoid indirectly inducing the "stop_machine effect"
> without even actually using stop_machine().
>
> And the patches show that it _is_ generally true: 5 patches deal with
> "light" readers, whereas only 1 patch deals with a "full" reader.
>
> Also, the "light" readers happen to be in very hot paths. So it makes a
> lot of sense to have such a distinction and a corresponding light-weight
> API.
>
> Links to previous versions:
> v5: http://lwn.net/Articles/533553/
> v4: https://lkml.org/lkml/2012/12/11/209
> v3: https://lkml.org/lkml/2012/12/7/287
> v2: https://lkml.org/lkml/2012/12/5/322
> v1: https://lkml.org/lkml/2012/12/4/88
>
> --
> Paul E. McKenney (1):
> cpu: No more __stop_machine() in _cpu_down()
>
> Srivatsa S. Bhat (45):
> percpu_rwlock: Introduce the global reader-writer lock backend
> percpu_rwlock: Introduce per-CPU variables for the reader and the writer
> percpu_rwlock: Provide a way to define and init percpu-rwlocks at compile time
> percpu_rwlock: Implement the core design of Per-CPU Reader-Writer Locks
> percpu_rwlock: Make percpu-rwlocks IRQ-safe, optimally
> percpu_rwlock: Rearrange the read-lock code to fastpath nested percpu readers
> percpu_rwlock: Allow writers to be readers, and add lockdep annotations
> CPU hotplug: Provide APIs to prevent CPU offline from atomic context
> CPU hotplug: Convert preprocessor macros to static inline functions
> smp, cpu hotplug: Fix smp_call_function_*() to prevent CPU offline properly
> smp, cpu hotplug: Fix on_each_cpu_*() to prevent CPU offline properly
> sched/timer: Use get/put_online_cpus_atomic() to prevent CPU offline
> sched/migration: Use raw_spin_lock/unlock since interrupts are already disabled
> sched/rt: Use get/put_online_cpus_atomic() to prevent CPU offline
> tick: Use get/put_online_cpus_atomic() to prevent CPU offline
> time/clocksource: Use get/put_online_cpus_atomic() to prevent CPU offline
> clockevents: Use get/put_online_cpus_atomic() in clockevents_notify()
> softirq: Use get/put_online_cpus_atomic() to prevent CPU offline
> irq: Use get/put_online_cpus_atomic() to prevent CPU offline
> net: Use get/put_online_cpus_atomic() to prevent CPU offline
> block: Use get/put_online_cpus_atomic() to prevent CPU offline
> crypto: pcrypt - Protect access to cpu_online_mask with get/put_online_cpus()
> infiniband: ehca: Use get/put_online_cpus_atomic() to prevent CPU offline
> [SCSI] fcoe: Use get/put_online_cpus_atomic() to prevent CPU offline
> staging: octeon: Use get/put_online_cpus_atomic() to prevent CPU offline
> x86: Use get/put_online_cpus_atomic() to prevent CPU offline
> perf/x86: Use get/put_online_cpus_atomic() to prevent CPU offline
> KVM: Use get/put_online_cpus_atomic() to prevent CPU offline from atomic context
> kvm/vmx: Use get/put_online_cpus_atomic() to prevent CPU offline
> x86/xen: Use get/put_online_cpus_atomic() to prevent CPU offline
> alpha/smp: Use get/put_online_cpus_atomic() to prevent CPU offline
> blackfin/smp: Use get/put_online_cpus_atomic() to prevent CPU offline
> cris/smp: Use get/put_online_cpus_atomic() to prevent CPU offline
> hexagon/smp: Use get/put_online_cpus_atomic() to prevent CPU offline
> ia64: Use get/put_online_cpus_atomic() to prevent CPU offline
> m32r: Use get/put_online_cpus_atomic() to prevent CPU offline
> MIPS: Use get/put_online_cpus_atomic() to prevent CPU offline
> mn10300: Use get/put_online_cpus_atomic() to prevent CPU offline
> parisc: Use get/put_online_cpus_atomic() to prevent CPU offline
> powerpc: Use get/put_online_cpus_atomic() to prevent CPU offline
> sh: Use get/put_online_cpus_atomic() to prevent CPU offline
> sparc: Use get/put_online_cpus_atomic() to prevent CPU offline
> tile: Use get/put_online_cpus_atomic() to prevent CPU offline
> CPU hotplug, stop_machine: Decouple CPU hotplug from stop_machine() in Kconfig
> Documentation/cpu-hotplug: Remove references to stop_machine()
>
> Documentation/cpu-hotplug.txt | 17 +-
> arch/alpha/kernel/smp.c | 19 +-
> arch/arm/Kconfig | 1
> arch/blackfin/Kconfig | 1
> arch/blackfin/mach-common/smp.c | 6 -
> arch/cris/arch-v32/kernel/smp.c | 8 +
> arch/hexagon/kernel/smp.c | 5
> arch/ia64/Kconfig | 1
> arch/ia64/kernel/irq_ia64.c | 13 +
> arch/ia64/kernel/perfmon.c | 6 +
> arch/ia64/kernel/smp.c | 23 ++
> arch/ia64/mm/tlb.c | 6 -
> arch/m32r/kernel/smp.c | 12 +
> arch/mips/Kconfig | 1
> arch/mips/kernel/cevt-smtc.c | 8 +
> arch/mips/kernel/smp.c | 16 +-
> arch/mips/kernel/smtc.c | 3
> arch/mips/mm/c-octeon.c | 4
> arch/mn10300/Kconfig | 1
> arch/mn10300/kernel/smp.c | 2
> arch/mn10300/mm/cache-smp.c | 5
> arch/mn10300/mm/tlb-smp.c | 15 +
> arch/parisc/Kconfig | 1
> arch/parisc/kernel/smp.c | 4
> arch/powerpc/Kconfig | 1
> arch/powerpc/mm/mmu_context_nohash.c | 2
> arch/s390/Kconfig | 1
> arch/sh/Kconfig | 1
> arch/sh/kernel/smp.c | 12 +
> arch/sparc/Kconfig | 1
> arch/sparc/kernel/leon_smp.c | 2
> arch/sparc/kernel/smp_64.c | 9 -
> arch/sparc/kernel/sun4d_smp.c | 2
> arch/sparc/kernel/sun4m_smp.c | 3
> arch/tile/kernel/smp.c | 4
> arch/x86/Kconfig | 1
> arch/x86/include/asm/ipi.h | 5
> arch/x86/kernel/apic/apic_flat_64.c | 10 +
> arch/x86/kernel/apic/apic_numachip.c | 5
> arch/x86/kernel/apic/es7000_32.c | 5
> arch/x86/kernel/apic/io_apic.c | 7 -
> arch/x86/kernel/apic/ipi.c | 10 +
> arch/x86/kernel/apic/x2apic_cluster.c | 4
> arch/x86/kernel/apic/x2apic_uv_x.c | 4
> arch/x86/kernel/cpu/mcheck/therm_throt.c | 4
> arch/x86/kernel/cpu/perf_event_intel_uncore.c | 5
> arch/x86/kvm/vmx.c | 8 +
> arch/x86/mm/tlb.c | 14 +
> arch/x86/xen/mmu.c | 11 +
> arch/x86/xen/smp.c | 9 +
> block/blk-softirq.c | 4
> crypto/pcrypt.c | 4
> drivers/infiniband/hw/ehca/ehca_irq.c | 8 +
> drivers/scsi/fcoe/fcoe.c | 7 +
> drivers/staging/octeon/ethernet-rx.c | 3
> include/linux/cpu.h | 8 +
> include/linux/percpu-rwlock.h | 74 +++++++
> include/linux/stop_machine.h | 2
> init/Kconfig | 2
> kernel/cpu.c | 59 +++++-
> kernel/irq/manage.c | 7 +
> kernel/sched/core.c | 36 +++-
> kernel/sched/fair.c | 5
> kernel/sched/rt.c | 3
> kernel/smp.c | 65 ++++--
> kernel/softirq.c | 3
> kernel/time/clockevents.c | 3
> kernel/time/clocksource.c | 5
> kernel/time/tick-broadcast.c | 2
> kernel/timer.c | 2
> lib/Kconfig | 3
> lib/Makefile | 1
> lib/percpu-rwlock.c | 256 +++++++++++++++++++++++++
> net/core/dev.c | 9 +
> virt/kvm/kvm_main.c | 10 +
> 75 files changed, 776 insertions(+), 123 deletions(-)
> create mode 100644 include/linux/percpu-rwlock.h
> create mode 100644 lib/percpu-rwlock.c
>
>
>
> Regards,
> Srivatsa S. Bhat
> IBM Linux Technology Center
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm" 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
* RE: [PATCH] n_gsm: Add Mutex to avoid race when net destroy
From: Bi, Chao @ 2013-03-01 11:04 UTC (permalink / raw)
To: Jiri Slaby
Cc: Greg Kroah-Hartman, linux-kernel@vger.kernel.org, ML netdev,
Pillet, VincentX
In-Reply-To: <51307079.2050905@suse.cz>
-----Original Message-----
From: Jiri Slaby [mailto:jirislaby@gmail.com] On Behalf Of Jiri Slaby
Sent: Friday, March 01, 2013 5:10 PM
To: Bi, Chao
Cc: Greg Kroah-Hartman; linux-kernel@vger.kernel.org; ML netdev; Pillet, VincentX
Subject: Re: [PATCH] n_gsm: Add Mutex to avoid race when net destroy
On 03/01/2013 09:51 AM, channing wrote:
>> It should stop the queue and schedule a workqueue to lock the mutex,
>> unregister the hetdev and reset dlci->net. (Or maybe just call
>> muxnet_put with the lock held.)
>
> Thanks, Jiri, you're right, I didn't notice that in validation because
> DEBUG_ATOMIC_SLEEP is not enabled in my platform :( Now I'm trying to
> work out the workqueue solution, when it finished I'll re-submit for
> review. What do you mean by "call muxnet_put with lock held"? do you
> mean to use spin lock instead of mutex?
No, I mean, in the newly added scheduled work, to lock the mutex and simply call muxnet_put. That should fix it, right?
[chao] Yes, that's to only move muxnet_put to scheduled work with mutex protected, and the rest of gsm_mux_net_start_xmit()
Is kept unchanged, and they are not in mutex lock. It could avoid race of net_free().
I'm not sure if it's safe enough, I mean if dlci->net is released before STATS(net) in gsm_mux_net_start_xmit(), will STATS(net) access unreliable data?
--
js
suse labs
^ permalink raw reply
* Re: [net-next (TAKE 2) 0/4] IPv6 over Firewire
From: Stephan Gatzka @ 2013-03-01 10:28 UTC (permalink / raw)
To: YOSHIFUJI Hideaki; +Cc: netdev, linux1394-devel, davem, stefanr
In-Reply-To: <511A9BFC.9010907@gmail.com>
Hi Yoshfuji,
> Nevertheless, there is some hope that I can try out your patch set
> during this week and find some insight why IPv6 does not work with MacOS X.
Unfortunately, until now I did not find some time to try out your IPv6
over firewire implementation. But now I did.
I just fired a ping6 from my Linux box running your kernel.
Using a FireSpy device I sniffed directly on the firewire line and
dumped the ndisc packets. They look pretty well, I can't see any
problems. The only thing I can't really judge about is the ICMPv6
checksum. But wireshark says the checksum is correct.
Hopefully I get a MacOS X notebook today so that I can also sniff the
packets from MacOS too.
I'll keep you informed.
Regards,
Stephan
^ permalink raw reply
* [patch net-next 2/2] team: introduce random mode
From: Jiri Pirko @ 2013-03-01 10:26 UTC (permalink / raw)
To: netdev; +Cc: davem, edumazet, fbl
In-Reply-To: <1362133566-1382-1-git-send-email-jiri@resnulli.us>
As suggested by Eric Dumazet, allow user to select mode which chooses
TX port randomly. Functionality should be more of less similar to
round-robin mode with even lower overhead.
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
---
drivers/net/team/Kconfig | 12 ++++++
drivers/net/team/Makefile | 1 +
drivers/net/team/team_mode_random.c | 71 +++++++++++++++++++++++++++++++++
drivers/net/team/team_mode_roundrobin.c | 22 +---------
include/linux/if_team.h | 20 ++++++++++
5 files changed, 105 insertions(+), 21 deletions(-)
create mode 100644 drivers/net/team/team_mode_random.c
diff --git a/drivers/net/team/Kconfig b/drivers/net/team/Kconfig
index c3011af..c853d84 100644
--- a/drivers/net/team/Kconfig
+++ b/drivers/net/team/Kconfig
@@ -37,6 +37,18 @@ config NET_TEAM_MODE_ROUNDROBIN
To compile this team mode as a module, choose M here: the module
will be called team_mode_roundrobin.
+config NET_TEAM_MODE_RANDOM
+ tristate "Random mode support"
+ depends on NET_TEAM
+ ---help---
+ Basic mode where port used for transmitting packets is selected
+ randomly.
+
+ All added ports are setup to have team's device address.
+
+ To compile this team mode as a module, choose M here: the module
+ will be called team_mode_random.
+
config NET_TEAM_MODE_ACTIVEBACKUP
tristate "Active-backup mode support"
depends on NET_TEAM
diff --git a/drivers/net/team/Makefile b/drivers/net/team/Makefile
index 9757630..c57e858 100644
--- a/drivers/net/team/Makefile
+++ b/drivers/net/team/Makefile
@@ -5,5 +5,6 @@
obj-$(CONFIG_NET_TEAM) += team.o
obj-$(CONFIG_NET_TEAM_MODE_BROADCAST) += team_mode_broadcast.o
obj-$(CONFIG_NET_TEAM_MODE_ROUNDROBIN) += team_mode_roundrobin.o
+obj-$(CONFIG_NET_TEAM_MODE_RANDOM) += team_mode_random.o
obj-$(CONFIG_NET_TEAM_MODE_ACTIVEBACKUP) += team_mode_activebackup.o
obj-$(CONFIG_NET_TEAM_MODE_LOADBALANCE) += team_mode_loadbalance.o
diff --git a/drivers/net/team/team_mode_random.c b/drivers/net/team/team_mode_random.c
new file mode 100644
index 0000000..9eabfaa
--- /dev/null
+++ b/drivers/net/team/team_mode_random.c
@@ -0,0 +1,71 @@
+/*
+ * drivers/net/team/team_mode_random.c - Random mode for team
+ * Copyright (c) 2013 Jiri Pirko <jiri@resnulli.us>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#include <linux/kernel.h>
+#include <linux/types.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/skbuff.h>
+#include <linux/reciprocal_div.h>
+#include <linux/if_team.h>
+
+static u32 random_N(unsigned int N)
+{
+ return reciprocal_divide(random32(), N);
+}
+
+static bool rnd_transmit(struct team *team, struct sk_buff *skb)
+{
+ struct team_port *port;
+ int port_index;
+
+ port_index = random_N(team->en_port_count);
+ port = team_get_port_by_index_rcu(team, port_index);
+ port = team_get_first_port_txable_rcu(team, port);
+ if (unlikely(!port))
+ goto drop;
+ if (team_dev_queue_xmit(team, port, skb))
+ return false;
+ return true;
+
+drop:
+ dev_kfree_skb_any(skb);
+ return false;
+}
+
+static const struct team_mode_ops rnd_mode_ops = {
+ .transmit = rnd_transmit,
+ .port_enter = team_modeop_port_enter,
+ .port_change_dev_addr = team_modeop_port_change_dev_addr,
+};
+
+static const struct team_mode rnd_mode = {
+ .kind = "random",
+ .owner = THIS_MODULE,
+ .ops = &rnd_mode_ops,
+};
+
+static int __init rnd_init_module(void)
+{
+ return team_mode_register(&rnd_mode);
+}
+
+static void __exit rnd_cleanup_module(void)
+{
+ team_mode_unregister(&rnd_mode);
+}
+
+module_init(rnd_init_module);
+module_exit(rnd_cleanup_module);
+
+MODULE_LICENSE("GPL v2");
+MODULE_AUTHOR("Jiri Pirko <jiri@resnulli.us>");
+MODULE_DESCRIPTION("Random mode for team");
+MODULE_ALIAS("team-mode-random");
diff --git a/drivers/net/team/team_mode_roundrobin.c b/drivers/net/team/team_mode_roundrobin.c
index ed63a6b..d268e4d 100644
--- a/drivers/net/team/team_mode_roundrobin.c
+++ b/drivers/net/team/team_mode_roundrobin.c
@@ -25,26 +25,6 @@ static struct rr_priv *rr_priv(struct team *team)
return (struct rr_priv *) &team->mode_priv;
}
-static struct team_port *__get_first_port_up(struct team *team,
- struct team_port *port)
-{
- struct team_port *cur;
-
- if (team_port_txable(port))
- return port;
- cur = port;
- list_for_each_entry_continue_rcu(cur, &team->port_list, list)
- if (team_port_txable(port))
- return cur;
- list_for_each_entry_rcu(cur, &team->port_list, list) {
- if (cur == port)
- break;
- if (team_port_txable(port))
- return cur;
- }
- return NULL;
-}
-
static bool rr_transmit(struct team *team, struct sk_buff *skb)
{
struct team_port *port;
@@ -52,7 +32,7 @@ static bool rr_transmit(struct team *team, struct sk_buff *skb)
port_index = rr_priv(team)->sent_packets++ % team->en_port_count;
port = team_get_port_by_index_rcu(team, port_index);
- port = __get_first_port_up(team, port);
+ port = team_get_first_port_txable_rcu(team, port);
if (unlikely(!port))
goto drop;
if (team_dev_queue_xmit(team, port, skb))
diff --git a/include/linux/if_team.h b/include/linux/if_team.h
index 622fe43..90fc919 100644
--- a/include/linux/if_team.h
+++ b/include/linux/if_team.h
@@ -242,6 +242,26 @@ static inline struct team_port *team_get_port_by_index_rcu(struct team *team,
return NULL;
}
+static inline struct team_port *
+team_get_first_port_txable_rcu(struct team *team, struct team_port *port)
+{
+ struct team_port *cur;
+
+ if (likely(team_port_txable(port)))
+ return port;
+ cur = port;
+ list_for_each_entry_continue_rcu(cur, &team->port_list, list)
+ if (team_port_txable(port))
+ return cur;
+ list_for_each_entry_rcu(cur, &team->port_list, list) {
+ if (cur == port)
+ break;
+ if (team_port_txable(port))
+ return cur;
+ }
+ return NULL;
+}
+
extern int team_options_register(struct team *team,
const struct team_option *option,
size_t option_count);
--
1.8.1.2
^ permalink raw reply related
* [patch net-next 1/2] team: introduce two default team_modeop functions and use them in modes
From: Jiri Pirko @ 2013-03-01 10:26 UTC (permalink / raw)
To: netdev; +Cc: davem, edumazet, fbl
In-Reply-To: <1362133566-1382-1-git-send-email-jiri@resnulli.us>
No need to duplicate code for this.
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
---
drivers/net/team/team.c | 19 ++++++++++++++++---
drivers/net/team/team_mode_broadcast.c | 14 ++------------
drivers/net/team/team_mode_roundrobin.c | 14 ++------------
include/linux/if_team.h | 5 ++++-
4 files changed, 24 insertions(+), 28 deletions(-)
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index 05c5efe..ece70a4 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -73,11 +73,24 @@ static int team_port_set_orig_dev_addr(struct team_port *port)
return __set_port_dev_addr(port->dev, port->orig.dev_addr);
}
-int team_port_set_team_dev_addr(struct team_port *port)
+static int team_port_set_team_dev_addr(struct team *team,
+ struct team_port *port)
+{
+ return __set_port_dev_addr(port->dev, team->dev->dev_addr);
+}
+
+int team_modeop_port_enter(struct team *team, struct team_port *port)
+{
+ return team_port_set_team_dev_addr(team, port);
+}
+EXPORT_SYMBOL(team_modeop_port_enter);
+
+void team_modeop_port_change_dev_addr(struct team *team,
+ struct team_port *port)
{
- return __set_port_dev_addr(port->dev, port->team->dev->dev_addr);
+ team_port_set_team_dev_addr(team, port);
}
-EXPORT_SYMBOL(team_port_set_team_dev_addr);
+EXPORT_SYMBOL(team_modeop_port_change_dev_addr);
static void team_refresh_port_linkup(struct team_port *port)
{
diff --git a/drivers/net/team/team_mode_broadcast.c b/drivers/net/team/team_mode_broadcast.c
index c5db428..c366cd2 100644
--- a/drivers/net/team/team_mode_broadcast.c
+++ b/drivers/net/team/team_mode_broadcast.c
@@ -46,20 +46,10 @@ static bool bc_transmit(struct team *team, struct sk_buff *skb)
return sum_ret;
}
-static int bc_port_enter(struct team *team, struct team_port *port)
-{
- return team_port_set_team_dev_addr(port);
-}
-
-static void bc_port_change_dev_addr(struct team *team, struct team_port *port)
-{
- team_port_set_team_dev_addr(port);
-}
-
static const struct team_mode_ops bc_mode_ops = {
.transmit = bc_transmit,
- .port_enter = bc_port_enter,
- .port_change_dev_addr = bc_port_change_dev_addr,
+ .port_enter = team_modeop_port_enter,
+ .port_change_dev_addr = team_modeop_port_change_dev_addr,
};
static const struct team_mode bc_mode = {
diff --git a/drivers/net/team/team_mode_roundrobin.c b/drivers/net/team/team_mode_roundrobin.c
index 105135a..ed63a6b 100644
--- a/drivers/net/team/team_mode_roundrobin.c
+++ b/drivers/net/team/team_mode_roundrobin.c
@@ -64,20 +64,10 @@ drop:
return false;
}
-static int rr_port_enter(struct team *team, struct team_port *port)
-{
- return team_port_set_team_dev_addr(port);
-}
-
-static void rr_port_change_dev_addr(struct team *team, struct team_port *port)
-{
- team_port_set_team_dev_addr(port);
-}
-
static const struct team_mode_ops rr_mode_ops = {
.transmit = rr_transmit,
- .port_enter = rr_port_enter,
- .port_change_dev_addr = rr_port_change_dev_addr,
+ .port_enter = team_modeop_port_enter,
+ .port_change_dev_addr = team_modeop_port_change_dev_addr,
};
static const struct team_mode rr_mode = {
diff --git a/include/linux/if_team.h b/include/linux/if_team.h
index 4648d80..622fe43 100644
--- a/include/linux/if_team.h
+++ b/include/linux/if_team.h
@@ -112,6 +112,10 @@ struct team_mode_ops {
void (*port_disabled)(struct team *team, struct team_port *port);
};
+extern int team_modeop_port_enter(struct team *team, struct team_port *port);
+extern void team_modeop_port_change_dev_addr(struct team *team,
+ struct team_port *port);
+
enum team_option_type {
TEAM_OPTION_TYPE_U32,
TEAM_OPTION_TYPE_STRING,
@@ -238,7 +242,6 @@ static inline struct team_port *team_get_port_by_index_rcu(struct team *team,
return NULL;
}
-extern int team_port_set_team_dev_addr(struct team_port *port);
extern int team_options_register(struct team *team,
const struct team_option *option,
size_t option_count);
--
1.8.1.2
^ permalink raw reply related
* [patch net-next 0/2] team: introduce random mode
From: Jiri Pirko @ 2013-03-01 10:26 UTC (permalink / raw)
To: netdev; +Cc: davem, edumazet, fbl
Jiri Pirko (2):
team: introduce two default team_modeop functions and use them in
modes
team: introduce random mode
drivers/net/team/Kconfig | 12 ++++++
drivers/net/team/Makefile | 1 +
drivers/net/team/team.c | 19 +++++++--
drivers/net/team/team_mode_broadcast.c | 14 +------
drivers/net/team/team_mode_random.c | 71 +++++++++++++++++++++++++++++++++
drivers/net/team/team_mode_roundrobin.c | 36 ++---------------
include/linux/if_team.h | 25 +++++++++++-
7 files changed, 129 insertions(+), 49 deletions(-)
create mode 100644 drivers/net/team/team_mode_random.c
--
1.8.1.2
^ 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