switchdev: fdb filter_dev is always NULL for self (device), so remove check
authorScott Feldman <sfeldma@gmail.com>
Wed, 17 Jun 2015 23:08:31 +0000 (16:08 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 23 Jun 2015 07:58:27 +0000 (00:58 -0700)
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")
Acked-by: Sridhar Samudrala <sridhar.samudrala@intel.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/switchdev/switchdev.c

index 658bc3ac80089da1fe676c82ff591dd3bfdbb3be..c29f2327f2e613070883e806c8ff0b0ad80a474a 100644 (file)
@@ -656,7 +656,6 @@ struct switchdev_fdb_dump {
        struct switchdev_obj obj;
        struct sk_buff *skb;
        struct netlink_callback *cb;
-       struct net_device *filter_dev;
        int idx;
 };
 
@@ -669,14 +668,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)
@@ -730,7 +725,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;