From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759063AbcIMPWo (ORCPT ); Tue, 13 Sep 2016 11:22:44 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:39780 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758881AbcIMPWn (ORCPT ); Tue, 13 Sep 2016 11:22:43 -0400 Date: Tue, 13 Sep 2016 11:22:42 -0400 (EDT) Message-Id: <20160913.112242.2097095000095740530.davem@davemloft.net> To: vivien.didelot@savoirfairelinux.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com, stephen@networkplumber.org Subject: Re: [PATCH net-next] net: bridge: add helper to call /sbin/bridge-stp From: David Miller In-Reply-To: <20160908165043.31042-1-vivien.didelot@savoirfairelinux.com> References: <20160908165043.31042-1-vivien.didelot@savoirfairelinux.com> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Tue, 13 Sep 2016 08:22:42 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vivien Didelot Date: Thu, 8 Sep 2016 12:50:43 -0400 > 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 Applied.