From: Hayes Wang <hayeswang@realtek.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
nic_swsd <nic_swsd@realtek.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Subject: RE: [PATCH net v2] r8152: avoid the driver drops a lot of packets
Date: Thu, 7 Sep 2023 07:16:50 +0000 [thread overview]
Message-ID: <7f8b32a91f5849c99609f78520b23535@realtek.com> (raw)
In-Reply-To: <20230906172847.2b3b749a@kernel.org>
Jakub Kicinski <kuba@kernel.org>
> Sent: Thursday, September 7, 2023 8:29 AM
[...]
> Good to see that you can repro the problem.
I don't reproduce the problem. I just find some information about it.
> 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)
The work_done would be 0, and napi_complete_done() wouldn't be called.
However, skb_queue_len(&tp->rx_queue) may be increased. I think it is
not acceptable, right?
> - 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.
Excuse me. I don't understand this part. I know that when the packets are
more than budget, the maximum packets which could be handled is budget.
That is, return work_done = budget. However, the extra packets would be queued
to rx_queue. I don't understand what you mean about " the rx_queue thing
should be gone completely". I think the current driver would return
work_done = budget, and queue the other packets. I don't sure what you
want me to change.
> - 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.
I would study about them. Thanks.
Should I include above changes for this patch?
I think I have to submit another patches for above.
> Please share the performance results with those changes.
I couldn't reproduce the problem, so I couldn't provide the result
with the differences.
Best Regards,
Hayes
next prev parent reply other threads:[~2023-09-07 18:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-06 3:11 [PATCH net v2] r8152: avoid the driver drops a lot of packets Hayes Wang
2023-09-07 0:28 ` Jakub Kicinski
2023-09-07 7:16 ` Hayes Wang [this message]
2023-09-07 16:38 ` Jakub Kicinski
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=7f8b32a91f5849c99609f78520b23535@realtek.com \
--to=hayeswang@realtek.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nic_swsd@realtek.com \
/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).