I was wondering if it is possible to get access to hardware timestamping on the NIC if you using SR-IOV virtualization.
Currently in a non-virtualized environment, I can configure HW timestamping by passing hwtstamp_config structure to ioctl(). However, when I do the same operation in a Xen based VM which uses SR-IOV (and Intel
82599 NIC) the same operation failed (I am getting Operation not supported message after calling ioctl()).
Reading the documentation on SR-IOV I couldn't figure out if accessing HW timestamps on a NIC is fundamentally not possible, or I just missing some configuration (such as Virtual Function for NIC).
What is the exact operating system used and the network adapter model? ( is it an onboard 82599 or discrete network adapter).
Let me further verify on this inquiry.
I am using "Intel Corporation 82599ES 10-Gigabit SFI/SFP" which I believe is discrete adapter.
I was also thinking if ixgbevf driver can be used to enable/access hardware timestamping on a Virtual Function.
Further checking, hardware timestamping is not supported in SR-IOV virtualization.
Hope this clarified and please do let me know if you still have other questions.
I can understand the 82599 not supporting timestamp access since it latches the time stamp to a register available to the PF when the configured packet is received, e.g. PTP packet. In the case of an I350, it has the capability to timestamp all packets and it appends the timestamp to an optional header on top of the MAC header in the receive buffer, so, theoretically, it should be available to a VF port when utilizing SR-IOV. Is there a way to receive the HW NIC timestamp via a VF port for the I350 NIC? It is not clear in the I350 data sheet.
Thanks for any help.
FYI, I did some more checking and found that the packet is received from the igbvf driver with the placeholder for 3 timestamps, presumably SW timestamp, HW synced timestamp, and HW unsynced timestamp. The HW timestamp portions are missing which is consistent with what ethtool -T reports for the interface and tcpdump -J option for the interface. Again, the NIC seems to have the ability, so either the HW doesn't prepend it to the packet in the RX buffer when in SRIOV mode or the igbvf driver strips it before handing it to the application. Let me know which.
My next question will be, if this doesn't work, can VMDq mode support HW timestamp?
Great, thanks. I take that to mean that I should see timestamps received at the VF; however, I do not see the timestamp received at the VF even though the PF is configured to timestamp all packets. The igbvf driver outputs 3 timestamps, the software timestamp with a valid value and the 2 hardware timestamps are zeroed out. ethtool -T on the igbvf interface shows no hardware timestamp capability. How do I get the timestamp to show up on the VF interface given that it should be there?
Apologize for any delay. Further checking, the HW timestamp is not available in the VF driver and currently we do not have timeline on when this feature will be included.
Hope this clarified.