All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel@savoirfairelinux.com,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH net-next] net: bridge: add helper to call /sbin/bridge-stp
Date: Thu, 8 Sep 2016 17:58:57 -0700	[thread overview]
Message-ID: <20160908175857.35565496@xeon-e3> (raw)
In-Reply-To: <20160908165043.31042-1-vivien.didelot@savoirfairelinux.com>

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.

  reply	other threads:[~2016-09-09  0:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-08 16:50 [PATCH net-next] net: bridge: add helper to call /sbin/bridge-stp Vivien Didelot
2016-09-09  0:58 ` Stephen Hemminger [this message]
2016-09-09 13:09   ` Vivien Didelot
2016-09-13 15:22 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160908175857.35565496@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=davem@davemloft.net \
    --cc=kernel@savoirfairelinux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=vivien.didelot@savoirfairelinux.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.