How to wait for a period in P4

Hi,

This is from andyfingerhut in this thread:

By default, simple_switch and simple_switch_grpc runs multiple threads. One thread runs ingress for all packets. There are 4 threads numbered 0…3 that run egress code for packets destined to different output ports, where packets destined to output port X run on thread (X % 4). Each of these threads on a Linux system typically runs on a separate CPU core, if your system has enough CPU cores available. See the function start_and_return_ in this file: behavioral-model/simple_switch.cpp at main · p4lang/behavioral-model · GitHub

Multiple threads is similar to running multiple pipelines, in that on a multi-core CPU there are physically separate CPU cores processing packets on different threads.

I guess it is possible that a packet can be processed a packet is being cloned. Not sure though why that would be an issue in your use case. Maybe you can explåin further.

Cheers,