xref: /dpdk/drivers/event/dlb2/dlb2_iface.c (revision bec8901bfe9f691a27e267005621a90efa815d79)
117f56f6dSTimothy McDaniel /* SPDX-License-Identifier: BSD-3-Clause
217f56f6dSTimothy McDaniel  * Copyright(c) 2016-2020 Intel Corporation
317f56f6dSTimothy McDaniel  */
417f56f6dSTimothy McDaniel 
517f56f6dSTimothy McDaniel #include <stdint.h>
617f56f6dSTimothy McDaniel 
717f56f6dSTimothy McDaniel #include "dlb2_priv.h"
817f56f6dSTimothy McDaniel 
917f56f6dSTimothy McDaniel /* DLB2 PMD Internal interface function pointers.
1017f56f6dSTimothy McDaniel  * If VDEV (bifurcated PMD),  these will resolve to functions that issue ioctls
1117f56f6dSTimothy McDaniel  * serviced by DLB kernel module.
1217f56f6dSTimothy McDaniel  * If PCI (PF PMD),  these will be implemented locally in user mode.
1317f56f6dSTimothy McDaniel  */
1417f56f6dSTimothy McDaniel 
1517f56f6dSTimothy McDaniel void (*dlb2_iface_low_level_io_init)(void);
1617f56f6dSTimothy McDaniel 
1717f56f6dSTimothy McDaniel int (*dlb2_iface_open)(struct dlb2_hw_dev *handle, const char *name);
1817f56f6dSTimothy McDaniel 
1917f56f6dSTimothy McDaniel int (*dlb2_iface_get_device_version)(struct dlb2_hw_dev *handle,
2017f56f6dSTimothy McDaniel 				     uint8_t *revision);
2117f56f6dSTimothy McDaniel 
2217f56f6dSTimothy McDaniel void (*dlb2_iface_hardware_init)(struct dlb2_hw_dev *handle);
2317f56f6dSTimothy McDaniel 
2417f56f6dSTimothy McDaniel int (*dlb2_iface_get_cq_poll_mode)(struct dlb2_hw_dev *handle,
2517f56f6dSTimothy McDaniel 				   enum dlb2_cq_poll_modes *mode);
2617f56f6dSTimothy McDaniel 
2717f56f6dSTimothy McDaniel int (*dlb2_iface_get_num_resources)(struct dlb2_hw_dev *handle,
2817f56f6dSTimothy McDaniel 				struct dlb2_get_num_resources_args *rsrcs);
29f3cad285STimothy McDaniel 
30f3cad285STimothy McDaniel int (*dlb2_iface_sched_domain_create)(struct dlb2_hw_dev *handle,
31f3cad285STimothy McDaniel 				struct dlb2_create_sched_domain_args *args);
32f3cad285STimothy McDaniel 
33f3cad285STimothy McDaniel void (*dlb2_iface_domain_reset)(struct dlb2_eventdev *dlb2);
347e668e57STimothy McDaniel 
357e668e57STimothy McDaniel int (*dlb2_iface_ldb_queue_create)(struct dlb2_hw_dev *handle,
367e668e57STimothy McDaniel 				   struct dlb2_create_ldb_queue_args *cfg);
377e668e57STimothy McDaniel 
387e668e57STimothy McDaniel int (*dlb2_iface_get_sn_allocation)(struct dlb2_hw_dev *handle,
397e668e57STimothy McDaniel 				    struct dlb2_get_sn_allocation_args *args);
407e668e57STimothy McDaniel 
417e668e57STimothy McDaniel int (*dlb2_iface_set_sn_allocation)(struct dlb2_hw_dev *handle,
427e668e57STimothy McDaniel 				    struct dlb2_set_sn_allocation_args *args);
437e668e57STimothy McDaniel 
447e668e57STimothy McDaniel int (*dlb2_iface_get_sn_occupancy)(struct dlb2_hw_dev *handle,
457e668e57STimothy McDaniel 				   struct dlb2_get_sn_occupancy_args *args);
463a6d0c04STimothy McDaniel 
473a6d0c04STimothy McDaniel int (*dlb2_iface_ldb_port_create)(struct dlb2_hw_dev *handle,
483a6d0c04STimothy McDaniel 				  struct dlb2_create_ldb_port_args *cfg,
493a6d0c04STimothy McDaniel 				  enum dlb2_cq_poll_modes poll_mode);
503a6d0c04STimothy McDaniel 
513a6d0c04STimothy McDaniel int (*dlb2_iface_dir_port_create)(struct dlb2_hw_dev *handle,
523a6d0c04STimothy McDaniel 				  struct dlb2_create_dir_port_args *cfg,
533a6d0c04STimothy McDaniel 				  enum dlb2_cq_poll_modes poll_mode);
541acd82c0STimothy McDaniel 
551acd82c0STimothy McDaniel int (*dlb2_iface_dir_queue_create)(struct dlb2_hw_dev *handle,
561acd82c0STimothy McDaniel 				   struct dlb2_create_dir_queue_args *cfg);
571acd82c0STimothy McDaniel 
581acd82c0STimothy McDaniel int (*dlb2_iface_map_qid)(struct dlb2_hw_dev *handle,
591acd82c0STimothy McDaniel 			  struct dlb2_map_qid_args *cfg);
60a29248b5STimothy McDaniel 
61a29248b5STimothy McDaniel int (*dlb2_iface_unmap_qid)(struct dlb2_hw_dev *handle,
62a29248b5STimothy McDaniel 			    struct dlb2_unmap_qid_args *cfg);
63a29248b5STimothy McDaniel 
64a29248b5STimothy McDaniel int (*dlb2_iface_pending_port_unmaps)(struct dlb2_hw_dev *handle,
65a29248b5STimothy McDaniel 				struct dlb2_pending_port_unmaps_args *args);
6659e1a966STimothy McDaniel 
6759e1a966STimothy McDaniel int (*dlb2_iface_sched_domain_start)(struct dlb2_hw_dev *handle,
6859e1a966STimothy McDaniel 				     struct dlb2_start_domain_args *cfg);
6918991548STimothy McDaniel 
7018991548STimothy McDaniel int (*dlb2_iface_get_ldb_queue_depth)(struct dlb2_hw_dev *handle,
7118991548STimothy McDaniel 				struct dlb2_get_ldb_queue_depth_args *args);
7218991548STimothy McDaniel 
7318991548STimothy McDaniel int (*dlb2_iface_get_dir_queue_depth)(struct dlb2_hw_dev *handle,
7418991548STimothy McDaniel 				struct dlb2_get_dir_queue_depth_args *args);
75ffa46fc4STimothy McDaniel 
76ffa46fc4STimothy McDaniel 
77ffa46fc4STimothy McDaniel int (*dlb2_iface_enable_cq_weight)(struct dlb2_hw_dev *handle,
78ffa46fc4STimothy McDaniel 				   struct dlb2_enable_cq_weight_args *args);
79*bec8901bSTimothy McDaniel 
80*bec8901bSTimothy McDaniel int (*dlb2_iface_set_cos_bw)(struct dlb2_hw_dev *handle,
81*bec8901bSTimothy McDaniel 			     struct dlb2_set_cos_bw_args *args);
82