From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Oyqqq/X9qdu3xx65zVGG4PWH/PNLT4F1km7kqg9CwhU=; b=gzddoHJOCVay1ZtwAg6gpZYehIhSRqUIQSdK4JUH+wPjfbt4c780257hgbJRUZZ0ZC i9KHrBmIsFtgQvFjDsTf2XoSa4rJGVoyx/WKywr3FvG1ot0/gXU9nB+lWK6l+aFqxR0R LvcGmC+ZWUIbjKMYyuMmV6a7Ur40nOQSw/CVGIrtgjg778xGuFveUJfmadVczelFyf0W M/0XtJ4D4x2wgj7yI+dTV5HRtqEtO410+bkvou21VP4UP767x4tRzG2mSrouCS+UN7Ic 7yhz8MtN27k2KQwgU83zQiyXSq13jEdR2prrmCrKgp+BkOJML+CaYOOFNa/sWxQJ5igr 0HvA== From: Vladimir Oltean Date: Wed, 6 Jan 2021 11:51:31 +0200 Message-Id: <20210106095136.224739-3-olteanv@gmail.com> In-Reply-To: <20210106095136.224739-1-olteanv@gmail.com> References: <20210106095136.224739-1-olteanv@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Bridge] [PATCH v4 net-next 2/7] net: dsa: be louder when a non-legacy FDB operation fails List-Id: Linux Ethernet Bridging List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andrew Lunn , Vivien Didelot , Florian Fainelli , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bridge@lists.linux-foundation.org, Roopa Prabhu , Nikolay Aleksandrov , "David S. Miller" Cc: Jiri Pirko , Alexandra Winter , Ido Schimmel , Russell King - ARM Linux admin , Marek Behun , DENG Qingfang , Claudiu Manoil , UNGLinuxDriver@microchip.com, Tobias Waldekranz From: Vladimir Oltean The dev_close() call was added in commit c9eb3e0f8701 ("net: dsa: Add support for learning FDB through notification") "to indicate inconsistent situation" when we could not delete an FDB entry from the port. bridge fdb del d8:58:d7:00:ca:6d dev swp0 self master It is a bit drastic and at the same time not helpful if the above fails to only print with netdev_dbg log level, but on the other hand to bring the interface down. So increase the verbosity of the error message, and drop dev_close(). Signed-off-by: Vladimir Oltean Reviewed-by: Andrew Lunn --- Changes in v4: None. Changes in v3: Patch is new. net/dsa/slave.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/net/dsa/slave.c b/net/dsa/slave.c index 4a0498bf6c65..d5d389300124 100644 --- a/net/dsa/slave.c +++ b/net/dsa/slave.c @@ -2072,7 +2072,9 @@ static void dsa_slave_switchdev_event_work(struct work_struct *work) err = dsa_port_fdb_add(dp, fdb_info->addr, fdb_info->vid); if (err) { - netdev_dbg(dev, "fdb add failed err=%d\n", err); + netdev_err(dev, + "failed to add %pM vid %d to fdb: %d\n", + fdb_info->addr, fdb_info->vid, err); break; } fdb_info->offloaded = true; @@ -2087,9 +2089,11 @@ static void dsa_slave_switchdev_event_work(struct work_struct *work) err = dsa_port_fdb_del(dp, fdb_info->addr, fdb_info->vid); if (err) { - netdev_dbg(dev, "fdb del failed err=%d\n", err); - dev_close(dev); + netdev_err(dev, + "failed to delete %pM vid %d from fdb: %d\n", + fdb_info->addr, fdb_info->vid, err); } + break; } rtnl_unlock(); -- 2.25.1