How to implement idle timeout for table entries?


I read in the P4Runtime specification that it supports idle timeout for table entries. But I am not able to find anything that will help me implement IdleTimeoutNotification in the helper files provided in the p4 tutorials. Any insight regarding this will be highly helpful.


I created a simple P4_16+v1model architecture program that can run on bmv2, and an automated PTF test that uses the P4Runtime API to communicate between the controller and switch, and shows the contents of all idle timeout notification messages sent from the bmv2 switch to the controller. You can find instructions for running it here: p4-guide/ptf-tests/idletimeout at master · jafingerhut/p4-guide · GitHub