From patchwork Wed Jun 14 14:26:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Monjalon X-Patchwork-Id: 128689 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 90D2442CB3; Wed, 14 Jun 2023 16:31:30 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2864342D12; Wed, 14 Jun 2023 16:31:19 +0200 (CEST) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by mails.dpdk.org (Postfix) with ESMTP id 6959142D10 for ; Wed, 14 Jun 2023 16:31:18 +0200 (CEST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 0B8105C00AC; Wed, 14 Jun 2023 10:31:18 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Wed, 14 Jun 2023 10:31:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1686753078; x=1686839478; bh=ROXWrlPMj0Dj2f8IgfkbKyRWsUamdcsXHrp lx/KtODI=; b=aPUVuGfKssk60uWbDl/+r2IpJgNEMJSn22Iu4NFVE0VqNdB4xqY nClpDBwE2iXYeYjrrOqka7CQloweMOFyqbH2D6IDJs+oGctuzFxSrWiBy8RUwV6j 6vUTAxKqqUG0/ZMQh+FIA+7hJdTLY1XYv1Y6xmqlNcr07vYnlFb4UwoU+2HS01yE eyj8BEM8HI7Phj0BUcyJursjxYMc2WQx52r27Kpnk2RkuJAMqj0lu75LZGCJHAtr 8C0q7CEecMRErVYt7F0NcXYgw0T6o6Imm2pAXhle8zJNMHpf2z0zCDyar819Gdt4 z/sgLVJo5hRXnMF7Gd0OgxpeQxeV+ZrawXg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1686753078; x=1686839478; bh=ROXWrlPMj0Dj2f8IgfkbKyRWsUamdcsXHrp lx/KtODI=; b=HK75QXqE7ej9xrM21YeaKi8h1fREhKvxyoO9nCmbmcDibBPp9yk 1UWA3XhpqrNpK+lgmSNAJojIXsL2quMqwJDY3kVliLu3fO29FsA1B/YUtf6oavdl BsX3wslrFk0LjiluLrv9r7BlqGDCK3p6Vh+a2RIxNPN0C+AkKXo9LjZxc1QpphdN Rar1n0P6SZqUJvIusEoG8eoAFdPFyCEX3TTf43kBw0wOiDK2RSyKoWmdL1GUB0eK 0SALqbjYY9jkMRfCAK7Ehgk7uc3Ylrd+7yo6T7Ri1IOY62BTbb7kFOeAyk9InL2+ /AanKYIoomYe+Fw3q1my+DQFcNgKUbcpL9A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrgedvtddgjeekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhggtgfgsehtkeertdertdejnecuhfhrohhmpefvhhho mhgrshcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqne cuggftrfgrthhtvghrnheptdeiffffgeefteelhfekueetueduffejgfelvedtieejudek gfevheetheehgeejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 14 Jun 2023 10:31:16 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: Konstantin Ananyev , Cristian Dumitrescu , Olivier Matz , Ruifeng Wang , David Christensen , Bruce Richardson , Ferruh Yigit , Andrew Rybchenko , Ori Kam Subject: [PATCH 3/5] lib: align comment blocks Date: Wed, 14 Jun 2023 16:26:49 +0200 Message-Id: <20230614142651.1456116-4-thomas@monjalon.net> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230614142651.1456116-1-thomas@monjalon.net> References: <20230614142651.1456116-1-thomas@monjalon.net> MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Some comment blocks were missing a space or had too many spaces at the beginning of the lines, resulting in misalignment of asterisks. Such mistakes were found with this kind of commands: git grep '^\*' lib git grep '^ *\*' lib Signed-off-by: Thomas Monjalon Reviewed-by: Ruifeng Wang --- lib/acl/acl_gen.c | 10 +- lib/acl/acl_vect.h | 2 +- lib/cfgfile/rte_cfgfile.h | 300 ++++++++++++------------- lib/cmdline/cmdline_parse_string.h | 14 +- lib/eal/arm/include/rte_cycles_32.h | 13 +- lib/eal/include/generic/rte_cycles.h | 2 +- lib/eal/include/rte_hexdump.h | 51 ++--- lib/eal/ppc/include/rte_byteorder.h | 2 +- lib/eal/x86/include/rte_byteorder_32.h | 2 +- lib/eal/x86/include/rte_byteorder_64.h | 2 +- lib/ethdev/rte_ethdev.h | 65 +++--- lib/ethdev/rte_flow.h | 8 +- lib/ethdev/rte_tm.h | 4 +- lib/table/rte_table_hash_ext.c | 28 +-- lib/table/rte_table_hash_lru.c | 102 ++++----- 15 files changed, 302 insertions(+), 303 deletions(-) diff --git a/lib/acl/acl_gen.c b/lib/acl/acl_gen.c index e759a2ca15..25e75fec35 100644 --- a/lib/acl/acl_gen.c +++ b/lib/acl/acl_gen.c @@ -148,11 +148,11 @@ acl_node_fill_dfa(const struct rte_acl_node *node, } /* -* Counts the number of groups of sequential bits that are -* either 0 or 1, as specified by the zero_one parameter. This is used to -* calculate the number of ranges in a node to see if it fits in a quad range -* node. -*/ + * Count the number of groups of sequential bits that are either 0 or 1, + * as specified by the zero_one parameter. + * This is used to calculate the number of ranges in a node + * to see if it fits in a quad range node. + */ static int acl_count_sequential_groups(struct rte_acl_bitset *bits, int zero_one) { diff --git a/lib/acl/acl_vect.h b/lib/acl/acl_vect.h index e4b4666090..2ab58a55a4 100644 --- a/lib/acl/acl_vect.h +++ b/lib/acl/acl_vect.h @@ -36,7 +36,7 @@ * This is effectively a popcnt of bytes that are greater than the * input byte. * Single nodes are processed in the same ways as quad range nodes. -*/ + */ #define ACL_TR_CALC_ADDR(P, S, \ addr, index_mask, next_input, shuffle_input, \ ones_16, range_base, tr_lo, tr_hi) do { \ diff --git a/lib/cfgfile/rte_cfgfile.h b/lib/cfgfile/rte_cfgfile.h index 7729c133b4..232c65c77b 100644 --- a/lib/cfgfile/rte_cfgfile.h +++ b/lib/cfgfile/rte_cfgfile.h @@ -12,11 +12,11 @@ extern "C" { #endif /** -* @file -* RTE Configuration File -* -* This library allows reading application defined parameters from standard -* format configuration file. + * @file + * Configuration File management. + * + * This library allows reading application defined parameters + * from standard format configuration file. */ #ifndef CFG_NAME_LEN @@ -63,15 +63,15 @@ enum { #define CFG_DEFAULT_COMMENT_CHARACTER ';' /** -* Open config file -* -* @param filename -* Config file name -* @param flags -* Config file flags -* @return -* Handle to configuration file on success, NULL otherwise -*/ + * Open config file. + * + * @param filename + * Config file name. + * @param flags + * Config file flags. + * @return + * Handle to configuration file on success, NULL otherwise. + */ struct rte_cfgfile *rte_cfgfile_load(const char *filename, int flags); /** @@ -167,133 +167,133 @@ int rte_cfgfile_set_entry(struct rte_cfgfile *cfg, const char *sectionname, int rte_cfgfile_save(struct rte_cfgfile *cfg, const char *filename); /** -* Get number of sections in config file -* -* @param cfg -* Config file -* @param sec_name -* Section name -* @param length -* Maximum section name length -* @return -* Number of sections -*/ + * Get number of sections in config file. + * + * @param cfg + * Config file. + * @param sec_name + * Section name. + * @param length + * Maximum section name length. + * @return + * Number of sections. + */ int rte_cfgfile_num_sections(struct rte_cfgfile *cfg, const char *sec_name, size_t length); /** -* Get name of all config file sections. -* -* Fills in the array sections with the name of all the sections in the file -* (up to the number of max_sections sections). -* -* @param cfg -* Config file -* @param sections -* Array containing section names after successful invocation. Each element -* of this array should be preallocated by the user with at least -* CFG_NAME_LEN characters. -* @param max_sections -* Maximum number of section names to be stored in sections array -* @return -* Number of populated sections names -*/ + * Get name of all config file sections. + * + * Fills in the array sections with the name of all the sections in the file + * (up to the number of max_sections sections). + * + * @param cfg + * Config file. + * @param sections + * Array containing section names after successful invocation. + * Each element of this array should be preallocated by the user + * with at least CFG_NAME_LEN characters. + * @param max_sections + * Maximum number of section names to be stored in sections array. + * @return + * Number of populated sections names. + */ int rte_cfgfile_sections(struct rte_cfgfile *cfg, char *sections[], int max_sections); /** -* Check if given section exists in config file -* -* @param cfg -* Config file -* @param sectionname -* Section name -* @return -* TRUE (value different than 0) if section exists, FALSE (value 0) otherwise -*/ + * Check if given section exists in config file. + * + * @param cfg + * Config file. + * @param sectionname + * Section name. + * @return + * TRUE (value different than 0) if section exists, FALSE (value 0) otherwise. + */ int rte_cfgfile_has_section(struct rte_cfgfile *cfg, const char *sectionname); /** -* Get number of entries in given config file section -* -* If multiple sections have the given name this function operates on the -* first one. -* -* @param cfg -* Config file -* @param sectionname -* Section name -* @return -* Number of entries in section on success, -1 otherwise -*/ + * Get number of entries in given config file section. + * + * If multiple sections have the given name, + * this function operates on the first one. + * + * @param cfg + * Config file. + * @param sectionname + * Section name. + * @return + * Number of entries in section on success, -1 otherwise. + */ int rte_cfgfile_section_num_entries(struct rte_cfgfile *cfg, const char *sectionname); /** -* Get number of entries in given config file section -* -* The index of a section is the same as the index of its name in the -* result of rte_cfgfile_sections. This API can be used when there are -* multiple sections with the same name. -* -* @param cfg -* Config file -* @param sectionname -* Section name -* @param index -* Section index -* @return -* Number of entries in section on success, -1 otherwise -*/ + * Get number of entries in given config file section. + * + * The index of a section is the same as the index of its name + * in the result of rte_cfgfile_sections. + * This API can be used when there are multiple sections with the same name. + * + * @param cfg + * Config file. + * @param sectionname + * Section name. + * @param index + * Section index. + * @return + * Number of entries in section on success, -1 otherwise. + */ int rte_cfgfile_section_num_entries_by_index(struct rte_cfgfile *cfg, char *sectionname, int index); /** -* Get section entries as key-value pairs -* -* If multiple sections have the given name this function operates on the -* first one. -* -* @param cfg -* Config file -* @param sectionname -* Section name -* @param entries -* Pre-allocated array of at least max_entries entries where the section -* entries are stored as key-value pair after successful invocation -* @param max_entries -* Maximum number of section entries to be stored in entries array -* @return -* Number of entries populated on success, -1 otherwise -*/ + * Get section entries as key-value pairs. + * + * If multiple sections have the given name, + * this function operates on the first one. + * + * @param cfg + * Config file. + * @param sectionname + * Section name. + * @param entries + * Pre-allocated array of at least max_entries entries where the section + * entries are stored as key-value pair after successful invocation. + * @param max_entries + * Maximum number of section entries to be stored in entries array. + * @return + * Number of entries populated on success, -1 otherwise. + */ int rte_cfgfile_section_entries(struct rte_cfgfile *cfg, const char *sectionname, struct rte_cfgfile_entry *entries, int max_entries); /** -* Get section entries as key-value pairs -* -* The index of a section is the same as the index of its name in the -* result of rte_cfgfile_sections. This API can be used when there are -* multiple sections with the same name. -* -* @param cfg -* Config file -* @param index -* Section index -* @param sectionname -* Pre-allocated string of at least CFG_NAME_LEN characters where the -* section name is stored after successful invocation. -* @param entries -* Pre-allocated array of at least max_entries entries where the section -* entries are stored as key-value pair after successful invocation -* @param max_entries -* Maximum number of section entries to be stored in entries array -* @return -* Number of entries populated on success, -1 otherwise -*/ + * Get section entries as key-value pairs. + * + * The index of a section is the same as the index of its name + * in the result of rte_cfgfile_sections. + * This API can be used when there are multiple sections with the same name. + * + * @param cfg + * Config file. + * @param index + * Section index. + * @param sectionname + * Pre-allocated string of at least CFG_NAME_LEN characters + * where the section name is stored after successful invocation. + * @param entries + * Pre-allocated array of at least max_entries entries where the section + * entries are stored as key-value pair after successful invocation. + * @param max_entries + * Maximum number of section entries to be stored in entries array. + * @return + * Number of entries populated on success, -1 otherwise. + */ int rte_cfgfile_section_entries_by_index(struct rte_cfgfile *cfg, int index, char *sectionname, @@ -301,50 +301,50 @@ int rte_cfgfile_section_entries_by_index(struct rte_cfgfile *cfg, int max_entries); /** -* Get value of the named entry in named config file section -* -* If multiple sections have the given name this function operates on the -* first one. -* -* @param cfg -* Config file -* @param sectionname -* Section name -* @param entryname -* Entry name -* @return -* Entry value on success, NULL otherwise -*/ + * Get value of the named entry in named config file section. + * + * If multiple sections have the given name, + * this function operates on the first one. + * + * @param cfg + * Config file. + * @param sectionname + * Section name. + * @param entryname + * Entry name. + * @return + * Entry value on success, NULL otherwise. + */ const char *rte_cfgfile_get_entry(struct rte_cfgfile *cfg, const char *sectionname, const char *entryname); /** -* Check if given entry exists in named config file section -* -* If multiple sections have the given name this function operates on the -* first one. -* -* @param cfg -* Config file -* @param sectionname -* Section name -* @param entryname -* Entry name -* @return -* TRUE (value different than 0) if entry exists, FALSE (value 0) otherwise -*/ + * Check if given entry exists in named config file section. + * + * If multiple sections have the given name, + * this function operates on the first one. + * + * @param cfg + * Config file. + * @param sectionname + * Section name. + * @param entryname + * Entry name. + * @return + * TRUE (value different than 0) if entry exists, FALSE (value 0) otherwise. + */ int rte_cfgfile_has_entry(struct rte_cfgfile *cfg, const char *sectionname, const char *entryname); /** -* Close config file -* -* @param cfg -* Config file -* @return -* 0 on success, -1 otherwise -*/ + * Close config file. + * + * @param cfg + * Config file. + * @return + * 0 on success, -1 otherwise. + */ int rte_cfgfile_close(struct rte_cfgfile *cfg); #ifdef __cplusplus diff --git a/lib/cmdline/cmdline_parse_string.h b/lib/cmdline/cmdline_parse_string.h index 52a26670ee..2199ca9a21 100644 --- a/lib/cmdline/cmdline_parse_string.h +++ b/lib/cmdline/cmdline_parse_string.h @@ -44,13 +44,13 @@ int cmdline_get_help_string(cmdline_parse_token_hdr_t *tk, char *dstbuf, unsigned int size); /** -* Token marked as TOKEN_STRING_MULTI takes entire parsing string -* until “#” sign appear. Everything after “#” sign is treated as a comment. -* -* Note: -* In this case second parameter of TOKEN_STRING_INITIALIZER must be a type of -* cmdline_multi_string_t. -*/ + * Token marked as TOKEN_STRING_MULTI takes entire parsing string + * until “#” sign appear. Everything after “#” sign is treated as a comment. + * + * Note: + * In this case second parameter of TOKEN_STRING_INITIALIZER + * must be a type of cmdline_multi_string_t. + */ #define TOKEN_STRING_MULTI "" #define TOKEN_STRING_INITIALIZER(structure, field, string) \ diff --git a/lib/eal/arm/include/rte_cycles_32.h b/lib/eal/arm/include/rte_cycles_32.h index cec4d69e7a..859cd2e5bb 100644 --- a/lib/eal/arm/include/rte_cycles_32.h +++ b/lib/eal/arm/include/rte_cycles_32.h @@ -5,12 +5,13 @@ #ifndef _RTE_CYCLES_ARM32_H_ #define _RTE_CYCLES_ARM32_H_ -/* ARM v7 does not have suitable source of clock signals. The only clock counter - available in the core is 32 bit wide. Therefore it is unsuitable as the - counter overlaps every few seconds and probably is not accessible by - userspace programs. Therefore we use clock_gettime(CLOCK_MONOTONIC_RAW) to - simulate counter running at 1GHz. -*/ +/* ARM v7 does not have suitable source of clock signals. + * The only clock counter available in the core is 32 bit wide. + * Therefore it is unsuitable as the counter overlaps every few seconds + * and probably is not accessible by userspace programs. + * Therefore we use clock_gettime(CLOCK_MONOTONIC_RAW) + * to simulate counter running at 1GHz. + */ #include diff --git a/lib/eal/include/generic/rte_cycles.h b/lib/eal/include/generic/rte_cycles.h index 69f3cee8d1..075e899f5a 100644 --- a/lib/eal/include/generic/rte_cycles.h +++ b/lib/eal/include/generic/rte_cycles.h @@ -38,7 +38,7 @@ rte_get_tsc_hz(void); /** * Return the number of TSC cycles since boot * - * @return + * @return * the number of cycles */ static inline uint64_t diff --git a/lib/eal/include/rte_hexdump.h b/lib/eal/include/rte_hexdump.h index 80cf2933a7..009ce24c5c 100644 --- a/lib/eal/include/rte_hexdump.h +++ b/lib/eal/include/rte_hexdump.h @@ -17,37 +17,34 @@ extern "C" { #endif /** -* Dump out memory in a special hex dump format. -* -* @param f -* A pointer to a file for output -* @param title -* If not NULL this string is printed as a header to the output. -* @param buf -* This is the buffer address to print out. -* @param len -* The number of bytes to dump out -*/ - + * Dump out memory in a special hex dump format. + * + * @param f + * A pointer to a file for output. + * @param title + * If not NULL this string is printed as a header to the output. + * @param buf + * This is the buffer address to print out. + * @param len + * The number of bytes to dump out. + */ extern void -rte_hexdump(FILE *f, const char * title, const void * buf, unsigned int len); +rte_hexdump(FILE *f, const char *title, const void *buf, unsigned int len); /** -* Dump out memory in a hex format with colons between bytes. -* -* @param f -* A pointer to a file for output -* @param title -* If not NULL this string is printed as a header to the output. -* @param buf -* This is the buffer address to print out. -* @param len -* The number of bytes to dump out -*/ - + * Dump out memory in a hex format with colons between bytes. + * + * @param f + * A pointer to a file for output. + * @param title + * If not NULL this string is printed as a header to the output. + * @param buf + * This is the buffer address to print out. + * @param len + * The number of bytes to dump out. + */ void -rte_memdump(FILE *f, const char * title, const void * buf, unsigned int len); - +rte_memdump(FILE *f, const char *title, const void *buf, unsigned int len); #ifdef __cplusplus } diff --git a/lib/eal/ppc/include/rte_byteorder.h b/lib/eal/ppc/include/rte_byteorder.h index bfdded40f5..49f369f1e7 100644 --- a/lib/eal/ppc/include/rte_byteorder.h +++ b/lib/eal/ppc/include/rte_byteorder.h @@ -39,7 +39,7 @@ static inline uint32_t rte_arch_bswap32(uint32_t _x) /* * An architecture-optimized byte swap for a 64-bit value. * - * Do not use this function directly. The preferred function is rte_bswap64(). + * Do not use this function directly. The preferred function is rte_bswap64(). */ /* 64-bit mode */ static inline uint64_t rte_arch_bswap64(uint64_t _x) diff --git a/lib/eal/x86/include/rte_byteorder_32.h b/lib/eal/x86/include/rte_byteorder_32.h index d5a768e52b..da901a4176 100644 --- a/lib/eal/x86/include/rte_byteorder_32.h +++ b/lib/eal/x86/include/rte_byteorder_32.h @@ -15,7 +15,7 @@ /* * An architecture-optimized byte swap for a 64-bit value. * - * Do not use this function directly. The preferred function is rte_bswap64(). + * Do not use this function directly. The preferred function is rte_bswap64(). */ /* Compat./Leg. mode */ static inline uint64_t rte_arch_bswap64(uint64_t x) diff --git a/lib/eal/x86/include/rte_byteorder_64.h b/lib/eal/x86/include/rte_byteorder_64.h index 8c6cf285b5..537d9a511e 100644 --- a/lib/eal/x86/include/rte_byteorder_64.h +++ b/lib/eal/x86/include/rte_byteorder_64.h @@ -15,7 +15,7 @@ /* * An architecture-optimized byte swap for a 64-bit value. * - * Do not use this function directly. The preferred function is rte_bswap64(). + * Do not use this function directly. The preferred function is rte_bswap64(). */ /* 64-bit mode */ static inline uint64_t rte_arch_bswap64(uint64_t _x) diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h index e550f09889..91a3b863db 100644 --- a/lib/ethdev/rte_ethdev.h +++ b/lib/ethdev/rte_ethdev.h @@ -825,10 +825,10 @@ rte_eth_rss_hf_refine(uint64_t rss_hf) #define RTE_ETH_VLAN_ID_MAX 0x0FFF /**< VLAN ID is in lower 12 bits*/ /**@}*/ -/* Definitions used for receive MAC address */ +/* Definitions used for receive MAC address */ #define RTE_ETH_NUM_RECEIVE_MAC_ADDR 128 /**< Maximum nb. of receive mac addr. */ -/* Definitions used for unicast hash */ +/* Definitions used for unicast hash */ #define RTE_ETH_VMDQ_NUM_UC_HASH_ARRAY 128 /**< Maximum nb. of UC hash array. */ /**@{@name VMDq Rx mode @@ -4496,7 +4496,7 @@ int rte_eth_dev_rss_reta_query(uint16_t port_id, * @return * - (0) if successful. * - (-ENOTSUP) if hardware doesn't support. - * - (-ENODEV) if *port_id* invalid. + * - (-ENODEV) if *port_id* invalid. * - (-EIO) if device is removed. * - (-EINVAL) if bad parameter. */ @@ -4517,7 +4517,7 @@ int rte_eth_dev_uc_hash_table_set(uint16_t port_id, struct rte_ether_addr *addr, * @return * - (0) if successful. * - (-ENOTSUP) if hardware doesn't support. - * - (-ENODEV) if *port_id* invalid. + * - (-ENODEV) if *port_id* invalid. * - (-EIO) if device is removed. * - (-EINVAL) if bad parameter. */ @@ -5231,38 +5231,39 @@ int rte_eth_read_clock(uint16_t port_id, uint64_t *clock); /** -* Get the port ID from device name. The device name should be specified -* as below: -* - PCIe address (Domain:Bus:Device.Function), for example- 0000:2:00.0 -* - SoC device name, for example- fsl-gmac0 -* - vdev dpdk name, for example- net_[pcap0|null0|tap0] -* -* @param name -* pci address or name of the device -* @param port_id -* pointer to port identifier of the device -* @return -* - (0) if successful and port_id is filled. -* - (-ENODEV or -EINVAL) on failure. -*/ + * Get the port ID from device name. + * The device name should be specified as below: + * - PCIe address (Domain:Bus:Device.Function), for example- 0000:2:00.0 + * - SoC device name, for example- fsl-gmac0 + * - vdev dpdk name, for example- net_[pcap0|null0|tap0] + * + * @param name + * PCI address or name of the device. + * @param port_id + * Pointer to port identifier of the device. + * @return + * - (0) if successful and port_id is filled. + * - (-ENODEV or -EINVAL) on failure. + */ int rte_eth_dev_get_port_by_name(const char *name, uint16_t *port_id); /** -* Get the device name from port ID. The device name is specified as below: -* - PCIe address (Domain:Bus:Device.Function), for example- 0000:02:00.0 -* - SoC device name, for example- fsl-gmac0 -* - vdev dpdk name, for example- net_[pcap0|null0|tun0|tap0] -* -* @param port_id -* Port identifier of the device. -* @param name -* Buffer of size RTE_ETH_NAME_MAX_LEN to store the name. -* @return -* - (0) if successful. -* - (-ENODEV) if *port_id* is invalid. -* - (-EINVAL) on failure. -*/ + * Get the device name from port ID. + * The device name is specified as below: + * - PCIe address (Domain:Bus:Device.Function), for example- 0000:02:00.0 + * - SoC device name, for example- fsl-gmac0 + * - vdev dpdk name, for example- net_[pcap0|null0|tun0|tap0] + * + * @param port_id + * Port identifier of the device. + * @param name + * Buffer of size RTE_ETH_NAME_MAX_LEN to store the name. + * @return + * - (0) if successful. + * - (-ENODEV) if *port_id* is invalid. + * - (-EINVAL) on failure. + */ int rte_eth_dev_get_name_by_port(uint16_t port_id, char *name); diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h index e11c4a044a..59e4093a5b 100644 --- a/lib/ethdev/rte_flow.h +++ b/lib/ethdev/rte_flow.h @@ -5831,10 +5831,10 @@ rte_flow_template_table_destroy(uint16_t port_id, */ __extension__ struct rte_flow_op_attr { - /** - * When set, the requested action will not be sent to the HW immediately. - * The application must call the rte_flow_queue_push to actually send it. - */ + /** + * When set, the requested action will not be sent to the HW immediately. + * The application must call the rte_flow_queue_push to actually send it. + */ uint32_t postpone:1; }; diff --git a/lib/ethdev/rte_tm.h b/lib/ethdev/rte_tm.h index 001d13f301..4103c49a3f 100644 --- a/lib/ethdev/rte_tm.h +++ b/lib/ethdev/rte_tm.h @@ -1937,9 +1937,9 @@ rte_tm_node_cman_update(uint16_t port_id, * Error details. Filled in only on error, when not NULL. * @return * 0 on success, non-zero error code otherwise. - * + * * @see struct rte_tm_capabilities::cman_wred_context_private_n_max -*/ + */ __rte_experimental int rte_tm_node_wred_context_update(uint16_t port_id, diff --git a/lib/table/rte_table_hash_ext.c b/lib/table/rte_table_hash_ext.c index bb7d23019b..4753ccb15c 100644 --- a/lib/table/rte_table_hash_ext.c +++ b/lib/table/rte_table_hash_ext.c @@ -829,20 +829,20 @@ static int rte_table_hash_ext_lookup_unoptimized( } /* -* The lookup function implements a 4-stage pipeline, with each stage processing -* two different packets. The purpose of pipelined implementation is to hide the -* latency of prefetching the data structures and loosen the data dependency -* between instructions. -* -* p00 _______ p10 _______ p20 _______ p30 _______ -*----->| |----->| |----->| |----->| |-----> -* | 0 | | 1 | | 2 | | 3 | -*----->|_______|----->|_______|----->|_______|----->|_______|-----> -* p01 p11 p21 p31 -* -* The naming convention is: -* pXY = packet Y of stage X, X = 0 .. 3, Y = 0 .. 1 -*/ + * The lookup function implements a 4-stage pipeline, with each stage processing + * two different packets. The purpose of pipelined implementation is to hide the + * latency of prefetching the data structures and loosen the data dependency + * between instructions. + * + * p00 _______ p10 _______ p20 _______ p30 _______ + *----->| |----->| |----->| |----->| |-----> + * | 0 | | 1 | | 2 | | 3 | + *----->|_______|----->|_______|----->|_______|----->|_______|-----> + * p01 p11 p21 p31 + * + * The naming convention is: + * pXY = packet Y of stage X, X = 0 .. 3, Y = 0 .. 1 + */ static int rte_table_hash_ext_lookup( void *table, struct rte_mbuf **pkts, diff --git a/lib/table/rte_table_hash_lru.c b/lib/table/rte_table_hash_lru.c index d71fc70834..f312d898c2 100644 --- a/lib/table/rte_table_hash_lru.c +++ b/lib/table/rte_table_hash_lru.c @@ -452,43 +452,43 @@ static int rte_table_hash_lru_lookup_unoptimized( } /* -* mask = match bitmask -* match = at least one match -* match_many = more than one match -* match_pos = position of first match -* -* ---------------------------------------- -* mask match match_many match_pos -* ---------------------------------------- -* 0000 0 0 00 -* 0001 1 0 00 -* 0010 1 0 01 -* 0011 1 1 00 -* ---------------------------------------- -* 0100 1 0 10 -* 0101 1 1 00 -* 0110 1 1 01 -* 0111 1 1 00 -* ---------------------------------------- -* 1000 1 0 11 -* 1001 1 1 00 -* 1010 1 1 01 -* 1011 1 1 00 -* ---------------------------------------- -* 1100 1 1 10 -* 1101 1 1 00 -* 1110 1 1 01 -* 1111 1 1 00 -* ---------------------------------------- -* -* match = 1111_1111_1111_1110 -* match_many = 1111_1110_1110_1000 -* match_pos = 0001_0010_0001_0011__0001_0010_0001_0000 -* -* match = 0xFFFELLU -* match_many = 0xFEE8LLU -* match_pos = 0x12131210LLU -*/ + * mask = match bitmask + * match = at least one match + * match_many = more than one match + * match_pos = position of first match + * + * ---------------------------------------- + * mask match match_many match_pos + * ---------------------------------------- + * 0000 0 0 00 + * 0001 1 0 00 + * 0010 1 0 01 + * 0011 1 1 00 + * ---------------------------------------- + * 0100 1 0 10 + * 0101 1 1 00 + * 0110 1 1 01 + * 0111 1 1 00 + * ---------------------------------------- + * 1000 1 0 11 + * 1001 1 1 00 + * 1010 1 1 01 + * 1011 1 1 00 + * ---------------------------------------- + * 1100 1 1 10 + * 1101 1 1 00 + * 1110 1 1 01 + * 1111 1 1 00 + * ---------------------------------------- + * + * match = 1111_1111_1111_1110 + * match_many = 1111_1110_1110_1000 + * match_pos = 0001_0010_0001_0011__0001_0010_0001_0000 + * + * match = 0xFFFELLU + * match_many = 0xFEE8LLU + * match_pos = 0x12131210LLU + */ #define LUT_MATCH 0xFFFELLU #define LUT_MATCH_MANY 0xFEE8LLU @@ -781,20 +781,20 @@ static int rte_table_hash_lru_lookup_unoptimized( } /* -* The lookup function implements a 4-stage pipeline, with each stage processing -* two different packets. The purpose of pipelined implementation is to hide the -* latency of prefetching the data structures and loosen the data dependency -* between instructions. -* -* p00 _______ p10 _______ p20 _______ p30 _______ -* ----->| |----->| |----->| |----->| |-----> -* | 0 | | 1 | | 2 | | 3 | -* ----->|_______|----->|_______|----->|_______|----->|_______|-----> -* p01 p11 p21 p31 -* -* The naming convention is: -* pXY = packet Y of stage X, X = 0 .. 3, Y = 0 .. 1 -*/ + * The lookup function implements a 4-stage pipeline, with each stage processing + * two different packets. The purpose of pipelined implementation is to hide the + * latency of prefetching the data structures and loosen the data dependency + * between instructions. + * + * p00 _______ p10 _______ p20 _______ p30 _______ + * ----->| |----->| |----->| |----->| |-----> + * | 0 | | 1 | | 2 | | 3 | + * ----->|_______|----->|_______|----->|_______|----->|_______|-----> + * p01 p11 p21 p31 + * + * The naming convention is: + * pXY = packet Y of stage X, X = 0 .. 3, Y = 0 .. 1 + */ static int rte_table_hash_lru_lookup( void *table, struct rte_mbuf **pkts,