SWDEV-209060 - Create the Skeleton RDC CLI and daemon
Create the skeleton implementation of rdc_client.so and rdci. Modify current rdcd to integrate the RDC API service: rdc.proto is changed to add a new RdcAPI service which defined the interfaces for the RDC API. RdcStandaloneHandler.cpp is added to send the request using gRPC to the rdcd. It is built into the rdc_client.so rdci.cc, RdciDisCoverySubSystem.cc and RdciSubSystem.cc are added to implement skeleton rdci. Currently, the discovery subsystem is supported. rdc_api_service.cc is added to the server as a skeleton to implement the RdcAPI service. Currently, only discovery API is implemented. Note: we disabled the rdc_rsmi_service, which will be removed in the future. The original rdc_client.so is renamed to rdc_client_smi.so which should also be removed in the future. Add the instruction how to run the rdcd and rdci in the build folder in the README.md. Change-Id: Id232f9f83787e5812d4a295dc8cf0daa7728b06c
This commit is contained in:
committed by
Chris Freehill
parent
1ff1c7b617
commit
020f6939f7
@@ -39,6 +39,7 @@ THE SOFTWARE.
|
||||
#include "rocm_smi/rocm_smi.h"
|
||||
#include "rdc/rdc_server_main.h"
|
||||
#include "rdc/rdc_rsmi_service.h"
|
||||
#include "rdc/rdc_api_service.h"
|
||||
#include "rdc/rdc_server_utils.h"
|
||||
|
||||
static bool sShutDownServer = false;
|
||||
@@ -86,6 +87,19 @@ RDCServer::Run() {
|
||||
}
|
||||
}
|
||||
|
||||
if (start_api_service()) {
|
||||
api_service_ = new amd::rdc::RdcAPIServiceImpl();
|
||||
builder.RegisterService(api_service_);
|
||||
|
||||
// TODO(bill_liu): pass flags from cnfg file
|
||||
rdc_status_t ret = api_service_->Initialize(0);
|
||||
|
||||
if (ret != RDC_ST_OK) {
|
||||
std::cerr << "Failed to start API service" << std::endl;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Finally assemble the server.
|
||||
// std::unique_ptr<::grpc::Server> server(builder.BuildAndStart());
|
||||
server_ = builder.BuildAndStart();
|
||||
@@ -316,8 +330,9 @@ int main(int argc, char** argv) {
|
||||
}
|
||||
|
||||
// TODO(cfreehil): Eventually, set these by reading a config file
|
||||
rdc_server.set_start_rsmi_service(true);
|
||||
rdc_server.set_start_rsmi_service(false);
|
||||
rdc_server.set_start_rdc_admin_service(true);
|
||||
rdc_server.set_start_api_service(true);
|
||||
|
||||
rdc_server.Run();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user