Skip to content

Commit

Permalink
Addressing review comments sonic-net#1
Browse files Browse the repository at this point in the history
  • Loading branch information
rhalstea committed Oct 31, 2022
1 parent 988c13f commit 38aae46
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
16 changes: 0 additions & 16 deletions p4rt_app/p4rt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -380,22 +380,6 @@ int main(int argc, char** argv) {

builder.RegisterService(&p4runtime_server);

// Disable max ping strikes behavior to allow more frequent KA.
builder.AddChannelArgument(GRPC_ARG_HTTP2_MAX_PING_STRIKES, 0);

// Sends KeepAlive pings to client to ensure P4RT can promptly discover
// disconnects and vacate the role of primary controller. Else, backup
// connection might not be able to connect to P4RT with the same election id.
builder.AddChannelArgument(GRPC_ARG_KEEPALIVE_TIME_MS, 1000);

// Keepalive should fail relatively fast to let P4RT find out disconnect
// quickly and yield primaryship to allow other controller to connect as
// primary.
builder.AddChannelArgument(GRPC_ARG_KEEPALIVE_TIMEOUT_MS, 4000);

// Sends KA pings even when existing streaming RPC is not active.
builder.AddChannelArgument(GRPC_ARG_HTTP2_MAX_PINGS_WITHOUT_DATA, 0);

std::unique_ptr<Server> server(builder.BuildAndStart());
LOG(INFO) << "Server listening on " << server_addr << ".";
server->Wait();
Expand Down
2 changes: 1 addition & 1 deletion p4rt_app/p4runtime/p4runtime_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ absl::Status AppendTableEntryReads(
sonic::P4rtTable& p4rt_table) {
RETURN_IF_ERROR(SupportedTableEntryRequest(pi_table_entry));

// Get all P4RT keys from the AppDb.
// Get all P4RT keys from the AppStateDb.
for (const auto& app_db_key : sonic::GetAllP4TableEntryKeys(p4rt_table)) {
// Read a single table entry out of the AppDb
ASSIGN_OR_RETURN(pdpi::IrTableEntry ir_table_entry,
Expand Down

0 comments on commit 38aae46

Please sign in to comment.