1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright(c) 2016-2020 Intel Corporation 3 */ 4 5 #include <stdint.h> 6 7 #include "dlb2_priv.h" 8 9 /* DLB2 PMD Internal interface function pointers. 10 * If VDEV (bifurcated PMD), these will resolve to functions that issue ioctls 11 * serviced by DLB kernel module. 12 * If PCI (PF PMD), these will be implemented locally in user mode. 13 */ 14 15 void (*dlb2_iface_low_level_io_init)(void); 16 17 int (*dlb2_iface_open)(struct dlb2_hw_dev *handle, const char *name); 18 19 int (*dlb2_iface_get_device_version)(struct dlb2_hw_dev *handle, 20 uint8_t *revision); 21 22 void (*dlb2_iface_hardware_init)(struct dlb2_hw_dev *handle); 23 24 int (*dlb2_iface_get_cq_poll_mode)(struct dlb2_hw_dev *handle, 25 enum dlb2_cq_poll_modes *mode); 26 27 int (*dlb2_iface_get_num_resources)(struct dlb2_hw_dev *handle, 28 struct dlb2_get_num_resources_args *rsrcs); 29 30 int (*dlb2_iface_sched_domain_create)(struct dlb2_hw_dev *handle, 31 struct dlb2_create_sched_domain_args *args); 32 33 void (*dlb2_iface_domain_reset)(struct dlb2_eventdev *dlb2); 34 35 int (*dlb2_iface_ldb_queue_create)(struct dlb2_hw_dev *handle, 36 struct dlb2_create_ldb_queue_args *cfg); 37 38 int (*dlb2_iface_get_sn_allocation)(struct dlb2_hw_dev *handle, 39 struct dlb2_get_sn_allocation_args *args); 40 41 int (*dlb2_iface_set_sn_allocation)(struct dlb2_hw_dev *handle, 42 struct dlb2_set_sn_allocation_args *args); 43 44 int (*dlb2_iface_get_sn_occupancy)(struct dlb2_hw_dev *handle, 45 struct dlb2_get_sn_occupancy_args *args); 46 47 int (*dlb2_iface_ldb_port_create)(struct dlb2_hw_dev *handle, 48 struct dlb2_create_ldb_port_args *cfg, 49 enum dlb2_cq_poll_modes poll_mode); 50 51 int (*dlb2_iface_dir_port_create)(struct dlb2_hw_dev *handle, 52 struct dlb2_create_dir_port_args *cfg, 53 enum dlb2_cq_poll_modes poll_mode); 54 55 int (*dlb2_iface_dir_queue_create)(struct dlb2_hw_dev *handle, 56 struct dlb2_create_dir_queue_args *cfg); 57 58 int (*dlb2_iface_map_qid)(struct dlb2_hw_dev *handle, 59 struct dlb2_map_qid_args *cfg); 60 61 int (*dlb2_iface_unmap_qid)(struct dlb2_hw_dev *handle, 62 struct dlb2_unmap_qid_args *cfg); 63 64 int (*dlb2_iface_pending_port_unmaps)(struct dlb2_hw_dev *handle, 65 struct dlb2_pending_port_unmaps_args *args); 66 67 int (*dlb2_iface_sched_domain_start)(struct dlb2_hw_dev *handle, 68 struct dlb2_start_domain_args *cfg); 69 70 int (*dlb2_iface_get_ldb_queue_depth)(struct dlb2_hw_dev *handle, 71 struct dlb2_get_ldb_queue_depth_args *args); 72 73 int (*dlb2_iface_get_dir_queue_depth)(struct dlb2_hw_dev *handle, 74 struct dlb2_get_dir_queue_depth_args *args); 75 76 77 int (*dlb2_iface_enable_cq_weight)(struct dlb2_hw_dev *handle, 78 struct dlb2_enable_cq_weight_args *args); 79 80 int (*dlb2_iface_set_cos_bw)(struct dlb2_hw_dev *handle, 81 struct dlb2_set_cos_bw_args *args); 82