DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] telemetry: make usable from C++
@ 2022-10-12 12:05 Markus Theil
  2022-10-27 12:04 ` David Marchand
  0 siblings, 1 reply; 3+ messages in thread
From: Markus Theil @ 2022-10-12 12:05 UTC (permalink / raw)
  To: dev; +Cc: Ciara Power, Markus Theil

From: Markus Theil <markus.theil@secunet.com>

Add missing include in order to make C++ compilers
happy.

Signed-off-by: Markus Theil <markus.theil@secunet.com>
---
 lib/telemetry/rte_telemetry.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/telemetry/rte_telemetry.h b/lib/telemetry/rte_telemetry.h
index 5e5ddaa25d..ded8e26b8b 100644
--- a/lib/telemetry/rte_telemetry.h
+++ b/lib/telemetry/rte_telemetry.h
@@ -3,6 +3,7 @@
  */
 
 #include <stdint.h>
+#include <stddef.h>
 
 #include <rte_compat.h>
 
-- 
2.38.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] telemetry: make usable from C++
  2022-10-12 12:05 [PATCH] telemetry: make usable from C++ Markus Theil
@ 2022-10-27 12:04 ` David Marchand
  2022-10-28  6:48   ` Markus Theil
  0 siblings, 1 reply; 3+ messages in thread
From: David Marchand @ 2022-10-27 12:04 UTC (permalink / raw)
  To: Markus Theil; +Cc: dev, Ciara Power, Markus Theil

On Wed, Oct 12, 2022 at 2:05 PM Markus Theil <markus.theil@tu-ilmenau.de> wrote:
>
> From: Markus Theil <markus.theil@secunet.com>
>
> Add missing include in order to make C++ compilers
> happy.
>

We have build checks for headers (-Dcheck_includes meson option), like for C++:

$ cat $BUILDDIR/buildtools/chkincs/chkincs-cpp.p/rte_telemetry.cpp
#include "/home/dmarchan/dpdk/lib/telemetry/rte_telemetry.h"

[917/1289] ccache c++ -Ibuildtools/chkincs/chkincs-cpp.p
-Ibuildtools/chkincs -I../../../dpdk/buildtools/chkincs
-Iexamples/vmdq_dcb -I../../../dpdk/examples/vmdq_dcb
-I../../../dpdk/examples/common -Idrivers/bus/vdev
-I../../../dpdk/drivers/bus/vdev -I. -I../../../dpdk -Iconfig
-I../../../dpdk/config -Ilib/eal/include
-I../../../dpdk/lib/eal/include -Ilib/eal/linux/include
-I../../../dpdk/lib/eal/linux/include -Ilib/eal/x86/include
-I../../../dpdk/lib/eal/x86/include -Ilib/eal/common
-I../../../dpdk/lib/eal/common -Ilib/eal -I../../../dpdk/lib/eal
-Ilib/kvargs -I../../../dpdk/lib/kvargs -Ilib/metrics
-I../../../dpdk/lib/metrics -Ilib/telemetry
-I../../../dpdk/lib/telemetry -Idrivers/bus/pci
-I../../../dpdk/drivers/bus/pci -I../../../dpdk/drivers/bus/pci/linux
-Ilib/pci -I../../../dpdk/lib/pci -Ilib/ring -I../../../dpdk/lib/ring
-Ilib/rcu -I../../../dpdk/lib/rcu -Ilib/mempool
-I../../../dpdk/lib/mempool -Ilib/mbuf -I../../../dpdk/lib/mbuf
-Ilib/net -I../../../dpdk/lib/net -Ilib/meter
-I../../../dpdk/lib/meter -Ilib/ethdev -I../../../dpdk/lib/ethdev
-Ilib/cmdline -I../../../dpdk/lib/cmdline -Ilib/hash
-I../../../dpdk/lib/hash -Ilib/timer -I../../../dpdk/lib/timer
-Ilib/acl -I../../../dpdk/lib/acl -Ilib/bbdev
-I../../../dpdk/lib/bbdev -Ilib/bitratestats
-I../../../dpdk/lib/bitratestats -Ilib/bpf -I../../../dpdk/lib/bpf
-Ilib/cfgfile -I../../../dpdk/lib/cfgfile -Ilib/compressdev
-I../../../dpdk/lib/compressdev -Ilib/cryptodev
-I../../../dpdk/lib/cryptodev -Ilib/distributor
-I../../../dpdk/lib/distributor -Ilib/efd -I../../../dpdk/lib/efd
-Ilib/eventdev -I../../../dpdk/lib/eventdev -Ilib/gpudev
-I../../../dpdk/lib/gpudev -Ilib/gro -I../../../dpdk/lib/gro -Ilib/gso
-I../../../dpdk/lib/gso -Ilib/ip_frag -I../../../dpdk/lib/ip_frag
-Ilib/jobstats -I../../../dpdk/lib/jobstats -Ilib/kni
-I../../../dpdk/lib/kni -Ilib/latencystats
-I../../../dpdk/lib/latencystats -Ilib/lpm -I../../../dpdk/lib/lpm
-Ilib/member -I../../../dpdk/lib/member -Ilib/pcapng
-I../../../dpdk/lib/pcapng -Ilib/power -I../../../dpdk/lib/power
-Ilib/rawdev -I../../../dpdk/lib/rawdev -Ilib/regexdev
-I../../../dpdk/lib/regexdev -Ilib/dmadev -I../../../dpdk/lib/dmadev
-Ilib/rib -I../../../dpdk/lib/rib -Ilib/reorder
-I../../../dpdk/lib/reorder -Ilib/sched -I../../../dpdk/lib/sched
-Ilib/security -I../../../dpdk/lib/security -Ilib/stack
-I../../../dpdk/lib/stack -Ilib/vhost -I../../../dpdk/lib/vhost
-Ilib/ipsec -I../../../dpdk/lib/ipsec -Ilib/fib
-I../../../dpdk/lib/fib -Ilib/port -I../../../dpdk/lib/port
-Ilib/pdump -I../../../dpdk/lib/pdump -Ilib/table
-I../../../dpdk/lib/table -Ilib/pipeline -I../../../dpdk/lib/pipeline
-Ilib/flow_classify -I../../../dpdk/lib/flow_classify -Ilib/graph
-I../../../dpdk/lib/graph -Ilib/node -I../../../dpdk/lib/node
-fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch
-Wnon-virtual-dtor -Wextra -Werror -O2 -g -include rte_config.h
-march=nehalem -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API -MD -MQ
buildtools/chkincs/chkincs-cpp.p/meson-generated_rte_telemetry.cpp.o
-MF buildtools/chkincs/chkincs-cpp.p/meson-generated_rte_telemetry.cpp.o.d
-o buildtools/chkincs/chkincs-cpp.p/meson-generated_rte_telemetry.cpp.o
-c buildtools/chkincs/chkincs-cpp.p/rte_telemetry.cpp

Besides, I fail to see the need for stddef.h.

In which setup / case, did you get a compilation issue?


-- 
David Marchand


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] telemetry: make usable from C++
  2022-10-27 12:04 ` David Marchand
