[dpdk-dev] [PATCH] doc: add example programs to doxygen api docs

John McNamara john.mcnamara at intel.com
Fri Dec 11 14:41:51 CET 2015


Enable Doxygen parsing of DPDK example files so that the example
code is linked to and from the API docs. This allows the reader
to see examples of API usage in context by following a link.

Signed-off-by: John McNamara <john.mcnamara at intel.com>
---

Notes:

* Here is an example of the sample code/api linkage in use:

  http://www.stack.nl/~dimitri/doxygen/manual/examples/example/html/examples.html
 
* The examples.dox file could be autogenerated from the build system.


doc/api/doxy-api.conf |   6 +-
 doc/api/examples.dox  | 222 ++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 227 insertions(+), 1 deletion(-)
 create mode 100644 doc/api/examples.dox

diff --git a/doc/api/doxy-api.conf b/doc/api/doxy-api.conf
index 15bba16..96a877f 100644
--- a/doc/api/doxy-api.conf
+++ b/doc/api/doxy-api.conf
@@ -60,12 +60,16 @@ INPUT                   = doc/api/doxy-api-index.md \
                           lib/librte_sched \
                           lib/librte_table \
                           lib/librte_timer \
-                          lib/librte_vhost
+                          lib/librte_vhost \
+                          doc/api/examples.dox
 FILE_PATTERNS           = rte_*.h \
                           cmdline.h
 PREDEFINED              = __DOXYGEN__ \
                           __attribute__(x)=
 
+EXAMPLE_PATH            = examples
+EXAMPLE_PATTERNS        = *.c
+EXAMPLE_RECURSIVE       = YES
 OPTIMIZE_OUTPUT_FOR_C   = YES
 ENABLE_PREPROCESSING    = YES
 MACRO_EXPANSION         = YES
