[P4-dev] does P4 support get timestamp and create msg

sundekui sundekui at huawei.com
Thu Dec 29 02:49:55 EST 2016


Hi

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?
Thanks
Tony Sun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20161229/0750cc47/attachment-0002.html>


More information about the P4-dev mailing list