[PATCH 3/3] net/enic: support max descriptors allowed by adapter

Ferruh Yigit ferruh.yigit at intel.com
Wed Jan 26 15:01:53 CET 2022


On 1/14/2022 3:10 AM, John Daley wrote:
> Newer VIC adapters have the max number of supported RX and TX
> descriptors in their configuration. Use these values as the
> maximums.
> 
> Signed-off-by: John Daley <johndale at cisco.com>
> Reviewed-by: Hyong Youb Kim <hyonkim at cisco.com>

<...>

> diff --git a/drivers/net/enic/enic_res.h b/drivers/net/enic/enic_res.h
> index 34f15d5a42..ae979d52be 100644
> --- a/drivers/net/enic/enic_res.h
> +++ b/drivers/net/enic/enic_res.h
> @@ -12,9 +12,11 @@
>   #include "vnic_rq.h"
>   
>   #define ENIC_MIN_WQ_DESCS		64
> -#define ENIC_MAX_WQ_DESCS		4096

There are still 'ENIC_MAX_WQ_DESCS' usage remaining in the code, causing build
error, can you please fix.


../drivers/net/enic/enic_rxtx.c: In function ‘enic_free_wq_bufs’:
../drivers/net/enic/enic_rxtx.c:397:46: error: ‘ENIC_MAX_WQ_DESCS’ undeclared (first use in this function); did you mean ‘ENIC_MIN_WQ_DESCS’?
   397 |                         RTE_ASSERT(nb_free < ENIC_MAX_WQ_DESCS);
       |                                              ^~~~~~~~~~~~~~~~~
../lib/eal/include/rte_branch_prediction.h:38:45: note: in definition of macro ‘unlikely’
    38 | #define unlikely(x)     __builtin_expect(!!(x), 0)
       |                                             ^
../lib/eal/include/rte_debug.h:47:25: note: in expansion of macro ‘RTE_VERIFY’
    47 | #define RTE_ASSERT(exp) RTE_VERIFY(exp)
       |                         ^~~~~~~~~~
../drivers/net/enic/enic_rxtx.c:397:25: note: in expansion of macro ‘RTE_ASSERT’
   397 |                         RTE_ASSERT(nb_free < ENIC_MAX_WQ_DESCS);
       |                         ^~~~~~~~~~
../drivers/net/enic/enic_rxtx.c:397:46: note: each undeclared identifier is reported only once for each function it appears in
   397 |                         RTE_ASSERT(nb_free < ENIC_MAX_WQ_DESCS);
       |                                              ^~~~~~~~~~~~~~~~~
../lib/eal/include/rte_branch_prediction.h:38:45: note: in definition of macro ‘unlikely’
    38 | #define unlikely(x)     __builtin_expect(!!(x), 0)
       |                                             ^
../lib/eal/include/rte_debug.h:47:25: note: in expansion of macro ‘RTE_VERIFY’
    47 | #define RTE_ASSERT(exp) RTE_VERIFY(exp)
       |                         ^~~~~~~~~~
../drivers/net/enic/enic_rxtx.c:397:25: note: in expansion of macro ‘RTE_ASSERT’
   397 |                         RTE_ASSERT(nb_free < ENIC_MAX_WQ_DESCS);
       |                         ^~~~~~~~~~


More information about the dev mailing list