aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge/br_device.c
diff options
context:
space:
mode:
authorJesse Gross <jesse@nicira.com>2010-10-20 09:56:08 -0400
committerDavid S. Miller <davem@davemloft.net>2010-10-21 04:26:54 -0400
commit361ff8a6cf90d62c0071b7e532e37369bfd3ae77 (patch)
treef9290f6ad21ebb74ca3632f5d37383a376226675 /net/bridge/br_device.c
parentd5dbda23804156ae6f35025ade5307a49d1db6d7 (diff)
bridge: Add support for TX vlan offload.
If some of the underlying devices support it, enable vlan offload on transmit for bridge devices. This allows senders to take advantage of the hardware support, similar to other forms of acceleration. Signed-off-by: Jesse Gross <jesse@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_device.c')
-rw-r--r--net/bridge/br_device.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c
index cf09fe591fc2..17cb0b633576 100644
--- a/net/bridge/br_device.c
+++ b/net/bridge/br_device.c
@@ -212,6 +212,11 @@ static int br_set_tx_csum(struct net_device *dev, u32 data)
212 return 0; 212 return 0;
213} 213}
214 214
215static int br_set_flags(struct net_device *netdev, u32 data)
216{
217 return ethtool_op_set_flags(netdev, data, ETH_FLAG_TXVLAN);
218}
219
215#ifdef CONFIG_NET_POLL_CONTROLLER 220#ifdef CONFIG_NET_POLL_CONTROLLER
216static void br_poll_controller(struct net_device *br_dev) 221static void br_poll_controller(struct net_device *br_dev)
217{ 222{
@@ -304,6 +309,7 @@ static const struct ethtool_ops br_ethtool_ops = {
304 .get_ufo = ethtool_op_get_ufo, 309 .get_ufo = ethtool_op_get_ufo,
305 .set_ufo = ethtool_op_set_ufo, 310 .set_ufo = ethtool_op_set_ufo,
306 .get_flags = ethtool_op_get_flags, 311 .get_flags = ethtool_op_get_flags,
312 .set_flags = br_set_flags,
307}; 313};
308 314
309static const struct net_device_ops br_netdev_ops = { 315static const struct net_device_ops br_netdev_ops = {
@@ -343,5 +349,5 @@ void br_dev_setup(struct net_device *dev)
343 349
344 dev->features = NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_HIGHDMA | 350 dev->features = NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_HIGHDMA |
345 NETIF_F_GSO_MASK | NETIF_F_NO_CSUM | NETIF_F_LLTX | 351 NETIF_F_GSO_MASK | NETIF_F_NO_CSUM | NETIF_F_LLTX |
346 NETIF_F_NETNS_LOCAL | NETIF_F_GSO; 352 NETIF_F_NETNS_LOCAL | NETIF_F_GSO | NETIF_F_HW_VLAN_TX;
347} 353}