diff options
author | Li RongQing <roy.qing.li@gmail.com> | 2014-01-04 01:22:34 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-01-04 20:11:33 -0500 |
commit | cdf3e274cf1b36e9a2fef2d175cabc566af841b2 (patch) | |
tree | 0d546fd7de0b74fb36a8406a75e0433db92362e6 /include/linux/if_macvlan.h | |
parent | 8f84985fec10de64a6b4cdfea45f2b0ab8f07c78 (diff) |
macvlan: unify macvlan_pcpu_stats and vlan_pcpu_stats
They are same, so unify them as one; since macvlan is a kind of vlan,
vlan_pcpu_stats should be a proper name for vlan and macvlan.
Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/if_macvlan.h')
-rw-r--r-- | include/linux/if_macvlan.h | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/include/linux/if_macvlan.h b/include/linux/if_macvlan.h index 551bdd3722a2..7c8b20b120ea 100644 --- a/include/linux/if_macvlan.h +++ b/include/linux/if_macvlan.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _LINUX_IF_MACVLAN_H | 2 | #define _LINUX_IF_MACVLAN_H |
3 | 3 | ||
4 | #include <linux/if_link.h> | 4 | #include <linux/if_link.h> |
5 | #include <linux/if_vlan.h> | ||
5 | #include <linux/list.h> | 6 | #include <linux/list.h> |
6 | #include <linux/netdevice.h> | 7 | #include <linux/netdevice.h> |
7 | #include <linux/netlink.h> | 8 | #include <linux/netlink.h> |
@@ -24,28 +25,6 @@ static inline struct socket *macvtap_get_socket(struct file *f) | |||
24 | struct macvlan_port; | 25 | struct macvlan_port; |
25 | struct macvtap_queue; | 26 | struct macvtap_queue; |
26 | 27 | ||
27 | /** | ||
28 | * struct macvlan_pcpu_stats - MACVLAN percpu stats | ||
29 | * @rx_packets: number of received packets | ||
30 | * @rx_bytes: number of received bytes | ||
31 | * @rx_multicast: number of received multicast packets | ||
32 | * @tx_packets: number of transmitted packets | ||
33 | * @tx_bytes: number of transmitted bytes | ||
34 | * @syncp: synchronization point for 64bit counters | ||
35 | * @rx_errors: number of rx errors | ||
36 | * @tx_dropped: number of tx dropped packets | ||
37 | */ | ||
38 | struct macvlan_pcpu_stats { | ||
39 | u64 rx_packets; | ||
40 | u64 rx_bytes; | ||
41 | u64 rx_multicast; | ||
42 | u64 tx_packets; | ||
43 | u64 tx_bytes; | ||
44 | struct u64_stats_sync syncp; | ||
45 | u32 rx_errors; | ||
46 | u32 tx_dropped; | ||
47 | }; | ||
48 | |||
49 | /* | 28 | /* |
50 | * Maximum times a macvtap device can be opened. This can be used to | 29 | * Maximum times a macvtap device can be opened. This can be used to |
51 | * configure the number of receive queue, e.g. for multiqueue virtio. | 30 | * configure the number of receive queue, e.g. for multiqueue virtio. |
@@ -62,7 +41,7 @@ struct macvlan_dev { | |||
62 | struct macvlan_port *port; | 41 | struct macvlan_port *port; |
63 | struct net_device *lowerdev; | 42 | struct net_device *lowerdev; |
64 | void *fwd_priv; | 43 | void *fwd_priv; |
65 | struct macvlan_pcpu_stats __percpu *pcpu_stats; | 44 | struct vlan_pcpu_stats __percpu *pcpu_stats; |
66 | 45 | ||
67 | DECLARE_BITMAP(mc_filter, MACVLAN_MC_FILTER_SZ); | 46 | DECLARE_BITMAP(mc_filter, MACVLAN_MC_FILTER_SZ); |
68 | 47 | ||
@@ -84,7 +63,7 @@ static inline void macvlan_count_rx(const struct macvlan_dev *vlan, | |||
84 | bool multicast) | 63 | bool multicast) |
85 | { | 64 | { |
86 | if (likely(success)) { | 65 | if (likely(success)) { |
87 | struct macvlan_pcpu_stats *pcpu_stats; | 66 | struct vlan_pcpu_stats *pcpu_stats; |
88 | 67 | ||
89 | pcpu_stats = this_cpu_ptr(vlan->pcpu_stats); | 68 | pcpu_stats = this_cpu_ptr(vlan->pcpu_stats); |
90 | u64_stats_update_begin(&pcpu_stats->syncp); | 69 | u64_stats_update_begin(&pcpu_stats->syncp); |