Skip to content

Commit

Permalink
Use RedisChannel instead of ZeroMQChannel for ClientSai
Browse files Browse the repository at this point in the history
Ideally, context config would be available here so that that information
about what channel to use can be passed in here. However, that is not
available here. Therefore, for our experiemental purposes, just change
ClientSai to use RedisChannel, so that it uses Redis and can be used
with current syncd runtime.

Signed-off-by: Saikrishna Arcot <[email protected]>
  • Loading branch information
saiarcot895 committed Aug 10, 2024
1 parent 563802d commit 1342f1f
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions lib/ClientSai.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "ClientSai.h"
#include "SaiInternal.h"
#include "RedisRemoteSaiInterface.h"
#include "ZeroMQChannel.h"
#include "RedisChannel.h"
#include "Utils.h"
#include "sairediscommon.h"
#include "ClientConfig.h"
Expand Down Expand Up @@ -77,13 +77,8 @@ sai_status_t ClientSai::initialize(

m_switchContainer = std::make_shared<SwitchContainer>();

auto clientConfig = service_method_table->profile_get_value(0, SAI_REDIS_KEY_CLIENT_CONFIG);

auto cc = ClientConfig::loadFromFile(clientConfig);

m_communicationChannel = std::make_shared<ZeroMQChannel>(
cc->m_zmqEndpoint,
cc->m_zmqNtfEndpoint,
m_communicationChannel = std::make_shared<RedisChannel>(
"ASIC_DB",
std::bind(&ClientSai::handleNotification, this, _1, _2, _3));

m_apiInitialized = true;
Expand Down

0 comments on commit 1342f1f

Please sign in to comment.