On 7/16/2024 1:02 PM, Serhii Iliushyk wrote:
> diff --git 
> a/drivers/net/ntnic/nthw/core/nt200a0x/clock_profiles/nthw_fpga_clk9563.c 
> b/drivers/net/ntnic/nthw/core/nt200a0x/clock_profiles/nthw_fpga_clk9563.c
> new file mode 100644
> index 0000000000..a957581bf3
> --- /dev/null
> +++ b/drivers/net/ntnic/nthw/core/nt200a0x/clock_profiles/nthw_fpga_clk9563.c
> @@ -0,0 +1,47 @@
> +/*
> + * SPDX-License-Identifier: BSD-3-Clause
> + * Copyright(c) 2023 Napatech A/S
> + */
> +
> +#include "ntnic_mod_reg.h"
> +
> +/*
> + * Clock profile for NT200A02 FPGA 9563
> + */
> +#define si5340_revd_register_t type_9563_si5340_nt200a02_u23_v5
> +#define si5340_revd_registers data_9563_si5340_nt200a02_u23_v5
> +#include "NT200A02_U23_Si5340_adr0_v5-Registers.h"
> +#ifdef __cplusplus
> +static_assert(sizeof(type_9563_si5340_nt200a02_u23_v5) == 
> sizeof(clk_profile_data_fmt2_t),
> +     clk_profile_size_error_msg);
> +#endif       /* __cplusplus */
>

As project compiled with C11 standard, C supports static assert, keyword
by spec is '_Static_assert' but it is aliased to 'static_assert', please
check 'rte_common.h', so it should be OK to use 'static_assert' directly
without "#ifdef __cplusplus".

Or DPDK macro for it is 'RTE_BUILD_BUG_ON', both are OK, up to you.

Reply via email to