队列类型定义
1 2 3 4 5 6 7 8 | /* Capabilities */ struct wd_capa { const char *alg;/* Algorithm name */ int throughput; /* throughput capability */ int latency; /* latency capability */ __u32 flags;/* other capabilities */ struct wcrypto_paras priv;/* For algorithm parameters, now it is defined in extending notions */ }; |
其中alg:为算法的名字,例如rsa,dh,zlib,gzip等(参考算法层公共接口的wcrypto_type);
throughput,latency:not supported, now need user set 0;
priv:用于算法私有信息,例如压缩与解压方向,压缩窗长,压缩级别,密钥宽度等,由各算法层子模块定义其详细接口请参考WCRYPTO算法层接口定义算法层公共接口的struct wcrypto_paras.
struct wd_queue { struct wd_capa capa; char dev_path[PATH_STR_SIZE]; /* if denote dev name, get its Q */ unsigned int node_mask; /* if denote dev node mask, get its Q */ void *qinfo; /* queue private */ };
其中capa:用于用户设置申请队列时对于能力的要求;
dev_path:用户可通过设备名字(/dev目录下的对应字符设备名字)来申请它的队列;
node_mask:用户可通过设备numa node掩码(将node id比特位置1,比如0x3,表示指定从node id为0或1的设备)来申请它的队列;
qinfo:WD队列私有信息,用户不可见,初始为NULL;
父主题: WD基础接口-WD队列管理接口