DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] Saving packet timestamp when reading from pcap
@ 2015-04-20 16:06 Dor Green
  2015-04-21 10:50 ` Nicolas Pernas Maradei
  0 siblings, 1 reply; 3+ messages in thread
From: Dor Green @ 2015-04-20 16:06 UTC (permalink / raw)
  To: dev

To test my program and for some other uses I sometimes use vdev
(libpcap pmd) to read data from a pcap file.

Those tests would be a lot easier if the packet timestamp (which is in
the cap) was supplied by DPDK, but alas it is not.

So I could access it, I placed it in mbuf's userdata for the timebeing.
In rte_eth_pcap.c I added this after line 171:
 mbuf->userdata = (void*) header.ts.tv_sec;
Obviously this isn't the prettiest and it lacks the microseconds the
struct supplies.

Does anyone have any better ideas on how to do it, or is this a
feature planned for any future version (seems easy enough to add some
more fields to the mbuf struct to accommodate this, and maybe in the
future hardware timestamps, etc.?)

Thanks, Dor.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-04-21 12:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-20 16:06 [dpdk-dev] Saving packet timestamp when reading from pcap Dor Green
2015-04-21 10:50 ` Nicolas Pernas Maradei
2015-04-21 12:02   ` Dor Green

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).