diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2006-08-18 14:02:52 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-08-18 14:02:52 -0400 |
commit | ef7d1b244fa6c94fb76d5f787b8629df64ea4046 (patch) | |
tree | eb6b35bb250f46d75853764bd9309c75e4f03c72 /include | |
parent | ed0da6fc9d3096f54c4a76737eeae57ac81418cf (diff) | |
parent | 78eb887733ec8ff5d6e6c69e3c32a187a9303622 (diff) |
Merge gregkh@master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/if_vlan.h | 5 | ||||
-rw-r--r-- | include/linux/netdevice.h | 27 |
2 files changed, 32 insertions, 0 deletions
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/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 | */ | ||
1021 | static 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 */ |