DPDK patches and discussions
 help / color / mirror / Atom feed
From: bugzilla@dpdk.org
To: dev@dpdk.org
Subject: [DPDK/ethdev Bug 1709] net/mlx5 warnings when build with lto
Date: Wed, 21 May 2025 15:20:35 +0000	[thread overview]
Message-ID: <bug-1709-3@http.bugs.dpdk.org/> (raw)

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

https://bugs.dpdk.org/show_bug.cgi?id=1709

            Bug ID: 1709
           Summary: net/mlx5 warnings when build with lto
           Product: DPDK
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: ethdev
          Assignee: dev@dpdk.org
          Reporter: stephen@networkplumber.org
  Target Milestone: ---

Suspect that temporary buffer may not be big enough.
LTO enables more inlining and therefore more bounds checking.

[3511/3591] Linking target drivers/librte_net_mlx5.so.25.2

In function ‘mlx5dr_action_prepare_decap_l3_data’,
    inlined from ‘mlx5dr_action_handle_tunnel_l3_to_l2’ at
../drivers/net/mlx5/hws/mlx5dr_action.c:2151:3,
    inlined from ‘mlx5dr_action_create_reformat_hws’ at
../drivers/net/mlx5/hws/mlx5dr_action.c:2221:9,
    inlined from ‘mlx5dr_action_create_reformat’ at
../drivers/net/mlx5/hws/mlx5dr_action.c:2278:8:
../drivers/net/mlx5/hws/mlx5dr_action.c:3630:17: warning: writing 4 bytes into
a region of size 0 [-Wstringop-overflow=]
 3630 |                 memcpy(dst, e_src, MLX5DR_ACTION_INLINE_DATA_SIZE); /*
data */
      |                 ^
../drivers/net/mlx5/hws/mlx5dr_action.c: In function
‘mlx5dr_action_create_reformat’:
../drivers/net/mlx5/hws/mlx5dr_action.c:2131:17: note: at offset [76, 524236]
into destination object ‘mh_data’ of size 64
 2131 |         uint8_t mh_data[MLX5DR_ACTION_REFORMAT_DATA_SIZE] = {0};
      |                 ^
In function ‘mlx5dr_action_prepare_decap_l3_data’,
    inlined from ‘mlx5dr_action_handle_tunnel_l3_to_l2’ at
../drivers/net/mlx5/hws/mlx5dr_action.c:2151:3,
    inlined from ‘mlx5dr_action_create_reformat_hws’ at
../drivers/net/mlx5/hws/mlx5dr_action.c:2221:9,
    inlined from ‘mlx5dr_action_create_reformat’ at
../drivers/net/mlx5/hws/mlx5dr_action.c:2278:8:
../drivers/net/mlx5/hws/mlx5dr_action.c:3630:17: warning: writing 4 bytes into
a region of size 0 [-Wstringop-overflow=]
 3630 |                 memcpy(dst, e_src, MLX5DR_ACTION_INLINE_DATA_SIZE); /*
data */
      |                 ^
../drivers/net/mlx5/hws/mlx5dr_action.c: In function
‘mlx5dr_action_create_reformat’:
../drivers/net/mlx5/hws/mlx5dr_action.c:2131:17: note: at offset [84, 524244]
into destination object ‘mh_data’ of size 64
 2131 |         uint8_t mh_data[MLX5DR_ACTION_REFORMAT_DATA_SIZE] = {0};
      |                 ^
In function ‘mlx5dr_action_prepare_decap_l3_data’,
    inlined from ‘mlx5dr_action_handle_tunnel_l3_to_l2’ at
../drivers/net/mlx5/hws/mlx5dr_action.c:2151:3,
    inlined from ‘mlx5dr_action_create_reformat_hws’ at
../drivers/net/mlx5/hws/mlx5dr_action.c:2221:9,
    inlined from ‘mlx5dr_action_create_reformat’ at
../drivers/net/mlx5/hws/mlx5dr_action.c:2278:8:
../drivers/net/mlx5/hws/mlx5dr_action.c:3630:17: warning: writing 4 bytes into
a region of size 0 [-Wstringop-overflow=]
 3630 |                 memcpy(dst, e_src, MLX5DR_ACTION_INLINE_DATA_SIZE); /*
data */
      |                 ^
../drivers/net/mlx5/hws/mlx5dr_action.c: In function
‘mlx5dr_action_create_reformat’:
../drivers/net/mlx5/hws/mlx5dr_action.c:2131:17: note: at offset [92, 524252]
into destination object ‘mh_data’ of size 64
 2131 |         uint8_t mh_data[MLX5DR_ACTION_REFORMAT_DATA_SIZE] = {0};
      |                 ^
In function ‘mlx5dr_action_prepare_decap_l3_data’,
    inlined from ‘mlx5dr_action_handle_tunnel_l3_to_l2’ at
../drivers/net/mlx5/hws/mlx5dr_action.c:2151:3,
    inlined from ‘mlx5dr_action_create_reformat_hws’ at
