net: switchdev: fix return code of fdb_dump stub
Subsystems (3)
PATCH 1/1 net: switchdev: fix return code of fdb_dump stub
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.
--- include/net/switchdev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/net/switchdev.h +1 -1
@@ -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,
Quoted 11 lines · Mon, Nov 16, 2015 at 10:52:48AM CET, [email protected] wrote:
rtnl_fdb_dumpalways expects an index to be returned by thendo_fdb_dumpop, but whenCONFIG_NET_SWITCHDEVis off, it returns an error.Fix that by returning the given unmodified idx.
A similar fix was
0890cf6cb6ab("switchdev: fix return value ofswitchdev_port_fdb_dumpin case of error") but for theCONFIG_NET_SWITCHDEV=ycase.Fixes 45d4122ca7cd ("switchdev: add support for fdb add/del/dump via switchdev_port_obj ops.")Signed-off-by Dragos Tatulea <[email protected]>
From: Dragos Tatulea <[email protected]>
Date: Mon, 16 Nov 2015 10:52:48 +0100
Quoted 11 lines
rtnl_fdb_dumpalways expects an index to be returned by thendo_fdb_dumpop, but whenCONFIG_NET_SWITCHDEVis off, it returns an error.Fix that by returning the given unmodified idx.
A similar fix was
0890cf6cb6ab("switchdev: fix return value ofswitchdev_port_fdb_dumpin case of error") but for theCONFIG_NET_SWITCHDEV=ycase.Fixes 45d4122ca7cd ("switchdev: add support for fdb add/del/dump via switchdev_port_obj ops.")Signed-off-by Dragos Tatulea <[email protected]>
Applied, thanks.