1c1407bfaSNicolas Chautru /* SPDX-License-Identifier: BSD-3-Clause 2c1407bfaSNicolas Chautru * Copyright(c) 2022 Intel Corporation 3c1407bfaSNicolas Chautru */ 4c1407bfaSNicolas Chautru 5c1407bfaSNicolas Chautru #ifndef _RTE_ACC_CFG_H_ 6c1407bfaSNicolas Chautru #define _RTE_ACC_CFG_H_ 7c1407bfaSNicolas Chautru 8c1407bfaSNicolas Chautru /** 9c1407bfaSNicolas Chautru * @file rte_acc_cfg.h 10c1407bfaSNicolas Chautru * 11c1407bfaSNicolas Chautru * Functions for configuring ACC HW, exposed directly to applications. 12c1407bfaSNicolas Chautru * Configuration related to encoding/decoding is done through the 13c1407bfaSNicolas Chautru * librte_bbdev library. 14c1407bfaSNicolas Chautru * 15c1407bfaSNicolas Chautru * @warning 16c1407bfaSNicolas Chautru * @b EXPERIMENTAL: this API may change without prior notice 17c1407bfaSNicolas Chautru */ 18c1407bfaSNicolas Chautru 19c1407bfaSNicolas Chautru #include <stdint.h> 20c1407bfaSNicolas Chautru #include <stdbool.h> 21*1094dd94SDavid Marchand #include <rte_compat.h> 22c1407bfaSNicolas Chautru #include "rte_acc_common_cfg.h" 23c1407bfaSNicolas Chautru 24c1407bfaSNicolas Chautru #ifdef __cplusplus 25c1407bfaSNicolas Chautru extern "C" { 26c1407bfaSNicolas Chautru #endif 27c1407bfaSNicolas Chautru 28c1407bfaSNicolas Chautru 29c1407bfaSNicolas Chautru /** 30c1407bfaSNicolas Chautru * Configure a ACC device in PF mode notably for bbdev-test 31c1407bfaSNicolas Chautru * 32c1407bfaSNicolas Chautru * @param dev_name 33c1407bfaSNicolas Chautru * The name of the device. This is the short form of PCI BDF, e.g. 00:01.0. 34c1407bfaSNicolas Chautru * It can also be retrieved for a bbdev device from the dev_name field in the 35c1407bfaSNicolas Chautru * rte_bbdev_info structure returned by rte_bbdev_info_get(). 36c1407bfaSNicolas Chautru * @param conf 37c1407bfaSNicolas Chautru * Configuration to apply to ACC HW. 38c1407bfaSNicolas Chautru * 39c1407bfaSNicolas Chautru * @return 40c1407bfaSNicolas Chautru * Zero on success, negative value on failure. 41c1407bfaSNicolas Chautru */ 42c1407bfaSNicolas Chautru __rte_experimental 43c1407bfaSNicolas Chautru int 44c1407bfaSNicolas Chautru rte_acc_configure(const char *dev_name, struct rte_acc_conf *conf); 45c1407bfaSNicolas Chautru 46c1407bfaSNicolas Chautru #ifdef __cplusplus 47c1407bfaSNicolas Chautru } 48c1407bfaSNicolas Chautru #endif 49c1407bfaSNicolas Chautru 50c1407bfaSNicolas Chautru #endif /* _RTE_ACC_CFG_H_ */ 51