netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-next PATCH] macvlan/macvtap: Add support for L2 forwarding offloads with macvtap
@ 2017-10-17  2:44 Alexander Duyck
  2017-10-19 11:44 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Duyck @ 2017-10-17  2:44 UTC (permalink / raw)
  To: netdev, davem

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>
---
 drivers/net/macvlan.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index 858bd66..cfeb0ee 100644
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
@@ -596,8 +596,6 @@ static int macvlan_hard_header(struct sk_buff *skb, struct net_device *dev,
 	.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);
@@ -613,8 +611,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);
 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [net-next PATCH] macvlan/macvtap: Add support for L2 forwarding offloads with macvtap
  2017-10-17  2:44 [net-next PATCH] macvlan/macvtap: Add support for L2 forwarding offloads with macvtap Alexander Duyck
@ 2017-10-19 11:44 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-10-19 11:44 UTC (permalink / raw)
  To: alexander.h.duyck; +Cc: netdev

From: Alexander Duyck <alexander.h.duyck@intel.com>
Date: Mon, 16 Oct 2017 22:44:44 -0400

> 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>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-10-19 11:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-17  2:44 [net-next PATCH] macvlan/macvtap: Add support for L2 forwarding offloads with macvtap Alexander Duyck
2017-10-19 11:44 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).