Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
975 Views

Accessing hardware timestamps with SR-IOV

Hi,

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

Thank you

0 Kudos
13 Replies
Highlighted
Community Manager
36 Views

Hi Kirill,

 

 

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.

 

 

Rgds,

 

wb

 

0 Kudos
Highlighted
Beginner
36 Views

Hi,

I am using "Intel Corporation 82599ES 10-Gigabit SFI/SFP" which I believe is discrete adapter.

Thank you

EDIT:

I was also thinking if ixgbevf driver can be used to enable/access hardware timestamping on a Virtual Function.

0 Kudos
Highlighted
Community Manager
36 Views

Hi Kirill,

 

 

Thank you for the reply. I will further verify for you.

 

 

rgds,

 

wb

 

0 Kudos
Highlighted
Community Manager
36 Views

Hi Kirill,

 

 

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.

 

 

Thanks,

 

wb

 

0 Kudos
Highlighted
Beginner
36 Views

Thank you very much for finding this out!

0 Kudos
Highlighted
Community Manager
36 Views

Hi Kirill,

 

 

You are welcome and glad to be of help.

 

 

rgds,

 

wb

 

0 Kudos
Highlighted
Beginner
36 Views

wb,

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.

Best,

NJP

0 Kudos
Highlighted
Community Manager
36 Views

HI NJP,

 

 

I will check for you on the part of I350. Will update you once there is any finding.

 

 

rgds,

 

wb

 

0 Kudos
Highlighted
Beginner
36 Views

Hi wb,

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?

Thanks,

NJP

0 Kudos
Highlighted
Community Manager
36 Views

Hi NJP,

 

 

Thank you for the additional information. Further checking, the i350 supports hardware stamping in next generation VMDq mode and SR-IOV.

rgds,

 

wb
0 Kudos
Highlighted
Beginner
36 Views

Hi wb,

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?

Thanks,

NJP

0 Kudos
Highlighted
Community Manager
36 Views

HI NJP,

 

 

Thank you for the update. Let me check for you how this can be done.

 

 

rgds,

 

wb

 

0 Kudos
Highlighted
Community Manager
36 Views

Hi NJP,

 

 

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.

 

 

rgds,

 

wb

 

 

0 Kudos