../drivers/net/mlx5/hws/mlx5dr_action.c:2221:9,
    inlined from ‘mlx5dr_action_create_reformat’ at
../drivers/net/mlx5/hws/mlx5dr_action.c:2278:8:
../drivers/net/mlx5/hws/mlx5dr_action.c:3630:17: warning: writing 4 bytes into
a region of size 0 [-Wstringop-overflow=]
 3630 |                 memcpy(dst, e_src, MLX5DR_ACTION_INLINE_DATA_SIZE); /*
data */
      |                 ^
../drivers/net/mlx5/hws/mlx5dr_action.c: In function
‘mlx5dr_action_create_reformat’:
../drivers/net/mlx5/hws/mlx5dr_action.c:2131:17: note: at offset [100, 524260]
into destination object ‘mh_data’ of size 64
 2131 |         uint8_t mh_data[MLX5DR_ACTION_REFORMAT_DATA_SIZE] = {0};
      |                 ^
In function ‘mlx5dr_action_prepare_decap_l3_data’,
    inlined from ‘mlx5dr_action_handle_tunnel_l3_to_l2’ at
../drivers/net/mlx5/hws/mlx5dr_action.c:2151:3,
    inlined from ‘mlx5dr_action_create_reformat_hws’ at
../drivers/net/mlx5/hws/mlx5dr_action.c:2221:9,
    inlined from ‘mlx5dr_action_create_reformat’ at
../drivers/net/mlx5/hws/mlx5dr_action.c:2278:8:
../drivers/net/mlx5/hws/mlx5dr_action.c:3630:17: warning: writing 4 bytes into
a region of size 0 [-Wstringop-overflow=]
 3630 |                 memcpy(dst, e_src, MLX5DR_ACTION_INLINE_DATA_SIZE); /*
data */
      |                 ^
../drivers/net/mlx5/hws/mlx5dr_action.c: In function
‘mlx5dr_action_create_reformat’:
../drivers/net/mlx5/hws/mlx5dr_action.c:2131:17: note: at offset [108, 524268]
into destination object ‘mh_data’ of size 64
 2131 |         uint8_t mh_data[MLX5DR_ACTION_REFORMAT_DATA_SIZE] = {0};
      |                 ^
In function ‘mlx5dr_action_prepare_decap_l3_data’,
    inlined from ‘mlx5dr_action_handle_tunnel_l3_to_l2’ at
../drivers/net/mlx5/hws/mlx5dr_action.c:2151:3,
    inlined from ‘mlx5dr_action_create_reformat_hws’ at
../drivers/net/mlx5/hws/mlx5dr_action.c:2221:9,
    inlined from ‘mlx5dr_action_create_reformat’ at
../drivers/net/mlx5/hws/mlx5dr_action.c:2278:8:
../drivers/net/mlx5/hws/mlx5dr_action.c:3630:17: warning: writing 4 bytes into
a region of size 0 [-Wstringop-overflow=]
 3630 |                 memcpy(dst, e_src, MLX5DR_ACTION_INLINE_DATA_SIZE); /*
data */
      |                 ^
../drivers/net/mlx5/hws/mlx5dr_action.c: In function
‘mlx5dr_action_create_reformat’:
../drivers/net/mlx5/hws/mlx5dr_action.c:2131:17: note: at offset [116, 524276]
into destination object ‘mh_data’ of size 64
 2131 |         uint8_t mh_data[MLX5DR_ACTION_REFORMAT_DATA_SIZE] = {0};
      |                 ^
In function ‘mlx5dr_action_prepare_decap_l3_data’,
    inlined from ‘mlx5dr_action_handle_tunnel_l3_to_l2’ at
../drivers/net/mlx5/hws/mlx5dr_action.c:2151:3,
    inlined from ‘mlx5dr_action_create_reformat_hws’ at
../drivers/net/mlx5/hws/mlx5dr_action.c:2221:9,
    inlined from ‘mlx5dr_action_create_reformat’ at
../drivers/net/mlx5/hws/mlx5dr_action.c:2278:8:
../drivers/net/mlx5/hws/mlx5dr_action.c:3630:17: warning: writing 4 bytes into
a region of size 0 [-Wstringop-overflow=]
 3630 |                 memcpy(dst, e_src, MLX5DR_ACTION_INLINE_DATA_SIZE); /*
data */
      |                 ^
../drivers/net/mlx5/hws/mlx5dr_action.c: In function
‘mlx5dr_action_create_reformat’:
../drivers/net/mlx5/hws/mlx5dr_action.c:2131:17: note: at offset [124, 524284]
into destination object ‘mh_data’ of size 64
 2131 |         uint8_t mh_data[MLX5DR_ACTION_REFORMAT_DATA_SIZE] = {0};
      |                 ^

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

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

                 reply	other threads:[~2025-05-21 15:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-1709-3@http.bugs.dpdk.org/ \
    --to=bugzilla@dpdk.org \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).