From: Daria Kolistratova Date: Tue, 26 Jun 2018 17:38:56 +0000 (+0100) Subject: net/ena: fix SIGFPE with 0 Rx queue X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=361913ad6f8c05fc541fe4bfdae3b0dc095ae3af;p=dpdk.git net/ena: fix SIGFPE with 0 Rx queue When the number of rx queues is 0 (what can be when application does not receive) failed with SIGFPE. It happens when the application is also requesting ETH_MQ_RX_RSS_FLAG in the rte_dev->data->dev_conf.rxmode.mq_mode. Fixed adding zero rx queues check. Signed-off-by: Daria Kolistratova Acked-by: Michal Krawczyk --- diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index 1870edf032..89080a9f59 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -1052,7 +1052,7 @@ static int ena_start(struct rte_eth_dev *dev) return rc; if (adapter->rte_dev->data->dev_conf.rxmode.mq_mode & - ETH_MQ_RX_RSS_FLAG) { + ETH_MQ_RX_RSS_FLAG && adapter->rte_dev->data->nb_rx_queues > 0) { rc = ena_rss_init_default(adapter); if (rc) return rc;