numam-dpdk/lib
Bruce Richardson d803387a7f ixgbe: add prefetch to improve slow-path tx perf
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>
2014-10-08 14:24:59 +02:00
..
librte_acl acl: fix build and runtime for default target 2014-09-03 03:26:50 +02:00
librte_cfgfile eal: deprecate rte_snprintf 2014-06-27 02:31:24 +02:00
librte_cmdline fix unix permissions for source files 2014-08-28 17:04:01 +02:00
librte_distributor mbuf: remove the rte_pktmbuf structure 2014-09-17 11:27:51 +02:00
librte_eal mbuf: add userdata pointer field 2014-10-08 14:24:59 +02:00
librte_ether ixgbe: support X550 2014-10-07 17:01:08 +02:00
librte_hash hash: make tailq fully local 2014-07-22 19:42:23 +02:00
librte_ip_frag mbuf: replace data pointer by an offset 2014-09-17 18:53:40 +02:00
librte_ivshmem eal: deprecate rte_snprintf 2014-06-27 02:31:24 +02:00
librte_kni eal: deprecate rte_snprintf 2014-06-27 02:31:24 +02:00
librte_kvargs kvargs: fix build with gcc 4.5.1 2014-06-17 19:01:59 +02:00
librte_lpm lpm: make tailq fully local 2014-07-22 19:42:23 +02:00
librte_malloc eal: deprecate rte_snprintf 2014-06-27 02:31:24 +02:00
librte_mbuf mbuf: switch vlan_tci and reserved2 fields 2014-10-08 14:24:59 +02:00
librte_mempool mempool: make tailq fully local 2014-07-22 19:42:23 +02:00
librte_meter remove trailing whitespaces 2014-06-11 00:29:34 +02:00
librte_net remove trailing whitespaces 2014-06-11 00:29:34 +02:00
librte_pipeline eal: deprecate rte_snprintf 2014-06-27 02:31:24 +02:00
librte_pmd_bond bond: move param parsing in configure step 2014-09-29 11:56:19 +02:00
librte_pmd_e1000 igb: fix i211 support 2014-09-24 19:33:36 +02:00
librte_pmd_i40e i40e/base: fix arq_event_info struct 2014-10-07 18:02:11 +02:00
librte_pmd_ixgbe ixgbe: add prefetch to improve slow-path tx perf 2014-10-08 14:24:59 +02:00
librte_pmd_pcap pcap: set port id in received mbuf 2014-09-29 16:34:50 +02:00
librte_pmd_ring ring: remove extra devices creation with --vdev option 2014-07-22 16:43:04 +02:00
librte_pmd_virtio virtio: fix crash if VIRTIO_NET_F_CTRL_VQ is not negotiated 2014-10-01 11:47:56 +02:00
librte_pmd_vmxnet3 mbuf: replace data pointer by an offset 2014-09-17 18:53:40 +02:00
librte_pmd_xenvirt mbuf: replace data pointer by an offset 2014-09-17 18:53:40 +02:00
librte_port doc: apply one comment to all members of a group 2014-09-29 16:34:58 +02:00
librte_power eal: deprecate rte_snprintf 2014-06-27 02:31:24 +02:00
librte_ring ring: make tailq fully local 2014-07-22 19:42:18 +02:00
librte_sched mbuf: remove the rte_pktmbuf structure 2014-09-17 11:27:51 +02:00
librte_table eal: deprecate rte_snprintf 2014-06-27 02:31:24 +02:00
librte_timer fix unix permissions for source files 2014-08-28 17:04:01 +02:00
Makefile bond: new link bonding library 2014-07-01 16:25:12 +02:00