On 04/06/2018 03:09 PM, Ferruh Yigit wrote:
On 4/4/2018 12:10 PM, Andrew Rybchenko wrote:
All loopback modes are listed in efx_loopback_type_t.
Available loopback modes are listed per link speed in
the enc_loopback_types member of the efx_nic_cfg_t.

Signed-off-by: Andrew Rybchenko <arybche...@solarflare.com>
Reviewed-by: Andy Moreton <amore...@solarflare.com>
Reviewed-by: Ivan Malov <ivan.ma...@oktetlabs.ru>
Getting following build error with clang, can you please check?


.../dpdk/drivers/net/sfc/base/efx_port.c:122:6: error: comparison of constant 64
with expression of type 'efx_loopback_type_t' (aka 'enum efx_loopback_type_e')
is always true [-Werror,-Wtautological-constant-out-of-range-compare]
         if (EFX_TEST_QWORD_BIT(encp->enc_loopback_types[link_mode],
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.../dpdk/drivers/net/sfc/base/efx_types.h:1590:28: note: expanded from macro
'EFX_TEST_QWORD_BIT'
#define EFX_TEST_QWORD_BIT      EFX_TEST_QWORD_BIT64
                                 ^
.../dpdk/drivers/net/sfc/base/efx_types.h:1412:22: note: expanded from macro
'EFX_TEST_QWORD_BIT64'
                     __CPU_TO_LE_64(EFX_SHIFT64(_bit, FIX_LINT(0)))) != 0)
                     ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.../dpdk/drivers/net/sfc/base/efx_types.h:1290:32: note: expanded from macro
'EFX_SHIFT64'
         (((_bit) >= (_base) && (_bit) < (_base) + 64) ?                 \
                                       ^
.../dpdk/drivers/net/sfc/base/efx_types.h:269:50: note: expanded from macro
'__CPU_TO_LE_64'
#define __CPU_TO_LE_64(_x)      ((uint64_t)__NOSWAP64(_x))
                                            ~~~~~~~~~~~^~~
.../dpdk/drivers/net/sfc/base/efx_types.h:238:26: note: expanded from macro
'__NOSWAP64'
#define __NOSWAP64(_x)          (_x)
                                  ^~
1 error generated.

Thanks, I've added patch to fix the problem.

Andrew.

Reply via email to