From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 01850B62 for ; Mon, 14 Dec 2015 20:17:14 +0100 (CET) Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 30670C0B9308; Mon, 14 Dec 2015 19:17:13 +0000 (UTC) Received: from aconole.bos.csb (dhcp-25-142.bos.redhat.com [10.18.25.142]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tBEJHCJH008923 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 14 Dec 2015 14:17:12 -0500 From: Aaron Conole To: Matthew Hall References: <98CBD80474FA8B44BF855DF32C47DC358AF758@smartserver.smartshare.dk> <20151214182931.GA17279@mhcomputing.net> Date: Mon, 14 Dec 2015 14:17:12 -0500 In-Reply-To: <20151214182931.GA17279@mhcomputing.net> (Matthew Hall's message of "Mon, 14 Dec 2015 13:29:31 -0500") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 Cc: dev@dpdk.org, Morten B Subject: Re: [dpdk-dev] tcpdump support in DPDK 2.3 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Dec 2015 19:17:14 -0000 Matthew Hall writes: >> The pcap file format contains a header in front of each packet, which is >> extremely simple. But it has a timestamp (which uses 32 bit for tv_sec and >> tv_usec in files), so it needs to be considered how to handle this >> efficiently. > > I already wrote some C code for generating the original pcap format files a > while ago which I think could be donated. For the timestamps to work at > highest efficiency we'd need to run an rte_timer every X microseconds that > updates a global volatile copy of tv_sec and tv_usec. > > Or make some code that calculates the offset of rte_rdtsc from 01 January 1970 > 00:00:00 UTC and uses TSC value to generate the right tv_sec and tv_usec would > also work fine. Why not just use libpcap to write out pcap files? I bet it does a better job that any of us will ;) It's BSD licensed, so there should be no issues with linking against it (DPDK currently does for the pcap PMD), and it supports both pcap and pcap-ng (although -ng support may not be 100%, I expect it will get better). No need to donate to the cause on this one, I think :) The issues surrounding tcpdump are, imo, ones of library/application workflow. HOW does the user enable tcpdump-like support? The current option is to start up with a pcap PMD configured, capture to a file for a bit, then stop. I think the issues being discussed are what other options to give the user. Then again, I may have my signals crossed somewhere. -Aaron > Matthew.