diff mbox series

[v2,1/1] ena: fix SIGFPE with 0 rx queues

Message ID 20180626110734.25181-1-daria.kolistratova@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers show
Series [v2,1/1] ena: fix SIGFPE with 0 rx queues | expand

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Ferruh Yigit June 26, 2018, 5:38 p.m. UTC
From: Daria Kolistratova <daria.kolistratova@intel.com>

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 <daria.kolistratova@intel.com>
---
 drivers/net/ena/ena_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ferruh Yigit June 26, 2018, 4:53 p.m. UTC | #1
On 6/26/2018 6:38 PM, Ferruh Yigit wrote:
> From: Daria Kolistratova <daria.kolistratova@intel.com>

I re-send the Daria's patch, somehow it didn't appeared in mail list and patchwork.

> 
> 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 <daria.kolistratova@intel.com>
> ---
>  drivers/net/ena/ena_ethdev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
> index 9ae73e331..3249b9d92 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;
>
Michal Krawczyk June 27, 2018, 8:36 a.m. UTC | #2
2018-06-26 18:53 GMT+02:00 Ferruh Yigit <ferruh.yigit@intel.com>:
> On 6/26/2018 6:38 PM, Ferruh Yigit wrote:
>> From: Daria Kolistratova <daria.kolistratova@intel.com>
>
> I re-send the Daria's patch, somehow it didn't appeared in mail list and patchwork.
>
>>
>> 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 <daria.kolistratova@intel.com>
Acked-by: Michal Krawczyk <mk@semihalf.com>
>> ---
>>  drivers/net/ena/ena_ethdev.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
>> index 9ae73e331..3249b9d92 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;
>>
>
Ferruh Yigit June 27, 2018, 1:22 p.m. UTC | #3
On 6/27/2018 9:36 AM, Michał Krawczyk wrote:
> 2018-06-26 18:53 GMT+02:00 Ferruh Yigit <ferruh.yigit@intel.com>:
>> On 6/26/2018 6:38 PM, Ferruh Yigit wrote:
>>> From: Daria Kolistratova <daria.kolistratova@intel.com>
>>
>> I re-send the Daria's patch, somehow it didn't appeared in mail list and patchwork.
>>
>>>
>>> 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 <daria.kolistratova@intel.com>
>
> Acked-by: Michal Krawczyk <mk@semihalf.com>

Applied to dpdk-next-net/master, thanks.
diff mbox series

Patch

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 9ae73e331..3249b9d92 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;