[P4-dev] does P4 support get timestamp and create msg
sundekui at huawei.com
Thu Dec 29 02:49:55 EST 2016
Current I am doing research on P4. I have several questions as following:
1. I want to get the timestamp when packets arrive and store it into register. For example, for a specified entry, I need to record/update the timestamp into the register when packet arrive. In other words the according register always stores the arrived time for the latest packet. I can't find any timestamp related actions but in p4 spec(1.0.3) I see the timestamp keyword(in page10, section 2.2). I guess this can be realized. But how to get the timestamp?
2. How to create totally new msg and send to controller? For example, for a specified entry, when the packet count or byte count exceeds a number, I want to create a msg and send to controller. I guess if I can create msg, I can simply set dest of the msg to controller ip addr and output it just like common packet. But how to create totally new msg?
3. I see that P4 frontend complier use thrift. So it means the api module generated by complier can be located on other location. And app can use the api and api to add/modify entry via ip network. Am I correct?
Anyone can help me?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the P4-dev