[dpdk-dev] [dpdk-users] when add the '-Werror' compilation option, tap、mlx5 compilation failed on dpdk-21.11.
wangyunjian
wangyunjian at huawei.com
Fri Dec 10 02:29:54 CET 2021
Hi, all
When I tried to add the '-Werror' compilation option to compile the dpdk-21.11’s device drivers, some errors were reported
TAP:
../drivers/net/tap/tap_flow.c:27:2: error: redeclaration of enumerator 'TCA_FLOWER_UNSPEC'
TCA_FLOWER_UNSPEC,
^~~~~~~~~~~~~~~~~
In file included from ../drivers/net/tap/tap_tcmsgs.h:13:0,
from ../drivers/net/tap/tap_flow.c:18:
/usr/include/linux/pkt_cls.h:429:2: note: previous definition of 'TCA_FLOWER_UNSPEC' was here
TCA_FLOWER_UNSPEC,
^~~~~~~~~~~~~~~~~
../drivers/net/tap/tap_flow.c:28:2: error: redeclaration of enumerator 'TCA_FLOWER_CLASSID'
TCA_FLOWER_CLASSID,
...
MLX5:
In file included from /usr/include/infiniband/mlx5dv.h:49:0,
from ../drivers/common/mlx5/linux/mlx5_glue.h:15,
from ../drivers/common/mlx5/linux/mlx5_glue.c:17:
../drivers/common/mlx5/linux/mlx5_glue.h:58:6: error: nested redefinition of 'enum mlx5_ib_uapi_flow_action_packet_reformat_type'
enum mlx5dv_flow_action_packet_reformat_type { packet_reformat_type = 0, };
^
../drivers/common/mlx5/linux/mlx5_glue.h:58:6: error: redeclaration of 'enum mlx5_ib_uapi_flow_action_packet_reformat_type'
In file included from /usr/include/infiniband/mlx5_api.h:36:0,
from /usr/include/infiniband/mlx5dv.h:49,
from ../drivers/common/mlx5/linux/mlx5_glue.h:15,
from ../drivers/common/mlx5/linux/mlx5_glue.c:17:
/usr/include/infiniband/mlx5_user_ioctl_verbs.h:50:6: note: originally defined here enum mlx5_ib_uapi_flow_action_packet_reformat_type {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/infiniband/mlx5dv.h:49:0,
from ../drivers/common/mlx5/linux/mlx5_glue.h:15,
from ../drivers/common/mlx5/linux/mlx5_glue.c:17:
../drivers/common/mlx5/linux/mlx5_glue.h:59:6: error: nested redefinition of 'enum mlx5_ib_uapi_flow_table_type'
enum mlx5dv_flow_table_type { flow_table_type = 0, };
^~~~~~~~~~~~~~~~~~
How can I solve this problem ?
Thakns for help.
More information about the dev
mailing list