DPDK patches and discussions
 help / color / mirror / Atom feed
* [DPDK/other Bug 1758] net/mlx5: Incompatible enum type used in bitwise operation
@ 2025-07-21 14:19 bugzilla
  0 siblings, 0 replies; only message in thread
From: bugzilla @ 2025-07-21 14:19 UTC (permalink / raw)
  To: dev

[-- Attachment #1: Type: text/plain, Size: 1467 bytes --]

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: dev@dpdk.org
          Reporter: andremuz@gmail.com
  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. */

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #2: Type: text/html, Size: 3342 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-07-21 14:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-21 14:19 [DPDK/other Bug 1758] net/mlx5: Incompatible enum type used in bitwise operation bugzilla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).