netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Michael Ellerman <mpe@ellerman.id.au>,
	Hannes Frederic Sowa <hannes@stressinduktion.org>
Cc: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	netdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: DNS (?) not working on G5 (64-bit powerpc) (was [net-next,v3,3/3] udp: try to avoid 2 cache miss on dequeue)
Date: Fri, 23 Jun 2017 13:59:41 +0200	[thread overview]
Message-ID: <1498219181.2611.6.camel@redhat.com> (raw)
In-Reply-To: <87r2ybp4ud.fsf@concordia.ellerman.id.au>

On Fri, 2017-06-23 at 16:59 +1000, Michael Ellerman wrote:
> Hannes Frederic Sowa <hannes@stressinduktion.org> writes:
> 
> > On Thu, Jun 22, 2017, at 22:57, Paolo Abeni wrote:
> > > 
> > > Can you please check if the following patch fixes the issue? Only
> > > compiled tested here.
> > > 
> > > Thanks!!!
> > > ---
> > > diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
> > > index 067a607..80d89fe 100644
> > > --- a/net/ipv4/udp.c
> > > +++ b/net/ipv4/udp.c
> > > @@ -1446,16 +1446,19 @@ static struct sk_buff
> > > *__first_packet_length(struct sock *sk,
> > >  {
> > >  	struct sk_buff *skb;
> > >  
> > > -       while ((skb = skb_peek(rcvq)) != NULL &&
> > > -              udp_lib_checksum_complete(skb)) {
> > > -               __UDP_INC_STATS(sock_net(sk), UDP_MIB_CSUMERRORS,
> > > -                               IS_UDPLITE(sk));
> > > -               __UDP_INC_STATS(sock_net(sk), UDP_MIB_INERRORS,
> > > -                               IS_UDPLITE(sk));
> > > -               atomic_inc(&sk->sk_drops);
> > > -               __skb_unlink(skb, rcvq);
> > > -               *total += skb->truesize;
> > > -               kfree_skb(skb);
> > > +       while ((skb = skb_peek(rcvq)) != NULL) {
> > > +               if (udp_lib_checksum_complete(skb)) {
> > > +                       __UDP_INC_STATS(sock_net(sk), UDP_MIB_CSUMERRORS,
> > > +                                       IS_UDPLITE(sk));
> > > +                       __UDP_INC_STATS(sock_net(sk), UDP_MIB_INERRORS,
> > > +                                       IS_UDPLITE(sk));
> > > +                       atomic_inc(&sk->sk_drops);
> > > +                       __skb_unlink(skb, rcvq);
> > > +                       *total += skb->truesize;
> > > +                       kfree_skb(skb);
> > > +               } else {
> > > +                       udp_set_dev_scratch(skb);
> > 
> > It needs a "break;" here.
> > 
> > > +               }
> > >  	}
> > >  	return skb;
> > >  }
> 
> That works!
> 
> $ wget google.com
> --2017-06-23 16:56:31--  http://google.com/
> Resolving proxy.pmdw.com (proxy.pmdw.com)... 10.1.2.3
> Connecting to proxy.pmdw.com (proxy.pmdw.com)|10.1.2.3|:3128... connected.
> Proxy request sent, awaiting response... 302 Found
> Location: http://www.google.com.au/?gfe_rd=cr&ei=n7tMWeb9JYPr8wfg4LXYAQ [following]
> --2017-06-23 16:56:31--  http://www.google.com.au/?gfe_rd=cr&ei=n7tMWeb9JYPr8wfg4LXYAQ
> Reusing existing connection to proxy.pmdw.com:3128.
> Proxy request sent, awaiting response... 200 OK
> Length: unspecified [text/html]
> Saving to: ‘index.html’
> 
> 
> The patch had whitespace issues or something and I had to apply it by
> hand, here's what I actually tested.

Thank you!

I'll submit formally the patch after some more testing.

I noticed this version has entered the ppc patchwork, but I think that
the formal submission should go towards the net-next tree.

Cheers,

Paolo

  reply	other threads:[~2017-06-23 11:59 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-12  9:23 [PATCH net-next v3 0/3] udp: reduce cache pressure Paolo Abeni
2017-06-12  9:23 ` [PATCH net-next v3 1/3] net: factor out a helper to decrement the skb refcount Paolo Abeni
2017-06-12  9:23 ` [PATCH net-next v3 2/3] udp: avoid a cache miss on dequeue Paolo Abeni
2017-07-17  7:04   ` Eric Dumazet
2017-07-17 20:59     ` [PATCH net] udp: preserve skb->dst if required for IP options processing Paolo Abeni
2017-07-17 21:26       ` Eric Dumazet
2017-07-18  7:50         ` Paolo Abeni
2017-07-17 21:30       ` Eric Dumazet
2017-07-17 21:35         ` Eric Dumazet
2017-06-12  9:23 ` [PATCH net-next v3 3/3] udp: try to avoid 2 cache miss on dequeue Paolo Abeni
2017-06-22 13:06   ` DNS (?) not working on G5 (64-bit powerpc) (was [net-next, v3, 3/3] udp: try to avoid 2 cache miss on dequeue) Michael Ellerman
2017-06-22 16:43     ` DNS (?) not working on G5 (64-bit powerpc) (was [net-next,v3,3/3] " Paolo Abeni
2017-06-22 20:27       ` Paolo Abeni
2017-06-22 20:28       ` Paolo Abeni
2017-06-22 20:57     ` Paolo Abeni
2017-06-22 21:18       ` Hannes Frederic Sowa
2017-06-23  6:59         ` Michael Ellerman
2017-06-23 11:59           ` Paolo Abeni [this message]
2017-06-26  3:15             ` Michael Ellerman
2017-06-12 14:01 ` [PATCH net-next v3 0/3] udp: reduce cache pressure David Miller

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=1498219181.2611.6.camel@redhat.com \
    --to=pabeni@redhat.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hannes@stressinduktion.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=netdev@vger.kernel.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 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).