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: <20230906172847.2b3b749a@kernel.org>
Date:   Wed, 6 Sep 2023 17:28:47 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Hayes Wang <hayeswang@...ltek.com>
Cc:     <davem@...emloft.net>, <netdev@...r.kernel.org>,
        <nic_swsd@...ltek.com>, <linux-kernel@...r.kernel.org>,
        <linux-usb@...r.kernel.org>
Subject: Re: [PATCH net v2] r8152: avoid the driver drops a lot of packets

On Wed, 6 Sep 2023 11:11:48 +0800 Hayes Wang wrote:
> Stop submitting rx, if the driver queue more than 256 packets.
> 
> If the hardware is more fast than the software, the driver would start
> queuing the packets. And, the driver starts dropping the packets, if it
> queues more than 1000 packets.
> 
> Increase the weight of NAPI could improve the situation. However, the
> weight has been changed to 64, so we have to stop submitting rx when the
> driver queues too many packets. Then, the device may send the pause frame
> to slow down the receiving, when the FIFO of the device is full.

Good to see that you can repro the problem.

Before we tweak the heuristics let's make sure rx_bottom() behaves
correctly. Could you make sure that 
 - we don't perform _any_ rx processing when budget is 0
   (see the NAPI documentation under Documentation/networking)
 - finish the current aggregate even if budget run out, return
   work_done = budget in that case.
   With this change the rx_queue thing should be gone completely.
 - instead of copying the head use napi_get_frags() + napi_gro_frags() 
   it gives you an skb, you just attach the page to it as a frag and
   hand it back to GRO. This makes sure you never pull data into head
   rather than just headers.

Please share the performance results with those changes.
-- 
pw-bot: cr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