diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2017-10-16 22:44:44 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-19 12:43:59 +0100 |
commit | 56fd2b2ca467f22f940282bf2c1ca4e1cb8f4c67 (patch) | |
tree | 76de77ecf6c44a9cd7062b19a19d6fec5329bc04 /drivers/net/macvlan.c | |
parent | 8f2e9ca837ecee50aa85e853299bf7e66431e071 (diff) |
macvlan/macvtap: Add support for L2 forwarding offloads with macvtap
This patch reverts earlier commit b13ba1b83f52 ("macvlan: forbid L2
fowarding offload for macvtap"). The reason for reverting this is because
the original patch no longer fixes what it previously did as the
underlying structure has changed for macvtap. Specifically macvtap
originally pulled packets directly off of the lowerdev. However in commit
6acf54f1cf0a ("macvtap: Add support of packet capture on macvtap device.")
that code was changed and instead macvtap would listen directly on the
macvtap device itself instead of the lower device. As such, the L2
forwarding offload should now be able to provide a performance advantage of
skipping the checks on the lower dev while not introducing any sort of
regression.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/macvlan.c')
-rw-r--r-- | drivers/net/macvlan.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c index 1e1df54c5d31..a178c5efd33e 100644 --- a/drivers/net/macvlan.c +++ b/drivers/net/macvlan.c @@ -598,8 +598,6 @@ static const struct header_ops macvlan_hard_header_ops = { .cache_update = eth_header_cache_update, }; -static struct rtnl_link_ops macvlan_link_ops; - static int macvlan_open(struct net_device *dev) { struct macvlan_dev *vlan = netdev_priv(dev); @@ -615,8 +613,7 @@ static int macvlan_open(struct net_device *dev) goto hash_add; } - if (lowerdev->features & NETIF_F_HW_L2FW_DOFFLOAD && - dev->rtnl_link_ops == &macvlan_link_ops) { + if (lowerdev->features & NETIF_F_HW_L2FW_DOFFLOAD) { vlan->fwd_priv = lowerdev->netdev_ops->ndo_dfwd_add_station(lowerdev, dev); |