aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mempool/octeontx/octeontx_fpavf.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mempool/octeontx/octeontx_fpavf.c')
-rw-r--r--drivers/mempool/octeontx/octeontx_fpavf.c23
1 files changed, 3 insertions, 20 deletions
diff --git a/drivers/mempool/octeontx/octeontx_fpavf.c b/drivers/mempool/octeontx/octeontx_fpavf.c
index 3bc50f35..28f431ed 100644
--- a/drivers/mempool/octeontx/octeontx_fpavf.c
+++ b/drivers/mempool/octeontx/octeontx_fpavf.c
@@ -386,8 +386,8 @@ err:
return ret;
}
-static int
-octeontx_fpavf_pool_setup(uintptr_t handle, unsigned long memsz,
+int
+octeontx_fpavf_pool_set_range(uintptr_t handle, unsigned long memsz,
void *memva, uint16_t gpool)
{
uint64_t va_end;
@@ -509,12 +509,9 @@ octeontx_fpa_bufpool_free_count(uintptr_t handle)
uintptr_t
octeontx_fpa_bufpool_create(unsigned int object_size, unsigned int object_count,
- unsigned int buf_offset, char **va_start,
- int node_id)
+ unsigned int buf_offset, int node_id)
{
unsigned int gpool;
- void *memva;
- unsigned long memsz;
uintptr_t gpool_handle;
uintptr_t pool_bar;
int res;
@@ -522,9 +519,6 @@ octeontx_fpa_bufpool_create(unsigned int object_size, unsigned int object_count,
RTE_SET_USED(node_id);
RTE_BUILD_BUG_ON(sizeof(struct rte_mbuf) > OCTEONTX_FPAVF_BUF_OFFSET);
- if (unlikely(*va_start == NULL))
- goto error_end;
-
object_size = RTE_CACHE_LINE_ROUNDUP(object_size);
if (object_size > FPA_MAX_OBJ_SIZE) {
errno = EINVAL;
@@ -567,15 +561,6 @@ octeontx_fpa_bufpool_create(unsigned int object_size, unsigned int object_count,
goto error_pool_destroy;
}
- /* vf pool setup */
- memsz = object_size * object_count;
- memva = *va_start;
- res = octeontx_fpavf_pool_setup(pool_bar, memsz, memva, gpool);
- if (res < 0) {
- errno = res;
- goto error_gaura_detach;
- }
-
/* Release lock */
rte_spinlock_unlock(&fpadev.lock);
@@ -591,8 +576,6 @@ octeontx_fpa_bufpool_create(unsigned int object_size, unsigned int object_count,
return gpool_handle;
-error_gaura_detach:
- (void) octeontx_fpapf_aura_detach(gpool);
error_pool_destroy:
octeontx_fpavf_free(gpool);
octeontx_fpapf_pool_destroy(gpool);