From patchwork Mon Nov 16 09:52:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dragos Tatulea X-Patchwork-Id: 544956 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 8D212140134 for ; Mon, 16 Nov 2015 20:52:57 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=endocode_com.20150623.gappssmtp.com header.i=@endocode_com.20150623.gappssmtp.com header.b=XcFTBHj8; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752732AbbKPJww (ORCPT ); Mon, 16 Nov 2015 04:52:52 -0500 Received: from mail-wm0-f50.google.com ([74.125.82.50]:36954 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752688AbbKPJwv (ORCPT ); Mon, 16 Nov 2015 04:52:51 -0500 Received: by wmww144 with SMTP id w144so110916106wmw.0 for ; Mon, 16 Nov 2015 01:52:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=endocode_com.20150623.gappssmtp.com; s=20150623; h=from:subject:to:cc:message-id:date:user-agent:mime-version :content-type:content-transfer-encoding; bh=yUI2CNqDw356hk9ksUNxOYzWbyyV4XxsCB1aUIjepG0=; b=XcFTBHj8h6PCMRuhTudNjQN8Er49Ct1BmbvkuYobRFMfvXh5pe23qX8dgaeoAzHTiU Rg/H1TM1UHicusOQ2jcSBPl4cNNRCQiKTvBt8wMtF0U3dfsPt5kCA4n7VOawWDAkbvl7 Jmd3H/38wtebxJ2Y5Jm9EsIsOSkTk5SuK1PekagZyidrGzg9YE9DCxjf+UquVqte4NRx TyJC0xx6DYds1GKKtJ6ojJoSfqdqRf8Gc5AP+U0TL5bhNO+arIMjz3EbVD0IuTCnEeoT MvXpWqgb1+LAo9j6u/OokKxhJxbTiB36JGh6RW/zKvwroXFVwd0wkjYkmzIAUguEI/Rj bW5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:subject:to:cc:message-id:date:user-agent :mime-version:content-type:content-transfer-encoding; bh=yUI2CNqDw356hk9ksUNxOYzWbyyV4XxsCB1aUIjepG0=; b=kqRu44C415JEQi0IBOpc1tKlaibi77An10RAOfZHW1q0Vgr7PU8FEBUuQ2gc9+ml7W uwslhw7m6FAiZwBcdg/IkRJrdTUFuNGRoUKmwM11XaP+HH+lgoVbU+q/gEhP2eZGVWEn MxsmKlACsq2cJsTIDzeq9+ENqMmJiLFE98BKvMIf75dtBO/X+8mxG/3x2VoueIyZmhgz QaZ5dYjASvjPZqhI2feObXeRuHgV9q50IsJsOj1Ruc6r2SbDOBUHwS2Kj74GUD/aSjuK Cbg9VoVP011R3hvyRKgTCdshHfKGrZoFoiUCnOr4UheYOKSTRZeFsS895kC5R+k07M6E TfQw== X-Gm-Message-State: ALoCoQlyMnjvludY8gkEd2rFFfQMXWfbB4XibNs9kxcAqWxt5bZC5d7fEnKCKJpUbDu2rrb/Cxmr X-Received: by 10.194.60.179 with SMTP id i19mr35784556wjr.135.1447667570282; Mon, 16 Nov 2015 01:52:50 -0800 (PST) Received: from ?IPv6:2a02:8109:a4bf:e678:eab1:fcff:feed:83c0? ([2a02:8109:a4bf:e678:eab1:fcff:feed:83c0]) by smtp.gmail.com with ESMTPSA id l1sm33668211wjx.13.2015.11.16.01.52.49 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Nov 2015 01:52:49 -0800 (PST) From: Dragos Tatulea Subject: [PATCH] net: switchdev: fix return code of fdb_dump stub To: netdev@vger.kernel.org Cc: "Samudrala, Sridhar" , Jiri Pirko , davem@davemloft.net Message-ID: <5649A770.8090909@endocode.com> Date: Mon, 16 Nov 2015 10:52:48 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org rtnl_fdb_dump always expects an index to be returned by the ndo_fdb_dump op, but when CONFIG_NET_SWITCHDEV is off, it returns an error. Fix that by returning the given unmodified idx. A similar fix was 0890cf6cb6ab ("switchdev: fix return value of switchdev_port_fdb_dump in case of error") but for the CONFIG_NET_SWITCHDEV=y case. Fixes: 45d4122ca7cd ("switchdev: add support for fdb add/del/dump via switchdev_port_obj ops.") Signed-off-by: Dragos Tatulea Acked-by: Jiri Pirko --- include/net/switchdev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/include/net/switchdev.h b/include/net/switchdev.h index bc865e2..bc5765a 100644 --- a/include/net/switchdev.h +++ b/include/net/switchdev.h @@ -323,7 +323,7 @@ static inline int switchdev_port_fdb_dump(struct sk_buff *skb, struct net_device *filter_dev, int idx) { - return -EOPNOTSUPP; + return idx; } static inline void switchdev_port_fwd_mark_set(struct net_device *dev,