[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fa2a8f21-d933-369f-4520-79a840616546@engleder-embedded.com>
Date: Wed, 5 Apr 2023 21:15:53 +0200
From: Gerhard Engleder <gerhard@...leder-embedded.com>
To: Maciej Fijalkowski <maciej.fijalkowski@...el.com>
Cc: netdev@...r.kernel.org, bpf@...r.kernel.org, davem@...emloft.net,
kuba@...nel.org, edumazet@...gle.com, pabeni@...hat.com,
bjorn@...nel.org, magnus.karlsson@...el.com,
jonathan.lemon@...il.com
Subject: Re: [PATCH net-next 5/5] tsnep: Add XDP socket zero-copy TX support
On 04.04.23 00:36, Maciej Fijalkowski wrote:
> On Sun, Apr 02, 2023 at 09:38:38PM +0200, Gerhard Engleder wrote:
>> Send and complete XSK pool frames within TX NAPI context. NAPI context
>> is triggered by ndo_xsk_wakeup.
>>
>> Signed-off-by: Gerhard Engleder <gerhard@...leder-embedded.com>
>> ---
>> drivers/net/ethernet/engleder/tsnep.h | 2 +
>> drivers/net/ethernet/engleder/tsnep_main.c | 131 +++++++++++++++++++--
>> 2 files changed, 123 insertions(+), 10 deletions(-)
>>
>
> (...)
>
>> +static void tsnep_xdp_xmit_zc(struct tsnep_tx *tx)
>> +{
>> + int desc_available = tsnep_tx_desc_available(tx);
>> + struct xdp_desc xdp_desc;
>> + bool xmit = false;
>> +
>> + /* ensure that TX ring is not filled up by XDP, always MAX_SKB_FRAGS
>> + * will be available for normal TX path and queue is stopped there if
>> + * necessary
>> + */
>> + if (desc_available <= (MAX_SKB_FRAGS + 1))
>> + return;
>> + desc_available -= MAX_SKB_FRAGS + 1;
>> +
>> + while (xsk_tx_peek_desc(tx->xsk_pool, &xdp_desc) && desc_available--) {
>
> Again, I am curious how batch API usage would improve your perf.
I will try xsk_tx_peek_release_desc_batch().
Thank you for the review!
Gerhard
Powered by blists - more mailing lists