Skip site navigation (1)Skip section navigation (2)

  
 
  

home | help
rte_trace.h(3)			      DPDK			  rte_trace.h(3)

NAME
     rte_trace.h

SYNOPSIS
     #include <stdbool.h>
     #include <stdio.h>
     #include <rte_common.h>
     #include <rte_compat.h>

   Enumerations
     enum rte_trace_mode { RTE_TRACE_MODE_OVERWRITE, RTE_TRACE_MODE_DISCARD }

   Functions
     __rte_experimental bool rte_trace_is_enabled (void)
     static __rte_experimental __rte_always_inline bool rte_trace_feature_is_en-
	 abled (void)
     __rte_experimental void rte_trace_mode_set (enum rte_trace_mode mode)
     __rte_experimental enum rte_trace_mode rte_trace_mode_get (void)
     __rte_experimental int rte_trace_pattern (const char *pattern, bool enable)
     __rte_experimental int rte_trace_regexp (const char *regex, bool enable)
     __rte_experimental int rte_trace_save (void)
     __rte_experimental int rte_trace_metadata_dump (FILE *f)
     __rte_experimental void rte_trace_dump (FILE *f)

Detailed Description
     RTE Trace API

     This file provides the trace API to RTE applications.

     Warning
	 EXPERIMENTAL: this API may change without prior notice

     Definition in file rte_trace.h.

Enumeration Type Documentation
   enum rte_trace_mode
     Enumerate trace mode operation.

     Enumerator

     RTE_TRACE_MODE_OVERWRITE
	    In	this mode, when no space is left in the trace buffer, the subse-
	    quent events overwrite the old events.

     RTE_TRACE_MODE_DISCARD
	    In this mode, when no space is left in the trace buffer, the  subse-
	    quent events shall not be recorded.

     Definition at line 61 of file rte_trace.h.

Function Documentation
   __rte_experimental bool rte_trace_is_enabled (void)
     Test if trace is enabled.

     Returns
	 true if trace is enabled, false otherwise.

   static  __rte_experimental  __rte_always_inline bool rte_trace_feature_is_en-
     abled (void) [static]
     Warning
	 EXPERIMENTAL: this API may change, or be removed, without prior notice

     Test if trace feature is enabled at compile time.

     Returns
	 true if trace feature is enabled, false otherwise.

     Definition at line 49 of file rte_trace.h.

   __rte_experimental void rte_trace_mode_set (enum rte_trace_mode mode)
     Set the trace mode.

     Parameters
	 mode Trace mode.

   __rte_experimental enum rte_trace_mode rte_trace_mode_get (void)
     Get the trace mode.

     Returns
	 The current trace mode.

   __rte_experimental int rte_trace_pattern (const char * pattern, bool enable)
     Enable/Disable a set of tracepoints based on globbing pattern.

     Parameters
	 pattern The globbing pattern identifying the tracepoint.
	 enable true to enable tracepoint, false to disable the tracepoint, upon
	 match.

     Returns

	 * 0: Success and no pattern match.

	 * 1: Success and found pattern match.

	 * (-ERANGE): Tracepoint object is not registered.

   __rte_experimental int rte_trace_regexp (const char * regex, bool enable)
     Enable/Disable a set of tracepoints based on regular expression.

     Parameters
	 regex A regular expression identifying the tracepoint.
	 enable true to enable tracepoint, false to disable the tracepoint, upon
	 match.

     Returns

	 * 0: Success and no pattern match.

	 * 1: Success and found pattern match.

	 * (-ERANGE): Tracepoint object is not registered.

	 * (-EINVAL): Invalid regular expression rule.

   __rte_experimental int rte_trace_save (void)
     Save the trace buffer to the trace directory.

     By default, trace directory will be created at $HOME directory and this can
     be overridden by --trace-dir EAL parameter.

     Returns

	 * 0: Success.

	 * <0 : Failure.

   __rte_experimental int rte_trace_metadata_dump (FILE * f)
     Dump the trace metadata to a file.

     Parameters
	 f A pointer to a file for output

     Returns

	 * 0: Success.

	 * <0 : Failure.

   __rte_experimental void rte_trace_dump (FILE * f)
     Dump the trace subsystem status to a file.

     Parameters
	 f A pointer to a file for output

Author
     Generated automatically by Doxygen for DPDK from the source code.

Version 25.11.0 		 Thu Aug 27 2026		  rte_trace.h(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=RTE_TRACE_MODE_DISCARD&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help