New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Time Stamp Command #1007
Comments
You need to type
to see what time stamp types tcpdump supports. Then you need to type
where is one of the time stamp types listed by If Note, by the way, that the |
This is what it said, host (Host) |
I type this, sudo tcpdump -j adapter dst port 57441 -s 65535 -w <file.pcap> But does not work... tcpdump: SIOCSHWTSTAMP failed: Invalid argument |
To quote a comment in the libpcap code for Linux:
so, unfortunately, the mere fact that You probably have a network adapter that doesn't do its own time stamping, so your only choice is "host" - which is the default. |
I just checked a change to libpcap that, with sufficiently recent kernels, will ask the kernel what time stamps the device supports ("sufficiently recent" to support asking the kernel that question), and only report the time stamp types that the kernel says are supported for the device. |
I've got a similar issue while using adapter_unsynced time stamp type. Does it mean that it is not supported?
Here is some hardware properties.
|
Is it build-in or an external network card? |
@joelcorporan, it is an external 10GbE network card. Here is a lspci excerpt:
|
Most likely it is an ixgbe issue
82599 network card does not satisfy a condition "hw->mac.type >= ixgbe_mac_X550" , so next it jumps to
Unsafe solution is to modify the condition to accept 82599 network card:
Now it works! |
What happens if you run the command
That should, with a sufficiently recent version of the kernel and libpcap, report only the time stamp types supported by the interface in question. |
BTW, "-J" worked the same way (contained same output) before patching ixgbe, errors occurred only when "-j" option was provided. |
Here is my tcpdump, libpcap an kernel versions:
|
OK, so that version of libpcap supports asking the device what timestamp types it supports, and, in fact, that appears to have succeeded, as it didn't list "adapter" as a type, just "host" and "adapter_unsynced" (if libpcap can't get a list of supported types, it falls back on "host", "adapter", and "adapter_unsynced", some of which could fail). And, in the 3.10.71 kernel as downloaded from kernel.org, the But the ixgbe_ptp.c in your code example doesn't match what's in the 3.10.71 kernel, so presumably your kernel isn't from a straight-from-Linus kernel. |
Sigh. It appears that the ETHTOOL_GET_TS_INFO ioctl provides a list of supported filter, but that the ixgbe driver does not indicate that any device supports HWTSTAMP_FILTER_ALL. Libpcap should check for HWTSTAMP_FILTER_ALL and, if it's not set, indicate that only software time stamping is supported - and I should ask on linux-netdev whether the ixgbe driver should indicate that HWTSTAMP_FILTER_ALL is supported for the X550 but not anything else. |
I've made that change to libpcap - and changed it to treat ERANGE for an attempt to set hardware time stamping as meaning "hardware time stamping not supported", and reporting it as a warning - in change c119a71. I've asked on linux-netdev at http://marc.info/?l=linux-netdev&m=146318183529571&w=2 This means that, with a tcpdump built with the current tip-of-the-master-branch libpcap,
will probably "Time stamp type cannot be set for ixeth0", even though it can for the X550, because of the driver bug(?). It also means that, with an unmodified driver, and a tcpdump built with the current tip-of-the-master-branch libpcap,
should issue a warning but not fail; if it fails, that's another bug. Whether your driver change will actually make hardware time stamping work is another matter. You'd have to ask the Intel people about that. |
Hi, I have a similar issue. My tcpdump -J gives me only host option. But my NIC supports hardware timestamping.
|
Please file this in the libpcap issue list as a separate issue, as it might be due to a different problem. |
How I use the tstamp for the network adapter. This is what I'm typing,
sudo tcpdump -j pcap_list_tstamp_types(pcap_tstamp_adapter() dst port 57441 -tttt -s 65535 -w
but doesn't not work. What I need to do?
The text was updated successfully, but these errors were encountered: