lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3bbe3c3762c44ffa932101092117853c@AcuMS.aculab.com>
Date:   Wed, 25 May 2022 07:28:42 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     David Laight <David.Laight@...LAB.COM>,
        'Pavan Chebbi' <pavan.chebbi@...adcom.com>
CC:     Paolo Abeni <pabeni@...hat.com>,
        Michael Chan <michael.chan@...adcom.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "mchan@...adcom.com" <mchan@...adcom.com>,
        David Miller <davem@...emloft.net>
Subject: RE: tg3 dropping packets at high packet rates

From: David Laight
> Sent: 23 May 2022 22:23
...
> As the trace below shows I think the underlying problem
> is that the napi callbacks aren't being made in a timely manner.

Further investigations have shown that this is actually
a generic problem with the way napi callbacks are called
from the softint handler.

The underlying problem is the effect of this code
in __do_softirq().

        pending = local_softirq_pending();
        if (pending) {
                if (time_before(jiffies, end) && !need_resched() &&
                    --max_restart)
                        goto restart;

                wakeup_softirqd();
        }

The napi processing can loop through here and needs to do
the 'goto restart' - not doing so will drop packets.
The need_resched() test is particularly troublesome.
I've also had to increase the limit for 'max_restart' from
its (hard coded) 10 to 1000 (100 isn't enough).
I'm not sure whether I'm hitting the jiffies limit,
but that is hard coded at 2.

I'm going to start another thread.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