From: Marcin Wojtas <mw@semihalf.com>
To: Daria Kolistratova <daria.kolistratova@intel.com>
Cc: "Tzalik, Guy" <gtzalik@amazon.com>,
"Evgeny Schemeilin" <evgenys@amazon.com>,
dev@dpdk.org, "Ferruh Yigit" <ferruh.yigit@intel.com>,
"Michał Krawczyk" <mk@semihalf.com>
Subject: Re: [dpdk-dev] [PATCH 1/1] ena: fix SIGFPE with 0 rx queues
Date: Thu, 21 Jun 2018 12:14:48 +0200 [thread overview]
Message-ID: <CAPv3WKdNHjrLTStcx5NseW7YLq2Z3SKQNCHr49BSbT17yS5TVA@mail.gmail.com> (raw)
In-Reply-To: <20180620163217.3770-1-daria.kolistratova@intel.com>
+ Ferruh and Michal
2018-06-20 18:32 GMT+02:00 Daria Kolistratova <daria.kolistratova@intel.com>:
> When he number of rx queues is 0
> (what can be when application does not receive)
> failed with SIGFPE.
> Fixed adding zero check before division.
>
> Signed-off-by: Daria Kolistratova <daria.kolistratova@intel.com>
> ---
> 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;
> +
> 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
>
next parent reply other threads:[~2018-06-21 10:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20180620163217.3770-1-daria.kolistratova@intel.com>
2018-06-21 10:14 ` Marcin Wojtas [this message]
2018-06-21 11:50 ` Michał Krawczyk
[not found] <20180621153433.86009-1-daria.kolistratova@intel.com>
2018-06-25 8:01 ` Michał Krawczyk
2018-06-25 11:05 ` Kolistratova, Daria
2018-06-25 11:09 ` Michał Krawczyk
[not found] <20180625134046.12448-1-daria.kolistratova@intel.com>
2018-06-26 7:29 ` Michał Krawczyk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAPv3WKdNHjrLTStcx5NseW7YLq2Z3SKQNCHr49BSbT17yS5TVA@mail.gmail.com \
--to=mw@semihalf.com \
--cc=daria.kolistratova@intel.com \
--cc=dev@dpdk.org \
--cc=evgenys@amazon.com \
--cc=ferruh.yigit@intel.com \
--cc=gtzalik@amazon.com \
--cc=mk@semihalf.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).