@ 2022-10-28  6:48   ` Markus Theil
  0 siblings, 0 replies; 3+ messages in thread
From: Markus Theil @ 2022-10-28  6:48 UTC (permalink / raw)
  To: David Marchand; +Cc: dev, Ciara Power, Markus Theil

On 10/27/22 14:04, David Marchand wrote:
> On Wed, Oct 12, 2022 at 2:05 PM Markus Theil <markus.theil@tu-ilmenau.de> wrote:
>> From: Markus Theil <markus.theil@secunet.com>
>>
>> Add missing include in order to make C++ compilers
>> happy.
>>
> We have build checks for headers (-Dcheck_includes meson option), like for C++:
>
> $ cat $BUILDDIR/buildtools/chkincs/chkincs-cpp.p/rte_telemetry.cpp
> #include "/home/dmarchan/dpdk/lib/telemetry/rte_telemetry.h"
>
> [917/1289] ccache c++ -Ibuildtools/chkincs/chkincs-cpp.p
> -Ibuildtools/chkincs -I../../../dpdk/buildtools/chkincs
> -Iexamples/vmdq_dcb -I../../../dpdk/examples/vmdq_dcb
> -I../../../dpdk/examples/common -Idrivers/bus/vdev
> -I../../../dpdk/drivers/bus/vdev -I. -I../../../dpdk -Iconfig
> -I../../../dpdk/config -Ilib/eal/include
> -I../../../dpdk/lib/eal/include -Ilib/eal/linux/include
> -I../../../dpdk/lib/eal/linux/include -Ilib/eal/x86/include
> -I../../../dpdk/lib/eal/x86/include -Ilib/eal/common
> -I../../../dpdk/lib/eal/common -Ilib/eal -I../../../dpdk/lib/eal
> -Ilib/kvargs -I../../../dpdk/lib/kvargs -Ilib/metrics
> -I../../../dpdk/lib/metrics -Ilib/telemetry
> -I../../../dpdk/lib/telemetry -Idrivers/bus/pci
> -I../../../dpdk/drivers/bus/pci -I../../../dpdk/drivers/bus/pci/linux
> -Ilib/pci -I../../../dpdk/lib/pci -Ilib/ring -I../../../dpdk/lib/ring
> -Ilib/rcu -I../../../dpdk/lib/rcu -Ilib/mempool
> -I../../../dpdk/lib/mempool -Ilib/mbuf -I../../../dpdk/lib/mbuf
> -Ilib/net -I../../../dpdk/lib/net -Ilib/meter
> -I../../../dpdk/lib/meter -Ilib/ethdev -I../../../dpdk/lib/ethdev
> -Ilib/cmdline -I../../../dpdk/lib/cmdline -Ilib/hash
> -I../../../dpdk/lib/hash -Ilib/timer -I../../../dpdk/lib/timer
> -Ilib/acl -I../../../dpdk/lib/acl -Ilib/bbdev
> -I../../../dpdk/lib/bbdev -Ilib/bitratestats
> -I../../../dpdk/lib/bitratestats -Ilib/bpf -I../../../dpdk/lib/bpf
> -Ilib/cfgfile -I../../../dpdk/lib/cfgfile -Ilib/compressdev
> -I../../../dpdk/lib/compressdev -Ilib/cryptodev
> -I../../../dpdk/lib/cryptodev -Ilib/distributor
> -I../../../dpdk/lib/distributor -Ilib/efd -I../../../dpdk/lib/efd
> -Ilib/eventdev -I../../../dpdk/lib/eventdev -Ilib/gpudev
> -I../../../dpdk/lib/gpudev -Ilib/gro -I../../../dpdk/lib/gro -Ilib/gso
> -I../../../dpdk/lib/gso -Ilib/ip_frag -I../../../dpdk/lib/ip_frag
> -Ilib/jobstats -I../../../dpdk/lib/jobstats -Ilib/kni
> -I../../../dpdk/lib/kni -Ilib/latencystats
> -I../../../dpdk/lib/latencystats -Ilib/lpm -I../../../dpdk/lib/lpm
> -Ilib/member -I../../../dpdk/lib/member -Ilib/pcapng
> -I../../../dpdk/lib/pcapng -Ilib/power -I../../../dpdk/lib/power
> -Ilib/rawdev -I../../../dpdk/lib/rawdev -Ilib/regexdev
> -I../../../dpdk/lib/regexdev -Ilib/dmadev -I../../../dpdk/lib/dmadev
> -Ilib/rib -I../../../dpdk/lib/rib -Ilib/reorder
> -I../../../dpdk/lib/reorder -Ilib/sched -I../../../dpdk/lib/sched
> -Ilib/security -I../../../dpdk/lib/security -Ilib/stack
> -I../../../dpdk/lib/stack -Ilib/vhost -I../../../dpdk/lib/vhost
> -Ilib/ipsec -I../../../dpdk/lib/ipsec -Ilib/fib
> -I../../../dpdk/lib/fib -Ilib/port -I../../../dpdk/lib/port
> -Ilib/pdump -I../../../dpdk/lib/pdump -Ilib/table
> -I../../../dpdk/lib/table -Ilib/pipeline -I../../../dpdk/lib/pipeline
> -Ilib/flow_classify -I../../../dpdk/lib/flow_classify -Ilib/graph
> -I../../../dpdk/lib/graph -Ilib/node -I../../../dpdk/lib/node
> -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch
> -Wnon-virtual-dtor -Wextra -Werror -O2 -g -include rte_config.h
> -march=nehalem -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API -MD -MQ
> buildtools/chkincs/chkincs-cpp.p/meson-generated_rte_telemetry.cpp.o
> -MF buildtools/chkincs/chkincs-cpp.p/meson-generated_rte_telemetry.cpp.o.d
> -o buildtools/chkincs/chkincs-cpp.p/meson-generated_rte_telemetry.cpp.o
> -c buildtools/chkincs/chkincs-cpp.p/rte_telemetry.cpp
>
> Besides, I fail to see the need for stddef.h.
>
> In which setup / case, did you get a compilation issue?
>
>
I traced back, that we need this only for some internal patches which 
expose the JSON output of telemetry inside our DPDK application in order 
to get SFF digital optics module data without piping the telemetry 
socket back into our application. It can be therefore ignored and was 
posted by mistake. I'm archiving it.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-10-28  6:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-12 12:05 [PATCH] telemetry: make usable from C++ Markus Theil
2022-10-27 12:04 ` David Marchand
2022-10-28  6:48   ` Markus Theil

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