net/mlx5: Incompatible enum type used in bitwise operation
https://bugs.dpdk.org/show_bug.cgi?id=1758
Bug ID: 1758
Summary: net/mlx5: Incompatible enum type used in bitwise
operation
Product: DPDK
Version: 25.03
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: other
Assignee: [email protected]
Reporter: [email protected]Target Milestone: ---
Compiling with MSCS results in the warning below:
../drivers/net/mlx5/mlx5_flow_dv.c(19636): warning C5287: operands are different enum types 'ibv_flow_attr_type' and 'ibv_flow_flags'; use an explicit cast to silence this warning
It looks like a legit bug. Here is the offending line:
struct mlx5dv_flow_matcher_attr dv_attr = {
.type = IBV_FLOW_ATTR_NORMAL | IBV_FLOW_ATTR_FLAGS_EGRESS,
As the warning states, the constants in the bitwise operation belong to different enums, and these enums have overlaping values, which makes the bitwise operation very suspicious.
On top of that, I see that struct mlx5dv_flow_matcher_attr has a field named "flags" which accepts values from ibv_flow_flags:
struct mlx5dv_flow_matcher_attr {
enum ibv_flow_attr_type type;
uint32_t flags; /* From enum ibv_flow_flags. */Signature · 2 lines
You are receiving this mail because: You are the assignee for the bug.