DPDK patches and discussions
 help / color / mirror / Atom feed
* dlb2 weird rte_memcpy
@ 2022-12-28 12:25 Morten Brørup
  0 siblings, 0 replies; only message in thread
From: Morten Brørup @ 2022-12-28 12:25 UTC (permalink / raw)
  To: Timothy McDaniel; +Cc: dev

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


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

only message in thread, other threads:[~2022-12-28 12:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-28 12:25 dlb2 weird rte_memcpy Morten Brørup

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).