Skip to contentSkip to conversation

switchdev: fdb filter_dev is always NULL for self (device), so remove check

PATCH Applied [email protected] 4 participants 4 messages Jun 17, 2015 – Jun 23, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 switchdev: fdb filter_dev is always NULL for self (device), so remove check

From: Scott Feldman <[email protected]>

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.

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(-)
net/switchdev/switchdev.c +0 -6
index a5d0f8e..7dda437 100644
@@ -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;
Signature · 1 line
1.7.10.4
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · On 6/17/2015 4:08 PM, [email protected] wrote:

From: Scott Feldman <[email protected]>

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.

Quoted 40 lines
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(-)
net/switchdev/switchdev.c +0 -6
index a5d0f8e..7dda437 100644
@@ -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;
maintainer Acked-by on v1 1/1
#2 lore raw
In reply to [email protected]
Quoted 8 lines · Thu, Jun 18, 2015 at 01:08:31AM CEST, [email protected] wrote:

From: Scott Feldman <[email protected]>

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.

maintainer Applied
#3 lore raw
In reply to [email protected]

From: [email protected]
Date: Wed, 17 Jun 2015 16:08:31 -0700

Quoted 9 lines

From: Scott Feldman <[email protected]>

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.

Fixes 45d4122c ("switchdev: add support for fdb add/del/dump via switchdev_port_obj ops")

Applied, thanks.