d803387a7f
Make a small improvement to slow path TX performance by adding in a prefetch for the second mbuf cache line. Also move assignment of l2/l3 length values only when needed. What I've done with the prefetches is two-fold: 1) changed it from prefetching the mbuf (first cache line) to prefetching the mbuf pool pointer (second cache line) so that when we go to access the pool pointer to free transmitted mbufs we don't get a cache miss. When clearing the ring and freeing mbufs, the pool pointer is the only mbuf field used, so we don't need that first cache line. 2) changed the code to prefetch earlier - in effect to prefetch one mbuf ahead. The original code prefetched the mbuf to be freed as soon as it started processing the mbuf to replace it. Instead now, every time we calculate what the next mbuf position is going to be we prefetch the mbuf in that position (i.e. the mbuf pool pointer we are going to free the mbuf to), even while we are still updating the previous mbuf slot on the ring. This gives the prefetch much more time to resolve and get the data we need in the cache before we need it. In terms of performance difference, a quick sanity test using testpmd on a Xeon (Sandy Bridge uarch) platform showed performance increases between approx 8-18%, depending on the particular RX path used in conjuntion with this TX path code. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> |
||
---|---|---|
.. | ||
librte_acl | ||
librte_cfgfile | ||
librte_cmdline | ||
librte_distributor | ||
librte_eal | ||
librte_ether | ||
librte_hash | ||
librte_ip_frag | ||
librte_ivshmem | ||
librte_kni | ||
librte_kvargs | ||
librte_lpm | ||
librte_malloc | ||
librte_mbuf | ||
librte_mempool | ||
librte_meter | ||
librte_net | ||
librte_pipeline | ||
librte_pmd_bond | ||
librte_pmd_e1000 | ||
librte_pmd_i40e | ||
librte_pmd_ixgbe | ||
librte_pmd_pcap | ||
librte_pmd_ring | ||
librte_pmd_virtio | ||
librte_pmd_vmxnet3 | ||
librte_pmd_xenvirt | ||
librte_port | ||
librte_power | ||
librte_ring | ||
librte_sched | ||
librte_table | ||
librte_timer | ||
Makefile |