diff mbox

[2/2] macvlan: Send frames to AF_PACKET sockets attached to lowerdev

Message ID 1303392693-1350-3-git-send-email-david.ward@ll.mit.edu
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

David Ward April 21, 2011, 1:31 p.m. UTC
In bridge mode, unicast frames can be forwarded directly between macvlan
interfaces attached to the same lowerdev without calling dev_queue_xmit.
These frames should still be sent to any AF_PACKET sockets (network taps)
attached to the lowerdev.

Signed-off-by: David Ward <david.ward@ll.mit.edu>
---
 drivers/net/macvlan.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Comments

David Miller April 28, 2011, 6:09 a.m. UTC | #1
From: David Ward <david.ward@ll.mit.edu>
Date: Thu, 21 Apr 2011 09:31:33 -0400

>  		dest = macvlan_hash_lookup(port, eth->h_dest);
>  		if (dest && dest->mode == MACVLAN_MODE_BRIDGE) {
> +			dev_queue_xmit_nit(skb, vlan->lowerdev);
>  			unsigned int length = skb->len + ETH_HLEN;
>  			int ret = dest->forward(dest->dev, skb);
>  			macvlan_count_rx(dest, length,

Don't put actual code before variable declarations in a basic
block, modern variants of C accept this but this isn't C++.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index 3ad5425..2b1ee81 100644
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
@@ -237,6 +237,7 @@  static int macvlan_queue_xmit(struct sk_buff *skb, struct net_device *dev)
 
 		dest = macvlan_hash_lookup(port, eth->h_dest);
 		if (dest && dest->mode == MACVLAN_MODE_BRIDGE) {
+			dev_queue_xmit_nit(skb, vlan->lowerdev);
 			unsigned int length = skb->len + ETH_HLEN;
 			int ret = dest->forward(dest->dev, skb);
 			macvlan_count_rx(dest, length,