aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/ethtool.h6
-rw-r--r--include/linux/if_packet.h2
-rw-r--r--include/linux/if_vlan.h25
-rw-r--r--include/linux/netdevice.h2
-rw-r--r--include/linux/netfilter/nf_conntrack_common.h3
-rw-r--r--include/linux/skbuff.h5
6 files changed, 36 insertions, 7 deletions
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index c6a850ab2ec5..439b173c5882 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -268,7 +268,7 @@ struct ethtool_pauseparam {
268 __u32 cmd; /* ETHTOOL_{G,S}PAUSEPARAM */ 268 __u32 cmd; /* ETHTOOL_{G,S}PAUSEPARAM */
269 269
270 /* If the link is being auto-negotiated (via ethtool_cmd.autoneg 270 /* If the link is being auto-negotiated (via ethtool_cmd.autoneg
271 * being true) the user may set 'autonet' here non-zero to have the 271 * being true) the user may set 'autoneg' here non-zero to have the
272 * pause parameters be auto-negotiated too. In such a case, the 272 * pause parameters be auto-negotiated too. In such a case, the
273 * {rx,tx}_pause values below determine what capabilities are 273 * {rx,tx}_pause values below determine what capabilities are
274 * advertised. 274 * advertised.
@@ -811,7 +811,7 @@ bool ethtool_invalid_flags(struct net_device *dev, u32 data, u32 supported);
811 * @get_tx_csum: Deprecated as redundant. Report whether transmit checksums 811 * @get_tx_csum: Deprecated as redundant. Report whether transmit checksums
812 * are turned on or off. 812 * are turned on or off.
813 * @set_tx_csum: Deprecated in favour of generic netdev features. Turn 813 * @set_tx_csum: Deprecated in favour of generic netdev features. Turn
814 * transmit checksums on or off. Returns a egative error code or zero. 814 * transmit checksums on or off. Returns a negative error code or zero.
815 * @get_sg: Deprecated as redundant. Report whether scatter-gather is 815 * @get_sg: Deprecated as redundant. Report whether scatter-gather is
816 * enabled. 816 * enabled.
817 * @set_sg: Deprecated in favour of generic netdev features. Turn 817 * @set_sg: Deprecated in favour of generic netdev features. Turn
@@ -1087,7 +1087,7 @@ struct ethtool_ops {
1087/* The following are all involved in forcing a particular link 1087/* The following are all involved in forcing a particular link
1088 * mode for the device for setting things. When getting the 1088 * mode for the device for setting things. When getting the
1089 * devices settings, these indicate the current mode and whether 1089 * devices settings, these indicate the current mode and whether
1090 * it was foced up into this mode or autonegotiated. 1090 * it was forced up into this mode or autonegotiated.
1091 */ 1091 */
1092 1092
1093/* The forced speed, 10Mb, 100Mb, gigabit, 2.5Gb, 10GbE. */ 1093/* The forced speed, 10Mb, 100Mb, gigabit, 2.5Gb, 10GbE. */
diff --git a/include/linux/if_packet.h b/include/linux/if_packet.h
index 6d66ce1791a9..7b318630139f 100644
--- a/include/linux/if_packet.h
+++ b/include/linux/if_packet.h
@@ -62,6 +62,7 @@ struct tpacket_auxdata {
62 __u16 tp_mac; 62 __u16 tp_mac;
63 __u16 tp_net; 63 __u16 tp_net;
64 __u16 tp_vlan_tci; 64 __u16 tp_vlan_tci;
65 __u16 tp_padding;
65}; 66};
66 67
67/* Rx ring - header status */ 68/* Rx ring - header status */
@@ -101,6 +102,7 @@ struct tpacket2_hdr {
101 __u32 tp_sec; 102 __u32 tp_sec;
102 __u32 tp_nsec; 103 __u32 tp_nsec;
103 __u16 tp_vlan_tci; 104 __u16 tp_vlan_tci;
105 __u16 tp_padding;
104}; 106};
105 107
106#define TPACKET2_HDRLEN (TPACKET_ALIGN(sizeof(struct tpacket2_hdr)) + sizeof(struct sockaddr_ll)) 108#define TPACKET2_HDRLEN (TPACKET_ALIGN(sizeof(struct tpacket2_hdr)) + sizeof(struct sockaddr_ll))
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
index dc01681fbb42..affa27380b72 100644
--- a/include/linux/if_vlan.h
+++ b/include/linux/if_vlan.h
@@ -225,7 +225,7 @@ static inline int vlan_hwaccel_receive_skb(struct sk_buff *skb,
225} 225}
226 226
227/** 227/**
228 * __vlan_put_tag - regular VLAN tag inserting 228 * vlan_insert_tag - regular VLAN tag inserting
229 * @skb: skbuff to tag 229 * @skb: skbuff to tag
230 * @vlan_tci: VLAN TCI to insert 230 * @vlan_tci: VLAN TCI to insert
231 * 231 *
@@ -234,8 +234,10 @@ static inline int vlan_hwaccel_receive_skb(struct sk_buff *skb,
234 * 234 *
235 * Following the skb_unshare() example, in case of error, the calling function 235 * Following the skb_unshare() example, in case of error, the calling function
236 * doesn't have to worry about freeing the original skb. 236 * doesn't have to worry about freeing the original skb.
237 *
238 * Does not change skb->protocol so this function can be used during receive.
237 */ 239 */
238static inline struct sk_buff *__vlan_put_tag(struct sk_buff *skb, u16 vlan_tci) 240static inline struct sk_buff *vlan_insert_tag(struct sk_buff *skb, u16 vlan_tci)
239{ 241{
240 struct vlan_ethhdr *veth; 242 struct vlan_ethhdr *veth;
241 243
@@ -255,8 +257,25 @@ static inline struct sk_buff *__vlan_put_tag(struct sk_buff *skb, u16 vlan_tci)
255 /* now, the TCI */ 257 /* now, the TCI */
256 veth->h_vlan_TCI = htons(vlan_tci); 258 veth->h_vlan_TCI = htons(vlan_tci);
257 259
258 skb->protocol = htons(ETH_P_8021Q); 260 return skb;
261}
259 262
263/**
264 * __vlan_put_tag - regular VLAN tag inserting
265 * @skb: skbuff to tag
266 * @vlan_tci: VLAN TCI to insert
267 *
268 * Inserts the VLAN tag into @skb as part of the payload
269 * Returns a VLAN tagged skb. If a new skb is created, @skb is freed.
270 *
271 * Following the skb_unshare() example, in case of error, the calling function
272 * doesn't have to worry about freeing the original skb.
273 */
274static inline struct sk_buff *__vlan_put_tag(struct sk_buff *skb, u16 vlan_tci)
275{
276 skb = vlan_insert_tag(skb, vlan_tci);
277 if (skb)
278 skb->protocol = htons(ETH_P_8021Q);
260 return skb; 279 return skb;
261} 280}
262 281
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index ca333e79e10f..54b8b4d7b68f 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2555,7 +2555,7 @@ extern void netdev_class_remove_file(struct class_attribute *class_attr);
2555 2555
2556extern struct kobj_ns_type_operations net_ns_type_operations; 2556extern struct kobj_ns_type_operations net_ns_type_operations;
2557 2557
2558extern char *netdev_drivername(const struct net_device *dev, char *buffer, int len); 2558extern const char *netdev_drivername(const struct net_device *dev);
2559 2559
2560extern void linkwatch_run_queue(void); 2560extern void linkwatch_run_queue(void);
2561 2561
diff --git a/include/linux/netfilter/nf_conntrack_common.h b/include/linux/netfilter/nf_conntrack_common.h
index 50cdc2559a5a..0d3dd66322ec 100644
--- a/include/linux/netfilter/nf_conntrack_common.h
+++ b/include/linux/netfilter/nf_conntrack_common.h
@@ -18,6 +18,9 @@ enum ip_conntrack_info {
18 /* >= this indicates reply direction */ 18 /* >= this indicates reply direction */
19 IP_CT_IS_REPLY, 19 IP_CT_IS_REPLY,
20 20
21 IP_CT_ESTABLISHED_REPLY = IP_CT_ESTABLISHED + IP_CT_IS_REPLY,
22 IP_CT_RELATED_REPLY = IP_CT_RELATED + IP_CT_IS_REPLY,
23 IP_CT_NEW_REPLY = IP_CT_NEW + IP_CT_IS_REPLY,
21 /* Number of distinct IP_CT types (no NEW in reply dirn). */ 24 /* Number of distinct IP_CT types (no NEW in reply dirn). */
22 IP_CT_NUMBER = IP_CT_IS_REPLY * 2 - 1 25 IP_CT_NUMBER = IP_CT_IS_REPLY * 2 - 1
23}; 26};
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index e8b78ce14474..c0a4f3ab0cc0 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1256,6 +1256,11 @@ static inline void skb_reserve(struct sk_buff *skb, int len)
1256 skb->tail += len; 1256 skb->tail += len;
1257} 1257}
1258 1258
1259static inline void skb_reset_mac_len(struct sk_buff *skb)
1260{
1261 skb->mac_len = skb->network_header - skb->mac_header;
1262}
1263
1259#ifdef NET_SKBUFF_DATA_USES_OFFSET 1264#ifdef NET_SKBUFF_DATA_USES_OFFSET
1260static inline unsigned char *skb_transport_header(const struct sk_buff *skb) 1265static inline unsigned char *skb_transport_header(const struct sk_buff *skb)
1261{ 1266{