From patchwork Wed Feb 21 12:00:06 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: 129049 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp550681ljc; Wed, 21 Feb 2018 04:12:06 -0800 (PST) X-Google-Smtp-Source: AG47ELvxaIRYP/2ExBBda9kYo528N6JHfjM7KOLGQqidtySw9jkBkKh11M58UjWDjPEuMxWW0nkA X-Received: by 10.55.12.66 with SMTP id 63mr4813262qkm.12.1519215126748; Wed, 21 Feb 2018 04:12:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519215126; cv=none; d=google.com; s=arc-20160816; b=HzBBCbrJLsu6KikM5QEUZSTA3VnlCN4KMUr8TX9sTpDJfte+9dnzUix72SKhv8Ig8D fAsVBzdxy0nUINmrFbd8TcM7luqbutaSGkBPFhnBgStx/JM5prxF0iWLdaciOiPqXEs1 rkNLJiDRC1cEaaycmDBrEvEDZCoWTrvNrcLy9iq/+4PmjlWhQ7tMkXuXdkc9vOjl2ZQD Q2HkZQMTQH33U+igr+PqO06Vy3zK/6v4hrZZygtxo6hB4aF1o8afMJ+foCmfbOvwAyQU H2jEZhWiwU5w6bQKlKO94Mm5Giuy8xCZGkMq1/UQDnnznUHttxFpvlaxSMGsfiNuGNty 6jag== 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=rOz127wsfQEDZ66rRAEu5ZOEoUsJhvWDx723ToUnn+s=; b=WKSLN+YPZ48vSB5mxhp6QYvsSbmZfWQQ7wnIrmBiZbHi+m9/qv7vRmpG7/zj2WFa4a s5oYqpAmvlXZuQ27pEvSG+GoQMt2taFLs6AxM3ujVwIKa4VeW9wquLcCuRUs8QO7Zg5Q 5wPknfsB7RKTqfZPWrFKiwPDYMoOiYZpo39CN8grJVHXJBmvoGFAql9bkGXtKfsdeYPH xT/yBl3/vuH1BBRSB0qLy0F4SKjquMv/o6hhDE2/oTPW5U3z+JO7dhoLOHYjDjASFuPI Lhf9h5twOl1h/Hn1KJw1HnOmlOAJ7spz4K+9kJPtl8QZk/v6gYRg4WCD5CI575yGFhNy 9deg== 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 q68si4146366qkq.220.2018.02.21.04.12.06; Wed, 21 Feb 2018 04:12:06 -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 699726152B; Wed, 21 Feb 2018 12:12:06 +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 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 58ED56177F; Wed, 21 Feb 2018 12:03:12 +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 4BDF16177F; Wed, 21 Feb 2018 12:03:04 +0000 (UTC) Received: from forward103o.mail.yandex.net (forward103o.mail.yandex.net [37.140.190.177]) by lists.linaro.org (Postfix) with ESMTPS id 1934260C5D for ; Wed, 21 Feb 2018 12:01:33 +0000 (UTC) Received: from mxback10o.mail.yandex.net (mxback10o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::24]) by forward103o.mail.yandex.net (Yandex) with ESMTP id 0E3F8588112A for ; Wed, 21 Feb 2018 15:00:16 +0300 (MSK) Received: from smtp2j.mail.yandex.net (smtp2j.mail.yandex.net [2a02:6b8:0:801::ac]) by mxback10o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 9Bz2FaxrUh-0FbGBjic; Wed, 21 Feb 2018 15:00:15 +0300 Received: by smtp2j.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id a6UlmCoovI-0Fv0qAfF; Wed, 21 Feb 2018 15:00:15 +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, 21 Feb 2018 15:00:06 +0300 Message-Id: <1519214407-28047-10-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1519214407-28047-1-git-send-email-odpbot@yandex.ru> References: <1519214407-28047-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 492 Subject: [lng-odp] [PATCH v1 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: 5a58bbf2bb331fd7dde2ebbc0430634ace6900fb ** Merge commit sha: 82a6bfe942419330a430b63149220e6b472f419c **/ 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 a2b9a9ca0..0a76d8b67 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[]) {