All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH net] sunvnet: set queue mapping when doing packet copies
       [not found] <54C90AED.7040404@oracle.com>
@ 2015-01-28 16:48 ` Sowmini Varadhan
  2015-01-29 16:46 ` David L Stevens
  2015-01-30 17:29 ` David L Stevens
  2 siblings, 0 replies; 6+ messages in thread
From: Sowmini Varadhan @ 2015-01-28 16:48 UTC (permalink / raw)
  To: David L Stevens; +Cc: David Miller, netdev

On (01/28/15 11:14), David L Stevens wrote:
> 
>  This patch fixes a bug where vnet_skb_shape() didn't set the already-selected
>  queue mapping when a packet copy was required. This results in using the
>  wrong queue index for stops/starts, hung tx queues and watchdog timeouts
>  under heavy load.

Acked-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>

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

* [PATCH net] sunvnet: set queue mapping when doing packet copies
       [not found] <54C90AED.7040404@oracle.com>
  2015-01-28 16:48 ` [PATCH net] sunvnet: set queue mapping when doing packet copies Sowmini Varadhan
@ 2015-01-29 16:46 ` David L Stevens
  2015-01-29 18:12   ` Eric Dumazet
  2015-01-30 17:29 ` David L Stevens
  2 siblings, 1 reply; 6+ messages in thread
From: David L Stevens @ 2015-01-29 16:46 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, Sowmini Varadhan


[resending this since it never appeared on netdev yesterday]

This patch fixes a bug where vnet_skb_shape() didn't set the already-selected
 queue mapping when a packet copy was required. This results in using the
 wrong queue index for stops/starts, hung tx queues and watchdog timeouts
 under heavy load.

Signed-off-by: David L Stevens <david.stevens@oracle.com>
Acked-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
---
 drivers/net/ethernet/sun/sunvnet.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ethernet/sun/sunvnet.c b/drivers/net/ethernet/sun/sunvnet.c
index 2b719cc..2b10b85 100644
--- a/drivers/net/ethernet/sun/sunvnet.c
+++ b/drivers/net/ethernet/sun/sunvnet.c
@@ -1123,6 +1123,7 @@ static inline struct sk_buff *vnet_skb_shape(struct sk_buff *skb, int ncookies)
 			skb_shinfo(nskb)->gso_size = skb_shinfo(skb)->gso_size;
 			skb_shinfo(nskb)->gso_type = skb_shinfo(skb)->gso_type;
 		}
+		nskb->queue_mapping = skb->queue_mapping;
 		dev_kfree_skb(skb);
 		skb = nskb;
 	}

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

* Re: [PATCH net] sunvnet: set queue mapping when doing packet copies
  2015-01-29 16:46 ` David L Stevens
@ 2015-01-29 18:12   ` Eric Dumazet
  2015-01-29 18:19     ` Eric Dumazet
  0 siblings, 1 reply; 6+ messages in thread
From: Eric Dumazet @ 2015-01-29 18:12 UTC (permalink / raw)
  To: David L Stevens; +Cc: David Miller, netdev, Sowmini Varadhan

On Thu, 2015-01-29 at 11:46 -0500, David L Stevens wrote:
> [resending this since it never appeared on netdev yesterday]
> 
> This patch fixes a bug where vnet_skb_shape() didn't set the already-selected
>  queue mapping when a packet copy was required. This results in using the
>  wrong queue index for stops/starts, hung tx queues and watchdog timeouts
>  under heavy load.
> 
> Signed-off-by: David L Stevens <david.stevens@oracle.com>
> Acked-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
> ---
>  drivers/net/ethernet/sun/sunvnet.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/net/ethernet/sun/sunvnet.c b/drivers/net/ethernet/sun/sunvnet.c
> index 2b719cc..2b10b85 100644
> --- a/drivers/net/ethernet/sun/sunvnet.c
> +++ b/drivers/net/ethernet/sun/sunvnet.c
> @@ -1123,6 +1123,7 @@ static inline struct sk_buff *vnet_skb_shape(struct sk_buff *skb, int ncookies)
>  			skb_shinfo(nskb)->gso_size = skb_shinfo(skb)->gso_size;
>  			skb_shinfo(nskb)->gso_type = skb_shinfo(skb)->gso_type;
>  		}
> +		nskb->queue_mapping = skb->queue_mapping;
>  		dev_kfree_skb(skb);
>  		skb = nskb;
>  	}

Note that vnet_skb_shape() also drops the skb -> sk assocation.

-> That removes flow control, a single socket can fill TX ring buffer.
TCP Small queue is also disabled.

