aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/if_vlan.h15
-rw-r--r--include/linux/netdevice.h15
-rw-r--r--include/linux/rtnetlink.h6
-rw-r--r--include/net/dst.h8
-rw-r--r--include/net/inet_timewait_sock.h8
-rw-r--r--include/net/ipip.h1
-rw-r--r--include/net/net_namespace.h4
-rw-r--r--include/net/rtnetlink.h3
-rw-r--r--include/net/tcp.h3
9 files changed, 48 insertions, 15 deletions
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
index 7ff9af1d0f05..71a4870c09a9 100644
--- a/include/linux/if_vlan.h
+++ b/include/linux/if_vlan.h
@@ -63,7 +63,11 @@ static inline struct vlan_ethhdr *vlan_eth_hdr(const struct sk_buff *skb)
63 return (struct vlan_ethhdr *)skb_mac_header(skb); 63 return (struct vlan_ethhdr *)skb_mac_header(skb);
64} 64}
65 65
66#define VLAN_VID_MASK 0xfff 66#define VLAN_PRIO_MASK 0xe000 /* Priority Code Point */
67#define VLAN_PRIO_SHIFT 13
68#define VLAN_CFI_MASK 0x1000 /* Canonical Format Indicator */
69#define VLAN_TAG_PRESENT VLAN_CFI_MASK
70#define VLAN_VID_MASK 0x0fff /* VLAN Identifier */
67 71
68/* found in socket.c */ 72/* found in socket.c */
69extern void vlan_ioctl_set(int (*hook)(struct net *, void __user *)); 73extern void vlan_ioctl_set(int (*hook)(struct net *, void __user *));
@@ -81,6 +85,7 @@ struct vlan_group {
81 * the vlan is attached to. 85 * the vlan is attached to.
82 */ 86 */
83 unsigned int nr_vlans; 87 unsigned int nr_vlans;
88 int killall;
84 struct hlist_node hlist; /* linked list */ 89 struct hlist_node hlist; /* linked list */
85 struct net_device **vlan_devices_arrays[VLAN_GROUP_ARRAY_SPLIT_PARTS]; 90 struct net_device **vlan_devices_arrays[VLAN_GROUP_ARRAY_SPLIT_PARTS];
86 struct rcu_head rcu; 91 struct rcu_head rcu;
@@ -105,8 +110,8 @@ static inline void vlan_group_set_device(struct vlan_group *vg,
105 array[vlan_id % VLAN_GROUP_ARRAY_PART_LEN] = dev; 110 array[vlan_id % VLAN_GROUP_ARRAY_PART_LEN] = dev;
106} 111}
107 112
108#define vlan_tx_tag_present(__skb) ((__skb)->vlan_tci) 113#define vlan_tx_tag_present(__skb) ((__skb)->vlan_tci & VLAN_TAG_PRESENT)
109#define vlan_tx_tag_get(__skb) ((__skb)->vlan_tci) 114#define vlan_tx_tag_get(__skb) ((__skb)->vlan_tci & ~VLAN_TAG_PRESENT)
110 115
111#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) 116#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
112extern struct net_device *vlan_dev_real_dev(const struct net_device *dev); 117extern struct net_device *vlan_dev_real_dev(const struct net_device *dev);
@@ -231,7 +236,7 @@ static inline struct sk_buff *__vlan_put_tag(struct sk_buff *skb, u16 vlan_tci)
231static inline struct sk_buff *__vlan_hwaccel_put_tag(struct sk_buff *skb, 236static inline struct sk_buff *__vlan_hwaccel_put_tag(struct sk_buff *skb,
232 u16 vlan_tci) 237 u16 vlan_tci)
233{ 238{
234 skb->vlan_tci = vlan_tci; 239 skb->vlan_tci = VLAN_TAG_PRESENT | vlan_tci;
235 return skb; 240 return skb;
236} 241}
237 242
@@ -284,7 +289,7 @@ static inline int __vlan_hwaccel_get_tag(const struct sk_buff *skb,
284 u16 *vlan_tci) 289 u16 *vlan_tci)
285{ 290{
286 if (vlan_tx_tag_present(skb)) { 291 if (vlan_tx_tag_present(skb)) {
287 *vlan_tci = skb->vlan_tci; 292 *vlan_tci = vlan_tx_tag_get(skb);
288 return 0; 293 return 0;
289 } else { 294 } else {
290 *vlan_tci = 0; 295 *vlan_tci = 0;
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 83800091a31a..ffc3106cc037 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -635,6 +635,10 @@ struct net_device_ops {
635 unsigned int sgc); 635 unsigned int sgc);
636 int (*ndo_fcoe_ddp_done)(struct net_device *dev, 636 int (*ndo_fcoe_ddp_done)(struct net_device *dev,
637 u16 xid); 637 u16 xid);
638#define NETDEV_FCOE_WWNN 0
639#define NETDEV_FCOE_WWPN 1
640 int (*ndo_fcoe_get_wwn)(struct net_device *dev,
641 u64 *wwn, int type);
638#endif 642#endif
639}; 643};
640 644
@@ -683,6 +687,7 @@ struct net_device
683 687
684 struct list_head dev_list; 688 struct list_head dev_list;
685 struct list_head napi_list; 689 struct list_head napi_list;
690 struct list_head unreg_list;
686 691
687 /* Net device features */ 692 /* Net device features */
688 unsigned long features; 693 unsigned long features;
@@ -1116,7 +1121,14 @@ extern int dev_close(struct net_device *dev);
1116extern void dev_disable_lro(struct net_device *dev); 1121extern void dev_disable_lro(struct net_device *dev);
1117extern int dev_queue_xmit(struct sk_buff *skb); 1122extern int dev_queue_xmit(struct sk_buff *skb);
1118extern int register_netdevice(struct net_device *dev); 1123extern int register_netdevice(struct net_device *dev);
1119extern void unregister_netdevice(struct net_device *dev); 1124extern void unregister_netdevice_queue(struct net_device *dev,
1125 struct list_head *head);
1126extern void unregister_netdevice_many(struct list_head *head);
1127static inline void unregister_netdevice(struct net_device *dev)
1128{
1129 unregister_netdevice_queue(dev, NULL);
1130}
1131
1120extern void free_netdev(struct net_device *dev); 1132extern void free_netdev(struct net_device *dev);
1121extern void synchronize_net(void); 1133extern void synchronize_net(void);
1122extern int register_netdevice_notifier(struct notifier_block *nb); 1134extern int register_netdevice_notifier(struct notifier_block *nb);
@@ -1127,6 +1139,7 @@ extern void netdev_resync_ops(struct net_device *dev);
1127extern int call_netdevice_notifiers(unsigned long val, struct net_device *dev); 1139extern int call_netdevice_notifiers(unsigned long val, struct net_device *dev);
1128extern struct net_device *dev_get_by_index(struct net *net, int ifindex); 1140extern struct net_device *dev_get_by_index(struct net *net, int ifindex);
1129extern struct net_device *__dev_get_by_index(struct net *net, int ifindex); 1141extern struct net_device *__dev_get_by_index(struct net *net, int ifindex);
1142extern struct net_device *dev_get_by_index_rcu(struct net *net, int ifindex);
1130extern int dev_restart(struct net_device *dev); 1143extern int dev_restart(struct net_device *dev);
1131#ifdef CONFIG_NETPOLL_TRAP 1144#ifdef CONFIG_NETPOLL_TRAP
1132extern int netpoll_trap(void); 1145extern int netpoll_trap(void);
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
index adf2068d12b5..e78b60cd65a4 100644
--- a/include/linux/rtnetlink.h
+++ b/include/linux/rtnetlink.h
@@ -377,9 +377,11 @@ enum
377#define RTAX_MAX (__RTAX_MAX - 1) 377#define RTAX_MAX (__RTAX_MAX - 1)
378 378
379#define RTAX_FEATURE_ECN 0x00000001 379#define RTAX_FEATURE_ECN 0x00000001
380#define RTAX_FEATURE_SACK 0x00000002 380#define RTAX_FEATURE_NO_SACK 0x00000002
381#define RTAX_FEATURE_TIMESTAMP 0x00000004 381#define RTAX_FEATURE_NO_TSTAMP 0x00000004
382#define RTAX_FEATURE_ALLFRAG 0x00000008 382#define RTAX_FEATURE_ALLFRAG 0x00000008
383#define RTAX_FEATURE_NO_WSCALE 0x00000010
384#define RTAX_FEATURE_NO_DSACK 0x00000020
383 385
384struct rta_session 386struct rta_session
385{ 387{
diff --git a/include/net/dst.h b/include/net/dst.h
index 720d90653a8e..6377ab2feba9 100644
--- a/include/net/dst.h
+++ b/include/net/dst.h
@@ -111,6 +111,12 @@ dst_metric(const struct dst_entry *dst, int metric)
111 return dst->metrics[metric-1]; 111 return dst->metrics[metric-1];
112} 112}
113 113
114static inline u32
115dst_feature(const struct dst_entry *dst, u32 feature)
116{
117 return dst_metric(dst, RTAX_FEATURES) & feature;
118}
119
114static inline u32 dst_mtu(const struct dst_entry *dst) 120static inline u32 dst_mtu(const struct dst_entry *dst)
115{ 121{
116 u32 mtu = dst_metric(dst, RTAX_MTU); 122 u32 mtu = dst_metric(dst, RTAX_MTU);
@@ -136,7 +142,7 @@ static inline void set_dst_metric_rtt(struct dst_entry *dst, int metric,
136static inline u32 142static inline u32
137dst_allfrag(const struct dst_entry *dst) 143dst_allfrag(const struct dst_entry *dst)
138{ 144{
139 int ret = dst_metric(dst, RTAX_FEATURES) & RTAX_FEATURE_ALLFRAG; 145 int ret = dst_feature(dst, RTAX_FEATURE_ALLFRAG);
140 /* Yes, _exactly_. This is paranoia. */ 146 /* Yes, _exactly_. This is paranoia. */
141 barrier(); 147 barrier();
142 return ret; 148 return ret;
diff --git a/include/net/inet_timewait_sock.h b/include/net/inet_timewait_sock.h
index 37f3aea074a5..773b10fa38e4 100644
--- a/include/net/inet_timewait_sock.h
+++ b/include/net/inet_timewait_sock.h
@@ -130,11 +130,11 @@ struct inet_timewait_sock {
130 __u16 tw_num; 130 __u16 tw_num;
131 kmemcheck_bitfield_begin(flags); 131 kmemcheck_bitfield_begin(flags);
132 /* And these are ours. */ 132 /* And these are ours. */
133 __u8 tw_ipv6only:1, 133 unsigned int tw_ipv6only : 1,
134 tw_transparent:1; 134 tw_transparent : 1,
135 /* 14 bits hole, try to pack */ 135 tw_pad : 14, /* 14 bits hole */
136 tw_ipv6_offset : 16;
136 kmemcheck_bitfield_end(flags); 137 kmemcheck_bitfield_end(flags);
137 __u16 tw_ipv6_offset;
138 unsigned long tw_ttd; 138 unsigned long tw_ttd;
139 struct inet_bind_bucket *tw_tb; 139 struct inet_bind_bucket *tw_tb;
140 struct hlist_node tw_death_node; 140 struct hlist_node tw_death_node;
diff --git a/include/net/ipip.h b/include/net/ipip.h
index 86f1c8bd040c..b3db2fd6e61c 100644
--- a/include/net/ipip.h
+++ b/include/net/ipip.h
@@ -45,6 +45,7 @@ struct ip_tunnel_prl_entry
45 struct ip_tunnel_prl_entry *next; 45 struct ip_tunnel_prl_entry *next;
46 __be32 addr; 46 __be32 addr;
47 u16 flags; 47 u16 flags;
48 struct rcu_head rcu_head;
48}; 49};
49 50
50#define IPTUNNEL_XMIT() do { \ 51#define IPTUNNEL_XMIT() do { \
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index 699410142bfa..0addd45038ac 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -28,6 +28,10 @@ struct ctl_table_header;
28struct net_generic; 28struct net_generic;
29struct sock; 29struct sock;
30 30
31
32#define NETDEV_HASHBITS 8
33#define NETDEV_HASHENTRIES (1 << NETDEV_HASHBITS)
34
31struct net { 35struct net {
32 atomic_t count; /* To decided when the network 36 atomic_t count; /* To decided when the network
33 * namespace should be freed. 37 * namespace should be freed.
diff --git a/include/net/rtnetlink.h b/include/net/rtnetlink.h
index c3aa044d3fc3..cd5af1f508f2 100644
--- a/include/net/rtnetlink.h
+++ b/include/net/rtnetlink.h
@@ -61,7 +61,8 @@ struct rtnl_link_ops {
61 int (*changelink)(struct net_device *dev, 61 int (*changelink)(struct net_device *dev,
62 struct nlattr *tb[], 62 struct nlattr *tb[],
63 struct nlattr *data[]); 63 struct nlattr *data[]);
64 void (*dellink)(struct net_device *dev); 64 void (*dellink)(struct net_device *dev,
65 struct list_head *head);
65 66
66 size_t (*get_size)(const struct net_device *dev); 67 size_t (*get_size)(const struct net_device *dev);
67 int (*fill_info)(struct sk_buff *skb, 68 int (*fill_info)(struct sk_buff *skb,
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 03a49c703377..740d09be8e2d 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -409,7 +409,8 @@ extern int tcp_recvmsg(struct kiocb *iocb, struct sock *sk,
409 409
410extern void tcp_parse_options(struct sk_buff *skb, 410extern void tcp_parse_options(struct sk_buff *skb,
411 struct tcp_options_received *opt_rx, 411 struct tcp_options_received *opt_rx,
412 int estab); 412 int estab,
413 struct dst_entry *dst);
413 414
414extern u8 *tcp_parse_md5sig_option(struct tcphdr *th); 415extern u8 *tcp_parse_md5sig_option(struct tcphdr *th);
415 416