Skip to content
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

How to get packet arriving timestamp? #685

Closed
cang233 opened this issue Jan 8, 2020 · 2 comments
Closed

How to get packet arriving timestamp? #685

cang233 opened this issue Jan 8, 2020 · 2 comments

Comments

@cang233
Copy link

cang233 commented Jan 8, 2020

I set the

	config := flow.Config{
		CPUList:              "0-3",
		HWRXPacketsTimestamp: true,
	}

and use packet.GetPacketTimestamp() to get timestamp but return 0.

why?

@gshimansky
Copy link
Contributor

This flag only enables capability of a NIC, it has to be supported by hardware to work correctly. AFAIK at the moment only Mellanox NICs support this feature, I implemented this flag for those cards. You can use flow.CheckHWCapability(flow.HWRXPacketsTimestamp) to query whether a network card supports this feature.

@cang233
Copy link
Author

cang233 commented Jan 9, 2020

oh,I get it,thanks a lot!

@cang233 cang233 closed this as completed Jan 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants