netdev_next_lower_dev_rcu() will be used to implement a function, which is to walk all lower interfaces. There are already functions that they walk their lower interface. (netdev_walk_all_lower_dev_rcu, netdev_walk_all_lower_dev()). But, there would be cases that couldn't be covered by given netdev_walk_all_lower_dev_{rcu}() function. So, some modules would want to implement own function, which is to walk all lower interfaces. In the next patch, netdev_next_lower_dev_rcu() will be used. In addition, this patch removes two unused prototypes in netdevice.h.
Unified · Split
| @@ -72,6 +72,8 @@ void netdev_set_default_ethtool_ops(struct net_device *dev, · 71 unmodified lines | |||
| 72 | #define NET_RX_SUCCESS 0 /* keep 'em coming, baby */ | 72 | #define NET_RX_SUCCESS 0 /* keep 'em coming, baby */ |
| 73 | #define NET_RX_DROP 1 /* packet dropped */ | 73 | #define NET_RX_DROP 1 /* packet dropped */ |
| 74 | 74 | ||
| 75 | #define MAX_NEST_DEV 8 | ||
| 76 | |||
| 75 | /* | 77 | /* |
| 76 | * Transmit return codes: transmit return codes originate from three different | 78 | * Transmit return codes: transmit return codes originate from three different |
| 77 | * namespaces: | 79 | * namespaces: |
| @@ -4389,11 +4391,8 @@ void *netdev_lower_get_next(struct net_device *dev, · 4311 unmodified lines | |||
| 4389 | ldev; \ | 4391 | ldev; \ |
| 4390 | ldev = netdev_lower_get_next(dev, &(iter))) | 4392 | ldev = netdev_lower_get_next(dev, &(iter))) |
| 4391 | 4393 | ||
| 4392 | struct net_device *netdev_all_lower_get_next(struct net_device *dev, | 4394 | struct net_device *netdev_next_lower_dev_rcu(struct net_device *dev, |
| 4393 | struct list_head **iter); | 4395 | struct list_head **iter); |
| 4394 | struct net_device *netdev_all_lower_get_next_rcu(struct net_device *dev, | ||
| 4395 | struct list_head **iter); | ||
| 4396 | |||
| 4397 | int netdev_walk_all_lower_dev(struct net_device *dev, | 4396 | int netdev_walk_all_lower_dev(struct net_device *dev, |
| 4398 | int (*fn)(struct net_device *lower_dev, | 4397 | int (*fn)(struct net_device *lower_dev, |
| 4399 | void *data), | 4398 | void *data), |
| @@ -146,7 +146,6 @@ · 145 unmodified lines | |||
| 146 | #include "net-sysfs.h" | 146 | #include "net-sysfs.h" |
| 147 | 147 | ||
| 148 | #define MAX_GRO_SKBS 8 | 148 | #define MAX_GRO_SKBS 8 |
| 149 | #define MAX_NEST_DEV 8 | ||
| 150 | 149 | ||
| 151 | /* This should be increased if a protocol with a bigger head is added. */ | 150 | /* This should be increased if a protocol with a bigger head is added. */ |
| 152 | #define GRO_MAX_HEAD (MAX_HEADER + 128) | 151 | #define GRO_MAX_HEAD (MAX_HEADER + 128) |
| @@ -7207,8 +7206,8 @@ static int __netdev_walk_all_lower_dev(struct net_device *dev, · 7054 unmodified lines | |||
| 7207 | return 0; | 7206 | return 0; |
| 7208 | } | 7207 | } |
| 7209 | 7208 | ||
| 7210 | static struct net_device *netdev_next_lower_dev_rcu(struct net_device *dev, | 7209 | struct net_device *netdev_next_lower_dev_rcu(struct net_device *dev, |
| 7211 | struct list_head **iter) | 7210 | struct list_head **iter) |
| 7212 | { | 7211 | { |
| 7213 | struct netdev_adjacent *lower; | 7212 | struct netdev_adjacent *lower; |
| 7214 | 7213 | ||
| @@ -7220,6 +7219,7 @@ static struct net_device *netdev_next_lower_dev_rcu(struct net_device *dev, · 5 unmodified lines | |||
| 7220 | 7219 | ||
| 7221 | return lower->dev; | 7220 | return lower->dev; |
| 7222 | } | 7221 | } |
| 7222 | EXPORT_SYMBOL(netdev_next_lower_dev_rcu); | ||
| 7223 | 7223 | ||
| 7224 | static u8 __netdev_upper_depth(struct net_device *dev) | 7224 | static u8 __netdev_upper_depth(struct net_device *dev) |
| 7225 | { | 7225 | { |