tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bridge(4) - feedback local packets into ether_input()



On 04/28/16 14:43, Roy Marples wrote:
On 22/04/2016 02:14, Roy Marples wrote:
Because DHCP is essentially a broadcast operation, I copied the logic
from bridge_broadcast() into bridge_output() (used for originating local
packets) where we send the packet to ether_input() if it's broadcast or
multicast. Because bridge_output has coding for if src_if == dst_if I
reversed the logic on sending it to ether_input (src_if != dst_if) so
that the receiving interface doesn't double up.
Nick suggested just to use bridge_broadcast() and came up with this
patch: http://www.netbsd.org/~skrll/bridge.diff

(note doesn't compile, src_if needs replacing with ifp)

It compiles now :)

However, this makes the kernel panic with locking against myself on
softnet_lock which we cannot figure out.
The backtrace for reference is

Apr 28 13:41:09 uberlaptop2 /netbsd: panic: LOCKDEBUG: Mutex error: lockdebug_wantlock: locking against myself
Apr 28 13:41:09 uberlaptop2 /netbsd: cpu0: Begin traceback...
Apr 28 13:41:09 uberlaptop2 /netbsd: vpanic() at netbsd:vpanic+0x1be
Apr 28 13:41:09 uberlaptop2 /netbsd: panic() at netbsd:panic+0x43
Apr 28 13:41:09 uberlaptop2 /netbsd: lockdebug_abort1() at netbsd:lockdebug_abort1+0x1f8 Apr 28 13:41:09 uberlaptop2 /netbsd: mutex_enter() at netbsd:mutex_enter+0x75 Apr 28 13:41:09 uberlaptop2 /netbsd: bridge_broadcast() at netbsd:bridge_broadcast+0x11d Apr 28 13:41:09 uberlaptop2 /netbsd: bridge_output() at netbsd:bridge_output+0x1db Apr 28 13:41:09 uberlaptop2 /netbsd: ether_output() at netbsd:ether_output+0x3e1
Apr 28 13:41:09 uberlaptop2 /netbsd: nd6_output() at netbsd:nd6_output+0x407
Apr 28 13:41:09 uberlaptop2 /netbsd: ip6_output() at netbsd:ip6_output+0x1b6a Apr 28 13:41:09 uberlaptop2 /netbsd: mld_sendpkt() at netbsd:mld_sendpkt+0x2cf Apr 28 13:41:09 uberlaptop2 /netbsd: in6_delmulti() at netbsd:in6_delmulti+0xc9 Apr 28 13:41:09 uberlaptop2 /netbsd: in6_leavegroup() at netbsd:in6_leavegroup+0x16 Apr 28 13:41:09 uberlaptop2 /netbsd: ip6_freemoptions() at netbsd:ip6_freemoptions+0x2b Apr 28 13:41:09 uberlaptop2 /netbsd: in6_pcbdetach() at netbsd:in6_pcbdetach+0x104 Apr 28 13:41:09 uberlaptop2 /netbsd: udp6_detach_wrapper() at netbsd:udp6_detach_wrapper+0x3d
Apr 28 13:41:09 uberlaptop2 /netbsd: soclose() at netbsd:soclose+0x1cd
Apr 28 13:41:09 uberlaptop2 /netbsd: soo_close() at netbsd:soo_close+0x19
Apr 28 13:41:09 uberlaptop2 /netbsd: closef() at netbsd:closef+0x99
Apr 28 13:41:09 uberlaptop2 /netbsd: fd_close() at netbsd:fd_close+0xf6
Apr 28 13:41:09 uberlaptop2 /netbsd: sys_close() at netbsd:sys_close+0x28
Apr 28 13:41:09 uberlaptop2 /netbsd: syscall() at netbsd:syscall+0xe7
Apr 28 13:41:09 uberlaptop2 /netbsd: --- syscall (number 6) ---


softnet_lock is taken by solock in soclose...

Nick


Home | Main Index | Thread Index | Old Index