From: Kamil Chalupnik Date: Wed, 9 May 2018 14:25:55 +0000 (+0200) Subject: baseband/turbo_sw: increase internal buffers X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=2efe2b435f877705884af07cad6906c9087bec15;p=dpdk.git baseband/turbo_sw: increase internal buffers Sizes of the internal buffers used by decoding were increased due to problem with memory for large vectors Signed-off-by: Kamil Chalupnik Acked-by: Amr Mokhtar --- diff --git a/drivers/baseband/turbo_sw/bbdev_turbo_software.c b/drivers/baseband/turbo_sw/bbdev_turbo_software.c index 9f01abf4a0..c3c250bf97 100644 --- a/drivers/baseband/turbo_sw/bbdev_turbo_software.c +++ b/drivers/baseband/turbo_sw/bbdev_turbo_software.c @@ -32,6 +32,10 @@ static int bbdev_turbo_sw_logtype; rte_bbdev_log(DEBUG, RTE_STR(__LINE__) ":%s() " fmt, __func__, \ ##__VA_ARGS__) +#define DEINT_INPUT_BUF_SIZE (((RTE_BBDEV_MAX_CB_SIZE >> 3) + 1) * 48) +#define DEINT_OUTPUT_BUF_SIZE (DEINT_INPUT_BUF_SIZE * 6) +#define ADAPTER_OUTPUT_BUF_SIZE ((RTE_BBDEV_MAX_CB_SIZE + 4) * 48) + /* private data structure */ struct bbdev_private { unsigned int max_nb_queues; /**< Max number of queues */ @@ -285,7 +289,7 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id, return -ENAMETOOLONG; } q->code_block = rte_zmalloc_socket(name, - (6144 >> 3) * sizeof(*q->code_block), + RTE_BBDEV_MAX_CB_SIZE * sizeof(*q->code_block), RTE_CACHE_LINE_SIZE, queue_conf->socket); if (q->code_block == NULL) { rte_bbdev_log(ERR, @@ -304,7 +308,7 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id, return -ENAMETOOLONG; } q->deint_input = rte_zmalloc_socket(name, - RTE_BBDEV_MAX_KW * sizeof(*q->deint_input), + DEINT_INPUT_BUF_SIZE * sizeof(*q->deint_input), RTE_CACHE_LINE_SIZE, queue_conf->socket); if (q->deint_input == NULL) { rte_bbdev_log(ERR, @@ -323,7 +327,7 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id, return -ENAMETOOLONG; } q->deint_output = rte_zmalloc_socket(NULL, - RTE_BBDEV_MAX_KW * sizeof(*q->deint_output), + DEINT_OUTPUT_BUF_SIZE * sizeof(*q->deint_output), RTE_CACHE_LINE_SIZE, queue_conf->socket); if (q->deint_output == NULL) { rte_bbdev_log(ERR, @@ -342,7 +346,7 @@ q_setup(struct rte_bbdev *dev, uint16_t q_id, return -ENAMETOOLONG; } q->adapter_output = rte_zmalloc_socket(NULL, - RTE_BBDEV_MAX_CB_SIZE * 6 * sizeof(*q->adapter_output), + ADAPTER_OUTPUT_BUF_SIZE * sizeof(*q->adapter_output), RTE_CACHE_LINE_SIZE, queue_conf->socket); if (q->adapter_output == NULL) { rte_bbdev_log(ERR,