I would try add before the dev_kfree_skb(skb) :

swap(nskb->sk, skb->sk);
swap(nskb->truesize, skb->truesize);

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

* Re: [PATCH net] sunvnet: set queue mapping when doing packet copies
  2015-01-29 18:12   ` Eric Dumazet
@ 2015-01-29 18:19     ` Eric Dumazet
  0 siblings, 0 replies; 6+ messages in thread
From: Eric Dumazet @ 2015-01-29 18:19 UTC (permalink / raw)
  To: David L Stevens; +Cc: David Miller, netdev, Sowmini Varadhan

On Thu, 2015-01-29 at 10:12 -0800, Eric Dumazet wrote:

> swap(nskb->sk, skb->sk);
> swap(nskb->truesize, skb->truesize);

and swap(nskb->destructor, skb->destructor);

(check skb_segment() for a similar path)

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

* [PATCH net] sunvnet: set queue mapping when doing packet copies
       [not found] <54C90AED.7040404@oracle.com>
  2015-01-28 16:48 ` [PATCH net] sunvnet: set queue mapping when doing packet copies Sowmini Varadhan
  2015-01-29 16:46 ` David L Stevens
@ 2015-01-30 17:29 ` David L Stevens
  2015-02-03  2:21   ` David Miller
  2 siblings, 1 reply; 6+ messages in thread
From: David L Stevens @ 2015-01-30 17:29 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, Sowmini Varadhan, Eric Dumazet



This patch fixes a bug where vnet_skb_shape() didn't set the already-selected
queue mapping when a packet copy was required. This results in using the
wrong queue index for stops/starts, hung tx queues and watchdog timeouts
under heavy load.

Signed-off-by: David L Stevens <david.stevens@oracle.com>
Acked-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>

--
I'm resubmitting this in its original form. Since skb_segment() doesn't do
TCP flow control either, due to an incorrect destructor check, and those
issues raised by Eric are a matter of fairness, while this missing queue_mapping
assignment results in crashes, I'd like to get this piece fixed separately.

---
 drivers/net/ethernet/sun/sunvnet.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ethernet/sun/sunvnet.c b/drivers/net/ethernet/sun/sunvnet.c
index 2b719cc..2b10b85 100644
--- a/drivers/net/ethernet/sun/sunvnet.c
+++ b/drivers/net/ethernet/sun/sunvnet.c
@@ -1123,6 +1123,7 @@ static inline struct sk_buff *vnet_skb_shape(struct sk_buff *skb, int ncookies)
 			skb_shinfo(nskb)->gso_size = skb_shinfo(skb)->gso_size;
 			skb_shinfo(nskb)->gso_type = skb_shinfo(skb)->gso_type;
 		}
+		nskb->queue_mapping = skb->queue_mapping;
 		dev_kfree_skb(skb);
 		skb = nskb;
 	}
-- 
1.7.1

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

* Re: [PATCH net] sunvnet: set queue mapping when doing packet copies
  2015-01-30 17:29 ` David L Stevens
@ 2015-02-03  2:21   ` David Miller
  0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2015-02-03  2:21 UTC (permalink / raw)
  To: david.stevens; +Cc: netdev, sowmini.varadhan, eric.dumazet

From: David L Stevens <david.stevens@oracle.com>
Date: Fri, 30 Jan 2015 12:29:45 -0500

> 
> 
> This patch fixes a bug where vnet_skb_shape() didn't set the already-selected
> queue mapping when a packet copy was required. This results in using the
> wrong queue index for stops/starts, hung tx queues and watchdog timeouts
> under heavy load.
> 
> Signed-off-by: David L Stevens <david.stevens@oracle.com>
> Acked-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
> 
> --
> I'm resubmitting this in its original form. Since skb_segment() doesn't do
> TCP flow control either, due to an incorrect destructor check, and those
> issues raised by Eric are a matter of fairness, while this missing queue_mapping
> assignment results in crashes, I'd like to get this piece fixed separately.

Fair enough, applied.

Please sort out the callback issues with Eric, thanks.

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

end of thread, other threads:[~2015-02-03  2:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <54C90AED.7040404@oracle.com>
2015-01-28 16:48 ` [PATCH net] sunvnet: set queue mapping when doing packet copies Sowmini Varadhan
2015-01-29 16:46 ` David L Stevens
2015-01-29 18:12   ` Eric Dumazet
2015-01-29 18:19     ` Eric Dumazet
2015-01-30 17:29 ` David L Stevens
2015-02-03  2:21   ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.