提交 24cb7055 编写于 作者: D Dragos Tatulea 提交者: David S. Miller

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 0890cf6c ("switchdev: fix return value of
switchdev_port_fdb_dump in case of error") but for the CONFIG_NET_SWITCHDEV=y
case.

Fixes: 45d4122c ("switchdev: add support for fdb add/del/dump via switchdev_port_obj ops.")
Signed-off-by: NDragos Tatulea <dragos@endocode.com>
Acked-by: NJiri Pirko <jiri@mellanox.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 ab6d7846
...@@ -323,7 +323,7 @@ static inline int switchdev_port_fdb_dump(struct sk_buff *skb, ...@@ -323,7 +323,7 @@ static inline int switchdev_port_fdb_dump(struct sk_buff *skb,
struct net_device *filter_dev, struct net_device *filter_dev,
int idx) int idx)
{ {
return -EOPNOTSUPP; return idx;
} }
static inline void switchdev_port_fwd_mark_set(struct net_device *dev, static inline void switchdev_port_fwd_mark_set(struct net_device *dev,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册