Skip to content

Commit

Permalink
Move encoding functions to ovsp4rt_encoders.cc
Browse files Browse the repository at this point in the history
- Moved the protobuf encoding functions from `newovsp4rt.cc` to
  `ovsp4rt_encoders.h`.

- Used Copilot to verify that the extracted functions are
  identical to their counterparts in `ovsp4rt.cc`.

Signed-off-by: Derek Foster <justffoulkes@gmail.com>
  • Loading branch information
ffoulkes committed Mar 3, 2025
1 parent 08d4788 commit 438fd5e
Show file tree
Hide file tree
Showing 4 changed files with 1,703 additions and 1,660 deletions.
8 changes: 7 additions & 1 deletion ovs-p4rt/sidecar/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,18 @@ if(TEST_COVERAGE)
add_compile_options(-fprofile-arcs -ftest-coverage)
endif()

if(BUILD_CLIENT)
set(CLIENT_SOURCES newovsp4rt.cc ovsp4rt_encoders.cc)
else()
set(CLIENT_SOURCES ovsp4rt.cc)
endif()

#-----------------------------------------------------------------------
# ovs_sidecar_o
#-----------------------------------------------------------------------
add_library(ovs_sidecar_o OBJECT
${CLIENT_SOURCES}
${OVSP4RT_INCLUDE_DIR}/ovsp4rt/ovs-p4rt.h
$<IF:$<BOOL:${BUILD_CLIENT}>,newovsp4rt.cc,ovsp4rt.cc>
ovsp4rt_private.h
)

Expand Down
Loading

0 comments on commit 438fd5e

Please sign in to comment.