Skip to content

Commit

Permalink
addressing review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
satish153 committed Sep 13, 2023
1 parent 3f5cecc commit a284c4d
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions clients/p4rt_perf_test/p4rt_perf_session.cc
Original file line number Diff line number Diff line change
Expand Up @@ -154,26 +154,20 @@ absl::Status SendWriteRequest(P4rtSession* session,

::p4::v1::TableEntry* SetupTableEntryToInsert(P4rtSession* session,
::p4::v1::WriteRequest* req) {
req->set_device_id(session->DeviceId());
*req->mutable_election_id() = session->ElectionId();
auto* update = req->add_updates();
update->set_type(::p4::v1::Update::INSERT);
return update->mutable_entity()->mutable_table_entry();
}

::p4::v1::TableEntry* SetupTableEntryToModify(P4rtSession* session,
::p4::v1::WriteRequest* req) {
req->set_device_id(session->DeviceId());
*req->mutable_election_id() = session->ElectionId();
auto* update = req->add_updates();
update->set_type(::p4::v1::Update::MODIFY);
return update->mutable_entity()->mutable_table_entry();
}

::p4::v1::TableEntry* SetupTableEntryToDelete(P4rtSession* session,
::p4::v1::WriteRequest* req) {
req->set_device_id(session->DeviceId());
*req->mutable_election_id() = session->ElectionId();
auto* update = req->add_updates();
update->set_type(::p4::v1::Update::DELETE);
return update->mutable_entity()->mutable_table_entry();
Expand Down

0 comments on commit a284c4d

Please sign in to comment.