From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vk0-f68.google.com (mail-vk0-f68.google.com [209.85.213.68]) by dpdk.org (Postfix) with ESMTP id D5ECE1B5C0 for ; Thu, 21 Jun 2018 13:50:04 +0200 (CEST) Received: by mail-vk0-f68.google.com with SMTP id s187-v6so1675401vke.9 for ; Thu, 21 Jun 2018 04:50:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=sXJIHu7iDgLItA33jxmwQIGAebpwhZwp09CbgwStbiE=; b=Qi1adru+GooSVeFsPi8D0lcoWRtZ5mk5mI4uxlebqeDyVBv4gE/reOfIWJ1127a7pW Ye2W8pbjgdV6NHHBT3S0kKfTmOWnKrjo4gwfHm6mFmHeyAw2ycyWzf1lwjI+FPyhsNKa fTiBY8jVRo04oA6G1jBW8xiwRKNW2Yr5/ZMpGXDY1p11bZozdt2N08AKLS7O9ALNewTv Xg5RJJaEN1H0OzDCq53YJ/qtrfbK79TOgwHylBNVd0Mzxa6vmoVb/rXZIUkPkZxwIWEl kzE+SZSmh5xM+Abj0raCY+Bzsu/CJ5iCICuh9Wqg8qIhPqTxE+t79VOJiVEplSM0QkWL vMhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=sXJIHu7iDgLItA33jxmwQIGAebpwhZwp09CbgwStbiE=; b=rB6lgJcRAJqmH5Z0f5DwvVT45x9bK15VGSxoXlmwxOPS8rJTN8kdrzA2dtTwZFzGUt 57Rs5oGS8YIDzUir255waqa3/GdepMWp+3XdaGRa2REKkeaeHt3B88Bz0G8jC2LpJP8E yVE/LqrpRTP9VDWvNW6kvNmc1y21XMSxttM/sL+ucQHDVseukbig6P1u5TPVdT0Mg6mN +EtQ8dSB4wKrto/NMWWYJX0M6LRx8BEs3bzAJZTknUsQAsXgrhIhLSbHTEa1m6SfQQXv Cm/x/2QKPnTp+xhNF1H9fHcG5tn8octSW7MK/nemqmt3vQDO5/V+0DAXnvGrQToTzumv Ungw== X-Gm-Message-State: APt69E2tt16NkT346l01U6DWiJc+2uHSmriJ+qwsZI5f0Mlb1k4w0YDQ orWNkU/jkPNGKxMq4Zc1BURELC7zyuJv13Bg4eMo1A== X-Google-Smtp-Source: ADUXVKL1L09rTzLgwGi7+HaL4V8D8zeGILyWZKlADHmRsA1FOVzc5ERDprS2+FjxvHf+CdO5M+qWxrxr8P4dpJMaDyc= X-Received: by 2002:a1f:b393:: with SMTP id c141-v6mr15018829vkf.37.1529581803821; Thu, 21 Jun 2018 04:50:03 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a67:62c7:0:0:0:0:0 with HTTP; Thu, 21 Jun 2018 04:50:03 -0700 (PDT) In-Reply-To: References: <20180620163217.3770-1-daria.kolistratova@intel.com> From: =?UTF-8?Q?Micha=C5=82_Krawczyk?= Date: Thu, 21 Jun 2018 13:50:03 +0200 Message-ID: To: Daria Kolistratova Cc: "Tzalik, Guy" , Marcin Wojtas , Evgeny Schemeilin , dev@dpdk.org, Ferruh Yigit Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH 1/1] ena: fix SIGFPE with 0 rx queues X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jun 2018 11:50:05 -0000 Hi Daria, I couldn't find the patch in the patchwork or the mailing list, so sorry for late response. 2018-06-21 12:14 GMT+02:00 Marcin Wojtas : > + Ferruh and Michal > > 2018-06-20 18:32 GMT+02:00 Daria Kolistratova : >> When he number of rx queues is 0 Typo (missing 't' letter) >> (what can be when application does not receive) To be precise, the issue appears only when the application is requesting ETH_MQ_RX_RSS_FLAG in the rte_dev->data->dev_conf.rxmode.mq_mode. >> failed with SIGFPE. >> Fixed adding zero check before division. >> >> Signed-off-by: Daria Kolistratova >> --- >> drivers/net/ena/ena_ethdev.c | 6 +++++- >> 1 file changed, 5 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c >> index 9ae73e331..76c483921 100644 >> --- a/drivers/net/ena/ena_ethdev.c >> +++ b/drivers/net/ena/ena_ethdev.c >> @@ -684,7 +684,11 @@ static int ena_rss_init_default(struct ena_adapter *adapter) >> } >> >> for (i = 0; i < ENA_RX_RSS_TABLE_SIZE; i++) { >> - val = i % nb_rx_queues; >> + if (nb_rx_queues != 0) >> + val = i % nb_rx_queues; >> + else >> + val = 0; >> + We can skip the RSS configuration at all if the nb_rx_queues is 0. I suggest to modify the patch like this: diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index 8701328ba..5ba90f58a 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -1056,7 +1056,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; >> rc = ena_com_indirect_table_fill_entry(ena_dev, i, >> ENA_IO_RXQ_IDX(val)); >> if (unlikely(rc && (rc != ENA_COM_UNSUPPORTED))) { >> -- >> 2.14.4 >>