From: Jason Wang <hidden> Date: 2013-09-04 04:45:30
Commit eda297729171fe16bf34fe5b0419dfb69060f623
(tun: Support software transmit time stamping) will queue skbs into error queue
when tx stamping is enabled. But it forgets to purge the error queue during
detach. This patch fixes this.
Cc: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Jason Wang <redacted>
---
drivers/net/tun.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
From: Jason Wang <hidden> Date: 2013-09-04 04:45:33
sock_tx_timestamp() will clear all zerocopy flags of skb which may lead the
frags never to be orphaned. This will break guest to guest traffic when zerocopy
is enabled. Fix this by orphaning the frags before trying to set tx time stamp.
The issue were introduced by commit eda297729171fe16bf34fe5b0419dfb69060f623
(tun: Support software transmit time stamping).
Cc: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Jason Wang <redacted>
---
drivers/net/tun.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
@@ -749,15 +749,16 @@ static netdev_tx_t tun_net_xmit(struct sk_buff *skb, struct net_device *dev)>=dev->tx_queue_len/tun->numqueues)gotodrop;+/* Orphan the skb - required as we might hang on to it+*forindefinitetime.*/+if(unlikely(skb_orphan_frags(skb,GFP_ATOMIC)))+gotodrop;+if(skb->sk){sock_tx_timestamp(skb->sk,&skb_shinfo(skb)->tx_flags);sw_tx_timestamp(skb);}-/* Orphan the skb - required as we might hang on to it-*forindefinitetime.*/-if(unlikely(skb_orphan_frags(skb,GFP_ATOMIC)))-gotodrop;skb_orphan(skb);nf_reset(skb);
From: Sergei Shtylyov <hidden> Date: 2013-09-04 13:27:04
Hello.
On 04-09-2013 8:33, Jason Wang wrote:
sock_tx_timestamp() will clear all zerocopy flags of skb which may lead the
frags never to be orphaned. This will break guest to guest traffic when zerocopy
is enabled. Fix this by orphaning the frags before trying to set tx time stamp.
The issue were introduced by commit eda297729171fe16bf34fe5b0419dfb69060f623
(tun: Support software transmit time stamping).
Cc: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Jason Wang <redacted>
---
drivers/net/tun.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
@@ -749,15 +749,16 @@ static netdev_tx_t tun_net_xmit(struct sk_buff *skb, struct net_device *dev)>=dev->tx_queue_len/tun->numqueues)gotodrop;+/* Orphan the skb - required as we might hang on to it+*forindefinitetime.*/
You could fix the comment style to the networking code default, while at: it:
/* bla
* bla
*/
+ if (unlikely(skb_orphan_frags(skb, GFP_ATOMIC)))
+ goto drop;
+
if (skb->sk) {
sock_tx_timestamp(skb->sk, &skb_shinfo(skb)->tx_flags);
sw_tx_timestamp(skb);
}
- /* Orphan the skb - required as we might hang on to it
- * for indefinite time. */
- if (unlikely(skb_orphan_frags(skb, GFP_ATOMIC)))
- goto drop;
From: Jason Wang <hidden> Date: 2013-09-05 09:59:21
On 09/04/2013 09:27 PM, Sergei Shtylyov wrote:
Hello.
On 04-09-2013 8:33, Jason Wang wrote:
quoted
sock_tx_timestamp() will clear all zerocopy flags of skb which may
lead the
frags never to be orphaned. This will break guest to guest traffic
when zerocopy
is enabled. Fix this by orphaning the frags before trying to set tx
time stamp.
quoted
The issue were introduced by commit
eda297729171fe16bf34fe5b0419dfb69060f623
(tun: Support software transmit time stamping).
quoted
Cc: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Jason Wang <redacted>
---
drivers/net/tun.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
*skb, struct net_device *dev)
>= dev->tx_queue_len / tun->numqueues)
goto drop;
+ /* Orphan the skb - required as we might hang on to it
+ * for indefinite time. */
You could fix the comment style to the networking code default,
while at: it:
/* bla
* bla
*/
quoted
+ if (unlikely(skb_orphan_frags(skb, GFP_ATOMIC)))
+ goto drop;
+
if (skb->sk) {
sock_tx_timestamp(skb->sk, &skb_shinfo(skb)->tx_flags);
sw_tx_timestamp(skb);
}
- /* Orphan the skb - required as we might hang on to it
- * for indefinite time. */
- if (unlikely(skb_orphan_frags(skb, GFP_ATOMIC)))
- goto drop;
From: Richard Cochran <richardcochran@gmail.com> Date: 2013-09-04 15:57:51
On Wed, Sep 04, 2013 at 12:33:46PM +0800, Jason Wang wrote:
sock_tx_timestamp() will clear all zerocopy flags of skb which may lead the
frags never to be orphaned. This will break guest to guest traffic when zerocopy
is enabled. Fix this by orphaning the frags before trying to set tx time stamp.
The issue were introduced by commit eda297729171fe16bf34fe5b0419dfb69060f623
(tun: Support software transmit time stamping).
Cc: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Jason Wang <redacted>
Acked-by: Richard Cochran <richardcochran@gmail.com>
From: Richard Cochran <richardcochran@gmail.com> Date: 2013-09-04 15:57:09
On Wed, Sep 04, 2013 at 12:33:45PM +0800, Jason Wang wrote:
Commit eda297729171fe16bf34fe5b0419dfb69060f623
(tun: Support software transmit time stamping) will queue skbs into error queue
when tx stamping is enabled. But it forgets to purge the error queue during
detach. This patch fixes this.
Cc: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Jason Wang <redacted>
Acked-by: Richard Cochran <richardcochran@gmail.com>