aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-08-19 17:27:27 -0400
committerJeff Garzik <jeff@garzik.org>2006-08-19 17:27:27 -0400
commit499792ec6dc737467e5486527cef95ed7d74fba9 (patch)
treeb88c4ef9d4491c17f71d26d33e73f05f7c7ea6a0 /include/linux
parent421b20b9c44b3fcdc07d6af875dad5ae86fad014 (diff)
parentd14b50cc60ca465290fcdb3b88e7d5fb684361ed (diff)
Merge branch 'upstream-fixes' into upstream
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/fb.h2
-rw-r--r--include/linux/if_vlan.h5
-rw-r--r--include/linux/kernel.h1
-rw-r--r--include/linux/mm.h1
-rw-r--r--include/linux/netdevice.h27
-rw-r--r--include/linux/skbuff.h19
6 files changed, 52 insertions, 3 deletions
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 4ad0673b1995..2f335e966011 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -1,7 +1,6 @@
1#ifndef _LINUX_FB_H 1#ifndef _LINUX_FB_H
2#define _LINUX_FB_H 2#define _LINUX_FB_H
3 3
4#include <linux/backlight.h>
5#include <asm/types.h> 4#include <asm/types.h>
6 5
7/* Definitions of frame buffers */ 6/* Definitions of frame buffers */
@@ -381,6 +380,7 @@ struct fb_cursor {
381#include <linux/workqueue.h> 380#include <linux/workqueue.h>
382#include <linux/notifier.h> 381#include <linux/notifier.h>
383#include <linux/list.h> 382#include <linux/list.h>
383#include <linux/backlight.h>
384#include <asm/io.h> 384#include <asm/io.h>
385 385
386struct vm_area_struct; 386struct vm_area_struct;
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
index 383627ad328f..ab2740832742 100644
--- a/include/linux/if_vlan.h
+++ b/include/linux/if_vlan.h
@@ -155,6 +155,11 @@ static inline int __vlan_hwaccel_rx(struct sk_buff *skb,
155{ 155{
156 struct net_device_stats *stats; 156 struct net_device_stats *stats;
157 157
158 if (skb_bond_should_drop(skb)) {
159 dev_kfree_skb_any(skb);
160 return NET_RX_DROP;
161 }
162
158 skb->dev = grp->vlan_devices[vlan_tag & VLAN_VID_MASK]; 163 skb->dev = grp->vlan_devices[vlan_tag & VLAN_VID_MASK];
159 if (skb->dev == NULL) { 164 if (skb->dev == NULL) {
160 dev_kfree_skb_any(skb); 165 dev_kfree_skb_any(skb);
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 181c69cad4e3..851aa1bcfc1a 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -210,6 +210,7 @@ extern enum system_states {
210extern void dump_stack(void); 210extern void dump_stack(void);
211 211
212#ifdef DEBUG 212#ifdef DEBUG
213/* If you are writing a driver, please use dev_dbg instead */
213#define pr_debug(fmt,arg...) \ 214#define pr_debug(fmt,arg...) \
214 printk(KERN_DEBUG fmt,##arg) 215 printk(KERN_DEBUG fmt,##arg)
215#else 216#else
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 990957e0929f..f0b135cd86da 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -336,6 +336,7 @@ static inline void init_page_count(struct page *page)
336} 336}
337 337
338void put_page(struct page *page); 338void put_page(struct page *page);
339void put_pages_list(struct list_head *pages);
339 340
340void split_page(struct page *page, unsigned int order); 341void split_page(struct page *page, unsigned int order);
341 342
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 75f02d8c6ed3..50a4719512ed 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -320,6 +320,9 @@ struct net_device
320#define NETIF_F_TSO_ECN (SKB_GSO_TCP_ECN << NETIF_F_GSO_SHIFT) 320#define NETIF_F_TSO_ECN (SKB_GSO_TCP_ECN << NETIF_F_GSO_SHIFT)
321#define NETIF_F_TSO6 (SKB_GSO_TCPV6 << NETIF_F_GSO_SHIFT) 321#define NETIF_F_TSO6 (SKB_GSO_TCPV6 << NETIF_F_GSO_SHIFT)
322 322
323 /* List of features with software fallbacks. */
324#define NETIF_F_GSO_SOFTWARE (NETIF_F_TSO | NETIF_F_TSO_ECN | NETIF_F_TSO6)
325
323#define NETIF_F_GEN_CSUM (NETIF_F_NO_CSUM | NETIF_F_HW_CSUM) 326#define NETIF_F_GEN_CSUM (NETIF_F_NO_CSUM | NETIF_F_HW_CSUM)
324#define NETIF_F_ALL_CSUM (NETIF_F_IP_CSUM | NETIF_F_GEN_CSUM) 327#define NETIF_F_ALL_CSUM (NETIF_F_IP_CSUM | NETIF_F_GEN_CSUM)
325 328
@@ -1012,6 +1015,30 @@ static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb)
1012 unlikely(skb->ip_summed != CHECKSUM_HW)); 1015 unlikely(skb->ip_summed != CHECKSUM_HW));
1013} 1016}
1014 1017
1018/* On bonding slaves other than the currently active slave, suppress
1019 * duplicates except for 802.3ad ETH_P_SLOW and alb non-mcast/bcast.
1020 */
1021static inline int skb_bond_should_drop(struct sk_buff *skb)
1022{
1023 struct net_device *dev = skb->dev;
1024 struct net_device *master = dev->master;
1025
1026 if (master &&
1027 (dev->priv_flags & IFF_SLAVE_INACTIVE)) {
1028 if (master->priv_flags & IFF_MASTER_ALB) {
1029 if (skb->pkt_type != PACKET_BROADCAST &&
1030 skb->pkt_type != PACKET_MULTICAST)
1031 return 0;
1032 }
1033 if (master->priv_flags & IFF_MASTER_8023AD &&
1034 skb->protocol == __constant_htons(ETH_P_SLOW))
1035 return 0;
1036
1037 return 1;
1038 }
1039 return 0;
1040}
1041
1015#endif /* __KERNEL__ */ 1042#endif /* __KERNEL__ */
1016 1043
1017#endif /* _LINUX_DEV_H */ 1044#endif /* _LINUX_DEV_H */
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 19c96d498e20..755e9cddac47 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1040,6 +1040,21 @@ static inline int pskb_trim(struct sk_buff *skb, unsigned int len)
1040} 1040}
1041 1041
1042/** 1042/**
1043 * pskb_trim_unique - remove end from a paged unique (not cloned) buffer
1044 * @skb: buffer to alter
1045 * @len: new length
1046 *
1047 * This is identical to pskb_trim except that the caller knows that
1048 * the skb is not cloned so we should never get an error due to out-
1049 * of-memory.
1050 */
1051static inline void pskb_trim_unique(struct sk_buff *skb, unsigned int len)
1052{
1053 int err = pskb_trim(skb, len);
1054 BUG_ON(err);
1055}
1056
1057/**
1043 * skb_orphan - orphan a buffer 1058 * skb_orphan - orphan a buffer
1044 * @skb: buffer to orphan 1059 * @skb: buffer to orphan
1045 * 1060 *
@@ -1081,7 +1096,7 @@ static inline void __skb_queue_purge(struct sk_buff_head *list)
1081 * the headroom they think they need without accounting for the 1096 * the headroom they think they need without accounting for the
1082 * built in space. The built in space is used for optimisations. 1097 * built in space. The built in space is used for optimisations.
1083 * 1098 *
1084 * %NULL is returned in there is no free memory. 1099 * %NULL is returned if there is no free memory.
1085 */ 1100 */
1086static inline struct sk_buff *__dev_alloc_skb(unsigned int length, 1101static inline struct sk_buff *__dev_alloc_skb(unsigned int length,
1087 gfp_t gfp_mask) 1102 gfp_t gfp_mask)
@@ -1101,7 +1116,7 @@ static inline struct sk_buff *__dev_alloc_skb(unsigned int length,
1101 * the headroom they think they need without accounting for the 1116 * the headroom they think they need without accounting for the
1102 * built in space. The built in space is used for optimisations. 1117 * built in space. The built in space is used for optimisations.
1103 * 1118 *
1104 * %NULL is returned in there is no free memory. Although this function 1119 * %NULL is returned if there is no free memory. Although this function
1105 * allocates memory it can be called from an interrupt. 1120 * allocates memory it can be called from an interrupt.
1106 */ 1121 */
1107static inline struct sk_buff *dev_alloc_skb(unsigned int length) 1122static inline struct sk_buff *dev_alloc_skb(unsigned int length)