Re: [PATCH net] bnxt: don't handle XDP in netpoll
From: Michael Chan <michael.chan@broadcom.com>
Date: 2023-07-27 19:30:06
Attachments
- smime.p7s [application/pkcs7-signature] 4209 bytes
From: Michael Chan <michael.chan@broadcom.com>
Date: 2023-07-27 19:30:06
On Thu, Jul 27, 2023 at 12:05 PM Jakub Kicinski [off-list ref] wrote:
On Thu, 27 Jul 2023 11:52:10 -0700 Michael Chan wrote:quoted
These TX packet completions have already been counted in __bnxt_poll_work(). If we do nothing here, I think the TX ring will forever be out-of-sync with the completion ring.I see... Do you prefer adding a return value to tx_int() to tell __bnxt_poll_work_done() whether the work has been done; or to clear tx_pkts in the handler itself rather than the caller?
It's a bigger problem. When we transmit packets, we store these packet buffers and advance the producer index. The completion ring tells us how many TX packets have completed. We then walk the TX ring for the number of TX packets completed and free the buffers. If we cannot free the buffers now, we have to save this information (the consumer index). We won't get this information again in the completion ring.