diff --git a/doc/api/examples.dox b/doc/api/examples.dox
new file mode 100644
index 0000000..4f0e2bb
--- /dev/null
+++ b/doc/api/examples.dox
@@ -0,0 +1,222 @@
+/**
+ at page examples DPDK Example Programs
+
+ at example bond/main.c
+
+ at example cmdline/commands.c
+
+ at example cmdline/main.c
+
+ at example cmdline/parse_obj_list.c
+
+ at example distributor/main.c
+
+ at example dpdk_qat/crypto.c
+
+ at example dpdk_qat/main.c
+
+ at example ethtool/ethtool-app/ethapp.c
+
+ at example ethtool/ethtool-app/main.c
+
+ at example ethtool/lib/rte_ethtool.c
+
+ at example exception_path/main.c
+
+ at example helloworld/main.c
+
+ at example ip_fragmentation/main.c
+
+ at example ip_pipeline/config_check.c
+
+ at example ip_pipeline/config_parse.c
+
+ at example ip_pipeline/config_parse_tm.c
+
+ at example ip_pipeline/cpu_core_map.c
+
+ at example ip_pipeline/init.c
+
+ at example ip_pipeline/main.c
+
+ at example ip_pipeline/pipeline/pipeline_common_be.c
+
+ at example ip_pipeline/pipeline/pipeline_common_fe.c
+
+ at example ip_pipeline/pipeline/pipeline_firewall_be.c
+
+ at example ip_pipeline/pipeline/pipeline_firewall.c
+
+ at example ip_pipeline/pipeline/pipeline_flow_actions_be.c
+
+ at example ip_pipeline/pipeline/pipeline_flow_actions.c
+
+ at example ip_pipeline/pipeline/pipeline_flow_classification_be.c
+
+ at example ip_pipeline/pipeline/pipeline_flow_classification.c
+
+ at example ip_pipeline/pipeline/pipeline_master_be.c
+
+ at example ip_pipeline/pipeline/pipeline_master.c
+
+ at example ip_pipeline/pipeline/pipeline_passthrough_be.c
+
+ at example ip_pipeline/pipeline/pipeline_passthrough.c
+
+ at example ip_pipeline/pipeline/pipeline_routing_be.c
+
+ at example ip_pipeline/pipeline/pipeline_routing.c
+
+ at example ip_pipeline/thread.c
+
+ at example ip_pipeline/thread_fe.c
+
+ at example ip_reassembly/main.c
+
+ at example ipv4_multicast/main.c
+
+ at example kni/main.c
+
+ at example l2fwd-crypto/main.c
+
+ at example l2fwd-ivshmem/guest/guest.c
+
+ at example l2fwd-ivshmem/host/host.c
+
+ at example l2fwd-jobstats/main.c
+
+ at example l2fwd-keepalive/main.c
+
+ at example l2fwd/main.c
+
+ at example l3fwd-acl/main.c
+
+ at example l3fwd/main.c
+
+ at example l3fwd-power/main.c
+
+ at example l3fwd-vf/main.c
+
+ at example link_status_interrupt/main.c
+
+ at example load_balancer/config.c
+
+ at example load_balancer/init.c
+
+ at example load_balancer/main.c
+
+ at example load_balancer/runtime.c
+
+ at example multi_process/client_server_mp/mp_client/client.c
+
+ at example multi_process/client_server_mp/mp_server/args.c
+
+ at example multi_process/client_server_mp/mp_server/init.c
+
+ at example multi_process/client_server_mp/mp_server/main.c
+
+ at example multi_process/l2fwd_fork/flib.c
+
+ at example multi_process/l2fwd_fork/main.c
+
+ at example multi_process/simple_mp/main.c
+
+ at example multi_process/simple_mp/mp_commands.c
+
+ at example multi_process/symmetric_mp/main.c
+
+ at example netmap_compat/bridge/bridge.c
+
+ at example netmap_compat/lib/compat_netmap.c
+
+ at example packet_ordering/main.c
+
+ at example performance-thread/common/arch/x86/ctx.c
+
+ at example performance-thread/common/lthread.c
+
+ at example performance-thread/common/lthread_cond.c
+
+ at example performance-thread/common/lthread_diag.c
+
+ at example performance-thread/common/lthread_mutex.c
+
+ at example performance-thread/common/lthread_sched.c
+
+ at example performance-thread/common/lthread_tls.c
+
+ at example performance-thread/l3fwd-thread/main.c
+
+ at example performance-thread/pthread_shim/main.c
+
+ at example performance-thread/pthread_shim/pthread_shim.c
+
+ at example ptpclient/ptpclient.c
+
+ at example qos_meter/main.c
+
+ at example qos_meter/rte_policer.c
+
+ at example qos_sched/app_thread.c
+
+ at example qos_sched/args.c
+
+ at example qos_sched/cfg_file.c
+
+ at example qos_sched/cmdline.c
+
+ at example qos_sched/init.c
+
+ at example qos_sched/main.c
+
+ at example qos_sched/stats.c
+
+ at example quota_watermark/qw/args.c
+
+ at example quota_watermark/qwctl/commands.c
+
+ at example quota_watermark/qwctl/qwctl.c
+
+ at example quota_watermark/qw/init.c
+
+ at example quota_watermark/qw/main.c
+
+ at example rxtx_callbacks/main.c
+
+ at example skeleton/basicfwd.c
+
+ at example tep_termination/main.c
+
+ at example tep_termination/vxlan.c
+
+ at example tep_termination/vxlan_setup.c
+
+ at example timer/main.c
+
+ at example vhost/main.c
+
+ at example vhost_xen/main.c
+
+ at example vhost_xen/vhost_monitor.c
+
+ at example vhost_xen/xenstore_parse.c
+
+ at example vmdq_dcb/main.c
+
+ at example vmdq/main.c
+
+ at example vm_power_manager/channel_manager.c
+
+ at example vm_power_manager/channel_monitor.c
+
+ at example vm_power_manager/guest_cli/main.c
+
+ at example vm_power_manager/guest_cli/vm_power_cli_guest.c
+
+ at example vm_power_manager/main.c
+
+ at example vm_power_manager/power_manager.c
+
+ at example vm_power_manager/vm_power_cli.c
+
+*/
-- 
2.5.0



More information about the dev mailing list