From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751474AbcIIA6u (ORCPT ); Thu, 8 Sep 2016 20:58:50 -0400 Received: from mail-pf0-f178.google.com ([209.85.192.178]:33124 "EHLO mail-pf0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750796AbcIIA6r (ORCPT ); Thu, 8 Sep 2016 20:58:47 -0400 Date: Thu, 8 Sep 2016 17:58:57 -0700 From: Stephen Hemminger To: Vivien Didelot Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com, "David S. Miller" Subject: Re: [PATCH net-next] net: bridge: add helper to call /sbin/bridge-stp Message-ID: <20160908175857.35565496@xeon-e3> In-Reply-To: <20160908165043.31042-1-vivien.didelot@savoirfairelinux.com> References: <20160908165043.31042-1-vivien.didelot@savoirfairelinux.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 8 Sep 2016 12:50:43 -0400 Vivien Didelot 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 I understand that debugging STP is hard. But this solution looks like it would break existing userspace because you changed an API.