| 375 | } |
| 376 | |
| 377 | static int |
| 378 | zlib_probe(struct rte_vdev_device *vdev) |
| 379 | { |
| 380 | struct rte_compressdev_pmd_init_params init_params = { |
| 381 | "", |
| 382 | rte_socket_id() |
| 383 | }; |
| 384 | const char *name; |
| 385 | const char *input_args; |
| 386 | int retval; |
| 387 | |
| 388 | name = rte_vdev_device_name(vdev); |
| 389 | |
| 390 | if (name == NULL) |
| 391 | return -EINVAL; |
| 392 | |
| 393 | input_args = rte_vdev_device_args(vdev); |
| 394 | |
| 395 | retval = rte_compressdev_pmd_parse_input_args(&init_params, input_args); |
| 396 | if (retval < 0) { |
| 397 | ZLIB_PMD_LOG(ERR, |
| 398 | "Failed to parse initialisation arguments[%s]", |
| 399 | input_args); |
| 400 | return -EINVAL; |
| 401 | } |
| 402 | |
| 403 | return zlib_create(name, vdev, &init_params); |
| 404 | } |
| 405 | |
| 406 | static int |
| 407 | zlib_remove(struct rte_vdev_device *vdev) |
nothing calls this directly
no test coverage detected