1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(C) 2021 Marvell.
8 struct roc_sso_hwgrp_qos {
16 struct plt_pci_device *pci_dev;
25 uint32_t xaq_buf_size;
28 #define ROC_SSO_MEM_SZ (16 * 1024)
29 uint8_t reserved[ROC_SSO_MEM_SZ] __plt_cache_aligned;
30 } __plt_cache_aligned;
32 /* SSO device initialization */
33 int __roc_api roc_sso_dev_init(struct roc_sso *roc_sso);
34 int __roc_api roc_sso_dev_fini(struct roc_sso *roc_sso);
36 /* SSO device configuration */
37 int __roc_api roc_sso_rsrc_init(struct roc_sso *roc_sso, uint8_t nb_hws,
39 void __roc_api roc_sso_rsrc_fini(struct roc_sso *roc_sso);
40 int __roc_api roc_sso_hwgrp_qos_config(struct roc_sso *roc_sso,
41 struct roc_sso_hwgrp_qos *qos,
42 uint8_t nb_qos, uint32_t nb_xaq);
43 int __roc_api roc_sso_hwgrp_alloc_xaq(struct roc_sso *roc_sso,
44 uint32_t npa_aura_id, uint16_t hwgrps);
45 int __roc_api roc_sso_hwgrp_release_xaq(struct roc_sso *roc_sso,
47 int __roc_api roc_sso_hwgrp_set_priority(struct roc_sso *roc_sso,
48 uint16_t hwgrp, uint8_t weight,
49 uint8_t affinity, uint8_t priority);
50 uint64_t __roc_api roc_sso_ns_to_gw(struct roc_sso *roc_sso, uint64_t ns);
51 int __roc_api roc_sso_hws_link(struct roc_sso *roc_sso, uint8_t hws,
52 uint16_t hwgrp[], uint16_t nb_hwgrp);
53 int __roc_api roc_sso_hws_unlink(struct roc_sso *roc_sso, uint8_t hws,
54 uint16_t hwgrp[], uint16_t nb_hwgrp);
55 int __roc_api roc_sso_hwgrp_hws_link_status(struct roc_sso *roc_sso,
56 uint8_t hws, uint16_t hwgrp);
57 uintptr_t __roc_api roc_sso_hws_base_get(struct roc_sso *roc_sso, uint8_t hws);
58 uintptr_t __roc_api roc_sso_hwgrp_base_get(struct roc_sso *roc_sso,
62 void __roc_api roc_sso_dump(struct roc_sso *roc_sso, uint8_t nb_hws,
63 uint16_t hwgrp, FILE *f);
65 #endif /* _ROC_SSOW_H_ */