Data Accelerator Offload
Loading...
Searching...
No Matches
Functions
dao_card_grpc_client.h File Reference
#include "../dao_card_grpc_service.h"
#include <stdint.h>

Go to the source code of this file.

Functions

struct dao_card_grpc_ctx * dao_card_grpc_client_init (const char *server_ip, uint16_t server_port)
 
void dao_card_grpc_client_fini (struct dao_card_grpc_ctx *ctx)
 
int dao_card_init (struct dao_card_grpc_ctx *ctx, struct dao_card_config *config)
 
void dao_card_fini (struct dao_card_grpc_ctx *ctx)
 
int dao_card_info_get (struct dao_card_grpc_ctx *ctx, struct dao_card_info *info)
 
int dao_card_app_update (struct dao_card_grpc_ctx *ctx, struct dao_card_app_update_req *req)
 

Detailed Description

This file contains the API for liquid crypto card.

Definition in file dao_card_grpc_client.h.

Function Documentation

◆ dao_card_grpc_client_init()

struct dao_card_grpc_ctx * dao_card_grpc_client_init ( const char *  server_ip,
uint16_t  server_port 
)

Initialize the gRPC client.

Parameters
server_ipIP address of the server
server_portPort number of the server
Returns
: A pointer to the gRPC client context

◆ dao_card_grpc_client_fini()

void dao_card_grpc_client_fini ( struct dao_card_grpc_ctx *  ctx)

Finalize the gRPC client.

Parameters
ctxgRPC client context

◆ dao_card_init()

int dao_card_init ( struct dao_card_grpc_ctx *  ctx,
struct dao_card_config *  config 
)

Initialize liquid crypto card.

This function need to be called from management daemon. It will initialize EAL and crypto device on the liquid crypto card. It will also launch worker threads which will wait till ethdev are created.

Parameters
ctxgRPC client context
configconfiguration for the card
Returns
: 0 on success, negative value on failure

◆ dao_card_fini()

void dao_card_fini ( struct dao_card_grpc_ctx *  ctx)

Finalize liquid crypto card.

This function need to be called from management daemon. It will wait for all the worker threads to finish processing and stop the crypto device and perform eal cleanup on the liquid crypto card.

Parameters
ctxgRPC client context

◆ dao_card_info_get()

int dao_card_info_get ( struct dao_card_grpc_ctx *  ctx,
struct dao_card_info *  info 
)

Get the card information.

It will get the card information like number of ethdevs and max number of sessions supported.

Parameters
ctxgRPC client context
info[out]: card information
Returns
: 0 on success, negative value on failure

◆ dao_card_app_update()

int dao_card_app_update ( struct dao_card_grpc_ctx *  ctx,
struct dao_card_app_update_req *  req 
)

Update the application in liquid crypto card.

This function need to be called from management daemon. It will copy or update the application on the liquid crypto card.

Parameters
ctxgRPC client context
reqRequest with file details
Returns
: 0 on success, negative value on failure