MCPcopy Create free account
hub / github.com/F-Stack/f-stack / rte_compressdev_capability_get

Function rte_compressdev_capability_get

dpdk/lib/compressdev/rte_compressdev.c:31–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29};
30
31const struct rte_compressdev_capabilities *
32rte_compressdev_capability_get(uint8_t dev_id,
33 enum rte_comp_algorithm algo)
34{
35 const struct rte_compressdev_capabilities *capability;
36 struct rte_compressdev_info dev_info;
37 int i = 0;
38
39 if (dev_id >= compressdev_globals.nb_devs) {
40 COMPRESSDEV_LOG(ERR, "Invalid dev_id=%d", dev_id);
41 return NULL;
42 }
43 rte_compressdev_info_get(dev_id, &dev_info);
44
45 while ((capability = &dev_info.capabilities[i++])->algo !=
46 RTE_COMP_ALGO_UNSPECIFIED){
47 if (capability->algo == algo)
48 return capability;
49 }
50
51 return NULL;
52}
53
54const char *
55rte_compressdev_get_feature_name(uint64_t flag)

Calls 1

rte_compressdev_info_getFunction · 0.85