sonic-swss icon indicating copy to clipboard operation
sonic-swss copied to clipboard

New p4orch development changes

Open mint570 opened this issue 11 months ago • 8 comments

New p4orch development changes.

This is the first PR for upstreaming the recent P4Orch changes (has been a while since the last time). The main changes include:

  1. Add new status code SWSS_RC_NOT_EXECUTED
  2. Enable redis pipeline in response publisher for P4Orch (performance improvement)
  3. Enable background thread of write to db in response publisher for P4Orch (performance improvement)
  4. P4Orch writes to APPL DB instead of APPL STATE DB for responses (prepare for the zmq change, APPL DB will be used as APPL STATE DB in P4Orch for performance improvement)

More details on the P4Orch response path changes (changes are only done on P4Orch, other orchs has no behavior changes):

  1. Enable P4Orch to use redis pipeline in response publisher. The redis pipeline feature in response publisher is done by the SONiC communicate to improve performance. We enabled P4Orch to use the pipeline feature. This will increase performance in batched request processing. This change has no behavior changes.

  2. Enable background thread in response publisher to write to DB for P4Orch. This change will move the APPL STATE DB write into a background thread, which will improve performance. This change has no behavior changes. The original change was done for APPL STATE DB since the response path writes into the APPL STATE DB. With the next change, APPL STATE DB is deprecated and replaced with APPL DB. So the overall change is that the P4Orch response path will write into APPL DB in a background thread.

  3. P4Orch writes to APPL DB instead of APPL STATE DB in response path. The APPL STATE DB is supposed to have successful entries programmed in the ASIC, while the APPL DB has the intend. However, for P4 tables, P4RT needs to clean up APPL DB to match with APPL STATE DB to keep them in sync when a request fails. This is done for warmboot purpose as we don't want to program the failed intend during warmboot. So for P4RT, the APPL STATE DB is redundant information. This change will replace APPL STATE DB with APPL DB. In later PR, we will also upstream the change for P4Orch to enable zmq. This will reduce half of the DB write operations. This change will require the later P4RT change to be in sync.

mint570 avatar Feb 29 '24 04:02 mint570