Commit f06c7f9f92295faf701a9628b383156c4efb6119

Authored by dingtianhong
Committed by David S. Miller
1 parent 60ff746739

vlan: rename __vlan_find_dev_deep() to __vlan_find_dev_deep_rcu()

The __vlan_find_dev_deep should always called in RCU, according
David's suggestion, rename to __vlan_find_dev_deep_rcu looks more
reasonable.

Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 8 changed files with 16 additions and 16 deletions Side-by-side Diff

drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c
... ... @@ -185,7 +185,7 @@
185 185 if (ether_addr_equal(dev->dev_addr, mac)) {
186 186 rcu_read_lock();
187 187 if (vlan && vlan != VLAN_VID_MASK) {
188   - dev = __vlan_find_dev_deep(dev, htons(ETH_P_8021Q), vlan);
  188 + dev = __vlan_find_dev_deep_rcu(dev, htons(ETH_P_8021Q), vlan);
189 189 } else if (netif_is_bond_slave(dev)) {
190 190 struct net_device *upper_dev;
191 191  
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
... ... @@ -4068,7 +4068,7 @@
4068 4068  
4069 4069 /* Parse all bond and vlan devices layered on top of the physical dev */
4070 4070 for (i = 0; i < VLAN_N_VID; i++) {
4071   - root_dev = __vlan_find_dev_deep(dev, htons(ETH_P_8021Q), i);
  4071 + root_dev = __vlan_find_dev_deep_rcu(dev, htons(ETH_P_8021Q), i);
4072 4072 if (!root_dev)
4073 4073 continue;
4074 4074  
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
... ... @@ -4146,7 +4146,7 @@
4146 4146  
4147 4147 rcu_read_lock();
4148 4148 for_each_set_bit(vid, adapter->vlans, VLAN_N_VID) {
4149   - dev = __vlan_find_dev_deep(netdev, htons(ETH_P_8021Q), vid);
  4149 + dev = __vlan_find_dev_deep_rcu(netdev, htons(ETH_P_8021Q), vid);
4150 4150 if (!dev)
4151 4151 continue;
4152 4152 qlcnic_config_indev_addr(adapter, dev, event);
drivers/net/usb/cdc_mbim.c
... ... @@ -223,8 +223,8 @@
223 223 /* need to send the NA on the VLAN dev, if any */
224 224 rcu_read_lock();
225 225 if (tci) {
226   - netdev = __vlan_find_dev_deep(dev->net, htons(ETH_P_8021Q),
227   - tci);
  226 + netdev = __vlan_find_dev_deep_rcu(dev->net, htons(ETH_P_8021Q),
  227 + tci);
228 228 if (!netdev) {
229 229 rcu_read_unlock();
230 230 return;
drivers/s390/net/qeth_l3_main.c
... ... @@ -1659,7 +1659,7 @@
1659 1659 for_each_set_bit(vid, card->active_vlans, VLAN_N_VID) {
1660 1660 struct net_device *netdev;
1661 1661  
1662   - netdev = __vlan_find_dev_deep(card->dev, htons(ETH_P_8021Q),
  1662 + netdev = __vlan_find_dev_deep_rcu(card->dev, htons(ETH_P_8021Q),
1663 1663 vid);
1664 1664 if (netdev == NULL ||
1665 1665 !(netdev->flags & IFF_UP))
... ... @@ -1721,7 +1721,7 @@
1721 1721 for_each_set_bit(vid, card->active_vlans, VLAN_N_VID) {
1722 1722 struct net_device *netdev;
1723 1723  
1724   - netdev = __vlan_find_dev_deep(card->dev, htons(ETH_P_8021Q),
  1724 + netdev = __vlan_find_dev_deep_rcu(card->dev, htons(ETH_P_8021Q),
1725 1725 vid);
1726 1726 if (netdev == NULL ||
1727 1727 !(netdev->flags & IFF_UP))
... ... @@ -1766,7 +1766,7 @@
1766 1766  
1767 1767 QETH_CARD_TEXT(card, 4, "frvaddr4");
1768 1768  
1769   - netdev = __vlan_find_dev_deep(card->dev, htons(ETH_P_8021Q), vid);
  1769 + netdev = __vlan_find_dev_deep_rcu(card->dev, htons(ETH_P_8021Q), vid);
1770 1770 if (!netdev)
1771 1771 return;
1772 1772 in_dev = in_dev_get(netdev);
... ... @@ -1796,7 +1796,7 @@
1796 1796  
1797 1797 QETH_CARD_TEXT(card, 4, "frvaddr6");
1798 1798  
1799   - netdev = __vlan_find_dev_deep(card->dev, htons(ETH_P_8021Q), vid);
  1799 + netdev = __vlan_find_dev_deep_rcu(card->dev, htons(ETH_P_8021Q), vid);
1800 1800 if (!netdev)
1801 1801 return;
1802 1802 in6_dev = in6_dev_get(netdev);
... ... @@ -2089,7 +2089,7 @@
2089 2089 struct net_device *netdev;
2090 2090  
2091 2091 rcu_read_lock();
2092   - netdev = __vlan_find_dev_deep(card->dev, htons(ETH_P_8021Q),
  2092 + netdev = __vlan_find_dev_deep_rcu(card->dev, htons(ETH_P_8021Q),
2093 2093 vid);
2094 2094 rcu_read_unlock();
2095 2095 if (netdev == dev) {
include/linux/if_vlan.h
... ... @@ -106,7 +106,7 @@
106 106  
107 107 #if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
108 108  
109   -extern struct net_device *__vlan_find_dev_deep(struct net_device *real_dev,
  109 +extern struct net_device *__vlan_find_dev_deep_rcu(struct net_device *real_dev,
110 110 __be16 vlan_proto, u16 vlan_id);
111 111 extern struct net_device *vlan_dev_real_dev(const struct net_device *dev);
112 112 extern u16 vlan_dev_vlan_id(const struct net_device *dev);
... ... @@ -199,7 +199,7 @@
199 199 extern bool vlan_uses_dev(const struct net_device *dev);
200 200 #else
201 201 static inline struct net_device *
202   -__vlan_find_dev_deep(struct net_device *real_dev,
  202 +__vlan_find_dev_deep_rcu(struct net_device *real_dev,
203 203 __be16 vlan_proto, u16 vlan_id)
204 204 {
205 205 return NULL;
net/8021q/vlan_core.c
... ... @@ -63,7 +63,7 @@
63 63 }
64 64  
65 65 /* Must be invoked with rcu_read_lock. */
66   -struct net_device *__vlan_find_dev_deep(struct net_device *dev,
  66 +struct net_device *__vlan_find_dev_deep_rcu(struct net_device *dev,
67 67 __be16 vlan_proto, u16 vlan_id)
68 68 {
69 69 struct vlan_info *vlan_info = rcu_dereference(dev->vlan_info);
70 70  
... ... @@ -81,13 +81,13 @@
81 81  
82 82 upper_dev = netdev_master_upper_dev_get_rcu(dev);
83 83 if (upper_dev)
84   - return __vlan_find_dev_deep(upper_dev,
  84 + return __vlan_find_dev_deep_rcu(upper_dev,
85 85 vlan_proto, vlan_id);
86 86 }
87 87  
88 88 return NULL;
89 89 }
90   -EXPORT_SYMBOL(__vlan_find_dev_deep);
  90 +EXPORT_SYMBOL(__vlan_find_dev_deep_rcu);
91 91  
92 92 struct net_device *vlan_dev_real_dev(const struct net_device *dev)
93 93 {
net/bridge/br_netfilter.c
... ... @@ -535,7 +535,7 @@
535 535 if (brnf_pass_vlan_indev == 0 || !vlan_tx_tag_present(skb))
536 536 return br;
537 537  
538   - vlan = __vlan_find_dev_deep(br, skb->vlan_proto,
  538 + vlan = __vlan_find_dev_deep_rcu(br, skb->vlan_proto,
539 539 vlan_tx_tag_get(skb) & VLAN_VID_MASK);
540 540  
541 541 return vlan ? vlan : br;