aboutsummaryrefslogtreecommitdiffstats
path: root/net/8021q/vlan.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/8021q/vlan.h')
-rw-r--r--net/8021q/vlan.h77
1 files changed, 0 insertions, 77 deletions
diff --git a/net/8021q/vlan.h b/net/8021q/vlan.h
index a2caf00b82cc..5704ed9c3a23 100644
--- a/net/8021q/vlan.h
+++ b/net/8021q/vlan.h
@@ -5,83 +5,6 @@
5#include <linux/u64_stats_sync.h> 5#include <linux/u64_stats_sync.h>
6#include <linux/list.h> 6#include <linux/list.h>
7 7
8
9/**
10 * struct vlan_priority_tci_mapping - vlan egress priority mappings
11 * @priority: skb priority
12 * @vlan_qos: vlan priority: (skb->priority << 13) & 0xE000
13 * @next: pointer to next struct
14 */
15struct vlan_priority_tci_mapping {
16 u32 priority;
17 u16 vlan_qos;
18 struct vlan_priority_tci_mapping *next;
19};
20
21
22/**
23 * struct vlan_pcpu_stats - VLAN percpu rx/tx stats
24 * @rx_packets: number of received packets
25 * @rx_bytes: number of received bytes
26 * @rx_multicast: number of received multicast packets
27 * @tx_packets: number of transmitted packets
28 * @tx_bytes: number of transmitted bytes
29 * @syncp: synchronization point for 64bit counters
30 * @rx_errors: number of rx errors
31 * @tx_dropped: number of tx drops
32 */
33struct vlan_pcpu_stats {
34 u64 rx_packets;
35 u64 rx_bytes;
36 u64 rx_multicast;
37 u64 tx_packets;
38 u64 tx_bytes;
39 struct u64_stats_sync syncp;
40 u32 rx_errors;
41 u32 tx_dropped;
42};
43
44struct netpoll;
45
46/**
47 * struct vlan_dev_priv - VLAN private device data
48 * @nr_ingress_mappings: number of ingress priority mappings
49 * @ingress_priority_map: ingress priority mappings
50 * @nr_egress_mappings: number of egress priority mappings
51 * @egress_priority_map: hash of egress priority mappings
52 * @vlan_proto: VLAN encapsulation protocol
53 * @vlan_id: VLAN identifier
54 * @flags: device flags
55 * @real_dev: underlying netdevice
56 * @real_dev_addr: address of underlying netdevice
57 * @dent: proc dir entry
58 * @vlan_pcpu_stats: ptr to percpu rx stats
59 */
60struct vlan_dev_priv {
61 unsigned int nr_ingress_mappings;
62 u32 ingress_priority_map[8];
63 unsigned int nr_egress_mappings;
64 struct vlan_priority_tci_mapping *egress_priority_map[16];
65
66 __be16 vlan_proto;
67 u16 vlan_id;
68 u16 flags;
69
70 struct net_device *real_dev;
71 unsigned char real_dev_addr[ETH_ALEN];
72
73 struct proc_dir_entry *dent;
74 struct vlan_pcpu_stats __percpu *vlan_pcpu_stats;
75#ifdef CONFIG_NET_POLL_CONTROLLER
76 struct netpoll *netpoll;
77#endif
78};
79
80static inline struct vlan_dev_priv *vlan_dev_priv(const struct net_device *dev)
81{
82 return netdev_priv(dev);
83}
84
85/* if this changes, algorithm will have to be reworked because this 8/* if this changes, algorithm will have to be reworked because this
86 * depends on completely exhausting the VLAN identifier space. Thus 9 * depends on completely exhausting the VLAN identifier space. Thus
87 * it gives constant time look-up, but in many cases it wastes memory. 10 * it gives constant time look-up, but in many cases it wastes memory.