diff options
author | John W. Linville <linville@tuxdriver.com> | 2006-08-22 14:42:36 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2006-08-22 14:42:36 -0400 |
commit | 69758820a42da207bdc775d6eccf1f9fb67cd62e (patch) | |
tree | 4c4dd2b596aa5535231656bf0fa1bc65a8b17471 /include/linux | |
parent | 113b898e38cb20e80847c24154ce62273b948c6a (diff) | |
parent | ef7d1b244fa6c94fb76d5f787b8629df64ea4046 (diff) |
Merge branch 'from-linus' into upstream
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/fb.h | 2 | ||||
-rw-r--r-- | include/linux/if_vlan.h | 5 | ||||
-rw-r--r-- | include/linux/mm.h | 1 | ||||
-rw-r--r-- | include/linux/netdevice.h | 27 |
4 files changed, 34 insertions, 1 deletions
diff --git a/include/linux/fb.h b/include/linux/fb.h index 4ad0673b199..2f335e96601 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -1,7 +1,6 @@ #ifndef _LINUX_FB_H #define _LINUX_FB_H -#include <linux/backlight.h> #include <asm/types.h> /* Definitions of frame buffers */ @@ -381,6 +380,7 @@ struct fb_cursor { #include <linux/workqueue.h> #include <linux/notifier.h> #include <linux/list.h> +#include <linux/backlight.h> #include <asm/io.h> struct vm_area_struct; diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index 383627ad328..ab274083274 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, { struct net_device_stats *stats; + if (skb_bond_should_drop(skb)) { + dev_kfree_skb_any(skb); + return NET_RX_DROP; + } + skb->dev = grp->vlan_devices[vlan_tag & VLAN_VID_MASK]; if (skb->dev == NULL) { dev_kfree_skb_any(skb); diff --git a/include/linux/mm.h b/include/linux/mm.h index 990957e0929..f0b135cd86d 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -336,6 +336,7 @@ static inline void init_page_count(struct page *page) } void put_page(struct page *page); +void put_pages_list(struct list_head *pages); void split_page(struct page *page, unsigned int order); diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 75f02d8c6ed..50a4719512e 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -320,6 +320,9 @@ struct net_device #define NETIF_F_TSO_ECN (SKB_GSO_TCP_ECN << NETIF_F_GSO_SHIFT) #define NETIF_F_TSO6 (SKB_GSO_TCPV6 << NETIF_F_GSO_SHIFT) + /* List of features with software fallbacks. */ +#define NETIF_F_GSO_SOFTWARE (NETIF_F_TSO | NETIF_F_TSO_ECN | NETIF_F_TSO6) + #define NETIF_F_GEN_CSUM (NETIF_F_NO_CSUM | NETIF_F_HW_CSUM) #define NETIF_F_ALL_CSUM (NETIF_F_IP_CSUM | NETIF_F_GEN_CSUM) @@ -1012,6 +1015,30 @@ static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb) unlikely(skb->ip_summed != CHECKSUM_HW)); } +/* On bonding slaves other than the currently active slave, suppress + * duplicates except for 802.3ad ETH_P_SLOW and alb non-mcast/bcast. + */ +static inline int skb_bond_should_drop(struct sk_buff *skb) +{ + struct net_device *dev = skb->dev; + struct net_device *master = dev->master; + + if (master && + (dev->priv_flags & IFF_SLAVE_INACTIVE)) { + if (master->priv_flags & IFF_MASTER_ALB) { + if (skb->pkt_type != PACKET_BROADCAST && + skb->pkt_type != PACKET_MULTICAST) + return 0; + } + if (master->priv_flags & IFF_MASTER_8023AD && + skb->protocol == __constant_htons(ETH_P_SLOW)) + return 0; + + return 1; + } + return 0; +} + #endif /* __KERNEL__ */ #endif /* _LINUX_DEV_H */ |