#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>
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;
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;
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;
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;
{
uword c;
/* *INDENT-OFF* */
- clib_bitmap_foreach (c, tr->coremask, ({
+ clib_bitmap_foreach (c, tr->coremask) {
if (clib_bitmap_get(avail_cpu, c) == 0)
return clib_error_return (0, "cpu %u is not available to be used"
" for the '%s' thread",c, tr->name);
avail_cpu = clib_bitmap_set(avail_cpu, c, 0);
- }));
+ }
/* *INDENT-ON* */
}
else
/* *INDENT-OFF* */
clib_sysfs_read ("/sys/devices/system/node/online", "%U",
unformat_bitmap_list, &nbmp);
- clib_bitmap_foreach (node, nbmp, ({
+ clib_bitmap_foreach (node, nbmp) {
p = format (p, "%s%u/cpulist%c", sys_node_path, node, 0);
clib_sysfs_read ((char *) p, "%U", unformat_bitmap_list, &cbmp);
if (clib_bitmap_get (cbmp, cpu_id))
numa_id = node;
vec_reset_length (cbmp);
vec_reset_length (p);
- }));
+ }
/* *INDENT-ON* */
vec_free (nbmp);
vec_free (cbmp);
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);
{
uword c;
/* *INDENT-OFF* */
- clib_bitmap_foreach (c, tr->coremask, ({
+ clib_bitmap_foreach (c, tr->coremask) {
w = vlib_worker_threads + worker_thread_index++;
err = vlib_launch_thread_int (vlib_worker_thread_bootstrap_fn,
w, c);
if (err)
clib_error_report (err);
- }));
+ }
/* *INDENT-ON* */
}
}
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])
{