DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] l3fwd LPM lookup - issue when measuring latency
@ 2014-03-23 16:29 Jun Han
  0 siblings, 0 replies; only message in thread
From: Jun Han @ 2014-03-23 16:29 UTC (permalink / raw)
  To: dev

Hi all,

I've been trying to measure possible performance penalties of performing
LPM table lookup on l3fwd code (as opposed to a simple forwarding without
lookup, i.e., forwarding back to the ingress port).

I perform two sets of experiments -- (1) generate a fixed dst IP address
from DPDK pktgen; (2) generate random dst IP address from DPDK pktgen. My
hypothesis is that for case (1), upon receiving many packets with same dst
IP, DPDK l3fwd should only need to fetch LPM table from the cache. However,
case (2) would generate more cache misses, hence requiring fetches from
memory, which should increase the latency. (My current machine has 20MB of
L3 cache.)

However, when I measure the average cycles it takes to perform a lookup
indexed by the received dst IP address, the two cases yield almost similar
results of around 34 cycles. I am using rdtsc to measure the cycles in the
rte_lpm_lookup() function in rte_lpm.h (under lib/librte_lpm). I am not
sure if this is due to rte_rdtsc problem, or if I am misunderstanding
something.

tsc1 = rte_rdtsc();
tbl_entry = *(const uint16_t *)&lpm->tbl24[tbl24_index];
tscdif = rte_rdtsc() - tsc1;
aggreg_dif += tscdif;

I would appreciate it if someone could provide their opinion on this
phenomenon.

Thanks in advance!
Jun

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-03-23 16:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-23 16:29 [dpdk-dev] l3fwd LPM lookup - issue when measuring latency Jun Han

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).