Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
For memif non-zero-copy mode, there is a branch to compare the mbuf and memif buffer size during memory copying. If all mbufs come from the same mempool, and memif buf size >= mbuf size, add a fast Tx memory copy path without the comparing branch and with mbuf bulk free, otherwise still run the original Tx path. The removal of the branch and bulk free lead to considerable performance uplift. Test with 1p1q on Ampere Altra AArch64 server, -------------------------------------------- buf size | memif >= mbuf | memif < mbuf | -------------------------------------------- non-zc gain | 10.82% | 0.04% | -------------------------------------------- zc gain | 8.86% | 3.18% | -------------------------------------------- Test with 1p1q on Cascade Lake Xeon X86server, -------------------------------------------- buf size | memif >= mbuf | memif < mbuf | -------------------------------------------- non-zc gain | 7.32% | -0.85% | -------------------------------------------- zc gain | 12.75% | -0.16% | -------------------------------------------- Signed-off-by: Joyce Kong <[email protected]> Reviewed-by: Ruifeng Wang <[email protected]> Acked-by: Morten Brørup <[email protected]>
- Loading branch information