All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Vrabel <david.vrabel@citrix.com>
To: Lennart Schulte <lennart.schulte@aalto.fi>, xen-devel@lists.xen.org
Subject: Re: SG off on domU middle node drops packets
Date: Wed, 10 Jun 2015 17:08:26 +0100	[thread overview]
Message-ID: <557860FA.4030801@citrix.com> (raw)
In-Reply-To: <55642708.9040302@aalto.fi>

On 26/05/15 08:55, Lennart Schulte wrote:
> Hi,
> I use a Xen domU with vanilla Linux 3.19 kernel as a middle node. SG is
> switched off via ethtool. I get random packet drops for about 7% of
> small packets (pings, TCP ACKs/SYNs/little payload).
> From the code in Linux 4.0 it seems that the behavior should be the same.

Why would you turn this option off?

> I posted on Xen-users before with more information:
> http://lists.xen.org/archives/html/xen-users/2015-05/msg00170.html
> 
> I narrowed down the issue, and the below patch seems to work. Any
> comments are highly welcome.
> 
> Thanks,
> Lennart
> 
> 
> diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
> index d8c1076..f5e403b 100644
> --- a/drivers/net/xen-netfront.c
> +++ b/drivers/net/xen-netfront.c
> @@ -611,11 +611,19 @@ static int xennet_start_xmit(struct sk_buff *skb,
> struct net_device *dev)
>         spin_lock_irqsave(&queue->tx_lock, flags);
> 
>         if (unlikely(!netif_carrier_ok(dev) ||
> -                    (slots > 1 && !xennet_can_sg(dev)) ||
>                      netif_needs_gso(dev, skb, netif_skb_features(skb)))) {
> spin_unlock_irqrestore(&queue->tx_lock, flags);
>                 goto drop;
>         }
> +       if (unlikely(slots > 1 && !xennet_can_sg(dev))) {
> +               if (skb_linearize(skb)) {
> + spin_unlock_irqrestore(&queue->tx_lock, flags);
> +                       goto drop;
> +               }
> +               data = skb->data;
> +               offset = offset_in_page(data);
> +               len = skb_headlen(skb);
> +       }

Looks ok, can you send a proper patch to devel and xen-devel, please?

David

      reply	other threads:[~2015-06-10 16:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-26  7:55 SG off on domU middle node drops packets Lennart Schulte
2015-06-10 16:08 ` David Vrabel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=557860FA.4030801@citrix.com \
    --to=david.vrabel@citrix.com \
    --cc=lennart.schulte@aalto.fi \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.