From patchwork Wed Feb 28 12:00:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 129971 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp945563lja; Wed, 28 Feb 2018 04:07:40 -0800 (PST) X-Google-Smtp-Source: AH8x224yH3VM69Jn97uQC8g6V6p1r+VTNBx/4TpIfEEXlF7tKkPFv4KnMhsWH9kO+ORYGzW9yvoe X-Received: by 10.129.160.10 with SMTP id x10mr11581177ywg.299.1519819660506; Wed, 28 Feb 2018 04:07:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519819660; cv=none; d=google.com; s=arc-20160816; b=VjQ2bIGfSZC0mKAZIaeLrERz9IEfGM3Wn1MEVlyoYXGHJ39pWFILcxQZNMI/ZnAjdl eOPJDnl8dggsvBweX2DnH2AZ+S5lJcfFBhYY4Ew1Mx+jdjJLN/Xa9UdR0tZYxAEBCd/c aX+bsaWUCGOJGdxGGSse0u0Y1BL1XDtTszFunvRNf2fjtlbacdImH83V7JDb+x7NrWjI masdCx6cdAtSF0lB7sVw7zqolmM0pywwqOwT2A5v32qIcxcjbHPGLuCnDHlnXGZZMpKZ Rg9EnA0+GfyMIw6MWQted6L1ti9JGe01sfD0TQ44xWmlHhOmW2XgeLUpf5qVXIWKqkTb Rg+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=uD0Qfts8p6q36/htTM54s+OcCgmyIZy9jx84YI5vkLo=; b=LGT1YcBo8GX+dIn2Zc+lN9ijRd0n/RPPdBHzUZbWmIqQyX0uNsjz44jRiUul9LDIfR rlxZfyN4MU6MypNGzTwvH6azmGjkYZUIup53vMhVsASd95ZdN1U3dlE37AIDnmkSeaQL Gnt4sHoiN5CZABy+7JalueVaJGbgvQIiyto773cCTJYJdm3zKcwT3Oi2JJLHVegvUJKS 85sA6DPizZsvVof1F4rAx3+laN0b2SfgSv6P3x31rGNmJ+CsxxVc1PQh/uQlmOSZvDLy +psgTf4n92zDVW4LZcnS2W7GNwC5v4tbqaD8YbW/AF3vjfOxnaMGV0NqaWKrXyDKs2rZ wV0g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id l65si1527433qkf.332.2018.02.28.04.07.40; Wed, 28 Feb 2018 04:07:40 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 2F2C2616F9; Wed, 28 Feb 2018 12:07:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2 autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 23A2E60745; Wed, 28 Feb 2018 12:02:34 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id B22FB61702; Wed, 28 Feb 2018 12:02:28 +0000 (UTC) Received: from forward101o.mail.yandex.net (forward101o.mail.yandex.net [37.140.190.181]) by lists.linaro.org (Postfix) with ESMTPS id 06BEC6082D for ; Wed, 28 Feb 2018 12:00:35 +0000 (UTC) Received: from mxback18j.mail.yandex.net (mxback18j.mail.yandex.net [IPv6:2a02:6b8:0:1619::94]) by forward101o.mail.yandex.net (Yandex) with ESMTP id A17D61344539 for ; Wed, 28 Feb 2018 15:00:28 +0300 (MSK) Received: from smtp1o.mail.yandex.net (smtp1o.mail.yandex.net [2a02:6b8:0:1a2d::25]) by mxback18j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id K7Cq4hO0oY-0SnOKVNE; Wed, 28 Feb 2018 15:00:28 +0300 Received: by smtp1o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id iE1m40jcci-0RSira8J; Wed, 28 Feb 2018 15:00:27 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Wed, 28 Feb 2018 15:00:17 +0300 Message-Id: <1519819218-27901-10-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1519819218-27901-1-git-send-email-odpbot@yandex.ru> References: <1519819218-27901-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 492 Subject: [lng-odp] [PATCH v3 9/10] test: l2fwd: remove unnecessary doxygen tags X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Petri Savolainen Doxygen documentation is not generated from this file. Remove unnecessary and incomplete doxygen taggings. Signed-off-by: Petri Savolainen --- /** Email created from pull request 492 (psavol:master-sched-optim) ** https://github.com/Linaro/odp/pull/492 ** Patch: https://github.com/Linaro/odp/pull/492.patch ** Base sha: f5e12df388352b27f09787028a0040afb28564f4 ** Merge commit sha: 56e6340663c8679516a24dc81df13a53488b86b8 **/ test/performance/odp_l2fwd.c | 190 +++++++++++++++++++------------------------ 1 file changed, 83 insertions(+), 107 deletions(-) diff --git a/test/performance/odp_l2fwd.c b/test/performance/odp_l2fwd.c index 26051c2d3..3ae47173c 100644 --- a/test/performance/odp_l2fwd.c +++ b/test/performance/odp_l2fwd.c @@ -6,13 +6,7 @@ #include "config.h" -/** - * @file - * - * @example odp_l2fwd.c ODP basic forwarding application - */ - -/** enable strtok */ +/* enable strtok */ #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif @@ -30,38 +24,28 @@ #include #include -/** @def MAX_WORKERS - * @brief Maximum number of worker threads - */ +/* Maximum number of worker threads */ #define MAX_WORKERS 32 -/** @def SHM_PKT_POOL_SIZE - * @brief Size of the shared memory block - */ +/* Size of the shared memory block */ #define SHM_PKT_POOL_SIZE 8192 -/** @def SHM_PKT_POOL_BUF_SIZE - * @brief Buffer size of the packet pool buffer - */ +/* Buffer size of the packet pool buffer */ #define SHM_PKT_POOL_BUF_SIZE 1856 -/** @def MAX_PKT_BURST - * @brief Maximum number of packet in a burst - */ +/* Maximum number of packet in a burst */ #define MAX_PKT_BURST 32 -/** Maximum number of pktio queues per interface */ +/* Maximum number of pktio queues per interface */ #define MAX_QUEUES 32 -/** Maximum number of pktio interfaces */ +/* Maximum number of pktio interfaces */ #define MAX_PKTIOS 8 -/** Maximum pktio index table size */ +/* Maximum pktio index table size */ #define MAX_PKTIO_INDEXES 1024 -/** - * Packet input mode - */ +/* Packet input mode */ typedef enum pktin_mode_t { DIRECT_RECV, PLAIN_QUEUE, @@ -70,9 +54,7 @@ typedef enum pktin_mode_t { SCHED_ORDERED, } pktin_mode_t; -/** - * Packet output modes - */ +/* Packet output modes */ typedef enum pktout_mode_t { PKTOUT_DIRECT, PKTOUT_QUEUE @@ -85,60 +67,56 @@ static inline int sched_mode(pktin_mode_t in_mode) (in_mode == SCHED_ORDERED); } -/** Get rid of path in filename - only for unix-type paths using '/' */ +/* Get rid of path in filename - only for unix-type paths using '/' */ #define NO_PATH(file_name) (strrchr((file_name), '/') ? \ strrchr((file_name), '/') + 1 : (file_name)) -/** +/* * Parsed command line application arguments */ typedef struct { - int extra_check; /**< Some extra checks have been enabled */ + int extra_check; /* Some extra checks have been enabled */ int cpu_count; - int if_count; /**< Number of interfaces to be used */ - int addr_count; /**< Number of dst addresses to be used */ - int num_workers; /**< Number of worker threads */ - char **if_names; /**< Array of pointers to interface names */ - odph_ethaddr_t addrs[MAX_PKTIOS]; /**< Array of dst addresses */ - pktin_mode_t in_mode; /**< Packet input mode */ - pktout_mode_t out_mode; /**< Packet output mode */ - int time; /**< Time in seconds to run. */ - int accuracy; /**< Number of seconds to get and print statistics */ - char *if_str; /**< Storage for interface names */ - int dst_change; /**< Change destination eth addresses */ - int src_change; /**< Change source eth addresses */ - int error_check; /**< Check packet errors */ - int chksum; /**< Checksum offload */ - int sched_mode; /**< Scheduler mode */ - int num_groups; /**< Number of scheduling groups */ - int verbose; /**< Verbose output */ + int if_count; /* Number of interfaces to be used */ + int addr_count; /* Number of dst addresses to be used */ + int num_workers; /* Number of worker threads */ + char **if_names; /* Array of pointers to interface names */ + odph_ethaddr_t addrs[MAX_PKTIOS]; /* Array of dst addresses */ + pktin_mode_t in_mode; /* Packet input mode */ + pktout_mode_t out_mode; /* Packet output mode */ + int time; /* Time in seconds to run. */ + int accuracy; /* Number of seconds to get and print stats */ + char *if_str; /* Storage for interface names */ + int dst_change; /* Change destination eth addresses */ + int src_change; /* Change source eth addresses */ + int error_check; /* Check packet errors */ + int chksum; /* Checksum offload */ + int sched_mode; /* Scheduler mode */ + int num_groups; /* Number of scheduling groups */ + int verbose; /* Verbose output */ } appl_args_t; -static int exit_threads; /**< Break workers loop if set to 1 */ +static int exit_threads; /* Break workers loop if set to 1 */ static void sig_handler(int signo ODP_UNUSED) { exit_threads = 1; } -/** - * Statistics - */ +/* Statistics */ typedef union ODP_ALIGNED_CACHE { struct { - /** Number of forwarded packets */ + /* Number of forwarded packets */ uint64_t packets; - /** Packets dropped due to receive error */ + /* Packets dropped due to receive error */ uint64_t rx_drops; - /** Packets dropped due to transmit error */ + /* Packets dropped due to transmit error */ uint64_t tx_drops; } s; uint8_t padding[ODP_CACHE_LINE_SIZE]; } stats_t; -/** - * Thread specific data - */ +/* Thread specific data */ typedef struct thread_args_t { stats_t stats; @@ -161,24 +139,24 @@ typedef struct thread_args_t { int num_groups; } thread_args_t; -/** +/* * Grouping of all global data */ typedef struct { - /** Thread specific arguments */ + /* Thread specific arguments */ thread_args_t thread[MAX_WORKERS]; - /** Barriers to synchronize main and workers */ + /* Barriers to synchronize main and workers */ odp_barrier_t init_barrier; odp_barrier_t term_barrier; - /** Application (parsed) arguments */ + /* Application (parsed) arguments */ appl_args_t appl; - /** Table of port ethernet addresses */ + /* Table of port ethernet addresses */ odph_ethaddr_t port_eth_addr[MAX_PKTIOS]; - /** Table of dst ethernet addresses */ + /* Table of dst ethernet addresses */ odph_ethaddr_t dst_eth_addr[MAX_PKTIOS]; - /** Table of dst ports. This is used by non-sched modes. */ + /* Table of dst ports. This is used by non-sched modes. */ int dst_port[MAX_PKTIOS]; - /** Table of pktio handles */ + /* Table of pktio handles */ struct { odp_pktio_t pktio; odp_pktin_queue_t pktin[MAX_QUEUES]; @@ -193,26 +171,26 @@ typedef struct { int next_tx_queue; } pktios[MAX_PKTIOS]; - /** Destination port lookup table. - * Table index is pktio_index of the API. This is used by the sched - * mode. */ + /* Destination port lookup table. + * Table index is pktio_index of the API. This is used by the sched + * mode. */ uint8_t dst_port_from_idx[MAX_PKTIO_INDEXES]; } args_t; -/** Global pointer to args */ +/* Global pointer to args */ static args_t *gbl_args; -/** +/* * Drop packets which input parsing marked as containing errors. * * Frees packets with error and modifies pkt_tbl[] to only contain packets with * no detected errors. * - * @param pkt_tbl Array of packets - * @param num Number of packets in pkt_tbl[] + * pkt_tbl Array of packets + * num Number of packets in pkt_tbl[] * - * @return Number of packets dropped + * Returns number of packets dropped */ static inline int drop_err_pkts(odp_packet_t pkt_tbl[], unsigned num) { @@ -234,12 +212,12 @@ static inline int drop_err_pkts(odp_packet_t pkt_tbl[], unsigned num) return dropped; } -/** +/* * Fill packets' eth addresses according to the destination port * - * @param pkt_tbl Array of packets - * @param num Number of packets in the array - * @param dst_port Destination port + * pkt_tbl Array of packets + * num Number of packets in the array + * dst_port Destination port */ static inline void fill_eth_addrs(odp_packet_t pkt_tbl[], unsigned num, int dst_port) @@ -301,10 +279,10 @@ static inline void chksum_insert(odp_packet_t *pkt_tbl, int pkts) } } -/** +/* * Packet IO worker thread using scheduled queues * - * @param arg thread arguments of type 'thread_args_t *' + * arg thread arguments of type 'thread_args_t *' */ static int run_worker_sched_mode(void *arg) { @@ -441,10 +419,10 @@ static int run_worker_sched_mode(void *arg) return 0; } -/** +/* * Packet IO worker thread using plain queues * - * @param arg thread arguments of type 'thread_args_t *' + * arg thread arguments of type 'thread_args_t *' */ static int run_worker_plain_queue_mode(void *arg) { @@ -568,10 +546,10 @@ static int run_worker_plain_queue_mode(void *arg) return 0; } -/** +/* * Packet IO worker thread accessing IO resources directly * - * @param arg thread arguments of type 'thread_args_t *' + * arg thread arguments of type 'thread_args_t *' */ static int run_worker_direct_mode(void *arg) { @@ -670,15 +648,14 @@ static int run_worker_direct_mode(void *arg) return 0; } -/** +/* * Create a pktio handle, optionally associating a default input queue. * - * @param dev Name of device to open - * @param index Pktio index - * @param pool Pool to associate with device for packet RX/TX + * dev Name of device to open + * index Pktio index + * pool Pool to associate with device for packet RX/TX * - * @retval 0 on success - * @retval -1 on failure + * Returns 0 on success, -1 on failure */ static int create_pktio(const char *dev, int idx, int num_rx, int num_tx, odp_pool_t pool, odp_schedule_group_t group) @@ -837,14 +814,13 @@ static int create_pktio(const char *dev, int idx, int num_rx, int num_tx, return 0; } -/** - * Print statistics - * - * @param num_workers Number of worker threads - * @param thr_stats Pointers to stats storage - * @param duration Number of seconds to loop in - * @param timeout Number of seconds for stats calculation +/* + * Print statistics * + * num_workers Number of worker threads + * thr_stats Pointers to stats storage + * duration Number of seconds to loop in + * timeout Number of seconds for stats calculation */ static int print_speed_stats(int num_workers, stats_t **thr_stats, int duration, int timeout) @@ -926,10 +902,10 @@ static void print_port_mapping(void) printf("\n"); } -/** +/* * Find the destination port for a given input port * - * @param port Input port index + * port Input port index */ static int find_dest_port(int port) { @@ -1117,7 +1093,7 @@ static void init_port_lookup_tbl(void) } } -/** +/* * Prinf usage information */ static void usage(char *progname) @@ -1172,12 +1148,12 @@ static void usage(char *progname) ); } -/** +/* * Parse and store the command line arguments * - * @param argc argument count - * @param argv[] argument vector - * @param appl_args Store application arguments here + * argc argument count + * argv[] argument vector + * appl_args Store application arguments here */ static void parse_args(int argc, char *argv[], appl_args_t *appl_args) { @@ -1377,7 +1353,7 @@ static void parse_args(int argc, char *argv[], appl_args_t *appl_args) optind = 1; /* reset 'extern optind' from the getopt lib */ } -/** +/* * Print system and application info */ static void print_info(char *progname, appl_args_t *appl_args) @@ -1447,8 +1423,8 @@ static void create_groups(int num, odp_schedule_group_t *group) } } -/** - * ODP L2 forwarding main function +/* + * L2 forwarding main function */ int main(int argc, char *argv[]) {