* [PATCH net-next] switchdev: fdb filter_dev is always NULL for self (device), so remove check
@ 2015-06-17 23:08 sfeldma
2015-06-18 5:30 ` Samudrala, Sridhar
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: sfeldma @ 2015-06-17 23:08 UTC (permalink / raw)
To: netdev; +Cc: jiri, sridhar.samudrala
From: Scott Feldman <sfeldma@gmail.com>
Remove the filter_dev check when dumping fdb entries, otherwise dump
returns empty list. filter_dev is always passed as NULL when dumping fdbs
on SELF. We want the fdbs installed on the device to be listed in the
dump.
Signed-off-by: Scott Feldman <sfeldma@gmail.com>
Fixes: 45d4122c ("switchdev: add support for fdb add/del/dump via switchdev_port_obj ops")
---
net/switchdev/switchdev.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/net/switchdev/switchdev.c b/net/switchdev/switchdev.c
index a5d0f8e..7dda437 100644
--- a/net/switchdev/switchdev.c
+++ b/net/switchdev/switchdev.c
@@ -657,7 +657,6 @@ struct switchdev_fdb_dump {
struct switchdev_obj obj;
struct sk_buff *skb;
struct netlink_callback *cb;
- struct net_device *filter_dev;
int idx;
};
@@ -670,14 +669,10 @@ static int switchdev_port_fdb_dump_cb(struct net_device *dev,
u32 seq = dump->cb->nlh->nlmsg_seq;
struct nlmsghdr *nlh;
struct ndmsg *ndm;
- struct net_device *master = netdev_master_upper_dev_get(dev);
if (dump->idx < dump->cb->args[0])
goto skip;
- if (master && dump->filter_dev != master)
- goto skip;
-
nlh = nlmsg_put(dump->skb, portid, seq, RTM_NEWNEIGH,
sizeof(*ndm), NLM_F_MULTI);
if (!nlh)
@@ -731,7 +726,6 @@ int switchdev_port_fdb_dump(struct sk_buff *skb, struct netlink_callback *cb,
},
.skb = skb,
.cb = cb,
- .filter_dev = filter_dev,
.idx = idx,
};
int err;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH net-next] switchdev: fdb filter_dev is always NULL for self (device), so remove check
2015-06-17 23:08 [PATCH net-next] switchdev: fdb filter_dev is always NULL for self (device), so remove check sfeldma
@ 2015-06-18 5:30 ` Samudrala, Sridhar
2015-06-18 9:22 ` Jiri Pirko
2015-06-23 7:58 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Samudrala, Sridhar @ 2015-06-18 5:30 UTC (permalink / raw)
To: sfeldma, netdev; +Cc: jiri
On 6/17/2015 4:08 PM, sfeldma@gmail.com wrote:
> From: Scott Feldman <sfeldma@gmail.com>
>
> Remove the filter_dev check when dumping fdb entries, otherwise dump
> returns empty list. filter_dev is always passed as NULL when dumping fdbs
> on SELF. We want the fdbs installed on the device to be listed in the
> dump.
>
> Signed-off-by: Scott Feldman <sfeldma@gmail.com>
Acked-by: Sridhar Samudrala <sridhar.samudrala@intel.com>
> Fixes: 45d4122c ("switchdev: add support for fdb add/del/dump via switchdev_port_obj ops")
> ---
> net/switchdev/switchdev.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/net/switchdev/switchdev.c b/net/switchdev/switchdev.c
> index a5d0f8e..7dda437 100644
> --- a/net/switchdev/switchdev.c
> +++ b/net/switchdev/switchdev.c
> @@ -657,7 +657,6 @@ struct switchdev_fdb_dump {
> struct switchdev_obj obj;
> struct sk_buff *skb;
> struct netlink_callback *cb;
> - struct net_device *filter_dev;
> int idx;
> };
>
> @@ -670,14 +669,10 @@ static int switchdev_port_fdb_dump_cb(struct net_device *dev,
> u32 seq = dump->cb->nlh->nlmsg_seq;
> struct nlmsghdr *nlh;
> struct ndmsg *ndm;
> - struct net_device *master = netdev_master_upper_dev_get(dev);
>
> if (dump->idx < dump->cb->args[0])
> goto skip;
>
> - if (master && dump->filter_dev != master)
> - goto skip;
> -
> nlh = nlmsg_put(dump->skb, portid, seq, RTM_NEWNEIGH,
> sizeof(*ndm), NLM_F_MULTI);
> if (!nlh)
> @@ -731,7 +726,6 @@ int switchdev_port_fdb_dump(struct sk_buff *skb, struct netlink_callback *cb,
> },
> .skb = skb,
> .cb = cb,
> - .filter_dev = filter_dev,
> .idx = idx,
> };
> int err;
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH net-next] switchdev: fdb filter_dev is always NULL for self (device), so remove check
2015-06-17 23:08 [PATCH net-next] switchdev: fdb filter_dev is always NULL for self (device), so remove check sfeldma
2015-06-18 5:30 ` Samudrala, Sridhar
@ 2015-06-18 9:22 ` Jiri Pirko
2015-06-23 7:58 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Jiri Pirko @ 2015-06-18 9:22 UTC (permalink / raw)
To: sfeldma; +Cc: netdev, sridhar.samudrala
Thu, Jun 18, 2015 at 01:08:31AM CEST, sfeldma@gmail.com wrote:
>From: Scott Feldman <sfeldma@gmail.com>
>
>Remove the filter_dev check when dumping fdb entries, otherwise dump
>returns empty list. filter_dev is always passed as NULL when dumping fdbs
>on SELF. We want the fdbs installed on the device to be listed in the
>dump.
>
>Signed-off-by: Scott Feldman <sfeldma@gmail.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] switchdev: fdb filter_dev is always NULL for self (device), so remove check
2015-06-17 23:08 [PATCH net-next] switchdev: fdb filter_dev is always NULL for self (device), so remove check sfeldma
2015-06-18 5:30 ` Samudrala, Sridhar
2015-06-18 9:22 ` Jiri Pirko
@ 2015-06-23 7:58 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2015-06-23 7:58 UTC (permalink / raw)
To: sfeldma; +Cc: netdev, jiri, sridhar.samudrala
From: sfeldma@gmail.com
Date: Wed, 17 Jun 2015 16:08:31 -0700
> From: Scott Feldman <sfeldma@gmail.com>
>
> Remove the filter_dev check when dumping fdb entries, otherwise dump
> returns empty list. filter_dev is always passed as NULL when dumping fdbs
> on SELF. We want the fdbs installed on the device to be listed in the
> dump.
>
> Signed-off-by: Scott Feldman <sfeldma@gmail.com>
> Fixes: 45d4122c ("switchdev: add support for fdb add/del/dump via switchdev_port_obj ops")
Applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-06-23 7:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-17 23:08 [PATCH net-next] switchdev: fdb filter_dev is always NULL for self (device), so remove check sfeldma
2015-06-18 5:30 ` Samudrala, Sridhar
2015-06-18 9:22 ` Jiri Pirko
2015-06-23 7:58 ` 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).