Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
misc: fix gcc-11 build
[vpp.git]
/
src
/
vlib
/
threads.c
diff --git
a/src/vlib/threads.c
b/src/vlib/threads.c
index
7efddff
..
48e1bab
100644
(file)
--- a/
src/vlib/threads.c
+++ b/
src/vlib/threads.c
@@
-18,6
+18,7
@@
#include <math.h>
#include <vppinfra/format.h>
#include <vppinfra/time_range.h>
#include <math.h>
#include <vppinfra/format.h>
#include <vppinfra/time_range.h>
+#include <vppinfra/interrupt.h>
#include <vppinfra/linux/sysfs.h>
#include <vlib/vlib.h>
#include <vppinfra/linux/sysfs.h>
#include <vlib/vlib.h>
@@
-47,13
+48,11
@@
barrier_trace_sync (f64 t_entry, f64 t_open, f64 t_closed)
if (!vlib_worker_threads->barrier_elog_enabled)
return;
if (!vlib_worker_threads->barrier_elog_enabled)
return;
- /* *INDENT-OFF* */
- ELOG_TYPE_DECLARE (e) =
- {
- .format = "bar-trace-%s-#%d",
- .format_args = "T4i4",
- };
- /* *INDENT-ON* */
+ ELOG_TYPE_DECLARE (e) = {
+ .format = "bar-trace-%s-#%d",
+ .format_args = "T4i4",
+ };
+
struct
{
u32 caller, count, t_entry, t_open, t_closed;
struct
{
u32 caller, count, t_entry, t_open, t_closed;
@@
-74,13
+73,11
@@
barrier_trace_sync_rec (f64 t_entry)
if (!vlib_worker_threads->barrier_elog_enabled)
return;
if (!vlib_worker_threads->barrier_elog_enabled)
return;
- /* *INDENT-OFF* */
- ELOG_TYPE_DECLARE (e) =
- {
- .format = "bar-syncrec-%s-#%d",
- .format_args = "T4i4",
- };
- /* *INDENT-ON* */
+ ELOG_TYPE_DECLARE (e) = {
+ .format = "bar-syncrec-%s-#%d",
+ .format_args = "T4i4",
+ };
+
struct
{
u32 caller, depth;
struct
{
u32 caller, depth;
@@
-98,13
+95,11
@@
barrier_trace_release_rec (f64 t_entry)
if (!vlib_worker_threads->barrier_elog_enabled)
return;
if (!vlib_worker_threads->barrier_elog_enabled)
return;
- /* *INDENT-OFF* */
- ELOG_TYPE_DECLARE (e) =
- {
- .format = "bar-relrrec-#%d",
- .format_args = "i4",
- };
- /* *INDENT-ON* */
+ ELOG_TYPE_DECLARE (e) = {
+ .format = "bar-relrrec-#%d",
+ .format_args = "i4",
+ };
+
struct
{
u32 depth;
struct
{
u32 depth;
@@
-120,13
+115,11
@@
barrier_trace_release (f64 t_entry, f64 t_closed_total, f64 t_update_main)
if (!vlib_worker_threads->barrier_elog_enabled)
return;
if (!vlib_worker_threads->barrier_elog_enabled)
return;
- /* *INDENT-OFF* */
- ELOG_TYPE_DECLARE (e) =
- {
- .format = "bar-rel-#%d-e%d-u%d-t%d",
- .format_args = "i4i4i4i4",
- };
- /* *INDENT-ON* */
+ ELOG_TYPE_DECLARE (e) = {
+ .format = "bar-rel-#%d-e%d-u%d-t%d",
+ .format_args = "i4i4i4i4",
+ };
+
struct
{
u32 count, t_entry, t_update_main, t_closed_total;
struct
{
u32 count, t_entry, t_update_main, t_closed_total;
@@
-863,6
+856,9
@@
start_workers (vlib_main_t * vm)
nm_clone->nodes_by_type[VLIB_NODE_TYPE_INPUT] =
vec_dup_aligned (nm->nodes_by_type[VLIB_NODE_TYPE_INPUT],
CLIB_CACHE_LINE_BYTES);
nm_clone->nodes_by_type[VLIB_NODE_TYPE_INPUT] =
vec_dup_aligned (nm->nodes_by_type[VLIB_NODE_TYPE_INPUT],
CLIB_CACHE_LINE_BYTES);
+ clib_interrupt_init (
+ &nm_clone->interrupts,
+ vec_len (nm_clone->nodes_by_type[VLIB_NODE_TYPE_INPUT]));
vec_foreach (rt, nm_clone->nodes_by_type[VLIB_NODE_TYPE_INPUT])
{
vlib_node_t *n = vlib_get_node (vm, rt->node_index);
vec_foreach (rt, nm_clone->nodes_by_type[VLIB_NODE_TYPE_INPUT])
{
vlib_node_t *n = vlib_get_node (vm, rt->node_index);
@@
-1178,6
+1174,9
@@
vlib_worker_thread_node_refork (void)
nm_clone->nodes_by_type[VLIB_NODE_TYPE_INPUT] =
vec_dup_aligned (nm->nodes_by_type[VLIB_NODE_TYPE_INPUT],
CLIB_CACHE_LINE_BYTES);
nm_clone->nodes_by_type[VLIB_NODE_TYPE_INPUT] =
vec_dup_aligned (nm->nodes_by_type[VLIB_NODE_TYPE_INPUT],
CLIB_CACHE_LINE_BYTES);
+ clib_interrupt_resize (
+ &nm_clone->interrupts,
+ vec_len (nm_clone->nodes_by_type[VLIB_NODE_TYPE_INPUT]));
vec_foreach (rt, nm_clone->nodes_by_type[VLIB_NODE_TYPE_INPUT])
{
vec_foreach (rt, nm_clone->nodes_by_type[VLIB_NODE_TYPE_INPUT])
{