|
@@ -480,7 +480,7 @@ EXPORT_SYMBOL(dev_add_offload);
|
|
* and must not be freed until after all the CPU's have gone
|
|
* and must not be freed until after all the CPU's have gone
|
|
* through a quiescent state.
|
|
* through a quiescent state.
|
|
*/
|
|
*/
|
|
-void __dev_remove_offload(struct packet_offload *po)
|
|
|
|
|
|
+static void __dev_remove_offload(struct packet_offload *po)
|
|
{
|
|
{
|
|
struct list_head *head = &offload_base;
|
|
struct list_head *head = &offload_base;
|
|
struct packet_offload *po1;
|
|
struct packet_offload *po1;
|
|
@@ -498,7 +498,6 @@ void __dev_remove_offload(struct packet_offload *po)
|
|
out:
|
|
out:
|
|
spin_unlock(&offload_lock);
|
|
spin_unlock(&offload_lock);
|
|
}
|
|
}
|
|
-EXPORT_SYMBOL(__dev_remove_offload);
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
* dev_remove_offload - remove packet offload handler
|
|
* dev_remove_offload - remove packet offload handler
|
|
@@ -1566,14 +1565,14 @@ EXPORT_SYMBOL(unregister_netdevice_notifier);
|
|
* are as for raw_notifier_call_chain().
|
|
* are as for raw_notifier_call_chain().
|
|
*/
|
|
*/
|
|
|
|
|
|
-int call_netdevice_notifiers_info(unsigned long val, struct net_device *dev,
|
|
|
|
- struct netdev_notifier_info *info)
|
|
|
|
|
|
+static int call_netdevice_notifiers_info(unsigned long val,
|
|
|
|
+ struct net_device *dev,
|
|
|
|
+ struct netdev_notifier_info *info)
|
|
{
|
|
{
|
|
ASSERT_RTNL();
|
|
ASSERT_RTNL();
|
|
netdev_notifier_info_init(info, dev);
|
|
netdev_notifier_info_init(info, dev);
|
|
return raw_notifier_call_chain(&netdev_chain, val, info);
|
|
return raw_notifier_call_chain(&netdev_chain, val, info);
|
|
}
|
|
}
|
|
-EXPORT_SYMBOL(call_netdevice_notifiers_info);
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
* call_netdevice_notifiers - call all network notifier blocks
|
|
* call_netdevice_notifiers - call all network notifier blocks
|
|
@@ -4355,19 +4354,6 @@ struct netdev_adjacent {
|
|
struct rcu_head rcu;
|
|
struct rcu_head rcu;
|
|
};
|
|
};
|
|
|
|
|
|
-static struct netdev_adjacent *__netdev_find_adj_rcu(struct net_device *dev,
|
|
|
|
- struct net_device *adj_dev,
|
|
|
|
- struct list_head *adj_list)
|
|
|
|
-{
|
|
|
|
- struct netdev_adjacent *adj;
|
|
|
|
-
|
|
|
|
- list_for_each_entry_rcu(adj, adj_list, list) {
|
|
|
|
- if (adj->dev == adj_dev)
|
|
|
|
- return adj;
|
|
|
|
- }
|
|
|
|
- return NULL;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
static struct netdev_adjacent *__netdev_find_adj(struct net_device *dev,
|
|
static struct netdev_adjacent *__netdev_find_adj(struct net_device *dev,
|
|
struct net_device *adj_dev,
|
|
struct net_device *adj_dev,
|
|
struct list_head *adj_list)
|
|
struct list_head *adj_list)
|
|
@@ -4406,13 +4392,12 @@ EXPORT_SYMBOL(netdev_has_upper_dev);
|
|
* Find out if a device is linked to an upper device and return true in case
|
|
* Find out if a device is linked to an upper device and return true in case
|
|
* it is. The caller must hold the RTNL lock.
|
|
* it is. The caller must hold the RTNL lock.
|
|
*/
|
|
*/
|
|
-bool netdev_has_any_upper_dev(struct net_device *dev)
|
|
|
|
|
|
+static bool netdev_has_any_upper_dev(struct net_device *dev)
|
|
{
|
|
{
|
|
ASSERT_RTNL();
|
|
ASSERT_RTNL();
|
|
|
|
|
|
return !list_empty(&dev->all_adj_list.upper);
|
|
return !list_empty(&dev->all_adj_list.upper);
|
|
}
|
|
}
|
|
-EXPORT_SYMBOL(netdev_has_any_upper_dev);
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
* netdev_master_upper_dev_get - Get master upper device
|
|
* netdev_master_upper_dev_get - Get master upper device
|
|
@@ -4644,9 +4629,9 @@ free_adj:
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
|
|
-void __netdev_adjacent_dev_remove(struct net_device *dev,
|
|
|
|
- struct net_device *adj_dev,
|
|
|
|
- struct list_head *dev_list)
|
|
|
|
|
|
+static void __netdev_adjacent_dev_remove(struct net_device *dev,
|
|
|
|
+ struct net_device *adj_dev,
|
|
|
|
+ struct list_head *dev_list)
|
|
{
|
|
{
|
|
struct netdev_adjacent *adj;
|
|
struct netdev_adjacent *adj;
|
|
char linkname[IFNAMSIZ+7];
|
|
char linkname[IFNAMSIZ+7];
|
|
@@ -4684,11 +4669,11 @@ void __netdev_adjacent_dev_remove(struct net_device *dev,
|
|
kfree_rcu(adj, rcu);
|
|
kfree_rcu(adj, rcu);
|
|
}
|
|
}
|
|
|
|
|
|
-int __netdev_adjacent_dev_link_lists(struct net_device *dev,
|
|
|
|
- struct net_device *upper_dev,
|
|
|
|
- struct list_head *up_list,
|
|
|
|
- struct list_head *down_list,
|
|
|
|
- void *private, bool master)
|
|
|
|
|
|
+static int __netdev_adjacent_dev_link_lists(struct net_device *dev,
|
|
|
|
+ struct net_device *upper_dev,
|
|
|
|
+ struct list_head *up_list,
|
|
|
|
+ struct list_head *down_list,
|
|
|
|
+ void *private, bool master)
|
|
{
|
|
{
|
|
int ret;
|
|
int ret;
|
|
|
|
|
|
@@ -4707,8 +4692,8 @@ int __netdev_adjacent_dev_link_lists(struct net_device *dev,
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
-int __netdev_adjacent_dev_link(struct net_device *dev,
|
|
|
|
- struct net_device *upper_dev)
|
|
|
|
|
|
+static int __netdev_adjacent_dev_link(struct net_device *dev,
|
|
|
|
+ struct net_device *upper_dev)
|
|
{
|
|
{
|
|
return __netdev_adjacent_dev_link_lists(dev, upper_dev,
|
|
return __netdev_adjacent_dev_link_lists(dev, upper_dev,
|
|
&dev->all_adj_list.upper,
|
|
&dev->all_adj_list.upper,
|
|
@@ -4716,26 +4701,26 @@ int __netdev_adjacent_dev_link(struct net_device *dev,
|
|
NULL, false);
|
|
NULL, false);
|
|
}
|
|
}
|
|
|
|
|
|
-void __netdev_adjacent_dev_unlink_lists(struct net_device *dev,
|
|
|
|
- struct net_device *upper_dev,
|
|
|
|
- struct list_head *up_list,
|
|
|
|
- struct list_head *down_list)
|
|
|
|
|
|
+static void __netdev_adjacent_dev_unlink_lists(struct net_device *dev,
|
|
|
|
+ struct net_device *upper_dev,
|
|
|
|
+ struct list_head *up_list,
|
|
|
|
+ struct list_head *down_list)
|
|
{
|
|
{
|
|
__netdev_adjacent_dev_remove(dev, upper_dev, up_list);
|
|
__netdev_adjacent_dev_remove(dev, upper_dev, up_list);
|
|
__netdev_adjacent_dev_remove(upper_dev, dev, down_list);
|
|
__netdev_adjacent_dev_remove(upper_dev, dev, down_list);
|
|
}
|
|
}
|
|
|
|
|
|
-void __netdev_adjacent_dev_unlink(struct net_device *dev,
|
|
|
|
- struct net_device *upper_dev)
|
|
|
|
|
|
+static void __netdev_adjacent_dev_unlink(struct net_device *dev,
|
|
|
|
+ struct net_device *upper_dev)
|
|
{
|
|
{
|
|
__netdev_adjacent_dev_unlink_lists(dev, upper_dev,
|
|
__netdev_adjacent_dev_unlink_lists(dev, upper_dev,
|
|
&dev->all_adj_list.upper,
|
|
&dev->all_adj_list.upper,
|
|
&upper_dev->all_adj_list.lower);
|
|
&upper_dev->all_adj_list.lower);
|
|
}
|
|
}
|
|
|
|
|
|
-int __netdev_adjacent_dev_link_neighbour(struct net_device *dev,
|
|
|
|
- struct net_device *upper_dev,
|
|
|
|
- void *private, bool master)
|
|
|
|
|
|
+static int __netdev_adjacent_dev_link_neighbour(struct net_device *dev,
|
|
|
|
+ struct net_device *upper_dev,
|
|
|
|
+ void *private, bool master)
|
|
{
|
|
{
|
|
int ret = __netdev_adjacent_dev_link(dev, upper_dev);
|
|
int ret = __netdev_adjacent_dev_link(dev, upper_dev);
|
|
|
|
|
|
@@ -4754,8 +4739,8 @@ int __netdev_adjacent_dev_link_neighbour(struct net_device *dev,
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
-void __netdev_adjacent_dev_unlink_neighbour(struct net_device *dev,
|
|
|
|
- struct net_device *upper_dev)
|
|
|
|
|
|
+static void __netdev_adjacent_dev_unlink_neighbour(struct net_device *dev,
|
|
|
|
+ struct net_device *upper_dev)
|
|
{
|
|
{
|
|
__netdev_adjacent_dev_unlink(dev, upper_dev);
|
|
__netdev_adjacent_dev_unlink(dev, upper_dev);
|
|
__netdev_adjacent_dev_unlink_lists(dev, upper_dev,
|
|
__netdev_adjacent_dev_unlink_lists(dev, upper_dev,
|
|
@@ -4944,21 +4929,6 @@ void netdev_upper_dev_unlink(struct net_device *dev,
|
|
}
|
|
}
|
|
EXPORT_SYMBOL(netdev_upper_dev_unlink);
|
|
EXPORT_SYMBOL(netdev_upper_dev_unlink);
|
|
|
|
|
|
-void *netdev_lower_dev_get_private_rcu(struct net_device *dev,
|
|
|
|
- struct net_device *lower_dev)
|
|
|
|
-{
|
|
|
|
- struct netdev_adjacent *lower;
|
|
|
|
-
|
|
|
|
- if (!lower_dev)
|
|
|
|
- return NULL;
|
|
|
|
- lower = __netdev_find_adj_rcu(dev, lower_dev, &dev->adj_list.lower);
|
|
|
|
- if (!lower)
|
|
|
|
- return NULL;
|
|
|
|
-
|
|
|
|
- return lower->private;
|
|
|
|
-}
|
|
|
|
-EXPORT_SYMBOL(netdev_lower_dev_get_private_rcu);
|
|
|
|
-
|
|
|
|
void *netdev_lower_dev_get_private(struct net_device *dev,
|
|
void *netdev_lower_dev_get_private(struct net_device *dev,
|
|
struct net_device *lower_dev)
|
|
struct net_device *lower_dev)
|
|
{
|
|
{
|