nsg-ethz/p4-learning

How to make the switches in topo use the same clock to achieve time synchronization?

welink321 opened this issue · 1 comments

We want to simulate the delay measurement in network performance, but we find that the time of each switch is activated when the packets are sent to the switch. There is no time synchronization, so we would like to ask you how to make the switches in topo use the same clock to achieve time synchronization.Or can you tell us where the code is for the switches in topo to synchronize?

Switch synchronization is out of the scope of this repository and it would be something to ask in the bmv2 repo .

However, I had a quick look at the thrift API and there is no method to set the timer. Maybe there is something using the P4Runtime API but I am not sure.

If there is nothing the best you can do is to ask in the bmv2 repo, or to look at the source code yourself and try to find how does a switch get global time. Maybe you can write yourself a function to set it once the switch is started. However, even if you do that, you might not be able to perfectly synch your switch timers.