lkml.org 
[lkml]   [2016]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next] net: bridge: add helper to call /sbin/bridge-stp
On Thu,  8 Sep 2016 12:50:43 -0400
Vivien Didelot <vivien.didelot@savoirfairelinux.com> wrote:

> If /sbin/bridge-stp is available on the system, bridge tries to execute
> it instead of the kernel implementation when starting/stopping STP.
>
> If anything goes wrong with /sbin/bridge-stp, bridge silently falls back
> to kernel STP, making hard to debug userspace STP.
>
> This patch adds a br_stp_call_user helper to start/stop userspace STP
> and debug errors from the program: abnormal exit status is stored in the
> lower byte and normal exit status is stored in higher byte.
>
> Below is a simple example on a kernel with dynamic debug enabled:
>
> # ln -s /bin/false /sbin/bridge-stp
> # brctl stp br0 on
> br0: failed to start userspace STP (256)
> # dmesg
> br0: /sbin/bridge-stp exited with code 1
> br0: failed to start userspace STP (256)
> br0: using kernel STP
>
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>

I understand that debugging STP is hard. But this solution looks like it
would break existing userspace because you changed an API.

\
 
 \ /
  Last update: 2016-09-17 09:58    [W:0.073 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site