From e4f931cc6ef271e817ee4f6465b8048815255deb Mon Sep 17 00:00:00 2001 From: Hemant Agrawal Date: Mon, 9 Apr 2018 15:52:46 +0530 Subject: [PATCH] net/dpaa: fix array overrun Coverity issue: 268342 Fixes: 62f53995caaf ("net/dpaa: add frame count based tail drop with CGR") Cc: stable@dpdk.org Signed-off-by: Hemant Agrawal Acked-by: Shreyansh Jain --- drivers/net/dpaa/dpaa_ethdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index db493648a9..0aad111c15 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -1105,10 +1105,10 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev) dpaa_push_mode_max_queue = DPAA_MAX_PUSH_MODE_QUEUE; } - /* Each device can not have more than DPAA_PCD_FQID_MULTIPLIER RX + /* Each device can not have more than DPAA_MAX_NUM_PCD_QUEUES RX * queues. */ - if (num_rx_fqs <= 0 || num_rx_fqs > DPAA_PCD_FQID_MULTIPLIER) { + if (num_rx_fqs <= 0 || num_rx_fqs > DPAA_MAX_NUM_PCD_QUEUES) { DPAA_PMD_ERR("Invalid number of RX queues\n"); return -EINVAL; } -- 2.20.1