diff mbox series

net/qede: fix qede milliseconds sleep macro

Message ID 20200727141644.174264-1-dsinghrawat@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: Jerin Jacob
Headers show
Series net/qede: fix qede milliseconds sleep macro | expand

Checks

Context Check Description
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-broadcom-Performance success Performance Testing PASS
ci/checkpatch success coding style OK

Commit Message

Devendra Singh Rawat July 27, 2020, 2:16 p.m. UTC
The macro defined for milliseconds sleep was not putting the thread
to sleep and was simply calling a delay routine. This fix redefines
the macro to call the correct rte sleep API.

Fixes: ec94dbc57362 ("qede: add base driver")
Cc: stable@dpdk.org

Signed-off-by: Devendra Singh Rawat <dsinghrawat@marvell.com>
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
Signed-off-by: Rasesh Mody <rmody@marvell.com>
---
 drivers/net/qede/base/bcm_osal.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Jerin Jacob Sept. 21, 2020, 5:30 p.m. UTC | #1
On Mon, Jul 27, 2020 at 7:47 PM Devendra Singh Rawat
<dsinghrawat@marvell.com> wrote:
>
> The macro defined for milliseconds sleep was not putting the thread
> to sleep and was simply calling a delay routine. This fix redefines
> the macro to call the correct rte sleep API.
>
> Fixes: ec94dbc57362 ("qede: add base driver")
> Cc: stable@dpdk.org
>
> Signed-off-by: Devendra Singh Rawat <dsinghrawat@marvell.com>
> Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
> Signed-off-by: Rasesh Mody <rmody@marvell.com>

Applied to dpdk-next-net-mrvl/master. Thanks


> ---
>  drivers/net/qede/base/bcm_osal.h | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/net/qede/base/bcm_osal.h b/drivers/net/qede/base/bcm_osal.h
> index 5d4df5907..ded4fb0f5 100644
> --- a/drivers/net/qede/base/bcm_osal.h
> +++ b/drivers/net/qede/base/bcm_osal.h
> @@ -81,9 +81,8 @@ typedef intptr_t osal_int_ptr_t;
>
>  #define DELAY(x) rte_delay_us(x)
>  #define usec_delay(x) DELAY(x)
> -#define msec_delay(x) DELAY(1000 * (x))
>  #define OSAL_UDELAY(time) usec_delay(time)
> -#define OSAL_MSLEEP(time) msec_delay(time)
> +#define OSAL_MSLEEP(time) rte_delay_us_sleep(1000 * (time))
>
>  /* Memory allocations and deallocations */
>
> --
> 2.18.2
>
diff mbox series

Patch

diff --git a/drivers/net/qede/base/bcm_osal.h b/drivers/net/qede/base/bcm_osal.h
index 5d4df5907..ded4fb0f5 100644
--- a/drivers/net/qede/base/bcm_osal.h
+++ b/drivers/net/qede/base/bcm_osal.h
@@ -81,9 +81,8 @@  typedef intptr_t osal_int_ptr_t;
 
 #define DELAY(x) rte_delay_us(x)
 #define usec_delay(x) DELAY(x)
-#define msec_delay(x) DELAY(1000 * (x))
 #define OSAL_UDELAY(time) usec_delay(time)
-#define OSAL_MSLEEP(time) msec_delay(time)
+#define OSAL_MSLEEP(time) rte_delay_us_sleep(1000 * (time))
 
 /* Memory allocations and deallocations */