* vlan/macvlan 02/02: propagate transmission state to upper layers
@ 2009-11-10 16:14 Patrick McHardy
2009-11-10 16:48 ` Stephen Hemminger
0 siblings, 1 reply; 3+ messages in thread
From: Patrick McHardy @ 2009-11-10 16:14 UTC (permalink / raw)
To: David S. Miller; +Cc: Linux Netdev List
[-- Attachment #1: Type: text/plain, Size: 0 bytes --]
[-- Attachment #2: 02.diff --]
[-- Type: text/x-patch, Size: 1514 bytes --]
commit 21fb413b55abb4665e057b884c289bb780f41b3c
Author: Patrick McHardy <kaber@trash.net>
Date: Tue Nov 10 16:55:50 2009 +0100
vlan/macvlan: propagate transmission state to upper layers
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>
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index d7dba3f..271aa7e 100644
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
@@ -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,
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 790fd55..9159659 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -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)
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: vlan/macvlan 02/02: propagate transmission state to upper layers
2009-11-10 16:14 vlan/macvlan 02/02: propagate transmission state to upper layers Patrick McHardy
@ 2009-11-10 16:48 ` Stephen Hemminger
2009-11-10 16:56 ` Patrick McHardy
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2009-11-10 16:48 UTC (permalink / raw)
To: Patrick McHardy; +Cc: David S. Miller, Linux Netdev List
On Tue, 10 Nov 2009 17:14:24 +0100
Patrick McHardy <kaber@trash.net> wrote:
> vlan/macvlan: propagate transmission state to upper layers
>
> 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>
Bridging and bonding have same issue, but the solution is more difficult.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: vlan/macvlan 02/02: propagate transmission state to upper layers
2009-11-10 16:48 ` Stephen Hemminger
@ 2009-11-10 16:56 ` Patrick McHardy
0 siblings, 0 replies; 3+ messages in thread
From: Patrick McHardy @ 2009-11-10 16:56 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: David S. Miller, Linux Netdev List
Stephen Hemminger wrote:
> On Tue, 10 Nov 2009 17:14:24 +0100
> Patrick McHardy <kaber@trash.net> wrote:
>
>> vlan/macvlan: propagate transmission state to upper layers
>>
>> 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>
>
>
> Bridging and bonding have same issue, but the solution is more difficult.
Yes, in both cases the packet might be sent out on multiple
interfaces, so its not really clear which state we should
propagate. I guess it would make sense to indicate an error
if transmission on *all* interfaces fail, but I'm not sure
about the other cases.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-11-10 16:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-10 16:14 vlan/macvlan 02/02: propagate transmission state to upper layers Patrick McHardy
2009-11-10 16:48 ` Stephen Hemminger
2009-11-10 16:56 ` Patrick McHardy
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).