<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 - warnings in CNXK when built with LTO"
   href="https://bugs.dpdk.org/show_bug.cgi?id=1790">1790</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>warnings in CNXK when built with LTO
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>25.07
          </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>ethdev
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>stephen@networkplumber.org
          </td>
        </tr>

        <tr>
          <th>Target Milestone</th>
          <td>---
          </td>
        </tr></table>
      <p>
        <div class="bz_comment_block">
          <pre class="bz_comment_text">If DPDK is built with link time optimization the compiler can see across file
scope and detect more errors like this.

$ meson setup build -Db_lto=true && ninja --quiet -C build

In function ‘parse_flag’,
    inlined from ‘kvargs_process_common’ at ../lib/kvargs/rte_kvargs.c:187:9,
    inlined from ‘rte_kvargs_process’ at ../lib/kvargs/rte_kvargs.c:203:9,
    inlined from ‘cnxk_ethdev_parse_devargs’ at
../drivers/net/cnxk/cnxk_ethdev_devargs.c:371:2:
../drivers/net/cnxk/cnxk_ethdev_devargs.c:166: warning: writing 2 bytes into a
region of size 1 [-Wstringop-overflow=]
  166 |         *(uint16_t *)extra_args = atoi(value);
../drivers/net/cnxk/cnxk_ethdev_devargs.c: In function
‘cnxk_ethdev_parse_devargs’:
../drivers/net/cnxk/cnxk_ethdev_devargs.c:306:17: note: destination object
‘force_tail_drop’ of size 1
  306 |         uint8_t force_tail_drop = 0;
      |                 ^
In function ‘parse_flag’,
    inlined from ‘kvargs_process_common’ at ../lib/kvargs/rte_kvargs.c:187:9,
    inlined from ‘rte_kvargs_process’ at ../lib/kvargs/rte_kvargs.c:203:9,
    inlined from ‘cnxk_ethdev_parse_devargs’ at
../drivers/net/cnxk/cnxk_ethdev_devargs.c:372:2:
../drivers/net/cnxk/cnxk_ethdev_devargs.c:166: warning: writing 2 bytes into a
region of size 1 [-Wstringop-overflow=]
  166 |         *(uint16_t *)extra_args = atoi(value);
../drivers/net/cnxk/cnxk_ethdev_devargs.c: In function
‘cnxk_ethdev_parse_devargs’:
../drivers/net/cnxk/cnxk_ethdev_devargs.c:312:17: note: destination object
‘dis_xqe_drop’ of size 1
  312 |         uint8_t dis_xqe_drop = 0;
      |                 ^
../drivers/common/cnxk/roc_platform.c: In function ‘irq_config’:
../drivers/common/cnxk/roc_platform.c:55:14: warning: argument to
variable-length array is too large [-Wvla-larger-than=]
   55 |         char irq_set_buf[MSIX_IRQ_SET_BUF_LEN];
      |              ^
../drivers/common/cnxk/roc_platform.c:55:14: note: limit is 9223372036854775807
bytes, but argument is 18446744073709551548
../drivers/common/cnxk/roc_platform.c: In function ‘irq_init’:
../drivers/common/cnxk/roc_platform.c:91:14: warning: argument to
variable-length array is too large [-Wvla-larger-than=]
   91 |         char irq_set_buf[MSIX_IRQ_SET_BUF_LEN];
      |              ^
../drivers/common/cnxk/roc_platform.c:91:14: note: limit is 9223372036854775807
bytes, but argument is 18446744073709551548
In function ‘roc_ow_reass_inb_sa_init’,
    inlined from ‘nix_inl_reass_inb_sa_tbl_setup’ at
../drivers/common/cnxk/roc_nix_inl.c:610:2,
    inlined from ‘nix_inl_inb_init’ at
../drivers/common/cnxk/roc_nix_inl.c:1417:8,
    inlined from ‘roc_nix_inl_inb_init’ at
../drivers/common/cnxk/roc_nix_inl.c:1439:9:
../drivers/common/cnxk/roc_ie_ow.c:35:9: warning: ‘memset’ writing 808 bytes
into a region of size 1 overflows the destination [-Wstringop-overflow=]
   35 |         memset(sa, 0, sizeof(struct roc_ow_ipsec_inb_sa));
      |         ^
In function ‘nix_inl_reass_inb_sa_tbl_setup’,
    inlined from ‘nix_inl_inb_init’ at
../drivers/common/cnxk/roc_nix_inl.c:1417:8,
    inlined from ‘roc_nix_inl_inb_init’ at
../drivers/common/cnxk/roc_nix_inl.c:1439:9:
../drivers/common/cnxk/roc_nix_inl.c:603:40: note: destination object of size 1
allocated by ‘rte_zmalloc’
  603 |         nix->inb_sa_base[profile_id] = plt_zmalloc(inb_sa_sz * max_sa,
ROC_NIX_INL_SA_BASE_ALIGN);
      |
          </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=1790">
          <meta itemprop="name" content="View bug">
        </div>
        <meta itemprop="description" content="Bugzilla bug update notification">
      </div>
    </body>
</html>