• Home
  • Raw
  • Download

Lines Matching refs:pf

13 static u32 nfp_shared_buf_pool_unit(struct nfp_pf *pf, unsigned int sb)  in nfp_shared_buf_pool_unit()  argument
18 for (i = 0; i < pf->num_shared_bufs; i++) in nfp_shared_buf_pool_unit()
19 if (pf->shared_bufs[i].id == sb_id) in nfp_shared_buf_pool_unit()
20 return le32_to_cpu(pf->shared_bufs[i].pool_size_unit); in nfp_shared_buf_pool_unit()
26 int nfp_shared_buf_pool_get(struct nfp_pf *pf, unsigned int sb, u16 pool_index, in nfp_shared_buf_pool_get() argument
37 unit_size = nfp_shared_buf_pool_unit(pf, sb); in nfp_shared_buf_pool_get()
41 n = nfp_mbox_cmd(pf, NFP_MBOX_POOL_GET, &id, sizeof(id), in nfp_shared_buf_pool_get()
56 int nfp_shared_buf_pool_set(struct nfp_pf *pf, unsigned int sb, in nfp_shared_buf_pool_set() argument
69 unit_size = nfp_shared_buf_pool_unit(pf, sb); in nfp_shared_buf_pool_set()
74 return nfp_mbox_cmd(pf, NFP_MBOX_POOL_SET, &set_data, sizeof(set_data), in nfp_shared_buf_pool_set()
78 int nfp_shared_buf_register(struct nfp_pf *pf) in nfp_shared_buf_register() argument
80 struct devlink *devlink = priv_to_devlink(pf); in nfp_shared_buf_register()
86 if (!pf->mbox) in nfp_shared_buf_register()
89 n = nfp_pf_rtsym_read_optional(pf, NFP_SHARED_BUF_COUNT_SYM_NAME, 0); in nfp_shared_buf_register()
94 sb_desc = nfp_pf_map_rtsym(pf, "sb_tbl", NFP_SHARED_BUF_TABLE_SYM_NAME, in nfp_shared_buf_register()
95 num_entries * sizeof(pf->shared_bufs[0]), in nfp_shared_buf_register()
102 pf->shared_bufs = kmalloc_array(num_entries, sizeof(pf->shared_bufs[0]), in nfp_shared_buf_register()
104 if (!pf->shared_bufs) { in nfp_shared_buf_register()
110 struct nfp_shared_buf *sb = &pf->shared_bufs[i]; in nfp_shared_buf_register()
125 pf->num_shared_bufs = num_entries; in nfp_shared_buf_register()
134 le32_to_cpu(pf->shared_bufs[i].id)); in nfp_shared_buf_register()
135 kfree(pf->shared_bufs); in nfp_shared_buf_register()
141 void nfp_shared_buf_unregister(struct nfp_pf *pf) in nfp_shared_buf_unregister() argument
143 struct devlink *devlink = priv_to_devlink(pf); in nfp_shared_buf_unregister()
146 for (i = 0; i < pf->num_shared_bufs; i++) in nfp_shared_buf_unregister()
148 le32_to_cpu(pf->shared_bufs[i].id)); in nfp_shared_buf_unregister()
149 kfree(pf->shared_bufs); in nfp_shared_buf_unregister()