DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Morten Brørup" <mb@smartsharesystems.com>
To: "Timothy McDaniel" <timothy.mcdaniel@intel.com>
Cc: <dev@dpdk.org>
Subject: dlb2 weird rte_memcpy
Date: Wed, 28 Dec 2022 13:25:29 +0100	[thread overview]
Message-ID: <98CBD80474FA8B44BF855DF32C47DC35D8760D@smartserver.smartshare.dk> (raw)

Timothy,

What is the purpose of [1]? Is it superfluous, or should ".hw_rsrc_max" be removed from the source pointer, or is the size wrong?

[1]: https://elixir.bootlin.com/dpdk/latest/source/drivers/event/dlb2/dlb2.c#L280

Building with access attributes to rte_memcpy() [2] causes this error:

../drivers/event/dlb2/dlb2.c: In function 'dlb2_hw_query_resources':
../drivers/event/dlb2/dlb2.c:280:9: error: 'rte_memcpy' reading 40 bytes from a region of size 32 [-Werror=stringop-overread]
  280 |         rte_memcpy(dlb2_info, &handle->info.hw_rsrc_max, sizeof(*dlb2_info));
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../drivers/event/dlb2/dlb2.c:34:
../drivers/event/dlb2/dlb2_priv.h:194:30: note: source object 'hw_rsrc_max' of size 32
  194 |         struct dlb2_hw_rsrcs hw_rsrc_max;
      |                              ^~~~~~~~~~~
In file included from ../lib/mempool/rte_mempool.h:48,
                 from ../lib/eventdev/rte_eventdev.h:217,
                 from ../drivers/event/dlb2/dlb2.c:22:
../lib/eal/x86/include/rte_memcpy.h:869:1: note: in a call to function 'rte_memcpy' declared with attribute 'access (read_only, 2, 3)'
  869 | rte_memcpy(void *dst, const void *src, size_t n)
      | ^~~~~~~~~~
cc1: all warnings being treated as errors

[2]: https://patchwork.dpdk.org/project/dpdk/patch/20221228114043.98739-1-mb@smartsharesystems.com/


Med venlig hilsen / Kind regards,
-Morten Brørup


                 reply	other threads:[~2022-12-28 12:25 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=98CBD80474FA8B44BF855DF32C47DC35D8760D@smartserver.smartshare.dk \
    --to=mb@smartsharesystems.com \
    --cc=dev@dpdk.org \
    --cc=timothy.mcdaniel@intel.com \
    /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).