1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright (c) 2024 Corigine, Inc. 3 * All rights reserved. 4 */ 5 6 #ifndef __NFP_SYNC_H__ 7 #define __NFP_SYNC_H__ 8 9 #include <stdint.h> 10 11 #include <bus_pci_driver.h> 12 13 #define NFP_SYNC_MAGIC_FL_SERVICE 0x53594e41 /**< ASCII - SYNA */ 14 15 struct nfp_sync; 16 17 struct nfp_sync *nfp_sync_alloc(void); 18 void nfp_sync_free(struct nfp_sync *sync); 19 20 void *nfp_sync_handle_alloc(struct nfp_sync *sync, 21 struct rte_pci_device *pci_dev, 22 uint32_t magic, 23 uint32_t size); 24 void nfp_sync_handle_free(struct nfp_sync *sync, 25 struct rte_pci_device *pci_dev, 26 void *handle); 27 uint16_t nfp_sync_handle_count_get(struct nfp_sync *sync, 28 struct rte_pci_device *pci_dev, 29 void *handle); 30 31 #endif /* __NFP_SYNC_H__ */ 32