p4lang / behavioral-model

The reference P4 software switch
Apache License 2.0
531 stars 327 forks source link

Minimal subset of PNA. #1255

Closed rupesh-chiluka-marvell closed 3 weeks ago

rupesh-chiluka-marvell commented 1 month ago

Basic implementation of pna_nic. Able to parse a simple PNA program (without tables). Discussion regarding this PR can be seen in the Issue: https://github.com/p4lang/behavioral-model/issues/1245

antoninbas commented 3 weeks ago

@qobilidop I think you are thinking about tests like these ones: https://github.com/p4lang/behavioral-model/tree/main/targets/simple_switch/tests. The tests you shared a link to are target-independent and only exercise the core bmv2 library ("bm_sim"). Yes, I think some target-specific tests would be nice, but I would suggest having them in a follow-up PR. The input JSON can indeed be hand-written and does not need to be generated by a functioning p4c backend. Although because it can be quite verbose, it would be easier to start from a valid JSON (for PSA or v1model) and modify it manually to match the PNA architecture.

@rupesh-chiluka-marvell PR looks good to me. After you address the 2 new comments from @qobilidop, we can run the CI tests and we can merge once they succeed.