PrincetonUniversity / lucid

MIT License
40 stars 10 forks source link

initial support for egress handlers in tofino backend #25

Closed jsonch closed 1 year ago

jsonch commented 1 year ago

egress handlers in the tofino backend. Prefix a handler declaration with @egress to make the handler execute in the egress pipeline. Notes: egress handlers may not access globals accessed by non-egress handlers; currently, each event may only have one handler; if an egress event arrives at a switch ingress, it will be dropped; egress handlers are not implemented in the interpreter yet, it just ignores the @egress tag for now.

TODO: make sure egress handler semantics are defined completely; add more test cases; add support in the interpreter (possibly by transforming egress events into self events that carry output port / group ids)