]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
vlan/macvlan: propagate transmission state to upper layers
authorPatrick McHardy <kaber@trash.net>
Tue, 10 Nov 2009 06:14:24 +0000 (06:14 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 13 Nov 2009 22:07:33 +0000 (14:07 -0800)
Both vlan and macvlan devices usually don't use a qdisc and immediately
queue packets to the underlying device. Propagate transmission state of
the underlying device to the upper layers so they can react on congestion
and/or inform the sending process.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/macvlan.c
net/8021q/vlan_dev.c

index d7dba3f6f7637f510b8c6ba371def08697af19aa..271aa7e1d033b18d9d7b528a802d9e635972a7e2 100644 (file)
@@ -202,7 +202,7 @@ static netdev_tx_t macvlan_start_xmit(struct sk_buff *skb,
        } else
                txq->tx_dropped++;
 
-       return NETDEV_TX_OK;
+       return ret;
 }
 
 static int macvlan_hard_header(struct sk_buff *skb, struct net_device *dev,
index 790fd55ec3189c069aac53b9bd23dbd9b0ce326d..9159659421395fc22a675f837238763f81083e93 100644 (file)
@@ -332,7 +332,7 @@ static netdev_tx_t vlan_dev_hard_start_xmit(struct sk_buff *skb,
        } else
                txq->tx_dropped++;
 
-       return NETDEV_TX_OK;
+       return ret;
 }
 
 static netdev_tx_t vlan_dev_hwaccel_hard_start_xmit(struct sk_buff *skb,
@@ -358,7 +358,7 @@ static netdev_tx_t vlan_dev_hwaccel_hard_start_xmit(struct sk_buff *skb,
        } else
                txq->tx_dropped++;
 
-       return NETDEV_TX_OK;
+       return ret;
 }
 
 static int vlan_dev_change_mtu(struct net_device *dev, int new_mtu)