[PATCH v4 0/2] add a fast path for memif Rx/Tx
Ferruh Yigit
ferruh.yigit at amd.com
Fri Dec 9 14:59:37 CET 2022
On 9/22/2022 10:12 AM, Ferruh Yigit wrote:
> On 9/15/2022 7:58 AM, Joyce Kong wrote:
>> For memif non-zero-copy mode, there is a branch to compare
>> the mbuf and memif buffer size during memory copy. Add a
>> fast memcpy path by removing this branch with mbuf and memif
>> buffer size defined at compile time. For Rx fast path, bulk
>> allocating mbufs to get additional speedup. For Tx fast path,
>> bulk free mbufs which come from the same mempool.
>>
>> When mbuf == memif buffer size, both Rx/Tx would choose the
>> fast memcpy path. When mbuf < memif buffer size, the Rx
>> chooses previous memcpy path while Tx chooses fast memcpy
>> path. When mbuf > memif buffer size, the Rx chooses fast
>> memcpy path while Tx chooses previous memcpy path.
>>
>> Test with 1p1q on N1SDP AArch64 server,
>> ---------------------------------------------------------
>> buf size | memif = mbuf | memif < mbuf | memif > mbuf
>> ---------------------------------------------------------
>> non-zc gain | 47.16% | 24.67% | 12.47%
>> ---------------------------------------------------------
>> zc gain | 20.96% | 9.16% | 10.66%
>> ---------------------------------------------------------
>>
>> Test with 1p1q on Cascade Lake Xeon X86 server,
>> ---------------------------------------------------------
>> buf size | memif = mbuf | memif < mbuf | memif > mbuf
>> ---------------------------------------------------------
>> non-zc gain | 23.52% | 14.20% | 5.10%
>> ---------------------------------------------------------
>> zc gain | 17.49% | 10.62% | 12.42%
>> ---------------------------------------------------------
>>
>> v4:
>> 1.Fix incorrect indentation.
>> 2.Fix the mbuf array length to avoid additional overhead if
>> stack-protector strong is enabled. <Stephen Hemminger>
>>
>> v3:
>> Add bulk allocation to get additional speedup for memif Rx
>> fast path. <Stephen Hemminger>
>>
>> v2:
>> Rebase v1 and update commit message.
>>
>> Joyce Kong (2):
>> net/memif: add a Rx fast path
>> net/memif: add a Tx fast path
>>
>
> Hi Jakub,
>
> Reminder of this set waiting for your review.
>
No objection received on the patch, and I can reproduce the performance
improvement.
Taking into account that we are at the beginning of the release cycle
and will have time to address any possible issue later, I will proceed
with the set.
Series applied to dpdk-next-net/main, thanks.
More information about the dev
mailing list