Skip to content

Commit

Permalink
net: switchdev: fix return code of fdb_dump stub
Browse files Browse the repository at this point in the history
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 0890cf6 ("switchdev: fix return value of
switchdev_port_fdb_dump in case of error") but for the CONFIG_NET_SWITCHDEV=y
case.

Fixes: 45d4122 ("switchdev: add support for fdb add/del/dump via switchdev_port_obj ops.")
Signed-off-by: Dragos Tatulea <dragos@endocode.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Dragos Tatulea authored and David S. Miller committed Nov 16, 2015
1 parent ab6d784 commit 24cb705
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/net/switchdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 24cb705

Please sign in to comment.