<html>
    <head>
      <base href="https://bugs.dpdk.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8" class="bz_new_table">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - net/mlx5: Incompatible enum type used in bitwise operation"
   href="https://bugs.dpdk.org/show_bug.cgi?id=1758">1758</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>net/mlx5: Incompatible enum type used in bitwise operation
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>DPDK
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>25.03
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>UNCONFIRMED
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>other
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>dev@dpdk.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>andremuz@gmail.com
          </td>
        </tr>

        <tr>
          <th>Target Milestone</th>
          <td>---
          </td>
        </tr></table>
      <p>
        <div class="bz_comment_block">
          <pre class="bz_comment_text">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. */
          </pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
      <div itemscope itemtype="http://schema.org/EmailMessage">
        <div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
          
          <link itemprop="url" href="https://bugs.dpdk.org/show_bug.cgi?id=1758">
          <meta itemprop="name" content="View bug">
        </div>
        <meta itemprop="description" content="Bugzilla bug update notification">
      </div>
    </body>
</html>