Queue Type Definition
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: algorithm name, such as rsa, dh, zlib, and gzip. (For details, see wcrypto_type in Common Interfaces at the Algorithm Layer.)
throughput and latency: not supported, which need to be set to 0.
priv: private algorithm information, such as the compression and decompression directions, compression window length, compression level, and key width. For details about how to define interfaces by each algorithm submodule, see struct wcrypto_paras in Common Interfaces at the Algorithm Layer.
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: capability requirements when a queue is applied for.
dev_path: You can apply for a queue based on the device name (the corresponding character device name in the /dev directory).
node_mask: You can apply for a queue based on the device NUMA node mask. (Setting the node ID bit to 1, for example, 0x3, indicates that you apply for a queue of a device whose node ID is 0 or 1.)
qinfo: private information about a WD queue, which is invisible to users. The initial value is NULL.