微知-DOCA中的error类型以及2个主要函数(doca_error_t,doca_error_get_name,doca_error_get_descr)

背景

DOCA: Data Center-on-a-Chip Architecture,片上数据中心架构。是NVIDIA针对DPU的软件框架。DOCA之于DPU,就相当于CUDA之于GPU。本文介绍的是DOCA SDK中的DOCA定义的错误类型以及他的2个接口和常用使用模板。

DOCA错误类型

一些关键常见错误:

  • DOCA_ERROR_NOT_PERMITTED
  • DOCA_ERROR_NO_MEMORY
  • DOCA_ERROR_TIME_OUT
  • DOCA_ERROR_NOT_CONNECTED
  • DOCA_ERROR_AUTHENTICATION
typedef enum doca_error {
   
   
	DOCA_SUCCESS = 0,		       /**< Success */
	DOCA_ERROR_UNKNOWN = 1,		       /**< Unknown error */
	DOCA_ERROR_NOT_PERMITTED = 2,	       /**< Operation not permitted */
	DOCA_ERROR_IN_USE = 3,		       /**< Resource already in use */
	DOCA_ERROR_NOT_SUPPORTED = 4,	       /**< Operation not supported */
	DOCA_ERROR_AGAIN = 5,		       /**< Resource temporarily unavailable, try again */
	DOCA_ERROR_INVALID_VALUE = 6,	       /**< Invalid input */
	DOCA_ERROR_NO_MEMORY = 7,	       /**< Memory allocation failure */
	DOCA_ERROR_INITIALIZATION = 8,	       /**< Resource initialization failure */
	DOCA_ERROR_TIME_OUT = 9,	       /**< Timer expired waiting for resource */
	DOCA_ERROR_SHUTDOWN = 10,	       /**< Shut down in process or completed */
	DOCA_ERRO
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值