* [PATCH] net: switchdev: fix return code of fdb_dump stub
@ 2015-11-16 9:52 Dragos Tatulea
2015-11-16 10:17 ` Jiri Pirko
2015-11-16 20:24 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Dragos Tatulea @ 2015-11-16 9:52 UTC (permalink / raw)
To: netdev; +Cc: Samudrala, Sridhar, Jiri Pirko, davem
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 <dragos@endocode.com>
---
include/net/switchdev.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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,
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] net: switchdev: fix return code of fdb_dump stub
2015-11-16 9:52 [PATCH] net: switchdev: fix return code of fdb_dump stub Dragos Tatulea
@ 2015-11-16 10:17 ` Jiri Pirko
2015-11-16 20:24 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Jiri Pirko @ 2015-11-16 10:17 UTC (permalink / raw)
To: Dragos Tatulea; +Cc: netdev, Samudrala, Sridhar, davem
Mon, Nov 16, 2015 at 10:52:48AM CET, dragos@endocode.com wrote:
>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 <dragos@endocode.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net: switchdev: fix return code of fdb_dump stub
2015-11-16 9:52 [PATCH] net: switchdev: fix return code of fdb_dump stub Dragos Tatulea
2015-11-16 10:17 ` Jiri Pirko
@ 2015-11-16 20:24 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2015-11-16 20:24 UTC (permalink / raw)
To: dragos; +Cc: netdev, sridhar.samudrala, jiri
From: Dragos Tatulea <dragos@endocode.com>
Date: Mon, 16 Nov 2015 10:52:48 +0100
> 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 <dragos@endocode.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-11-16 20:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-16 9:52 [PATCH] net: switchdev: fix return code of fdb_dump stub Dragos Tatulea
2015-11-16 10:17 ` Jiri Pirko
2015-11-16 20:24 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).