<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Dear DPDK Developers and Users,</p>
<p>I have met the following issue with my RFC 8219 compliant SIIT
and stateful NAT64/NAT44 tester, siitperf:
<a class="moz-txt-link-freetext" href="https://github.com/lencsegabor/siitperf">https://github.com/lencsegabor/siitperf</a></p>
<p>Its main program starts two sending threads and two receiving
threads on their exclusively used CPU cores using the <font
face="monospace">rte_eal_remote_launch()</font> function, e.g.,
the code is as follows:</p>
<p><font face="monospace"> // start left sender<br>
if ( rte_eal_remote_launch(send, &spars1,
cpu_left_sender) )<br>
std::cout << "Error: could not start Left
Sender." << std::endl;</font><br>
</p>
<p>When the test frame sending is finished, the senders check the
sending time, and if the allowed time was significantly exceeded,
the sender gives an error message and terminates (itself and also
the main program) using the <font face="monospace">rte_exit()</font>
function.</p>
<p>This is the code:<br>
</p>
<p><font face="monospace"> elapsed_seconds =
(double)(rte_rdtsc()-start_tsc)/hz;<br>
printf("Info: %s sender's sending took %3.10lf seconds.\n",
side, elapsed_seconds);<br>
if ( elapsed_seconds > duration*TOLERANCE )<br>
rte_exit(EXIT_FAILURE, "%s sending exceeded the %3.10lf
seconds limit, the test is invalid.\n", side,
duration*TOLERANCE);<br>
printf("%s frames sent: %lu\n", side, sent_frames);<br>
<br>
return 0; </font><br>
</p>
<p>The above code worked as I expected, while I used siitperf under
Debian 9.13 with DPDK 16.11.11-1+deb9u2. It always displayed the
execution time of test frame sending, and if the allowed time was
significantly exceed, then it gave an error message, and it was
terminated, thus the sender did not print out the number of send
frames. And also the main program was terminated due to the call
of this function: it did not write out the "Info: Test finished."
message.<br>
</p>
<p>However, when I updated siitperf to use it with Ubuntu 22.04 with
DPDK version "21.11.3-0ubuntu0.22.04.1 amd64", then I experienced
something rather strange:</p>
<p>In the case, when the sending time is significantly exceeded, I
get the following messages from the program (I copy here the full
output, as it may be useful):</p>
<p><font face="monospace">root@x033:~/siitperf# cat temp.out<br>
EAL: Detected CPU lcores: 56<br>
EAL: Detected NUMA nodes: 4<br>
EAL: Detected shared linkage of DPDK<br>
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket<br>
EAL: Selected IOVA mode 'PA'<br>
EAL: No free 2048 kB hugepages reported on node 0<br>
EAL: No free 2048 kB hugepages reported on node 1<br>
EAL: No free 2048 kB hugepages reported on node 2<br>
EAL: No free 2048 kB hugepages reported on node 3<br>
EAL: No available 2048 kB hugepages reported<br>
EAL: VFIO support initialized<br>
EAL: Probe PCI driver: net_ice (8086:159b) device: 0000:98:00.0
(socket 2)<br>
ice_load_pkg_type(): Active package is: 1.3.26.0, ICE OS Default
Package (single VLAN mode)<br>
EAL: Probe PCI driver: net_ice (8086:159b) device: 0000:98:00.1
(socket 2)<br>
ice_load_pkg_type(): Active package is: 1.3.26.0, ICE OS Default
Package (single VLAN mode)<br>
TELEMETRY: No legacy callbacks, legacy socket not created<br>
ice_set_rx_function(): Using AVX2 Vector Rx (port 0).<br>
ice_set_rx_function(): Using AVX2 Vector Rx (port 1).<br>
Info: Left port and Left Sender CPU core belong to the same NUMA
node: 2<br>
Info: Right port and Right Receiver CPU core belong to the same
NUMA node: 2<br>
Info: Right port and Right Sender CPU core belong to the same
NUMA node: 2<br>
Info: Left port and Left Receiver CPU core belong to the same
NUMA node: 2<br>
Info: Testing initiated at 2023-09-15 07:50:17<br>
EAL: Error - exiting with code: 1<br>
Cause: Forward sending exceeded the 60.0006000000 seconds
limit, the test is invalid.<br>
EAL: Error - exiting with code: 1<br>
Cause: Reverse sending exceeded the 60.0006000000 seconds
limit, the test is invalid.<br>
root@x033:~/siitperf#</font><br>
</p>
<p>The <font face="monospace">rte_exit()</font> function seems to
work, as the error message appears, and the number of sent frames
is not displayed, however, the "Info: ..." message about the
sending time (printed out earlier in the code) is missing! This is
rather strange!<br>
</p>
<p>What is worse, the program does not stop, but <b>the sender
threads and the main program remain running (forever)</b>.</p>
<p>Here is the output of the "top" command:</p>
<p><font face="monospace">top - 07:54:24 up 1 day, 14:12, 2 users,
load average: 3.02, 2.41, 2.10<br>
Tasks: 591 total, 2 running, 589 sleeping, 0 stopped, 0
zombie<br>
%Cpu0 :100.0 us, 0.0 sy, 0.0 ni, 0.0 id, 0.0 wa, 0.0 hi,
0.0 si, 0.0 st<br>
%Cpu1 :100.0 us, 0.0 sy, 0.0 ni, 0.0 id, 0.0 wa, 0.0 hi,
0.0 si, 0.0 st<br>
%Cpu2 : 0.0 us, 0.0 sy, 0.0 ni, 94.1 id, 0.0 wa, 0.0 hi,
5.9 si, 0.0 st<br>
%Cpu3 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi,
0.0 si, 0.0 st<br>
%Cpu4 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi,
0.0 si, 0.0 st<br>
%Cpu5 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi,
0.0 si, 0.0 st<br>
%Cpu6 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi,
0.0 si, 0.0 st<br>
%Cpu7 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi,
0.0 si, 0.0 st<br>
%Cpu8 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi,
0.0 si, 0.0 st<br>
%Cpu9 :100.0 us, 0.0 sy, 0.0 ni, 0.0 id, 0.0 wa, 0.0 hi,
0.0 si, 0.0 st<br>
%Cpu10 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi,
0.0 si, 0.0 st<br>
%Cpu11 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi,
0.0 si, 0.0 st<br>
%Cpu12 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi,
0.0 si, 0.0 st<br>
%Cpu13 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi,
0.0 si, 0.0 st</font><br>
</p>
<p>CPU0 is the main core, the left sender and the right sender use
CPU1 and CPU9, respectively. (The receivers that used CPU5 and
CPU13 already terminated due to their timeout.)</p>
<p><b>Thus, rte_exit() behaves differently now: it used the
terminate the main program but now it does not. </b>(And it
also suppresses some previously sent output.)<b><br>
</b></p>
<p>Is it a bug a new feature?</p>
<p><b>How could I achieve the old behavior?</b> (Or at least the
termination of the main program by sender threads?)</p>
<p>Thank you very much for you guidance!</p>
<p>Best regards,</p>
<p>Gábor Lencse</p>
<p><br>
</p>
<p><br>
</p>
</body>
</html>