소스 검색

bridge: Set vlan_features to allow offloads on vlans.

When vlan device is configured on top of the brige, it does
not support any offload capabilities because the bridge
device does not initiliaze vlan_fatures.  Set vlan_fatures to
be equivalent to hw_fatures.

Signed-off-by: Vlad Yasevich <vyasevic@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Vlad Yasevich 12 년 전
부모
커밋
161f65ba35
1개의 변경된 파일7개의 추가작업 그리고 6개의 파일을 삭제
  1. 7 6
      net/bridge/br_device.c

+ 7 - 6
net/bridge/br_device.c

@@ -22,6 +22,9 @@
 #include <asm/uaccess.h>
 #include <asm/uaccess.h>
 #include "br_private.h"
 #include "br_private.h"
 
 
+#define COMMON_FEATURES (NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_HIGHDMA | \
+			 NETIF_F_GSO_MASK | NETIF_F_HW_CSUM)
+
 /* net device transmit always called with BH disabled */
 /* net device transmit always called with BH disabled */
 netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev)
 netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev)
 {
 {
@@ -346,12 +349,10 @@ void br_dev_setup(struct net_device *dev)
 	dev->tx_queue_len = 0;
 	dev->tx_queue_len = 0;
 	dev->priv_flags = IFF_EBRIDGE;
 	dev->priv_flags = IFF_EBRIDGE;
 
 
-	dev->features = NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_HIGHDMA |
-			NETIF_F_GSO_MASK | NETIF_F_HW_CSUM | NETIF_F_LLTX |
-			NETIF_F_NETNS_LOCAL | NETIF_F_HW_VLAN_CTAG_TX;
-	dev->hw_features = NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_HIGHDMA |
-			   NETIF_F_GSO_MASK | NETIF_F_HW_CSUM |
-			   NETIF_F_HW_VLAN_CTAG_TX;
+	dev->features = COMMON_FEATURES | NETIF_F_LLTX | NETIF_F_NETNS_LOCAL |
+			NETIF_F_HW_VLAN_CTAG_TX;
+	dev->hw_features = COMMON_FEATURES | NETIF_F_HW_VLAN_CTAG_TX;
+	dev->vlan_features = COMMON_FEATURES;
 
 
 	br->dev = dev;
 	br->dev = dev;
 	spin_lock_init(&br->lock);
 	spin_lock_init(&br->lock);