<div data-ntes="ntes_mail_body_root" style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div id="spnEditorContent"><pre class="content" style="box-sizing: border-box; overflow: auto; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 13px; padding: 9.5px; margin-top: 0px; margin-bottom: 10px; line-height: normal; color: rgb(51, 51, 51); word-break: break-all; border: 0px; border-radius: 0px;"><span class="quote" style="box-sizing: border-box; color: rgb(0, 127, 0); font-size: 11.05px; line-height: 9.3925px;">> [main] [dpdk.org] $ git diff</span>
<span class="quote" style="box-sizing: border-box; color: rgb(0, 127, 0); font-size: 11.05px; line-height: 9.3925px;">> diff --git a/lib/graph/rte_graph_worker_common.h b/lib/graph/rte_graph_worker_common.h</span>
<span class="quote" style="box-sizing: border-box; color: rgb(0, 127, 0); font-size: 11.05px; line-height: 9.3925px;">> index a518af2b2a..ec9a82186d 100644</span>
<span class="quote" style="box-sizing: border-box; color: rgb(0, 127, 0); font-size: 11.05px; line-height: 9.3925px;">> --- a/lib/graph/rte_graph_worker_common.h</span>
<span class="quote" style="box-sizing: border-box; color: rgb(0, 127, 0); font-size: 11.05px; line-height: 9.3925px;">> +++ b/lib/graph/rte_graph_worker_common.h</span>
<span class="quote" style="box-sizing: border-box; color: rgb(0, 127, 0); font-size: 11.05px; line-height: 9.3925px;">> @@ -104,6 +104,7 @@ struct __rte_cache_aligned rte_node {</span>
<span class="quote" style="box-sizing: border-box; color: rgb(0, 127, 0); font-size: 11.05px; line-height: 9.3925px;">> /** Original process function when pcap is enabled. */</span>
<span class="quote" style="box-sizing: border-box; color: rgb(0, 127, 0); font-size: 11.05px; line-height: 9.3925px;">> rte_node_process_t original_process;</span>
<span class="quote" style="box-sizing: border-box; color: rgb(0, 127, 0); font-size: 11.05px; line-height: 9.3925px;">
> + alignas(RTE_CACHE_LINE_MIN_SIZE)</span>
<span class="quote" style="box-sizing: border-box; color: rgb(0, 127, 0); font-size: 11.05px; line-height: 9.3925px;">> union {</span>
Hi, Jerin
The C++standard cannot align anonymous unions. Do we need to fill in reserved fields in order to maintain union alignment with RTE-CAHE_LINE_LIN_SIZE bytes?
<span class="quote" style="box-sizing: border-box; color: rgb(0, 127, 0); font-size: 11.05px; line-height: 9.3925px;">
> /* Fast schedule area for mcore dispatch model */</span>
<span class="quote" style="box-sizing: border-box; color: rgb(0, 127, 0); font-size: 11.05px; line-height: 9.3925px;">> struct {</span>
<span class="quote" style="box-sizing: border-box; color: rgb(0, 127, 0); font-size: 11.05px; line-height: 9.3925px;">> @@ -112,6 +113,7 @@ struct __rte_cache_aligned rte_node {</span>
<span class="quote" style="box-sizing: border-box; color: rgb(0, 127, 0); font-size: 11.05px; line-height: 9.3925px;">> uint64_t total_sched_fail; /**< Number of scheduled failure. */</span>
<span class="quote" style="box-sizing: border-box; color: rgb(0, 127, 0); font-size: 11.05px; line-height: 9.3925px;">> } dispatch;</span>
<span class="quote" style="box-sizing: border-box; color: rgb(0, 127, 0); font-size: 11.05px; line-height: 9.3925px;">> };</span>
<span class="quote" style="box-sizing: border-box; color: rgb(0, 127, 0); font-size: 11.05px; line-height: 9.3925px;">> + alignas(RTE_CACHE_LINE_MIN_SIZE)</span>
<span class="quote" style="box-sizing: border-box; color: rgb(0, 127, 0); font-size: 11.05px; line-height: 9.3925px;">> rte_graph_off_t xstat_off; /**< Offset to xstat counters. */</span>
<span class="quote" style="box-sizing: border-box; color: rgb(0, 127, 0); font-size: 11.05px; line-height: 9.3925px;">> /* Fast path area */</span>
<span class="quote" style="box-sizing: border-box; color: rgb(0, 127, 0); font-size: 11.05px; line-height: 9.3925px;">> __extension__ struct __rte_cache_aligned {</span>
FAILED: buildtools/chkincs/chkincs-cpp.p/meson-generated_rte_graph_worker.cpp.o
ccache c++ -Ibuildtools/chkincs/chkincs-cpp.p -Ibuildtools/chkincs -I../buildtools/chkincs -Iexamples/l3fwd -I../examples/l3fwd -I../examples/common -Idrivers/bus/vdev -I../drivers/bus/vdev -I. -I.. -Iconfig -I../config -Ilib/eal/include -I../lib/eal/include -Ilib/eal/linux/include -I../lib/eal/linux/include -Ilib/eal/x86/include -I../lib/eal/x86/include -I../kernel/linux -Ilib/eal/common -I../lib/eal/common -Ilib/eal -I../lib/eal -Ilib/kvargs -I../lib/kvargs -Ilib/log -I../lib/log -Ilib/metrics -I../lib/metrics -Ilib/telemetry -I../lib/telemetry -Idrivers/bus/pci -I../drivers/bus/pci -I../drivers/bus/pci/linux -Ilib/pci -I../lib/pci -Idrivers/bus/vmbus -I../drivers/bus/vmbus -I../drivers/bus/vmbus/linux -Ilib/argparse -I../lib/argparse -Ilib/ptr_compress -I../lib/ptr_compress -Ilib/ring -I../lib/ring -Ilib/rcu -I../lib/rcu -Ilib/mempool -I../lib/mempool -Ilib/mbuf -I../lib/mbuf -Ilib/net -I../lib/net -Ilib/meter -I../lib/meter -Ilib/ethdev -I../lib/ethdev -Ilib/cmdline -I../lib/cmdline -Ilib/hash -I../lib/hash -Ilib/timer -I../lib/timer -Ilib/acl -I../lib/acl -Ilib/bbdev -I../lib/bbdev -Ilib/bitratestats -I../lib/bitratestats -Ilib/bpf -I../lib/bpf -Ilib/cfgfile -I../lib/cfgfile -Ilib/compressdev -I../lib/compressdev -Ilib/cryptodev -I../lib/cryptodev -Ilib/distributor -I../lib/distributor -Ilib/dmadev -I../lib/dmadev -Ilib/efd -I../lib/efd -Ilib/eventdev -I../lib/eventdev -Ilib/dispatcher -I../lib/dispatcher -Ilib/gpudev -I../lib/gpudev -Ilib/gro -I../lib/gro -Ilib/gso -I../lib/gso -Ilib/ip_frag -I../lib/ip_frag -Ilib/jobstats -I../lib/jobstats -Ilib/latencystats -I../lib/latencystats -Ilib/lpm -I../lib/lpm -Ilib/member -I../lib/member -Ilib/pcapng -I../lib/pcapng -Ilib/power -I../lib/power -Ilib/rawdev -I../lib/rawdev -Ilib/regexdev -I../lib/regexdev -Ilib/mldev -I../lib/mldev -Ilib/rib -I../lib/rib -Ilib/reorder -I../lib/reorder -Ilib/sched -I../lib/sched -Ilib/security -I../lib/security -Ilib/stack -I../lib/stack -Ilib/vhost -I../lib/vhost -Ilib/ipsec -I../lib/ipsec -Ilib/pdcp -I../lib/pdcp -Ilib/fib -I../lib/fib -Ilib/port -I../lib/port -Ilib/pdump -I../lib/pdump -Ilib/table -I../lib/table -Ilib/pipeline -I../lib/pipeline -Ilib/graph -I../lib/graph -Ilib/node -I../lib/node -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -Werror -g -include rte_config.h -march=corei7 -mrtm -MD -MQ buildtools/chkincs/chkincs-cpp.p/meson-generated_rte_graph_worker.cpp.o -MF buildtools/chkincs/chkincs-cpp.p/meson-generated_rte_graph_worker.cpp.o.d -o buildtools/chkincs/chkincs-cpp.p/meson-generated_rte_graph_worker.cpp.o -c buildtools/chkincs/chkincs-cpp.p/rte_graph_worker.cpp
In file included from /home/runner/work/dpdk/dpdk/lib/graph/rte_graph_model_rtc.h:6,
from /home/runner/work/dpdk/dpdk/lib/graph/rte_graph_worker.h:9,
from buildtools/chkincs/chkincs-cpp.p/rte_graph_worker.cpp:1:
/home/runner/work/dpdk/dpdk/lib/graph/rte_graph_worker_common.h:108:15: error: attribute ignored in declaration of ¡®union rte_node::<unnamed>¡¯ [-Werror=attributes]
108 | union {
| ^
/home/runner/work/dpdk/dpdk/lib/graph/rte_graph_worker_common.h:108:15: note: attribute for ¡®union rte_node::<unnamed>¡¯ must follow the ¡®union¡¯ keyword
cc1plus: all warnings being treated as errors
[5410/6569] Compiling C++ object buildtools/chkincs/chkincs-cpp.p/meson-generated_rte_table_lpm.cpp.o
[5411/6569] Compiling C++ object buildtools/chkincs/chkincs-cpp.p/meson-generated_rte_port_in_action.cpp.o
[5412/6569] Compiling C++ object buildtools/chkincs/chkincs-cpp.p/meson-generated_rte_pipeline.cpp.o
[5413/6569] Compiling C++ object buildtools/chkincs/chkincs-cpp.p/meson-generated_rte_table_action.cpp.o
[5414/6569] Compiling C++ object buildtools/chkincs/chkincs-cpp.p/meson-generated_rte_swx_ipsec.cpp.o
ninja: build stopped: subcommand failed.</pre></div></div>