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

pcapng wrong timestamp at TsnSwitch #979

Open
andrew-lukin opened this issue May 23, 2024 · 1 comment
Open

pcapng wrong timestamp at TsnSwitch #979

andrew-lukin opened this issue May 23, 2024 · 1 comment
Assignees
Labels

Comments

@andrew-lukin
Copy link

Platform

  • OMNeT++ version: 6.0.3
  • OS: Xubuntu 20.04
  • INET: 4.5.2

I'm trying to check residence time for TsnSwitch node with pcapng analysis. For this I'm using a simple network with source(TsnDevice) then switch(TsnSwitch) then sink(TsnDevice). I'm recording all the interfaces of a switch into one file.
As the result, I'm experiencing the same Arrival time in pcapng files for inbound and outbound packets.
So, outbound packets are timestamped with inbound's Arrival time.
Then, a check of a correspondent packet timestamp on the sink side shows a proper value, which includes the switch's residence time.

I'm expecting to see smth like this:
source eth0 time: 0.000000
switch eth0 time: 0.000006
switch eth1 time: 0.000013
sink eth0 time: 0.000013

but what I get instead:
source eth0 time: 0.000000
switch eth0 time: 0.000006
switch eth1 time: 0.000006
sink eth0 time: 0.000013

For EthernetSwitch and StandardHost type nodes everything works as expected, for instance.

I'm using the following configuration for pcapng capturing:

**.crcMode = "computed"
**.fcsMode = "computed"
**.recordPcap = true

**.fileFormat = "pcapng"
**.numPcapRecorders = 1

*.source1.pcapRecorder[*].pcapFile = "results/source1.pcapng"
*.sink1.pcapRecorder[*].pcapFile = "results/sink1.pcapng"
*.switch1.pcapRecorder[*].pcapFile = "results/switch1.pcapng"

It could be added to inet4.5/showcases/tsn/timesynchronization/clockdrift/omnetpp.ini, for instance, with the same result.

@levy levy self-assigned this May 27, 2024
@levy
Copy link
Contributor

levy commented May 27, 2024

There's a difference between how StandardHost/EthernetSwitch and TsnDevice/TsnSwitch records PCAPng files. The former records the TX end and RX start timestamps. The latter records the TX start and RX start timestamps. In your case the TX start equals with RX end for all packets processed by the switch. The difference comes that you see comes from the different operation of the above mentioned modules.

I'm not sure what to do with this. Ideally they should work the same way, or at least let the user chose what timestamp to record. I'll come back to this.

@levy levy added the Bug label May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants