From: Thomas Monjalon <thomas@monjalon.net>
To: dev@dpdk.org
Cc: Konstantin Ananyev <konstantin.ananyev@intel.com>,
Olivier Matz <olivier.matz@6wind.com>,
Declan Doherty <declan.doherty@intel.com>,
Cristian Dumitrescu <cristian.dumitrescu@intel.com>,
Wenzhuo Lu <wenzhuo.lu@intel.com>,
Jingjing Wu <jingjing.wu@intel.com>,
Bernard Iremonger <bernard.iremonger@intel.com>,
Bruce Richardson <bruce.richardson@intel.com>,
Vladimir Medvedkin <vladimir.medvedkin@intel.com>,
Yipeng Wang <yipeng1.wang@intel.com>,
Sameh Gobriel <sameh.gobriel@intel.com>,
Anatoly Burakov <anatoly.burakov@intel.com>,
Andrew Rybchenko <arybchenko@solarflare.com>,
Phil Yang <phil.yang@arm.com>, Joyce Kong <joyce.kong@arm.com>,
Robert Sanford <rsanford@akamai.com>,
Erik Gabriel Carrillo <erik.g.carrillo@intel.com>,
John McNamara <john.mcnamara@intel.com>,
Marko Kovacevic <marko.kovacevic@intel.com>,
Ori Kam <orika@mellanox.com>,
Radu Nicolau <radu.nicolau@intel.com>,
Akhil Goyal <akhil.goyal@nxp.com>,
Tomasz Kantecki <tomasz.kantecki@intel.com>,
Sunil Kumar Kori <skori@marvell.com>,
Pavan Nikhilesh <pbhagavatula@marvell.com>,
David Hunt <david.hunt@intel.com>,
Hemant Agrawal <hemant.agrawal@nxp.com>,
Sachin Saxena <sachin.saxena@nxp.com>,
Chas Williams <chas3@att.com>, John Daley <johndale@cisco.com>,
Hyong Youb Kim <hyonkim@cisco.com>,
Ziyang Xuan <xuanziyang2@huawei.com>,
Xiaoyun Wang <cloud.wangxiaoyun@huawei.com>,
Guoyang Zhou <zhouguoyang@huawei.com>,
"Wei Hu (Xavier)" <xavier.huwei@huawei.com>,
"Min Hu (Connor)" <humin29@huawei.com>,
Yisen Zhuang <yisen.zhuang@huawei.com>,
Beilei Xing <beilei.xing@intel.com>,
Qi Zhang <qi.z.zhang@intel.com>,
Qiming Yang <qiming.yang@intel.com>,
Gagandeep Singh <g.singh@nxp.com>,
Rasesh Mody <rmody@marvell.com>,
Shahed Shaikh <shshaikh@marvell.com>,
Jerin Jacob <jerinj@marvell.com>,
Maciej Czekaj <mczekaj@marvell.com>,
Rosen Xu <rosen.xu@intel.com>,
Tianfei zhang <tianfei.zhang@intel.com>,
Xiaoyun Li <xiaoyun.li@intel.com>,
Kirill Rybalchenko <kirill.rybalchenko@intel.com>,
Harry van Haaren <harry.van.haaren@intel.com>,
Jasvinder Singh <jasvinder.singh@intel.com>,
Byron Marohn <byron.marohn@intel.com>,
Maxime Coquelin <maxime.coquelin@redhat.com>,
Tiwei Bie <tiwei.bie@intel.com>,
Zhihong Wang <zhihong.wang@intel.com>
Subject: [dpdk-dev] [PATCH 20.05 09/15] replace unused attributes
Date: Mon, 10 Feb 2020 17:20:26 +0100 [thread overview]
Message-ID: <20200210162032.1177478-10-thomas@monjalon.net> (raw)
In-Reply-To: <20200210162032.1177478-1-thomas@monjalon.net>
There is a common macro __rte_unused, avoiding warnings,
which is now used where appropriate for consistency.
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
app/test-acl/main.c | 2 +-
app/test-cmdline/cmdline_test.c | 4 +-
app/test-cmdline/commands.c | 40 +-
app/test-crypto-perf/cperf_test_common.c | 2 +-
app/test-pipeline/main.c | 2 +-
app/test-pipeline/pipeline_hash.c | 10 +-
app/test-pmd/bpf_cmd.c | 8 +-
app/test-pmd/cmdline.c | 832 +++++++++---------
app/test-pmd/cmdline_mtr.c | 56 +-
app/test-pmd/cmdline_tm.c | 88 +-
app/test-pmd/txonly.c | 2 +-
app/test/commands.c | 20 +-
app/test/test_atomic.c | 14 +-
app/test/test_cmdline_lib.c | 18 +-
app/test/test_func_reentrancy.c | 14 +-
app/test/test_hash.c | 6 +-
app/test/test_hash_readwrite.c | 2 +-
app/test/test_hash_readwrite_lf_perf.c | 8 +-
app/test/test_malloc.c | 6 +-
app/test/test_mcslock.c | 4 +-
app/test/test_mempool.c | 6 +-
app/test/test_mempool_perf.c | 2 +-
app/test/test_per_lcore.c | 6 +-
app/test/test_rwlock.c | 4 +-
app/test/test_spinlock.c | 6 +-
app/test/test_table.c | 10 +-
app/test/test_table.h | 10 +-
app/test/test_table_pipeline.c | 22 +-
app/test/test_ticketlock.c | 6 +-
app/test/test_timer.c | 10 +-
app/test/test_timer_racecond.c | 2 +-
doc/guides/sample_app_ug/cmd_line.rst | 2 +-
doc/guides/sample_app_ug/hello_world.rst | 2 +-
.../sample_app_ug/l3_forward_power_man.rst | 2 +-
doc/guides/sample_app_ug/timer.rst | 4 +-
drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 4 +-
drivers/common/dpaax/caamflib/compat.h | 4 +-
drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 2 +-
drivers/net/bonding/rte_eth_bond_pmd.c | 4 +-
drivers/net/dpaa2/dpaa2_ethdev.h | 2 +-
drivers/net/dpaa2/dpaa2_rxtx.c | 6 +-
drivers/net/enic/base/vnic_dev.c | 4 +-
drivers/net/hinic/hinic_pmd_rx.c | 2 +-
drivers/net/hns3/hns3_ethdev.c | 2 +-
drivers/net/hns3/hns3_ethdev_vf.c | 4 +-
drivers/net/i40e/i40e_ethdev.c | 10 +-
drivers/net/ice/base/ice_osdep.h | 10 +-
drivers/net/ixgbe/ixgbe_ethdev.c | 6 +-
drivers/net/pfe/base/pfe.h | 2 +-
drivers/net/qede/base/bcm_osal.h | 2 +-
drivers/net/qede/qede_filter.c | 6 +-
drivers/net/thunderx/base/nicvf_mbox.c | 2 +-
drivers/raw/ifpga/base/ifpga_compat.h | 2 +-
examples/bond/main.c | 28 +-
examples/cmdline/commands.c | 8 +-
examples/cmdline/parse_obj_list.c | 2 +-
examples/ethtool/ethtool-app/main.c | 2 +-
.../fips_validation/fips_validation_aes.c | 4 +-
.../fips_validation/fips_validation_hmac.c | 4 +-
.../fips_validation/fips_validation_sha.c | 4 +-
.../fips_validation/fips_validation_tdes.c | 6 +-
examples/helloworld/main.c | 2 +-
examples/ip_fragmentation/main.c | 2 +-
examples/ip_reassembly/main.c | 2 +-
examples/ipsec-secgw/ipsec-secgw.c | 2 +-
examples/l2fwd-jobstats/main.c | 2 +-
examples/l2fwd-keepalive/main.c | 6 +-
examples/l2fwd/main.c | 2 +-
examples/l3fwd-acl/main.c | 2 +-
examples/l3fwd-power/main.c | 14 +-
examples/l3fwd/l3fwd.h | 20 +-
examples/l3fwd/l3fwd_em.c | 10 +-
examples/l3fwd/l3fwd_lpm.c | 10 +-
examples/link_status_interrupt/main.c | 2 +-
.../client_server_mp/mp_server/main.c | 2 +-
examples/multi_process/hotplug_mp/commands.c | 16 +-
examples/multi_process/simple_mp/main.c | 2 +-
.../multi_process/simple_mp/mp_commands.c | 12 +-
examples/ntb/ntb_fwd.c | 34 +-
.../performance-thread/l3fwd-thread/main.c | 4 +-
.../performance-thread/pthread_shim/main.c | 4 +-
examples/qos_meter/main.c | 2 +-
examples/qos_sched/cmdline.c | 46 +-
examples/qos_sched/main.c | 2 +-
examples/server_node_efd/server/main.c | 2 +-
examples/timer/main.c | 10 +-
examples/vdpa/main.c | 14 +-
.../guest_cli/vm_power_cli_guest.h | 2 +-
examples/vm_power_manager/main.c | 4 +-
examples/vm_power_manager/oob_monitor_nop.c | 8 +-
examples/vm_power_manager/vm_power_cli.c | 20 +-
examples/vm_power_manager/vm_power_cli.h | 2 +-
examples/vmdq/main.c | 2 +-
lib/librte_cmdline/cmdline.c | 2 +-
lib/librte_cmdline/cmdline_parse_etheraddr.c | 4 +-
lib/librte_cmdline/cmdline_parse_portlist.c | 4 +-
lib/librte_eal/common/include/rte_common.h | 2 +-
lib/librte_eal/freebsd/eal/eal.c | 2 +-
lib/librte_eal/freebsd/eal/eal_thread.c | 2 +-
lib/librte_eal/linux/eal/eal.c | 2 +-
lib/librte_eal/linux/eal/eal_log.c | 2 +-
lib/librte_eal/linux/eal/eal_thread.c | 2 +-
lib/librte_eal/linux/eal/eal_timer.c | 2 +-
lib/librte_mbuf/rte_mbuf.c | 6 +-
lib/librte_power/power_kvm_vm.c | 14 +-
105 files changed, 839 insertions(+), 833 deletions(-)
diff --git a/app/test-acl/main.c b/app/test-acl/main.c
index 57f23942eb..4bc00272f4 100644
--- a/app/test-acl/main.c
+++ b/app/test-acl/main.c
@@ -858,7 +858,7 @@ search_ip5tuples_once(uint32_t categories, uint32_t step, const char *alg)
}
static int
-search_ip5tuples(__attribute__((unused)) void *arg)
+search_ip5tuples(__rte_unused void *arg)
{
uint64_t pkt, start, tm;
uint32_t i, lcore;
diff --git a/app/test-cmdline/cmdline_test.c b/app/test-cmdline/cmdline_test.c
index 3e406331a0..89f4260cbf 100644
--- a/app/test-cmdline/cmdline_test.c
+++ b/app/test-cmdline/cmdline_test.c
@@ -12,6 +12,8 @@
#include <ctype.h>
#include <sys/queue.h>
+#include <rte_common.h>
+
#include <cmdline_rdline.h>
#include <cmdline_parse.h>
#include <cmdline_socket.h>
@@ -20,7 +22,7 @@
#include "cmdline_test.h"
int
-main(int __attribute__((unused)) argc, char __attribute__((unused)) ** argv)
+main(int __rte_unused argc, char __rte_unused ** argv)
{
struct cmdline *cl;
diff --git a/app/test-cmdline/commands.c b/app/test-cmdline/commands.c
index d81da9665a..d67c0ca6ac 100644
--- a/app/test-cmdline/commands.c
+++ b/app/test-cmdline/commands.c
@@ -7,6 +7,8 @@
#include <termios.h>
#include <inttypes.h>
+#include <rte_common.h>
+
#include <cmdline_rdline.h>
#include <cmdline_parse.h>
#include <cmdline_parse_string.h>
@@ -23,9 +25,9 @@ struct cmd_quit_result {
};
static void
-cmd_quit_parsed(__attribute__((unused)) void *parsed_result,
+cmd_quit_parsed(__rte_unused void *parsed_result,
struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
cmdline_quit(cl);
}
@@ -54,9 +56,9 @@ struct cmd_single_result {
};
static void
-cmd_single_parsed(__attribute__((unused)) void *parsed_result,
+cmd_single_parsed(__rte_unused void *parsed_result,
struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
cmdline_printf(cl, "Single word command parsed!\n");
}
@@ -85,9 +87,9 @@ struct cmd_single_long_result {
};
static void
-cmd_single_long_parsed(__attribute__((unused)) void *parsed_result,
+cmd_single_long_parsed(__rte_unused void *parsed_result,
struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
cmdline_printf(cl, "Single long word command parsed!\n");
}
@@ -118,9 +120,9 @@ struct cmd_autocomplete_1_result {
};
static void
-cmd_autocomplete_1_parsed(__attribute__((unused)) void *parsed_result,
+cmd_autocomplete_1_parsed(__rte_unused void *parsed_result,
struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
cmdline_printf(cl, "Autocomplete command 1 parsed!\n");
}
@@ -151,9 +153,9 @@ struct cmd_autocomplete_2_result {
};
static void
-cmd_autocomplete_2_parsed(__attribute__((unused)) void *parsed_result,
+cmd_autocomplete_2_parsed(__rte_unused void *parsed_result,
struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
cmdline_printf(cl, "Autocomplete command 2 parsed!\n");
}
@@ -184,7 +186,7 @@ struct cmd_num_result {
static void
cmd_num_parsed(void *parsed_result,
struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
unsigned result = ((struct cmd_num_result*)parsed_result)->num;
cmdline_printf(cl, "%u\n", result);
@@ -214,9 +216,9 @@ struct cmd_ambig_result_1 {
};
static void
-cmd_ambig_1_parsed(__attribute__((unused)) void *parsed_result,
+cmd_ambig_1_parsed(__rte_unused void *parsed_result,
struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
cmdline_printf(cl, "Command 1 parsed!\n");
}
@@ -250,9 +252,9 @@ struct cmd_ambig_result_2 {
};
static void
-cmd_ambig_2_parsed(__attribute__((unused)) void *parsed_result,
+cmd_ambig_2_parsed(__rte_unused void *parsed_result,
struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
cmdline_printf(cl, "Command 2 parsed!\n");
}
@@ -288,9 +290,9 @@ struct cmd_get_history_bufsize_result {
};
static void
-cmd_get_history_bufsize_parsed(__attribute__((unused)) void *parsed_result,
+cmd_get_history_bufsize_parsed(__rte_unused void *parsed_result,
struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
cmdline_printf(cl, "History buffer size: %zu\n",
sizeof(cl->rdl.history_buf));
@@ -320,9 +322,9 @@ struct cmd_clear_history_result {
};
static void
-cmd_clear_history_parsed(__attribute__((unused)) void *parsed_result,
+cmd_clear_history_parsed(__rte_unused void *parsed_result,
struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
rdline_clear_history(&cl->rdl);
}
diff --git a/app/test-crypto-perf/cperf_test_common.c b/app/test-crypto-perf/cperf_test_common.c
index 85603eed5b..058e0ba564 100644
--- a/app/test-crypto-perf/cperf_test_common.c
+++ b/app/test-crypto-perf/cperf_test_common.c
@@ -86,7 +86,7 @@ static void
mempool_obj_init(struct rte_mempool *mp,
void *opaque_arg,
void *obj,
- __attribute__((unused)) unsigned int i)
+ __rte_unused unsigned int i)
{
struct obj_params *params = opaque_arg;
struct rte_crypto_op *op = obj;
diff --git a/app/test-pipeline/main.c b/app/test-pipeline/main.c
index 0be02ac25f..7f0d6d3f18 100644
--- a/app/test-pipeline/main.c
+++ b/app/test-pipeline/main.c
@@ -76,7 +76,7 @@ main(int argc, char **argv)
}
int
-app_lcore_main_loop(__attribute__((unused)) void *arg)
+app_lcore_main_loop(__rte_unused void *arg)
{
unsigned lcore;
diff --git a/app/test-pipeline/pipeline_hash.c b/app/test-pipeline/pipeline_hash.c
index 25fb2e0dab..2dd8928d43 100644
--- a/app/test-pipeline/pipeline_hash.c
+++ b/app/test-pipeline/pipeline_hash.c
@@ -380,9 +380,9 @@ app_main_loop_worker_pipeline_hash(void) {
uint64_t test_hash(
void *key,
- __attribute__((unused)) void *key_mask,
- __attribute__((unused)) uint32_t key_size,
- __attribute__((unused)) uint64_t seed)
+ __rte_unused void *key_mask,
+ __rte_unused uint32_t key_size,
+ __rte_unused uint64_t seed)
{
uint32_t *k32 = key;
uint32_t ip_dst = rte_be_to_cpu_32(k32[0]);
@@ -393,8 +393,8 @@ uint64_t test_hash(
uint32_t test_hash_cuckoo(
const void *key,
- __attribute__((unused)) uint32_t key_size,
- __attribute__((unused)) uint32_t seed)
+ __rte_unused uint32_t key_size,
+ __rte_unused uint32_t seed)
{
const uint32_t *k32 = key;
uint32_t ip_dst = rte_be_to_cpu_32(k32[0]);
diff --git a/app/test-pmd/bpf_cmd.c b/app/test-pmd/bpf_cmd.c
index 830bfc13a5..0f984ccf4a 100644
--- a/app/test-pmd/bpf_cmd.c
+++ b/app/test-pmd/bpf_cmd.c
@@ -87,8 +87,8 @@ bpf_parse_flags(const char *str, struct rte_bpf_arg *arg, uint32_t *flags)
}
static void cmd_operate_bpf_ld_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
int32_t rc;
uint32_t flags;
@@ -158,8 +158,8 @@ struct cmd_bpf_unld_result {
};
static void cmd_operate_bpf_unld_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_bpf_unld_result *res;
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index de7a695d74..0a38e4ee73 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -80,9 +80,9 @@ struct cmd_help_brief_result {
cmdline_fixed_string_t help;
};
-static void cmd_help_brief_parsed(__attribute__((unused)) void *parsed_result,
+static void cmd_help_brief_parsed(__rte_unused void *parsed_result,
struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
cmdline_printf(
cl,
@@ -123,7 +123,7 @@ struct cmd_help_long_result {
static void cmd_help_long_parsed(void *parsed_result,
struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
int show_all = 0;
struct cmd_help_long_result *res = parsed_result;
@@ -1304,8 +1304,8 @@ struct cmd_operate_port_result {
};
static void cmd_operate_port_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_operate_port_result *res = parsed_result;
@@ -1350,8 +1350,8 @@ struct cmd_operate_specific_port_result {
};
static void cmd_operate_specific_port_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_operate_specific_port_result *res = parsed_result;
@@ -1399,8 +1399,8 @@ struct cmd_set_port_setup_on_result {
};
static void cmd_set_port_setup_on_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_set_port_setup_on_result *res = parsed_result;
@@ -1450,8 +1450,8 @@ struct cmd_operate_attach_port_result {
};
static void cmd_operate_attach_port_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_operate_attach_port_result *res = parsed_result;
@@ -1492,8 +1492,8 @@ struct cmd_operate_detach_port_result {
};
static void cmd_operate_detach_port_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_operate_detach_port_result *res = parsed_result;
@@ -1533,8 +1533,8 @@ struct cmd_operate_detach_device_result {
};
static void cmd_operate_detach_device_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_operate_detach_device_result *res = parsed_result;
@@ -1630,8 +1630,8 @@ parse_and_check_speed_duplex(char *speedstr, char *duplexstr, uint32_t *speed)
static void
cmd_config_speed_all_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_config_speed_all *res = parsed_result;
uint32_t link_speed;
@@ -1702,8 +1702,8 @@ struct cmd_config_speed_specific {
static void
cmd_config_speed_specific_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_config_speed_specific *res = parsed_result;
uint32_t link_speed;
@@ -1776,8 +1776,8 @@ struct cmd_config_loopback_all {
static void
cmd_config_loopback_all_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_config_loopback_all *res = parsed_result;
portid_t pid;
@@ -1832,8 +1832,8 @@ struct cmd_config_loopback_specific {
static void
cmd_config_loopback_specific_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_config_loopback_specific *res = parsed_result;
@@ -1892,8 +1892,8 @@ struct cmd_config_rx_tx {
static void
cmd_config_rx_tx_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_config_rx_tx *res = parsed_result;
@@ -1982,8 +1982,8 @@ struct cmd_config_max_pkt_len_result {
static void
cmd_config_max_pkt_len_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_config_max_pkt_len_result *res = parsed_result;
portid_t pid;
@@ -2064,8 +2064,8 @@ struct cmd_config_max_lro_pkt_size_result {
static void
cmd_config_max_lro_pkt_size_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_config_max_lro_pkt_size_result *res = parsed_result;
portid_t pid;
@@ -2136,8 +2136,8 @@ struct cmd_config_mtu_result {
static void
cmd_config_mtu_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_config_mtu_result *res = parsed_result;
@@ -2187,8 +2187,8 @@ struct cmd_config_rx_mode_flag {
static void
cmd_config_rx_mode_flag_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_config_rx_mode_flag *res = parsed_result;
@@ -2255,8 +2255,8 @@ struct cmd_config_rss {
static void
cmd_config_rss_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_config_rss *res = parsed_result;
struct rte_eth_rss_conf rss_conf = { .rss_key_len = 0, };
@@ -2403,8 +2403,8 @@ parse_and_check_key_hexa_digit(char *key, int idx)
static void
cmd_config_rss_hash_key_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_config_rss_hash_key *res = parsed_result;
uint8_t hash_key[RSS_HASH_KEY_LENGTH];
@@ -2502,8 +2502,8 @@ struct cmd_config_rxtx_ring_size {
static void
cmd_config_rxtx_ring_size_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_config_rxtx_ring_size *res = parsed_result;
struct rte_port *port;
@@ -2596,8 +2596,8 @@ struct cmd_config_rxtx_queue {
static void
cmd_config_rxtx_queue_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_config_rxtx_queue *res = parsed_result;
uint8_t isrx;
@@ -2691,8 +2691,8 @@ struct cmd_config_deferred_start_rxtx_queue {
static void
cmd_config_deferred_start_rxtx_queue_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_config_deferred_start_rxtx_queue *res = parsed_result;
struct rte_port *port;
@@ -2789,8 +2789,8 @@ cmdline_parse_token_string_t cmd_setup_rxtx_queue_setup =
static void
cmd_setup_rxtx_queue_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_setup_rxtx_queue *res = parsed_result;
struct rte_port *port;
@@ -2945,8 +2945,8 @@ parse_reta_config(const char *str,
static void
cmd_set_rss_reta_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
int ret;
struct rte_eth_dev_info dev_info;
@@ -3067,8 +3067,8 @@ showport_parse_reta_config(struct rte_eth_rss_reta_entry64 *conf,
static void
cmd_showport_reta_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_showport_reta *res = parsed_result;
struct rte_eth_rss_reta_entry64 reta_conf[8];
@@ -3140,7 +3140,7 @@ struct cmd_showport_rss_hash {
};
static void cmd_showport_rss_hash_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
+ __rte_unused struct cmdline *cl,
void *show_rss_key)
{
struct cmd_showport_rss_hash *res = parsed_result;
@@ -3202,8 +3202,8 @@ struct cmd_config_dcb {
static void
cmd_config_dcb_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_config_dcb *res = parsed_result;
portid_t port_id = res->port_id;
@@ -3300,8 +3300,8 @@ struct cmd_config_burst {
static void
cmd_config_burst_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_config_burst *res = parsed_result;
struct rte_eth_dev_info dev_info;
@@ -3391,8 +3391,8 @@ struct cmd_config_thresh {
static void
cmd_config_thresh_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_config_thresh *res = parsed_result;
@@ -3460,8 +3460,8 @@ struct cmd_config_threshold {
static void
cmd_config_threshold_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_config_threshold *res = parsed_result;
@@ -3518,9 +3518,9 @@ struct cmd_stop_result {
cmdline_fixed_string_t stop;
};
-static void cmd_stop_parsed(__attribute__((unused)) void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+static void cmd_stop_parsed(__rte_unused void *parsed_result,
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
stop_packet_forwarding();
}
@@ -3611,8 +3611,8 @@ struct cmd_set_list_result {
};
static void cmd_set_list_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_set_list_result *res;
union {
@@ -3679,8 +3679,8 @@ struct cmd_setmask_result {
};
static void cmd_set_mask_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_setmask_result *res = parsed_result;
@@ -3727,8 +3727,8 @@ struct cmd_set_result {
};
static void cmd_set_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_set_result *res = parsed_result;
if (!strcmp(res->what, "nbport")) {
@@ -3774,8 +3774,8 @@ struct cmd_set_log_result {
static void
cmd_set_log_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_set_log_result *res;
int ret;
@@ -3822,8 +3822,8 @@ struct cmd_set_txpkts_result {
static void
cmd_set_txpkts_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_set_txpkts_result *res;
unsigned seg_lengths[RTE_MAX_SEGS_PER_PKT];
@@ -3868,8 +3868,8 @@ struct cmd_set_txsplit_result {
static void
cmd_set_txsplit_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_set_txsplit_result *res;
@@ -3909,8 +3909,8 @@ struct cmd_rx_vlan_filter_all_result {
static void
cmd_rx_vlan_filter_all_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_rx_vlan_filter_all_result *res = parsed_result;
@@ -3960,8 +3960,8 @@ struct cmd_vlan_offload_result {
static void
cmd_vlan_offload_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
int on;
struct cmd_vlan_offload_result *res = parsed_result;
@@ -4064,8 +4064,8 @@ struct cmd_vlan_tpid_result {
static void
cmd_vlan_tpid_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_vlan_tpid_result *res = parsed_result;
enum rte_vlan_type vlan_type;
@@ -4126,8 +4126,8 @@ struct cmd_rx_vlan_filter_result {
static void
cmd_rx_vlan_filter_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_rx_vlan_filter_result *res = parsed_result;
@@ -4175,8 +4175,8 @@ struct cmd_tx_vlan_set_result {
static void
cmd_tx_vlan_set_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_tx_vlan_set_result *res = parsed_result;
@@ -4229,8 +4229,8 @@ struct cmd_tx_vlan_set_qinq_result {
static void
cmd_tx_vlan_set_qinq_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_tx_vlan_set_qinq_result *res = parsed_result;
@@ -4288,8 +4288,8 @@ struct cmd_tx_vlan_set_pvid_result {
static void
cmd_tx_vlan_set_pvid_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_tx_vlan_set_pvid_result *res = parsed_result;
@@ -4342,8 +4342,8 @@ struct cmd_tx_vlan_reset_result {
static void
cmd_tx_vlan_reset_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_tx_vlan_reset_result *res = parsed_result;
@@ -4464,8 +4464,8 @@ cmd_config_queue_tx_offloads(struct rte_port *port)
static void
cmd_csum_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_csum_result *res = parsed_result;
int hw = 0;
@@ -4615,8 +4615,8 @@ struct cmd_csum_tunnel_result {
static void
cmd_csum_tunnel_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_csum_tunnel_result *res = parsed_result;
@@ -4668,8 +4668,8 @@ struct cmd_tso_set_result {
static void
cmd_tso_set_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_tso_set_result *res = parsed_result;
struct rte_eth_dev_info dev_info;
@@ -4807,8 +4807,8 @@ check_tunnel_tso_nic_support(portid_t port_id)
static void
cmd_tunnel_tso_set_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_tunnel_tso_set_result *res = parsed_result;
struct rte_eth_dev_info dev_info;
@@ -4928,8 +4928,8 @@ struct cmd_gro_enable_result {
static void
cmd_gro_enable_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_gro_enable_result *res;
@@ -4978,8 +4978,8 @@ struct cmd_gro_show_result {
static void
cmd_gro_show_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_gro_show_result *res;
@@ -5024,8 +5024,8 @@ struct cmd_gro_flush_result {
static void
cmd_gro_flush_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_gro_flush_result *res;
@@ -5072,8 +5072,8 @@ struct cmd_gso_enable_result {
static void
cmd_gso_enable_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_gso_enable_result *res;
@@ -5122,8 +5122,8 @@ struct cmd_gso_size_result {
static void
cmd_gso_size_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_gso_size_result *res = parsed_result;
@@ -5180,8 +5180,8 @@ struct cmd_gso_show_result {
static void
cmd_gso_show_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_gso_show_result *res = parsed_result;
@@ -5237,8 +5237,8 @@ struct cmd_set_flush_rx {
static void
cmd_set_flush_rx_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_set_flush_rx *res = parsed_result;
no_flush_rx = (uint8_t)((strcmp(res->mode, "on") == 0) ? 0 : 1);
@@ -5276,8 +5276,8 @@ struct cmd_set_link_check {
static void
cmd_set_link_check_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_set_link_check *res = parsed_result;
no_link_check = (uint8_t)((strcmp(res->mode, "on") == 0) ? 0 : 1);
@@ -5318,8 +5318,8 @@ struct cmd_set_bypass_mode_result {
static void
cmd_set_bypass_mode_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_set_bypass_mode_result *res = parsed_result;
portid_t port_id = res->port_id;
@@ -5386,8 +5386,8 @@ struct cmd_set_bypass_event_result {
static void
cmd_set_bypass_event_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
int32_t rc = -EINVAL;
struct cmd_set_bypass_event_result *res = parsed_result;
@@ -5493,8 +5493,8 @@ struct cmd_set_bypass_timeout_result {
static void
cmd_set_bypass_timeout_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
__rte_unused struct cmd_set_bypass_timeout_result *res = parsed_result;
@@ -5555,8 +5555,8 @@ struct cmd_show_bypass_config_result {
static void
cmd_show_bypass_config_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_show_bypass_config_result *res = parsed_result;
portid_t port_id = res->port_id;
@@ -5655,8 +5655,8 @@ struct cmd_set_bonding_mode_result {
};
static void cmd_set_bonding_mode_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_set_bonding_mode_result *res = parsed_result;
portid_t port_id = res->port_id;
@@ -5708,8 +5708,8 @@ struct cmd_set_bonding_lacp_dedicated_queues_result {
};
static void cmd_set_bonding_lacp_dedicated_queues_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_set_bonding_lacp_dedicated_queues_result *res = parsed_result;
portid_t port_id = res->port_id;
@@ -5786,8 +5786,8 @@ struct cmd_set_bonding_balance_xmit_policy_result {
};
static void cmd_set_bonding_balance_xmit_policy_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_set_bonding_balance_xmit_policy_result *res = parsed_result;
portid_t port_id = res->port_id;
@@ -5852,8 +5852,8 @@ struct cmd_show_bonding_config_result {
};
static void cmd_show_bonding_config_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_show_bonding_config_result *res = parsed_result;
int bonding_mode, agg_mode;
@@ -5996,8 +5996,8 @@ struct cmd_set_bonding_primary_result {
};
static void cmd_set_bonding_primary_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_set_bonding_primary_result *res = parsed_result;
portid_t master_port_id = res->port_id;
@@ -6053,8 +6053,8 @@ struct cmd_add_bonding_slave_result {
};
static void cmd_add_bonding_slave_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_add_bonding_slave_result *res = parsed_result;
portid_t master_port_id = res->port_id;
@@ -6111,8 +6111,8 @@ struct cmd_remove_bonding_slave_result {
};
static void cmd_remove_bonding_slave_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_remove_bonding_slave_result *res = parsed_result;
portid_t master_port_id = res->port_id;
@@ -6171,8 +6171,8 @@ struct cmd_create_bonded_device_result {
static int bond_dev_num = 0;
static void cmd_create_bonded_device_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_create_bonded_device_result *res = parsed_result;
char ethdev_name[RTE_ETH_NAME_MAX_LEN];
@@ -6251,8 +6251,8 @@ struct cmd_set_bond_mac_addr_result {
};
static void cmd_set_bond_mac_addr_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_set_bond_mac_addr_result *res = parsed_result;
int ret;
@@ -6306,8 +6306,8 @@ struct cmd_set_bond_mon_period_result {
};
static void cmd_set_bond_mon_period_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_set_bond_mon_period_result *res = parsed_result;
int ret;
@@ -6362,8 +6362,8 @@ struct cmd_set_bonding_agg_mode_policy_result {
static void
cmd_set_bonding_agg_mode(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_set_bonding_agg_mode_policy_result *res = parsed_result;
uint8_t policy = AGG_BANDWIDTH;
@@ -6424,8 +6424,8 @@ struct cmd_set_fwd_mode_result {
};
static void cmd_set_fwd_mode_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_set_fwd_mode_result *res = parsed_result;
@@ -6484,8 +6484,8 @@ struct cmd_set_fwd_retry_mode_result {
};
static void cmd_set_fwd_retry_mode_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_set_fwd_retry_mode_result *res = parsed_result;
@@ -6555,8 +6555,8 @@ struct cmd_set_burst_tx_retry_result {
};
static void cmd_set_burst_tx_retry_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_set_burst_tx_retry_result *res = parsed_result;
@@ -6611,7 +6611,7 @@ struct cmd_set_promisc_mode_result {
};
static void cmd_set_promisc_mode_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
+ __rte_unused struct cmdline *cl,
void *allports)
{
struct cmd_set_promisc_mode_result *res = parsed_result;
@@ -6683,7 +6683,7 @@ struct cmd_set_allmulti_mode_result {
};
static void cmd_set_allmulti_mode_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
+ __rte_unused struct cmdline *cl,
void *allports)
{
struct cmd_set_allmulti_mode_result *res = parsed_result;
@@ -6982,7 +6982,7 @@ cmdline_parse_inst_t cmd_link_flow_control_set_autoneg = {
static void
cmd_link_flow_ctrl_set_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
+ __rte_unused struct cmdline *cl,
void *data)
{
struct cmd_link_flow_ctrl_set_result *res = parsed_result;
@@ -7071,8 +7071,8 @@ struct cmd_priority_flow_ctrl_set_result {
static void
cmd_priority_flow_ctrl_set_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_priority_flow_ctrl_set_result *res = parsed_result;
struct rte_eth_pfc_conf pfc_conf;
@@ -7165,9 +7165,9 @@ struct cmd_reset_result {
cmdline_fixed_string_t def;
};
-static void cmd_reset_parsed(__attribute__((unused)) void *parsed_result,
+static void cmd_reset_parsed(__rte_unused void *parsed_result,
struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
cmdline_printf(cl, "Reset to default forwarding configuration...\n");
set_def_fwd_config();
@@ -7198,9 +7198,9 @@ struct cmd_start_result {
cmdline_parse_token_string_t cmd_start_start =
TOKEN_STRING_INITIALIZER(struct cmd_start_result, start, "start");
-static void cmd_start_parsed(__attribute__((unused)) void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+static void cmd_start_parsed(__rte_unused void *parsed_result,
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
start_packet_forwarding(0);
}
@@ -7222,9 +7222,9 @@ struct cmd_start_tx_first_result {
};
static void
-cmd_start_tx_first_parsed(__attribute__((unused)) void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+cmd_start_tx_first_parsed(__rte_unused void *parsed_result,
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
start_packet_forwarding(1);
}
@@ -7257,8 +7257,8 @@ struct cmd_start_tx_first_n_result {
static void
cmd_start_tx_first_n_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_start_tx_first_n_result *res = parsed_result;
@@ -7306,9 +7306,9 @@ cmdline_parse_token_string_t cmd_set_link_up_port =
cmdline_parse_token_num_t cmd_set_link_up_port_id =
TOKEN_NUM_INITIALIZER(struct cmd_set_link_up_result, port_id, UINT16);
-static void cmd_set_link_up_parsed(__attribute__((unused)) void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+static void cmd_set_link_up_parsed(__rte_unused void *parsed_result,
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_set_link_up_result *res = parsed_result;
dev_set_link_up(res->port_id);
@@ -7346,9 +7346,9 @@ cmdline_parse_token_num_t cmd_set_link_down_port_id =
TOKEN_NUM_INITIALIZER(struct cmd_set_link_down_result, port_id, UINT16);
static void cmd_set_link_down_parsed(
- __attribute__((unused)) void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *parsed_result,
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_set_link_down_result *res = parsed_result;
dev_set_link_down(res->port_id);
@@ -7375,8 +7375,8 @@ struct cmd_showcfg_result {
};
static void cmd_showcfg_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_showcfg_result *res = parsed_result;
if (!strcmp(res->what, "rxtx"))
@@ -7418,8 +7418,8 @@ struct cmd_showportall_result {
};
static void cmd_showportall_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
portid_t i;
@@ -7492,8 +7492,8 @@ struct cmd_showport_result {
};
static void cmd_showport_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_showport_result *res = parsed_result;
if (!strcmp(res->show, "clear")) {
@@ -7556,8 +7556,8 @@ struct cmd_showdevice_result {
};
static void cmd_showdevice_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_showdevice_result *res = parsed_result;
if (!strcmp(res->what, "info")) {
@@ -7603,8 +7603,8 @@ struct cmd_showqueue_result {
static void
cmd_showqueue_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_showqueue_result *res = parsed_result;
@@ -7692,8 +7692,8 @@ struct cmd_read_reg_result {
static void
cmd_read_reg_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_read_reg_result *res = parsed_result;
port_reg_display(res->port_id, res->reg_off);
@@ -7733,8 +7733,8 @@ struct cmd_read_reg_bit_field_result {
static void
cmd_read_reg_bit_field_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_read_reg_bit_field_result *res = parsed_result;
port_reg_bit_field_display(res->port_id, res->reg_off,
@@ -7787,8 +7787,8 @@ struct cmd_read_reg_bit_result {
static void
cmd_read_reg_bit_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_read_reg_bit_result *res = parsed_result;
port_reg_bit_display(res->port_id, res->reg_off, res->bit_pos);
@@ -7831,8 +7831,8 @@ struct cmd_write_reg_result {
static void
cmd_write_reg_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_write_reg_result *res = parsed_result;
port_reg_set(res->port_id, res->reg_off, res->value);
@@ -7876,8 +7876,8 @@ struct cmd_write_reg_bit_field_result {
static void
cmd_write_reg_bit_field_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_write_reg_bit_field_result *res = parsed_result;
port_reg_bit_field_set(res->port_id, res->reg_off,
@@ -7936,8 +7936,8 @@ struct cmd_write_reg_bit_result {
static void
cmd_write_reg_bit_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_write_reg_bit_result *res = parsed_result;
port_reg_bit_set(res->port_id, res->reg_off, res->bit_pos, res->value);
@@ -7985,8 +7985,8 @@ struct cmd_read_rxd_txd_result {
static void
cmd_read_rxd_txd_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_read_rxd_txd_result *res = parsed_result;
@@ -8027,9 +8027,9 @@ struct cmd_quit_result {
cmdline_fixed_string_t quit;
};
-static void cmd_quit_parsed(__attribute__((unused)) void *parsed_result,
+static void cmd_quit_parsed(__rte_unused void *parsed_result,
struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
cmdline_quit(cl);
}
@@ -8056,8 +8056,8 @@ struct cmd_mac_addr_result {
};
static void cmd_mac_addr_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_mac_addr_result *res = parsed_result;
int ret;
@@ -8111,8 +8111,8 @@ struct cmd_eth_peer_result {
};
static void cmd_set_eth_peer_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_eth_peer_result *res = parsed_result;
@@ -8159,8 +8159,8 @@ struct cmd_set_qmap_result {
static void
cmd_set_qmap_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_set_qmap_result *res = parsed_result;
int is_rx = (strcmp(res->what, "tx") == 0) ? 0 : 1;
@@ -8212,8 +8212,8 @@ struct cmd_set_xstats_hide_zero_result {
static void
cmd_set_xstats_hide_zero_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_set_xstats_hide_zero_result *res;
uint16_t on_off = 0;
@@ -8257,8 +8257,8 @@ struct cmd_set_uc_hash_table {
static void
cmd_set_uc_hash_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
int ret=0;
struct cmd_set_uc_hash_table *res = parsed_result;
@@ -8318,8 +8318,8 @@ struct cmd_set_uc_all_hash_table {
static void
cmd_set_uc_all_hash_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
int ret=0;
struct cmd_set_uc_all_hash_table *res = parsed_result;
@@ -8382,8 +8382,8 @@ struct cmd_set_vf_macvlan_filter {
static void
cmd_set_vf_macvlan_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
int is_on, ret = 0;
struct cmd_set_vf_macvlan_filter *res = parsed_result;
@@ -8485,8 +8485,8 @@ struct cmd_set_vf_traffic {
static void
cmd_set_vf_traffic_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_set_vf_traffic *res = parsed_result;
int is_rx = (strcmp(res->what, "rx") == 0) ? 1 : 0;
@@ -8547,8 +8547,8 @@ struct cmd_set_vf_rxmode {
static void
cmd_set_vf_rxmode_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
int ret = -ENOTSUP;
uint16_t vf_rxmode = 0;
@@ -8638,8 +8638,8 @@ struct cmd_vf_mac_addr_result {
};
static void cmd_vf_mac_addr_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_vf_mac_addr_result *res = parsed_result;
int ret = -ENOTSUP;
@@ -8715,8 +8715,8 @@ struct cmd_vf_rx_vlan_filter {
static void
cmd_vf_rx_vlan_filter_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_vf_rx_vlan_filter *res = parsed_result;
int ret = -ENOTSUP;
@@ -8808,8 +8808,8 @@ struct cmd_queue_rate_limit_result {
};
static void cmd_queue_rate_limit_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_queue_rate_limit_result *res = parsed_result;
int ret = 0;
@@ -8877,8 +8877,8 @@ struct cmd_vf_rate_limit_result {
};
static void cmd_vf_rate_limit_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_vf_rate_limit_result *res = parsed_result;
int ret = 0;
@@ -8959,8 +8959,8 @@ struct cmd_tunnel_filter_result {
static void
cmd_tunnel_filter_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_tunnel_filter_result *res = parsed_result;
struct rte_eth_tunnel_filter_conf tunnel_filter_conf;
@@ -9103,8 +9103,8 @@ struct cmd_tunnel_udp_config {
static void
cmd_tunnel_udp_config_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_tunnel_udp_config *res = parsed_result;
struct rte_eth_udp_tunnel tunnel_udp;
@@ -9165,8 +9165,8 @@ struct cmd_config_tunnel_udp_port {
static void
cmd_cfg_tunnel_udp_port_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_config_tunnel_udp_port *res = parsed_result;
struct rte_eth_udp_tunnel tunnel_udp;
@@ -9248,8 +9248,8 @@ struct cmd_global_config_result {
static void
cmd_global_config_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_global_config_result *res = parsed_result;
struct rte_eth_global_cfg conf;
@@ -9338,8 +9338,8 @@ cmdline_parse_token_string_t cmd_mirror_mask_on =
static void
cmd_set_mirror_mask_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
int ret,nb_item,i;
struct cmd_set_mirror_mask_result *res = parsed_result;
@@ -9449,8 +9449,8 @@ cmdline_parse_token_string_t cmd_mirror_link_on =
static void
cmd_set_mirror_link_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
int ret;
struct cmd_set_mirror_link_result *res = parsed_result;
@@ -9523,8 +9523,8 @@ cmdline_parse_token_num_t cmd_rm_mirror_rule_ruleid =
static void
cmd_reset_mirror_rule_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
int ret;
struct cmd_set_mirror_link_result *res = parsed_result;
@@ -9565,8 +9565,8 @@ dump_struct_sizes(void)
}
static void cmd_dump_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_dump_result *res = parsed_result;
@@ -9614,7 +9614,7 @@ struct cmd_dump_one_result {
};
static void cmd_dump_one_parsed(void *parsed_result, struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
struct cmd_dump_one_result *res = parsed_result;
@@ -9668,8 +9668,8 @@ struct cmd_syn_filter_result {
static void
cmd_syn_filter_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_syn_filter_result *res = parsed_result;
struct rte_eth_syn_filter syn_filter;
@@ -9762,8 +9762,8 @@ struct cmd_queue_region_result {
static void
cmd_queue_region_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_queue_region_result *res = parsed_result;
int ret = -ENOTSUP;
@@ -9861,8 +9861,8 @@ struct cmd_region_flowtype_result {
static void
cmd_region_flowtype_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_region_flowtype_result *res = parsed_result;
int ret = -ENOTSUP;
@@ -9952,8 +9952,8 @@ struct cmd_user_priority_region_result {
static void
cmd_user_priority_region_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_user_priority_region_result *res = parsed_result;
int ret = -ENOTSUP;
@@ -10043,8 +10043,8 @@ struct cmd_flush_queue_region_result {
static void
cmd_flush_queue_region_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_flush_queue_region_result *res = parsed_result;
int ret = -ENOTSUP;
@@ -10125,8 +10125,8 @@ struct cmd_show_queue_region_info {
static void
cmd_show_queue_region_info_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_show_queue_region_info *res = parsed_result;
int ret = -ENOTSUP;
@@ -10209,8 +10209,8 @@ struct cmd_2tuple_filter_result {
static void
cmd_2tuple_filter_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct rte_eth_ntuple_filter filter;
struct cmd_2tuple_filter_result *res = parsed_result;
@@ -10364,8 +10364,8 @@ struct cmd_5tuple_filter_result {
static void
cmd_5tuple_filter_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct rte_eth_ntuple_filter filter;
struct cmd_5tuple_filter_result *res = parsed_result;
@@ -10572,8 +10572,8 @@ static int xdigit2val(unsigned char c)
static void
cmd_flex_filter_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
int ret = 0;
struct rte_eth_flex_filter filter;
@@ -10779,8 +10779,8 @@ cmdline_parse_token_num_t cmd_ethertype_filter_queue_id =
static void
cmd_ethertype_filter_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_ethertype_filter_result *res = parsed_result;
struct rte_eth_ethertype_filter filter;
@@ -11003,8 +11003,8 @@ do { \
static void
cmd_flow_director_filter_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_flow_director_result *res = parsed_result;
struct rte_eth_fdir_filter entry;
@@ -11623,8 +11623,8 @@ cmdline_parse_token_num_t cmd_flush_flow_director_port_id =
static void
cmd_flush_flow_director_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_flow_director_result *res = parsed_result;
int ret = 0;
@@ -11681,8 +11681,8 @@ struct cmd_flow_director_mask_result {
static void
cmd_flow_director_mask_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_flow_director_mask_result *res = parsed_result;
struct rte_eth_fdir_masks *mask;
@@ -11873,8 +11873,8 @@ struct cmd_flow_director_flex_mask_result {
static void
cmd_flow_director_flex_mask_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_flow_director_flex_mask_result *res = parsed_result;
struct rte_eth_fdir_info fdir_info;
@@ -12027,8 +12027,8 @@ parse_offsets(const char *q_arg, uint16_t *offsets, uint16_t max_num)
static void
cmd_flow_director_flxpld_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_flow_director_flexpayload_result *res = parsed_result;
struct rte_eth_flex_payload_cfg flex_cfg;
@@ -12631,8 +12631,8 @@ struct cmd_mcast_addr_result {
};
static void cmd_mcast_addr_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_mcast_addr_result *res = parsed_result;
@@ -12746,8 +12746,8 @@ str2fdir_l2_tunnel_type(char *string)
static void
cmd_config_l2_tunnel_eth_type_all_parsed
(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_config_l2_tunnel_eth_type_result *res = parsed_result;
struct rte_eth_l2_tunnel_conf entry;
@@ -12781,8 +12781,8 @@ cmdline_parse_inst_t cmd_config_l2_tunnel_eth_type_all = {
static void
cmd_config_l2_tunnel_eth_type_specific_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_config_l2_tunnel_eth_type_result *res =
parsed_result;
@@ -12857,8 +12857,8 @@ cmdline_parse_token_string_t cmd_config_l2_tunnel_en_dis_en_dis =
static void
cmd_config_l2_tunnel_en_dis_all_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_config_l2_tunnel_en_dis_result *res = parsed_result;
struct rte_eth_l2_tunnel_conf entry;
@@ -12899,8 +12899,8 @@ cmdline_parse_inst_t cmd_config_l2_tunnel_en_dis_all = {
static void
cmd_config_l2_tunnel_en_dis_specific_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_config_l2_tunnel_en_dis_result *res =
parsed_result;
@@ -13055,8 +13055,8 @@ cmdline_parse_token_num_t cmd_config_e_tag_vf_id =
static void
cmd_config_e_tag_insertion_en_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_config_e_tag_result *res =
parsed_result;
@@ -13077,8 +13077,8 @@ cmd_config_e_tag_insertion_en_parsed(
static void
cmd_config_e_tag_insertion_dis_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_config_e_tag_result *res =
parsed_result;
@@ -13136,8 +13136,8 @@ cmdline_parse_inst_t cmd_config_e_tag_insertion_dis = {
static void
cmd_config_e_tag_stripping_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_config_e_tag_result *res =
parsed_result;
@@ -13181,8 +13181,8 @@ cmdline_parse_inst_t cmd_config_e_tag_stripping_en_dis = {
static void
cmd_config_e_tag_forwarding_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_config_e_tag_result *res = parsed_result;
struct rte_eth_l2_tunnel_conf entry;
@@ -13225,8 +13225,8 @@ cmdline_parse_inst_t cmd_config_e_tag_forwarding_en_dis = {
static void
cmd_config_e_tag_filter_add_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_config_e_tag_result *res = parsed_result;
struct rte_eth_l2_tunnel_conf entry;
@@ -13283,8 +13283,8 @@ cmdline_parse_inst_t cmd_config_e_tag_filter_add = {
static void
cmd_config_e_tag_filter_del_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_config_e_tag_result *res = parsed_result;
struct rte_eth_l2_tunnel_conf entry;
@@ -13381,8 +13381,8 @@ cmdline_parse_token_string_t cmd_vf_vlan_anti_spoof_on_off =
static void
cmd_set_vf_vlan_anti_spoof_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_vf_vlan_anti_spoof_result *res = parsed_result;
int ret = -ENOTSUP;
@@ -13487,8 +13487,8 @@ cmdline_parse_token_string_t cmd_vf_mac_anti_spoof_on_off =
static void
cmd_set_vf_mac_anti_spoof_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_vf_mac_anti_spoof_result *res = parsed_result;
int ret = -ENOTSUP;
@@ -13593,8 +13593,8 @@ cmdline_parse_token_string_t cmd_vf_vlan_stripq_on_off =
static void
cmd_set_vf_vlan_stripq_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_vf_vlan_stripq_result *res = parsed_result;
int ret = -ENOTSUP;
@@ -13699,8 +13699,8 @@ cmdline_parse_token_num_t cmd_vf_vlan_insert_vlan_id =
static void
cmd_set_vf_vlan_insert_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_vf_vlan_insert_result *res = parsed_result;
int ret = -ENOTSUP;
@@ -13793,8 +13793,8 @@ cmdline_parse_token_string_t cmd_tx_loopback_on_off =
static void
cmd_set_tx_loopback_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_tx_loopback_result *res = parsed_result;
int ret = -ENOTSUP;
@@ -13893,8 +13893,8 @@ cmdline_parse_token_string_t cmd_all_queues_drop_en_on_off =
static void
cmd_set_all_queues_drop_en_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_all_queues_drop_en_result *res = parsed_result;
int ret = -ENOTSUP;
@@ -13989,8 +13989,8 @@ cmdline_parse_token_string_t cmd_vf_split_drop_en_on_off =
static void
cmd_set_vf_split_drop_en_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_vf_split_drop_en_result *res = parsed_result;
int ret = -ENOTSUP;
@@ -14082,8 +14082,8 @@ cmdline_parse_token_etheraddr_t cmd_set_vf_mac_addr_mac_addr =
static void
cmd_set_vf_mac_addr_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_set_vf_mac_addr_result *res = parsed_result;
int ret = -ENOTSUP;
@@ -14196,8 +14196,8 @@ cmdline_parse_token_string_t cmd_macsec_offload_on_rp_on_off =
static void
cmd_set_macsec_offload_on_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_macsec_offload_on_result *res = parsed_result;
int ret = -ENOTSUP;
@@ -14295,8 +14295,8 @@ cmdline_parse_token_string_t cmd_macsec_offload_off_off =
static void
cmd_set_macsec_offload_off_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_macsec_offload_off_result *res = parsed_result;
int ret = -ENOTSUP;
@@ -14394,8 +14394,8 @@ cmdline_parse_token_num_t cmd_macsec_sc_pi =
static void
cmd_set_macsec_sc_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_macsec_sc_result *res = parsed_result;
int ret = -ENOTSUP;
@@ -14494,8 +14494,8 @@ cmdline_parse_token_string_t cmd_macsec_sa_key =
static void
cmd_set_macsec_sa_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_macsec_sa_result *res = parsed_result;
int ret = -ENOTSUP;
@@ -14606,8 +14606,8 @@ cmdline_parse_token_string_t cmd_vf_promisc_on_off =
static void
cmd_set_vf_promisc_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_vf_promisc_result *res = parsed_result;
int ret = -ENOTSUP;
@@ -14696,8 +14696,8 @@ cmdline_parse_token_string_t cmd_vf_allmulti_on_off =
static void
cmd_set_vf_allmulti_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_vf_allmulti_result *res = parsed_result;
int ret = -ENOTSUP;
@@ -14786,8 +14786,8 @@ cmdline_parse_token_string_t cmd_set_vf_broadcast_on_off =
static void
cmd_set_vf_broadcast_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_set_vf_broadcast_result *res = parsed_result;
int ret = -ENOTSUP;
@@ -14880,8 +14880,8 @@ cmdline_parse_token_string_t cmd_set_vf_vlan_tag_on_off =
static void
cmd_set_vf_vlan_tag_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_set_vf_vlan_tag_result *res = parsed_result;
int ret = -ENOTSUP;
@@ -15003,8 +15003,8 @@ cmdline_parse_token_num_t cmd_vf_tc_bw_tc_map =
static void
cmd_vf_max_bw_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_vf_tc_bw_result *res = parsed_result;
int ret = -ENOTSUP;
@@ -15097,8 +15097,8 @@ vf_tc_min_bw_parse_bw_list(uint8_t *bw_list,
static void
cmd_vf_tc_min_bw_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_vf_tc_bw_result *res = parsed_result;
uint8_t tc_num;
@@ -15155,8 +15155,8 @@ cmdline_parse_inst_t cmd_vf_tc_min_bw = {
static void
cmd_tc_min_bw_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_vf_tc_bw_result *res = parsed_result;
struct rte_port *port;
@@ -15218,8 +15218,8 @@ cmdline_parse_inst_t cmd_tc_min_bw = {
static void
cmd_vf_tc_max_bw_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_vf_tc_bw_result *res = parsed_result;
int ret = -ENOTSUP;
@@ -15305,8 +15305,8 @@ cmdline_parse_token_num_t cmd_set_port_tm_hierarchy_default_port_id =
port_id, UINT16);
static void cmd_set_port_tm_hierarchy_default_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_set_port_tm_hierarchy_default_result *res = parsed_result;
struct rte_port *p;
@@ -15430,8 +15430,8 @@ cmdline_parse_token_etheraddr_t cmd_set_vxlan_eth_dst_value =
TOKEN_ETHERADDR_INITIALIZER(struct cmd_set_vxlan_result, eth_dst);
static void cmd_set_vxlan_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_set_vxlan_result *res = parsed_result;
union {
@@ -15630,8 +15630,8 @@ cmdline_parse_token_etheraddr_t cmd_set_nvgre_eth_dst_value =
TOKEN_ETHERADDR_INITIALIZER(struct cmd_set_nvgre_result, eth_dst);
static void cmd_set_nvgre_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_set_nvgre_result *res = parsed_result;
union {
@@ -15761,8 +15761,8 @@ cmdline_parse_token_etheraddr_t cmd_set_l2_encap_eth_dst_value =
TOKEN_ETHERADDR_INITIALIZER(struct cmd_set_l2_encap_result, eth_dst);
static void cmd_set_l2_encap_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_set_l2_encap_result *res = parsed_result;
@@ -15840,8 +15840,8 @@ cmdline_parse_token_string_t cmd_set_l2_decap_l2_decap_with_vlan =
"l2_decap-with-vlan");
static void cmd_set_l2_decap_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_set_l2_decap_result *res = parsed_result;
@@ -15939,8 +15939,8 @@ cmdline_parse_token_etheraddr_t cmd_set_mplsogre_encap_eth_dst_value =
eth_dst);
static void cmd_set_mplsogre_encap_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_set_mplsogre_encap_result *res = parsed_result;
union {
@@ -16054,8 +16054,8 @@ cmdline_parse_token_string_t cmd_set_mplsogre_decap_ip_version_value =
ip_version, "ipv4#ipv6");
static void cmd_set_mplsogre_decap_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_set_mplsogre_decap_result *res = parsed_result;
@@ -16175,8 +16175,8 @@ cmdline_parse_token_etheraddr_t cmd_set_mplsoudp_encap_eth_dst_value =
eth_dst);
static void cmd_set_mplsoudp_encap_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_set_mplsoudp_encap_result *res = parsed_result;
union {
@@ -16301,8 +16301,8 @@ cmdline_parse_token_string_t cmd_set_mplsoudp_decap_ip_version_value =
ip_version, "ipv4#ipv6");
static void cmd_set_mplsoudp_decap_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_set_mplsoudp_decap_result *res = parsed_result;
@@ -16346,8 +16346,8 @@ cmdline_parse_inst_t cmd_set_mplsoudp_decap_with_vlan = {
static void
cmd_strict_link_prio_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_vf_tc_bw_result *res = parsed_result;
int ret = -ENOTSUP;
@@ -16410,8 +16410,8 @@ cmdline_parse_token_string_t cmd_ddp_add_filepath =
static void
cmd_ddp_add_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_ddp_add_result *res = parsed_result;
uint8_t *buff;
@@ -16490,8 +16490,8 @@ cmdline_parse_token_string_t cmd_ddp_del_filepath =
static void
cmd_ddp_del_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_ddp_del_result *res = parsed_result;
uint8_t *buff;
@@ -16555,8 +16555,8 @@ cmdline_parse_token_string_t cmd_ddp_info_filepath =
static void
cmd_ddp_info_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_ddp_info_result *res = parsed_result;
uint8_t *pkg;
@@ -16794,9 +16794,9 @@ cmdline_parse_token_num_t cmd_ddp_get_list_port_id =
static void
cmd_ddp_get_list_parsed(
- __attribute__((unused)) void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *parsed_result,
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
#ifdef RTE_LIBRTE_I40E_PMD
struct cmd_ddp_get_list_result *res = parsed_result;
@@ -16870,9 +16870,9 @@ struct cmd_cfg_input_set_result {
static void
cmd_cfg_input_set_parsed(
- __attribute__((unused)) void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *parsed_result,
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
#ifdef RTE_LIBRTE_I40E_PMD
struct cmd_cfg_input_set_result *res = parsed_result;
@@ -16993,9 +16993,9 @@ struct cmd_clear_input_set_result {
static void
cmd_clear_input_set_parsed(
- __attribute__((unused)) void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *parsed_result,
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
#ifdef RTE_LIBRTE_I40E_PMD
struct cmd_clear_input_set_result *res = parsed_result;
@@ -17112,8 +17112,8 @@ cmdline_parse_token_num_t cmd_show_vf_stats_vf_id =
static void
cmd_show_vf_stats_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_show_vf_stats_result *res = parsed_result;
struct rte_eth_stats stats;
@@ -17221,8 +17221,8 @@ cmdline_parse_token_num_t cmd_clear_vf_stats_vf_id =
static void
cmd_clear_vf_stats_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_clear_vf_stats_result *res = parsed_result;
int ret = -ENOTSUP;
@@ -17313,8 +17313,8 @@ cmdline_parse_token_string_t cmd_pctype_mapping_reset_reset =
static void
cmd_pctype_mapping_reset_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_pctype_mapping_reset_result *res = parsed_result;
int ret = -ENOTSUP;
@@ -17391,8 +17391,8 @@ cmdline_parse_token_string_t cmd_pctype_mapping_get_mapping =
static void
cmd_pctype_mapping_get_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_pctype_mapping_get_result *res = parsed_result;
int ret = -ENOTSUP;
@@ -17507,8 +17507,8 @@ cmdline_parse_token_num_t cmd_pctype_mapping_update_flow_type =
static void
cmd_pctype_mapping_update_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_pctype_mapping_update_result *res = parsed_result;
int ret = -ENOTSUP;
@@ -17605,8 +17605,8 @@ cmdline_parse_token_num_t cmd_ptype_mapping_get_valid_only =
static void
cmd_ptype_mapping_get_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_ptype_mapping_get_result *res = parsed_result;
int ret = -ENOTSUP;
@@ -17710,8 +17710,8 @@ cmdline_parse_token_num_t cmd_ptype_mapping_replace_pkt_type =
static void
cmd_ptype_mapping_replace_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_ptype_mapping_replace_result *res = parsed_result;
int ret = -ENOTSUP;
@@ -17792,8 +17792,8 @@ cmdline_parse_token_num_t cmd_ptype_mapping_reset_port_id =
static void
cmd_ptype_mapping_reset_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_ptype_mapping_reset_result *res = parsed_result;
int ret = -ENOTSUP;
@@ -17873,8 +17873,8 @@ cmdline_parse_token_num_t cmd_ptype_mapping_update_sw_ptype =
static void
cmd_ptype_mapping_update_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_ptype_mapping_update_result *res = parsed_result;
int ret = -ENOTSUP;
@@ -17940,8 +17940,8 @@ cmdline_parse_token_string_t cmd_load_cmdfile_filename =
static void
cmd_load_from_file_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_cmdfile_result *res = parsed_result;
@@ -18015,8 +18015,8 @@ print_rx_offloads(uint64_t offloads)
static void
cmd_rx_offload_get_capa_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_rx_offload_get_capa_result *res = parsed_result;
struct rte_eth_dev_info dev_info;
@@ -18089,8 +18089,8 @@ cmdline_parse_token_string_t cmd_rx_offload_get_configuration_configuration =
static void
cmd_rx_offload_get_configuration_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_rx_offload_get_configuration_result *res = parsed_result;
struct rte_eth_dev_info dev_info;
@@ -18201,8 +18201,8 @@ search_rx_offload(const char *name)
static void
cmd_config_per_port_rx_offload_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_config_per_port_rx_offload_result *res = parsed_result;
portid_t port_id = res->port_id;
@@ -18307,8 +18307,8 @@ cmdline_parse_token_string_t cmd_config_per_queue_rx_offload_result_on_off =
static void
cmd_config_per_queue_rx_offload_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_config_per_queue_rx_offload_result *res = parsed_result;
struct rte_eth_dev_info dev_info;
@@ -18425,8 +18425,8 @@ print_tx_offloads(uint64_t offloads)
static void
cmd_tx_offload_get_capa_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_tx_offload_get_capa_result *res = parsed_result;
struct rte_eth_dev_info dev_info;
@@ -18499,8 +18499,8 @@ cmdline_parse_token_string_t cmd_tx_offload_get_configuration_configuration =
static void
cmd_tx_offload_get_configuration_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_tx_offload_get_configuration_result *res = parsed_result;
struct rte_eth_dev_info dev_info;
@@ -18615,8 +18615,8 @@ search_tx_offload(const char *name)
static void
cmd_config_per_port_tx_offload_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_config_per_port_tx_offload_result *res = parsed_result;
portid_t port_id = res->port_id;
@@ -18723,8 +18723,8 @@ cmdline_parse_token_string_t cmd_config_per_queue_tx_offload_result_on_off =
static void
cmd_config_per_queue_tx_offload_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_config_per_queue_tx_offload_result *res = parsed_result;
struct rte_eth_dev_info dev_info;
@@ -18797,8 +18797,8 @@ struct cmd_config_tx_metadata_specific_result {
static void
cmd_config_tx_metadata_specific_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_config_tx_metadata_specific_result *res = parsed_result;
@@ -18855,8 +18855,8 @@ struct cmd_config_tx_dynf_specific_result {
static void
cmd_config_dynf_specific_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_config_tx_dynf_specific_result *res = parsed_result;
struct rte_mbuf_dynflag desc_flag;
@@ -18936,8 +18936,8 @@ struct cmd_show_tx_metadata_result {
static void
cmd_show_tx_metadata_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_show_tx_metadata_result *res = parsed_result;
@@ -19008,8 +19008,8 @@ cmdline_parse_token_string_t cmd_show_port_supported_ptypes_ptypes =
static void
cmd_show_port_supported_ptypes_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
#define RSVD_PTYPE_MASK 0xf0000000
#define MAX_PTYPES_PER_LAYER 16
@@ -19099,8 +19099,8 @@ struct cmd_show_rx_tx_desc_status_result {
static void
cmd_show_rx_tx_desc_status_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_show_rx_tx_desc_status_result *res = parsed_result;
int rc;
@@ -19215,8 +19215,8 @@ cmdline_parse_token_num_t cmd_set_port_ptypes_mask_u32 =
static void
cmd_set_port_ptypes_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_set_port_ptypes_result *res = parsed_result;
#define PTYPE_NAMESIZE 256
@@ -19273,8 +19273,8 @@ struct cmd_showport_macs_result {
static void
cmd_showport_macs_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_showport_macs_result *res = parsed_result;
diff --git a/app/test-pmd/cmdline_mtr.c b/app/test-pmd/cmdline_mtr.c
index ab5c8642db..caa7e98644 100644
--- a/app/test-pmd/cmdline_mtr.c
+++ b/app/test-pmd/cmdline_mtr.c
@@ -256,8 +256,8 @@ cmdline_parse_token_num_t cmd_show_port_meter_cap_port_id =
struct cmd_show_port_meter_cap_result, port_id, UINT16);
static void cmd_show_port_meter_cap_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_show_port_meter_cap_result *res = parsed_result;
struct rte_mtr_capabilities cap;
@@ -378,8 +378,8 @@ cmdline_parse_token_num_t cmd_add_port_meter_profile_srtcm_ebs =
ebs, UINT64);
static void cmd_add_port_meter_profile_srtcm_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_add_port_meter_profile_srtcm_result *res = parsed_result;
struct rte_mtr_meter_profile mp;
@@ -484,8 +484,8 @@ cmdline_parse_token_num_t cmd_add_port_meter_profile_trtcm_pbs =
pbs, UINT64);
static void cmd_add_port_meter_profile_trtcm_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_add_port_meter_profile_trtcm_result *res = parsed_result;
struct rte_mtr_meter_profile mp;
@@ -595,8 +595,8 @@ cmdline_parse_token_num_t cmd_add_port_meter_profile_trtcm_rfc4115_ebs =
static void cmd_add_port_meter_profile_trtcm_rfc4115_parsed(
void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_add_port_meter_profile_trtcm_rfc4115_result *res =
parsed_result;
@@ -679,8 +679,8 @@ cmdline_parse_token_num_t cmd_del_port_meter_profile_profile_id =
profile_id, UINT32);
static void cmd_del_port_meter_profile_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_del_port_meter_profile_result *res = parsed_result;
struct rte_mtr_error error;
@@ -772,8 +772,8 @@ cmdline_parse_token_string_t cmd_create_port_meter_input_color =
meter_input_color, TOKEN_STRING_MULTI);
static void cmd_create_port_meter_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_create_port_meter_result *res = parsed_result;
struct rte_mtr_error error;
@@ -872,8 +872,8 @@ cmdline_parse_token_num_t cmd_enable_port_meter_mtr_id =
struct cmd_enable_port_meter_result, mtr_id, UINT32);
static void cmd_enable_port_meter_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_enable_port_meter_result *res = parsed_result;
struct rte_mtr_error error;
@@ -933,8 +933,8 @@ cmdline_parse_token_num_t cmd_disable_port_meter_mtr_id =
struct cmd_disable_port_meter_result, mtr_id, UINT32);
static void cmd_disable_port_meter_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_disable_port_meter_result *res = parsed_result;
struct rte_mtr_error error;
@@ -994,8 +994,8 @@ cmdline_parse_token_num_t cmd_del_port_meter_mtr_id =
struct cmd_del_port_meter_result, mtr_id, UINT32);
static void cmd_del_port_meter_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_del_port_meter_result *res = parsed_result;
struct rte_mtr_error error;
@@ -1063,8 +1063,8 @@ cmdline_parse_token_num_t cmd_set_port_meter_profile_profile_id =
struct cmd_set_port_meter_profile_result, profile_id, UINT32);
static void cmd_set_port_meter_profile_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_set_port_meter_profile_result *res = parsed_result;
struct rte_mtr_error error;
@@ -1129,8 +1129,8 @@ cmdline_parse_token_string_t cmd_set_port_meter_dscp_table_token_string =
token_string, TOKEN_STRING_MULTI);
static void cmd_set_port_meter_dscp_table_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_set_port_meter_dscp_table_result *res = parsed_result;
struct rte_mtr_error error;
@@ -1223,8 +1223,8 @@ cmdline_parse_token_string_t cmd_set_port_meter_policer_action_policer_action =
policer_action, TOKEN_STRING_MULTI);
static void cmd_set_port_meter_policer_action_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_set_port_meter_policer_action_result *res = parsed_result;
enum rte_mtr_policer_action *actions;
@@ -1326,8 +1326,8 @@ cmdline_parse_token_num_t cmd_set_port_meter_stats_mask_stats_mask =
UINT64);
static void cmd_set_port_meter_stats_mask_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_set_port_meter_stats_mask_result *res = parsed_result;
struct rte_mtr_error error;
@@ -1397,8 +1397,8 @@ cmdline_parse_token_string_t cmd_show_port_meter_stats_clear =
struct cmd_show_port_meter_stats_result, clear, "yes#no");
static void cmd_show_port_meter_stats_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_show_port_meter_stats_result *res = parsed_result;
struct rte_mtr_stats stats;
diff --git a/app/test-pmd/cmdline_tm.c b/app/test-pmd/cmdline_tm.c
index d62a4f5443..6951beb58d 100644
--- a/app/test-pmd/cmdline_tm.c
+++ b/app/test-pmd/cmdline_tm.c
@@ -220,8 +220,8 @@ cmdline_parse_token_num_t cmd_show_port_tm_cap_port_id =
port_id, UINT16);
static void cmd_show_port_tm_cap_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_show_port_tm_cap_result *res = parsed_result;
struct rte_tm_capabilities cap;
@@ -361,8 +361,8 @@ cmdline_parse_token_num_t cmd_show_port_tm_level_cap_level_id =
static void cmd_show_port_tm_level_cap_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_show_port_tm_level_cap_result *res = parsed_result;
struct rte_tm_level_capabilities lcap;
@@ -487,8 +487,8 @@ cmdline_parse_token_num_t cmd_show_port_tm_node_cap_node_id =
node_id, UINT32);
static void cmd_show_port_tm_node_cap_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_show_port_tm_node_cap_result *res = parsed_result;
struct rte_tm_node_capabilities ncap;
@@ -603,8 +603,8 @@ cmdline_parse_token_num_t cmd_show_port_tm_node_stats_clear =
struct cmd_show_port_tm_node_stats_result, clear, UINT32);
static void cmd_show_port_tm_node_stats_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_show_port_tm_node_stats_result *res = parsed_result;
struct rte_tm_node_stats stats;
@@ -719,8 +719,8 @@ cmdline_parse_token_num_t cmd_show_port_tm_node_type_node_id =
node_id, UINT32);
static void cmd_show_port_tm_node_type_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_show_port_tm_node_type_result *res = parsed_result;
struct rte_tm_error error;
@@ -831,8 +831,8 @@ cmdline_parse_token_num_t cmd_add_port_tm_node_shaper_profile_pktlen_adjust =
pktlen_adjust, UINT32);
static void cmd_add_port_tm_node_shaper_profile_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_add_port_tm_node_shaper_profile_result *res = parsed_result;
struct rte_tm_shaper_params sp;
@@ -927,8 +927,8 @@ cmdline_parse_token_num_t cmd_del_port_tm_node_shaper_profile_shaper_id =
shaper_id, UINT32);
static void cmd_del_port_tm_node_shaper_profile_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_del_port_tm_node_shaper_profile_result *res = parsed_result;
struct rte_tm_error error;
@@ -1012,8 +1012,8 @@ cmdline_parse_token_num_t cmd_add_port_tm_node_shared_shaper_shaper_profile_id =
shaper_profile_id, UINT32);
static void cmd_add_port_tm_node_shared_shaper_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_add_port_tm_node_shared_shaper_result *res = parsed_result;
struct rte_tm_error error;
@@ -1108,8 +1108,8 @@ cmdline_parse_token_num_t cmd_del_port_tm_node_shared_shaper_shared_shaper_id =
shared_shaper_id, UINT32);
static void cmd_del_port_tm_node_shared_shaper_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_del_port_tm_node_shared_shaper_result *res = parsed_result;
struct rte_tm_error error;
@@ -1262,8 +1262,8 @@ cmdline_parse_token_num_t cmd_add_port_tm_node_wred_profile_wq_log2_r =
static void cmd_add_port_tm_node_wred_profile_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_add_port_tm_node_wred_profile_result *res = parsed_result;
struct rte_tm_wred_params wp;
@@ -1381,8 +1381,8 @@ cmdline_parse_token_num_t cmd_del_port_tm_node_wred_profile_wred_profile_id =
wred_profile_id, UINT32);
static void cmd_del_port_tm_node_wred_profile_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_del_port_tm_node_wred_profile_result *res = parsed_result;
struct rte_tm_error error;
@@ -1467,8 +1467,8 @@ cmdline_parse_token_num_t
shaper_profile_id, UINT32);
static void cmd_set_port_tm_node_shaper_profile_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_set_port_tm_node_shaper_profile_result *res = parsed_result;
struct rte_tm_error error;
@@ -1581,8 +1581,8 @@ cmdline_parse_token_string_t
multi_shared_shaper_id, TOKEN_STRING_MULTI);
static void cmd_add_port_tm_nonleaf_node_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_add_port_tm_nonleaf_node_result *res = parsed_result;
struct rte_tm_error error;
@@ -1742,8 +1742,8 @@ cmdline_parse_token_string_t
multi_shared_shaper_id, TOKEN_STRING_MULTI);
static void cmd_add_port_tm_leaf_node_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_add_port_tm_leaf_node_result *res = parsed_result;
struct rte_tm_error error;
@@ -1864,8 +1864,8 @@ cmdline_parse_token_num_t cmd_del_port_tm_node_node_id =
node_id, UINT32);
static void cmd_del_port_tm_node_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_del_port_tm_node_result *res = parsed_result;
struct rte_tm_error error;
@@ -1951,8 +1951,8 @@ cmdline_parse_token_num_t cmd_set_port_tm_node_parent_weight =
weight, UINT32);
static void cmd_set_port_tm_node_parent_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_set_port_tm_node_parent_result *res = parsed_result;
struct rte_tm_error error;
@@ -2030,8 +2030,8 @@ cmdline_parse_token_num_t cmd_suspend_port_tm_node_node_id =
struct cmd_suspend_port_tm_node_result, node_id, UINT32);
static void cmd_suspend_port_tm_node_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_suspend_port_tm_node_result *res = parsed_result;
struct rte_tm_error error;
@@ -2095,8 +2095,8 @@ cmdline_parse_token_num_t cmd_resume_port_tm_node_node_id =
struct cmd_resume_port_tm_node_result, node_id, UINT32);
static void cmd_resume_port_tm_node_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_resume_port_tm_node_result *res = parsed_result;
struct rte_tm_error error;
@@ -2162,8 +2162,8 @@ cmdline_parse_token_string_t cmd_port_tm_hierarchy_commit_clean_on_fail =
clean_on_fail, "yes#no");
static void cmd_port_tm_hierarchy_commit_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_port_tm_hierarchy_commit_result *res = parsed_result;
struct rte_tm_error error;
@@ -2249,8 +2249,8 @@ cmdline_parse_token_num_t cmd_port_tm_mark_ip_ecn_red =
red, UINT16);
static void cmd_port_tm_mark_ip_ecn_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_port_tm_mark_ip_ecn_result *res = parsed_result;
struct rte_tm_error error;
@@ -2336,8 +2336,8 @@ cmdline_parse_token_num_t cmd_port_tm_mark_ip_dscp_red =
red, UINT16);
static void cmd_port_tm_mark_ip_dscp_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_port_tm_mark_ip_dscp_result *res = parsed_result;
struct rte_tm_error error;
@@ -2423,8 +2423,8 @@ cmdline_parse_token_num_t cmd_port_tm_mark_vlan_dei_red =
red, UINT16);
static void cmd_port_tm_mark_vlan_dei_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_port_tm_mark_vlan_dei_result *res = parsed_result;
struct rte_tm_error error;
diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c
index 4b5bec443b..33db9ab521 100644
--- a/app/test-pmd/txonly.c
+++ b/app/test-pmd/txonly.c
@@ -341,7 +341,7 @@ pkt_burst_transmit(struct fwd_stream *fs)
}
static void
-tx_only_begin(__attribute__((unused)) portid_t pi)
+tx_only_begin(__rte_unused portid_t pi)
{
uint16_t pkt_data_len;
diff --git a/app/test/commands.c b/app/test/commands.c
index 3bf767bf7f..d48dd513d7 100644
--- a/app/test/commands.c
+++ b/app/test/commands.c
@@ -59,8 +59,8 @@ struct cmd_autotest_result {
};
static void cmd_autotest_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct test_command *t;
struct cmd_autotest_result *res = parsed_result;
@@ -112,8 +112,8 @@ dump_struct_sizes(void)
}
static void cmd_dump_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_dump_result *res = parsed_result;
@@ -167,7 +167,7 @@ struct cmd_dump_one_result {
};
static void cmd_dump_one_parsed(void *parsed_result, struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
struct cmd_dump_one_result *res = parsed_result;
@@ -216,9 +216,9 @@ struct cmd_quit_result {
};
static void
-cmd_quit_parsed(__attribute__((unused)) void *parsed_result,
+cmd_quit_parsed(__rte_unused void *parsed_result,
struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
cmdline_quit(cl);
}
@@ -245,7 +245,7 @@ struct cmd_set_rxtx_result {
};
static void cmd_set_rxtx_parsed(void *parsed_result, struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
struct cmd_set_rxtx_result *res = parsed_result;
if (test_set_rxtx_conf(res->mode) < 0)
@@ -281,7 +281,7 @@ struct cmd_set_rxtx_anchor {
static void
cmd_set_rxtx_anchor_parsed(void *parsed_result,
struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
struct cmd_set_rxtx_anchor *res = parsed_result;
if (test_set_rxtx_anchor(res->type) < 0)
@@ -318,7 +318,7 @@ struct cmd_set_rxtx_sc {
static void
cmd_set_rxtx_sc_parsed(void *parsed_result,
struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
struct cmd_set_rxtx_sc *res = parsed_result;
if (test_set_rxtx_sc(res->type) < 0)
diff --git a/app/test/test_atomic.c b/app/test/test_atomic.c
index de3030d221..214452e543 100644
--- a/app/test/test_atomic.c
+++ b/app/test/test_atomic.c
@@ -108,7 +108,7 @@ static rte_atomic64_t count;
static rte_atomic32_t synchro;
static int
-test_atomic_usual(__attribute__((unused)) void *arg)
+test_atomic_usual(__rte_unused void *arg)
{
unsigned i;
@@ -146,7 +146,7 @@ test_atomic_usual(__attribute__((unused)) void *arg)
}
static int
-test_atomic_tas(__attribute__((unused)) void *arg)
+test_atomic_tas(__rte_unused void *arg)
{
while (rte_atomic32_read(&synchro) == 0)
;
@@ -162,7 +162,7 @@ test_atomic_tas(__attribute__((unused)) void *arg)
}
static int
-test_atomic_addsub_and_return(__attribute__((unused)) void *arg)
+test_atomic_addsub_and_return(__rte_unused void *arg)
{
uint32_t tmp16;
uint32_t tmp32;
@@ -206,7 +206,7 @@ test_atomic_addsub_and_return(__attribute__((unused)) void *arg)
*
*/
static int
-test_atomic_inc_and_test(__attribute__((unused)) void *arg)
+test_atomic_inc_and_test(__rte_unused void *arg)
{
while (rte_atomic32_read(&synchro) == 0)
;
@@ -233,7 +233,7 @@ test_atomic_inc_and_test(__attribute__((unused)) void *arg)
* be checked as the result later.
*/
static int
-test_atomic_dec_and_test(__attribute__((unused)) void *arg)
+test_atomic_dec_and_test(__rte_unused void *arg)
{
while (rte_atomic32_read(&synchro) == 0)
;
@@ -261,7 +261,7 @@ static rte_int128_t count128;
* iteration it runs compare and swap operation with different memory models.
*/
static int
-test_atomic128_cmp_exchange(__attribute__((unused)) void *arg)
+test_atomic128_cmp_exchange(__rte_unused void *arg)
{
rte_int128_t expected;
int success;
@@ -397,7 +397,7 @@ get_crc8(uint8_t *message, int length)
* +------------+------------+
*/
static int
-test_atomic_exchange(__attribute__((unused)) void *arg)
+test_atomic_exchange(__rte_unused void *arg)
{
int i;
test16_t nt16, ot16; /* new token, old token */
diff --git a/app/test/test_cmdline_lib.c b/app/test/test_cmdline_lib.c
index a856a97132..dec465da5f 100644
--- a/app/test/test_cmdline_lib.c
+++ b/app/test/test_cmdline_lib.c
@@ -12,6 +12,8 @@
#include <ctype.h>
#include <sys/queue.h>
+#include <rte_common.h>
+
#include <cmdline_vt100.h>
#include <cmdline_rdline.h>
#include <cmdline_parse.h>
@@ -23,18 +25,18 @@
/****************************************************************/
/* static functions required for some tests */
static void
-valid_buffer(__attribute__((unused))struct rdline *rdl,
- __attribute__((unused))const char *buf,
- __attribute__((unused)) unsigned int size)
+valid_buffer(__rte_unused struct rdline *rdl,
+ __rte_unused const char *buf,
+ __rte_unused unsigned int size)
{
}
static int
-complete_buffer(__attribute__((unused)) struct rdline *rdl,
- __attribute__((unused)) const char *buf,
- __attribute__((unused)) char *dstbuf,
- __attribute__((unused)) unsigned int dstsize,
- __attribute__((unused)) int *state)
+complete_buffer(__rte_unused struct rdline *rdl,
+ __rte_unused const char *buf,
+ __rte_unused char *dstbuf,
+ __rte_unused unsigned int dstsize,
+ __rte_unused int *state)
{
return 0;
}
diff --git a/app/test/test_func_reentrancy.c b/app/test/test_func_reentrancy.c
index 596d395eb4..f5ddd03d76 100644
--- a/app/test/test_func_reentrancy.c
+++ b/app/test/test_func_reentrancy.c
@@ -66,7 +66,7 @@ static rte_atomic32_t synchro = RTE_ATOMIC32_INIT(0);
* rte_eal_init only init once
*/
static int
-test_eal_init_once(__attribute__((unused)) void *arg)
+test_eal_init_once(__rte_unused void *arg)
{
unsigned lcore_self = rte_lcore_id();
@@ -99,7 +99,7 @@ ring_clean(unsigned int lcore_id)
}
static int
-ring_create_lookup(__attribute__((unused)) void *arg)
+ring_create_lookup(__rte_unused void *arg)
{
unsigned lcore_self = rte_lcore_id();
struct rte_ring * rp;
@@ -133,7 +133,7 @@ ring_create_lookup(__attribute__((unused)) void *arg)
}
static void
-my_obj_init(struct rte_mempool *mp, __attribute__((unused)) void *arg,
+my_obj_init(struct rte_mempool *mp, __rte_unused void *arg,
void *obj, unsigned i)
{
uint32_t *objnum = obj;
@@ -159,7 +159,7 @@ mempool_clean(unsigned int lcore_id)
}
static int
-mempool_create_lookup(__attribute__((unused)) void *arg)
+mempool_create_lookup(__rte_unused void *arg)
{
unsigned lcore_self = rte_lcore_id();
struct rte_mempool * mp;
@@ -217,7 +217,7 @@ hash_clean(unsigned lcore_id)
}
static int
-hash_create_free(__attribute__((unused)) void *arg)
+hash_create_free(__rte_unused void *arg)
{
unsigned lcore_self = rte_lcore_id();
struct rte_hash *handle;
@@ -281,7 +281,7 @@ fbk_clean(unsigned lcore_id)
}
static int
-fbk_create_free(__attribute__((unused)) void *arg)
+fbk_create_free(__rte_unused void *arg)
{
unsigned lcore_self = rte_lcore_id();
struct rte_fbk_hash_table *handle;
@@ -347,7 +347,7 @@ lpm_clean(unsigned int lcore_id)
}
static int
-lpm_create_free(__attribute__((unused)) void *arg)
+lpm_create_free(__rte_unused void *arg)
{
unsigned lcore_self = rte_lcore_id();
struct rte_lpm *lpm;
diff --git a/app/test/test_hash.c b/app/test/test_hash.c
index ade473d5d4..03c46a7147 100644
--- a/app/test/test_hash.c
+++ b/app/test/test_hash.c
@@ -75,9 +75,9 @@ int hash_logtype_test;
* Hash function that always returns the same value, to easily test what
* happens when a bucket is full.
*/
-static uint32_t pseudo_hash(__attribute__((unused)) const void *keys,
- __attribute__((unused)) uint32_t key_len,
- __attribute__((unused)) uint32_t init_val)
+static uint32_t pseudo_hash(__rte_unused const void *keys,
+ __rte_unused uint32_t key_len,
+ __rte_unused uint32_t init_val)
{
return 3;
}
diff --git a/app/test/test_hash_readwrite.c b/app/test/test_hash_readwrite.c
index a9429091c2..73333dff13 100644
--- a/app/test/test_hash_readwrite.c
+++ b/app/test/test_hash_readwrite.c
@@ -55,7 +55,7 @@ static rte_atomic64_t greads;
static rte_atomic64_t gwrites;
static int
-test_hash_readwrite_worker(__attribute__((unused)) void *arg)
+test_hash_readwrite_worker(__rte_unused void *arg)
{
uint64_t i, offset;
uint32_t lcore_id = rte_lcore_id();
diff --git a/app/test/test_hash_readwrite_lf_perf.c b/app/test/test_hash_readwrite_lf_perf.c
index 7bfc067f4e..889799865c 100644
--- a/app/test/test_hash_readwrite_lf_perf.c
+++ b/app/test/test_hash_readwrite_lf_perf.c
@@ -98,7 +98,7 @@ get_short_sig(const hash_sig_t hash)
}
static inline uint32_t
-get_prim_bucket_index(__attribute__((unused)) const struct rte_hash *h,
+get_prim_bucket_index(__rte_unused const struct rte_hash *h,
const hash_sig_t hash)
{
uint32_t num_buckets;
@@ -109,7 +109,7 @@ get_prim_bucket_index(__attribute__((unused)) const struct rte_hash *h,
}
static inline uint32_t
-get_alt_bucket_index(__attribute__((unused)) const struct rte_hash *h,
+get_alt_bucket_index(__rte_unused const struct rte_hash *h,
uint32_t cur_bkt_idx, uint16_t sig)
{
uint32_t num_buckets;
@@ -555,7 +555,7 @@ generate_keys(void)
}
static int
-test_rwc_reader(__attribute__((unused)) void *arg)
+test_rwc_reader(__rte_unused void *arg)
{
uint32_t i, j;
int ret;
@@ -678,7 +678,7 @@ write_keys(uint8_t write_type)
}
static int
-test_rwc_multi_writer(__attribute__((unused)) void *arg)
+test_rwc_multi_writer(__rte_unused void *arg)
{
uint32_t i, offset;
uint32_t pos_core = (uint32_t)((uintptr_t)arg);
diff --git a/app/test/test_malloc.c b/app/test/test_malloc.c
index 67a48ba38a..232d3186d0 100644
--- a/app/test/test_malloc.c
+++ b/app/test/test_malloc.c
@@ -67,7 +67,7 @@ is_aligned(void *p, int align)
}
static int
-test_align_overlap_per_lcore(__attribute__((unused)) void *arg)
+test_align_overlap_per_lcore(__rte_unused void *arg)
{
const unsigned align1 = 8,
align2 = 64,
@@ -138,7 +138,7 @@ test_align_overlap_per_lcore(__attribute__((unused)) void *arg)
}
static int
-test_reordered_free_per_lcore(__attribute__((unused)) void *arg)
+test_reordered_free_per_lcore(__rte_unused void *arg)
{
const unsigned align1 = 8,
align2 = 64,
@@ -582,7 +582,7 @@ test_realloc(void)
}
static int
-test_random_alloc_free(void *_ __attribute__((unused)))
+test_random_alloc_free(void *_ __rte_unused)
{
struct mem_list {
struct mem_list *next;
diff --git a/app/test/test_mcslock.c b/app/test/test_mcslock.c
index e9359df2ee..ddccaafa92 100644
--- a/app/test/test_mcslock.c
+++ b/app/test/test_mcslock.c
@@ -50,7 +50,7 @@ static unsigned int count;
static rte_atomic32_t synchro;
static int
-test_mcslock_per_core(__attribute__((unused)) void *arg)
+test_mcslock_per_core(__rte_unused void *arg)
{
/* Per core me node. */
rte_mcslock_t ml_me = RTE_PER_LCORE(_ml_me);
@@ -148,7 +148,7 @@ test_mcslock_perf(void)
* return immediately.
*/
static int
-test_mcslock_try(__attribute__((unused)) void *arg)
+test_mcslock_try(__rte_unused void *arg)
{
/**< Per core me node. */
rte_mcslock_t ml_me = RTE_PER_LCORE(_ml_me);
diff --git a/app/test/test_mempool.c b/app/test/test_mempool.c
index c32a5d387d..084842fdaa 100644
--- a/app/test/test_mempool.c
+++ b/app/test/test_mempool.c
@@ -64,7 +64,7 @@ static rte_atomic32_t synchro;
* other bytes are set to 0.
*/
static void
-my_obj_init(struct rte_mempool *mp, __attribute__((unused)) void *arg,
+my_obj_init(struct rte_mempool *mp, __rte_unused void *arg,
void *obj, unsigned i)
{
uint32_t *objnum = obj;
@@ -291,13 +291,13 @@ static int test_mempool_single_consumer(void)
* can run on one lcore only
*/
static int
-test_mempool_launch_single_consumer(__attribute__((unused)) void *arg)
+test_mempool_launch_single_consumer(__rte_unused void *arg)
{
return test_mempool_single_consumer();
}
static void
-my_mp_init(struct rte_mempool *mp, __attribute__((unused)) void *arg)
+my_mp_init(struct rte_mempool *mp, __rte_unused void *arg)
{
printf("mempool name is %s\n", mp->name);
/* nothing to be implemented here*/
diff --git a/app/test/test_mempool_perf.c b/app/test/test_mempool_perf.c
index 4c877834e7..60bda8aadb 100644
--- a/app/test/test_mempool_perf.c
+++ b/app/test/test_mempool_perf.c
@@ -104,7 +104,7 @@ static struct mempool_test_stats stats[RTE_MAX_LCORE];
* other bytes are set to 0.
*/
static void
-my_obj_init(struct rte_mempool *mp, __attribute__((unused)) void *arg,
+my_obj_init(struct rte_mempool *mp, __rte_unused void *arg,
void *obj, unsigned i)
{
uint32_t *objnum = obj;
diff --git a/app/test/test_per_lcore.c b/app/test/test_per_lcore.c
index 19b55f2642..fcd00212f1 100644
--- a/app/test/test_per_lcore.c
+++ b/app/test/test_per_lcore.c
@@ -35,7 +35,7 @@
static RTE_DEFINE_PER_LCORE(unsigned, test) = 0x12345678;
static int
-assign_vars(__attribute__((unused)) void *arg)
+assign_vars(__rte_unused void *arg)
{
if (RTE_PER_LCORE(test) != 0x12345678)
return -1;
@@ -44,7 +44,7 @@ assign_vars(__attribute__((unused)) void *arg)
}
static int
-display_vars(__attribute__((unused)) void *arg)
+display_vars(__rte_unused void *arg)
{
unsigned lcore_id = rte_lcore_id();
unsigned var = RTE_PER_LCORE(test);
@@ -59,7 +59,7 @@ display_vars(__attribute__((unused)) void *arg)
}
static int
-test_per_lcore_delay(__attribute__((unused)) void *arg)
+test_per_lcore_delay(__rte_unused void *arg)
{
rte_delay_ms(100);
printf("wait 100ms on lcore %u\n", rte_lcore_id());
diff --git a/app/test/test_rwlock.c b/app/test/test_rwlock.c
index 40f91759c2..61bee7d7c2 100644
--- a/app/test/test_rwlock.c
+++ b/app/test/test_rwlock.c
@@ -65,7 +65,7 @@ struct try_rwlock_lcore {
static struct try_rwlock_lcore try_lcore_data[RTE_MAX_LCORE];
static int
-test_rwlock_per_core(__attribute__((unused)) void *arg)
+test_rwlock_per_core(__rte_unused void *arg)
{
rte_rwlock_write_lock(&sl);
printf("Global write lock taken on core %u\n", rte_lcore_id());
@@ -92,7 +92,7 @@ static uint64_t time_count[RTE_MAX_LCORE] = {0};
#define TEST_RWLOCK_DEBUG 0
static int
-load_loop_fn(__attribute__((unused)) void *arg)
+load_loop_fn(__rte_unused void *arg)
{
uint64_t time_diff = 0, begin;
uint64_t hz = rte_get_timer_hz();
diff --git a/app/test/test_spinlock.c b/app/test/test_spinlock.c
index 6ac749597a..842990ed3b 100644
--- a/app/test/test_spinlock.c
+++ b/app/test/test_spinlock.c
@@ -52,7 +52,7 @@ static unsigned count = 0;
static rte_atomic32_t synchro;
static int
-test_spinlock_per_core(__attribute__((unused)) void *arg)
+test_spinlock_per_core(__rte_unused void *arg)
{
rte_spinlock_lock(&sl);
printf("Global lock taken on core %u\n", rte_lcore_id());
@@ -66,7 +66,7 @@ test_spinlock_per_core(__attribute__((unused)) void *arg)
}
static int
-test_spinlock_recursive_per_core(__attribute__((unused)) void *arg)
+test_spinlock_recursive_per_core(__rte_unused void *arg)
{
unsigned id = rte_lcore_id();
@@ -178,7 +178,7 @@ test_spinlock_perf(void)
* checked as the result later.
*/
static int
-test_spinlock_try(__attribute__((unused)) void *arg)
+test_spinlock_try(__rte_unused void *arg)
{
if (rte_spinlock_trylock(&sl_try) == 0) {
rte_spinlock_lock(&sl);
diff --git a/app/test/test_table.c b/app/test/test_table.c
index a4b0ed65f9..bc8d8a2e10 100644
--- a/app/test/test_table.c
+++ b/app/test/test_table.c
@@ -43,9 +43,9 @@ static void app_init_rings(void);
static void app_init_mbuf_pools(void);
uint64_t pipeline_test_hash(void *key,
- __attribute__((unused)) void *key_mask,
- __attribute__((unused)) uint32_t key_size,
- __attribute__((unused)) uint64_t seed)
+ __rte_unused void *key_mask,
+ __rte_unused uint32_t key_size,
+ __rte_unused uint64_t seed)
{
uint32_t *k32 = key;
uint32_t ip_dst = rte_be_to_cpu_32(k32[0]);
@@ -55,8 +55,8 @@ uint64_t pipeline_test_hash(void *key,
}
uint32_t pipeline_test_hash_cuckoo(const void *key,
- __attribute__((unused)) uint32_t key_size,
- __attribute__((unused)) uint32_t seed)
+ __rte_unused uint32_t key_size,
+ __rte_unused uint32_t seed)
{
const uint32_t *k32 = key;
uint32_t ip_dst = rte_be_to_cpu_32(k32[0]);
diff --git a/app/test/test_table.h b/app/test/test_table.h
index a66342cb65..43b8855874 100644
--- a/app/test/test_table.h
+++ b/app/test/test_table.h
@@ -103,14 +103,14 @@
/* Function definitions */
uint64_t pipeline_test_hash(
void *key,
- __attribute__((unused)) void *key_mask,
- __attribute__((unused)) uint32_t key_size,
- __attribute__((unused)) uint64_t seed);
+ __rte_unused void *key_mask,
+ __rte_unused uint32_t key_size,
+ __rte_unused uint64_t seed);
uint32_t pipeline_test_hash_cuckoo(
const void *key,
- __attribute__((unused)) uint32_t key_size,
- __attribute__((unused)) uint32_t seed);
+ __rte_unused uint32_t key_size,
+ __rte_unused uint32_t seed);
/* Extern variables */
extern struct rte_pipeline *p;
diff --git a/app/test/test_table_pipeline.c b/app/test/test_table_pipeline.c
index 441338ac01..97788ca042 100644
--- a/app/test/test_table_pipeline.c
+++ b/app/test/test_table_pipeline.c
@@ -74,11 +74,11 @@ table_action_stub_miss(struct rte_pipeline *p, struct rte_mbuf **pkts,
uint64_t pkts_mask, struct rte_pipeline_table_entry *entry, void *arg);
rte_pipeline_table_action_handler_hit
-table_action_0x00(__attribute__((unused)) struct rte_pipeline *p,
- __attribute__((unused)) struct rte_mbuf **pkts,
+table_action_0x00(__rte_unused struct rte_pipeline *p,
+ __rte_unused struct rte_mbuf **pkts,
uint64_t pkts_mask,
- __attribute__((unused)) struct rte_pipeline_table_entry **entry,
- __attribute__((unused)) void *arg)
+ __rte_unused struct rte_pipeline_table_entry **entry,
+ __rte_unused void *arg)
{
printf("Table Action, setting pkts_mask to 0x00\n");
pkts_mask = ~0x00;
@@ -87,11 +87,11 @@ table_action_0x00(__attribute__((unused)) struct rte_pipeline *p,
}
rte_pipeline_table_action_handler_hit
-table_action_stub_hit(__attribute__((unused)) struct rte_pipeline *p,
- __attribute__((unused)) struct rte_mbuf **pkts,
+table_action_stub_hit(__rte_unused struct rte_pipeline *p,
+ __rte_unused struct rte_mbuf **pkts,
uint64_t pkts_mask,
- __attribute__((unused)) struct rte_pipeline_table_entry **entry,
- __attribute__((unused)) void *arg)
+ __rte_unused struct rte_pipeline_table_entry **entry,
+ __rte_unused void *arg)
{
printf("STUB Table Action Hit - doing nothing\n");
printf("STUB Table Action Hit - setting mask to 0x%"PRIx64"\n",
@@ -103,10 +103,10 @@ table_action_stub_hit(__attribute__((unused)) struct rte_pipeline *p,
static int
table_action_stub_miss(struct rte_pipeline *p,
- __attribute__((unused)) struct rte_mbuf **pkts,
+ __rte_unused struct rte_mbuf **pkts,
uint64_t pkts_mask,
- __attribute__((unused)) struct rte_pipeline_table_entry *entry,
- __attribute__((unused)) void *arg)
+ __rte_unused struct rte_pipeline_table_entry *entry,
+ __rte_unused void *arg)
{
printf("STUB Table Action Miss - setting mask to 0x%"PRIx64"\n",
override_miss_mask);
diff --git a/app/test/test_ticketlock.c b/app/test/test_ticketlock.c
index 13bdadbcb1..66ab3d1a02 100644
--- a/app/test/test_ticketlock.c
+++ b/app/test/test_ticketlock.c
@@ -52,7 +52,7 @@ static unsigned int count;
static rte_atomic32_t synchro;
static int
-test_ticketlock_per_core(__attribute__((unused)) void *arg)
+test_ticketlock_per_core(__rte_unused void *arg)
{
rte_ticketlock_lock(&tl);
printf("Global lock taken on core %u\n", rte_lcore_id());
@@ -66,7 +66,7 @@ test_ticketlock_per_core(__attribute__((unused)) void *arg)
}
static int
-test_ticketlock_recursive_per_core(__attribute__((unused)) void *arg)
+test_ticketlock_recursive_per_core(__rte_unused void *arg)
{
unsigned int id = rte_lcore_id();
@@ -186,7 +186,7 @@ test_ticketlock_perf(void)
* checked as the result later.
*/
static int
-test_ticketlock_try(__attribute__((unused)) void *arg)
+test_ticketlock_try(__rte_unused void *arg)
{
if (rte_ticketlock_trylock(&tl_try) == 0) {
rte_ticketlock_lock(&tl);
diff --git a/app/test/test_timer.c b/app/test/test_timer.c
index 8e0a589828..5933f56ed5 100644
--- a/app/test/test_timer.c
+++ b/app/test/test_timer.c
@@ -137,8 +137,8 @@ mytimer_reset(struct mytimerinfo *timinfo, uint64_t ticks,
/* timer callback for stress tests */
static void
-timer_stress_cb(__attribute__((unused)) struct rte_timer *tim,
- __attribute__((unused)) void *arg)
+timer_stress_cb(__rte_unused struct rte_timer *tim,
+ __rte_unused void *arg)
{
long r;
unsigned lcore_id = rte_lcore_id();
@@ -163,7 +163,7 @@ timer_stress_cb(__attribute__((unused)) struct rte_timer *tim,
}
static int
-timer_stress_main_loop(__attribute__((unused)) void *arg)
+timer_stress_main_loop(__rte_unused void *arg)
{
uint64_t hz = rte_get_timer_hz();
unsigned lcore_id = rte_lcore_id();
@@ -272,7 +272,7 @@ timer_stress2_cb(struct rte_timer *tim __rte_unused, void *arg __rte_unused)
#define NB_STRESS2_TIMERS 8192
static int
-timer_stress2_main_loop(__attribute__((unused)) void *arg)
+timer_stress2_main_loop(__rte_unused void *arg)
{
static struct rte_timer *timers;
int i, ret;
@@ -457,7 +457,7 @@ timer_basic_cb(struct rte_timer *tim, void *arg)
}
static int
-timer_basic_main_loop(__attribute__((unused)) void *arg)
+timer_basic_main_loop(__rte_unused void *arg)
{
uint64_t hz = rte_get_timer_hz();
unsigned lcore_id = rte_lcore_id();
diff --git a/app/test/test_timer_racecond.c b/app/test/test_timer_racecond.c
index a9e1daf16b..176f224b0a 100644
--- a/app/test/test_timer_racecond.c
+++ b/app/test/test_timer_racecond.c
@@ -108,7 +108,7 @@ reload_timer(struct rte_timer *tim)
}
static int
-slave_main_loop(__attribute__((unused)) void *arg)
+slave_main_loop(__rte_unused void *arg)
{
unsigned lcore_id = rte_lcore_id();
unsigned i;
diff --git a/doc/guides/sample_app_ug/cmd_line.rst b/doc/guides/sample_app_ug/cmd_line.rst
index 828a607bec..6deb6c8112 100644
--- a/doc/guides/sample_app_ug/cmd_line.rst
+++ b/doc/guides/sample_app_ug/cmd_line.rst
@@ -128,7 +128,7 @@ For example, the cmd_obj_del_show command is defined as shown below:
struct object *obj;
};
- static void cmd_obj_del_show_parsed(void *parsed_result, struct cmdline *cl, attribute ((unused)) void *data)
+ static void cmd_obj_del_show_parsed(void *parsed_result, struct cmdline *cl, __rte_unused void *data)
{
/* ... */
}
diff --git a/doc/guides/sample_app_ug/hello_world.rst b/doc/guides/sample_app_ug/hello_world.rst
index c0e0a1549e..46f997a7dc 100644
--- a/doc/guides/sample_app_ug/hello_world.rst
+++ b/doc/guides/sample_app_ug/hello_world.rst
@@ -62,7 +62,7 @@ The following is the definition of the function:
.. code-block:: c
static int
- lcore_hello( attribute ((unused)) void *arg)
+ lcore_hello(__rte_unused void *arg)
{
unsigned lcore_id;
diff --git a/doc/guides/sample_app_ug/l3_forward_power_man.rst b/doc/guides/sample_app_ug/l3_forward_power_man.rst
index 6ec24f4ad8..475a866cfb 100644
--- a/doc/guides/sample_app_ug/l3_forward_power_man.rst
+++ b/doc/guides/sample_app_ug/l3_forward_power_man.rst
@@ -206,7 +206,7 @@ to generate hints based on recent network load trends.
.. code-block:: c
static
- attribute ((noreturn)) int main_loop( attribute ((unused)) void *dummy)
+ attribute ((noreturn)) int main_loop(__rte_unused void *dummy)
{
// ...
diff --git a/doc/guides/sample_app_ug/timer.rst b/doc/guides/sample_app_ug/timer.rst
index 87dfb4c1f4..98d762d238 100644
--- a/doc/guides/sample_app_ug/timer.rst
+++ b/doc/guides/sample_app_ug/timer.rst
@@ -137,7 +137,7 @@ In this case, the timer is stopped using the rte_timer_stop() function.
/* timer0 callback */
static void
- timer0_cb( attribute ((unused)) struct rte_timer *tim, __attribute ((unused)) void *arg)
+ timer0_cb(__rte_unused struct rte_timer *tim, __rte_unused void *arg)
{
static unsigned counter = 0;
@@ -159,7 +159,7 @@ rte_timer_reset() function:
/* timer1 callback */
static void
- timer1_cb( attribute ((unused)) struct rte_timer *tim, _attribute ((unused)) void *arg)
+ timer1_cb(__rte_unused struct rte_timer *tim, __rte_unused void *arg)
{
unsigned lcore_id = rte_lcore_id();
uint64_t hz;
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
index ab2b213f8d..44d3d49c7a 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
@@ -333,7 +333,7 @@ extern struct dpaa2_memseg_list rte_dpaa2_memsegs;
#ifdef RTE_LIBRTE_DPAA2_USE_PHYS_IOVA
extern uint8_t dpaa2_virt_mode;
-static void *dpaa2_mem_ptov(phys_addr_t paddr) __attribute__((unused));
+static void *dpaa2_mem_ptov(phys_addr_t paddr) __rte_unused;
static void *dpaa2_mem_ptov(phys_addr_t paddr)
{
@@ -352,7 +352,7 @@ static void *dpaa2_mem_ptov(phys_addr_t paddr)
return va;
}
-static phys_addr_t dpaa2_mem_vtop(uint64_t vaddr) __attribute__((unused));
+static phys_addr_t dpaa2_mem_vtop(uint64_t vaddr) __rte_unused;
static phys_addr_t dpaa2_mem_vtop(uint64_t vaddr)
{
diff --git a/drivers/common/dpaax/caamflib/compat.h b/drivers/common/dpaax/caamflib/compat.h
index ce946ccb5c..36ee4b5335 100644
--- a/drivers/common/dpaax/caamflib/compat.h
+++ b/drivers/common/dpaax/caamflib/compat.h
@@ -33,11 +33,11 @@
#endif
#ifndef __always_unused
-#define __always_unused __attribute__((unused))
+#define __always_unused __rte_unused
#endif
#ifndef __maybe_unused
-#define __maybe_unused __attribute__((unused))
+#define __maybe_unused __rte_unused
#endif
#if defined(__GLIBC__) && !defined(pr_debug)
diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index 6ed2701ab6..9727378fcf 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -3565,7 +3565,7 @@ dpaa2_sec_process_parallel_event(struct qbman_swp *swp,
qbman_swp_dqrr_consume(swp, dq);
}
static void
-dpaa2_sec_process_atomic_event(struct qbman_swp *swp __attribute__((unused)),
+dpaa2_sec_process_atomic_event(struct qbman_swp *swp __rte_unused,
const struct qbman_fd *fd,
const struct qbman_result *dq,
struct dpaa2_queue *rxq,
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 707a0f3cdd..612a64599a 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -489,9 +489,9 @@ update_client_stats(uint32_t addr, uint16_t port, uint32_t *TXorRXindicator)
#endif
static void
-mode6_debug(const char __attribute__((unused)) *info,
+mode6_debug(const char __rte_unused *info,
struct rte_ether_hdr *eth_h, uint16_t port,
- uint32_t __attribute__((unused)) *burstnumber)
+ uint32_t __rte_unused *burstnumber)
{
struct rte_ipv4_hdr *ipv4_h;
#ifdef RTE_LIBRTE_BOND_DEBUG_ALB
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.h b/drivers/net/dpaa2/dpaa2_ethdev.h
index 95674b26b9..31dca8c7b6 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.h
+++ b/drivers/net/dpaa2/dpaa2_ethdev.h
@@ -198,7 +198,7 @@ uint16_t dpaa2_dev_tx_ordered(void *queue, struct rte_mbuf **bufs,
uint16_t dummy_dev_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts);
void dpaa2_dev_free_eqresp_buf(uint16_t eqresp_ci);
void dpaa2_flow_clean(struct rte_eth_dev *dev);
-uint16_t dpaa2_dev_tx_conf(void *queue) __attribute__((unused));
+uint16_t dpaa2_dev_tx_conf(void *queue) __rte_unused;
#if defined(RTE_LIBRTE_IEEE1588)
int dpaa2_timesync_enable(struct rte_eth_dev *dev);
diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c
index 23d48035d5..4159096155 100644
--- a/drivers/net/dpaa2/dpaa2_rxtx.c
+++ b/drivers/net/dpaa2/dpaa2_rxtx.c
@@ -29,7 +29,7 @@ static inline uint32_t __attribute__((hot))
dpaa2_dev_rx_parse_slow(struct rte_mbuf *mbuf,
struct dpaa2_annot_hdr *annotation);
-static void enable_tx_tstamp(struct qbman_fd *fd) __attribute__((unused));
+static void enable_tx_tstamp(struct qbman_fd *fd) __rte_unused;
#define DPAA2_MBUF_TO_CONTIG_FD(_mbuf, _fd, _bpid) do { \
DPAA2_SET_FD_ADDR(_fd, DPAA2_MBUF_VADDR_TO_IOVA(_mbuf)); \
@@ -432,7 +432,7 @@ eth_mbuf_to_sg_fd(struct rte_mbuf *mbuf,
static void
eth_mbuf_to_fd(struct rte_mbuf *mbuf,
- struct qbman_fd *fd, uint16_t bpid) __attribute__((unused));
+ struct qbman_fd *fd, uint16_t bpid) __rte_unused;
static void __rte_noinline __attribute__((hot))
eth_mbuf_to_fd(struct rte_mbuf *mbuf,
@@ -688,7 +688,7 @@ dpaa2_dev_process_parallel_event(struct qbman_swp *swp,
}
void __attribute__((hot))
-dpaa2_dev_process_atomic_event(struct qbman_swp *swp __attribute__((unused)),
+dpaa2_dev_process_atomic_event(struct qbman_swp *swp __rte_unused,
const struct qbman_fd *fd,
const struct qbman_result *dq,
struct dpaa2_queue *rxq,
diff --git a/drivers/net/enic/base/vnic_dev.c b/drivers/net/enic/base/vnic_dev.c
index d6f3ba2b3a..ac03817f40 100644
--- a/drivers/net/enic/base/vnic_dev.c
+++ b/drivers/net/enic/base/vnic_dev.c
@@ -234,7 +234,7 @@ void vnic_dev_clear_desc_ring(struct vnic_dev_ring *ring)
int vnic_dev_alloc_desc_ring(struct vnic_dev *vdev,
struct vnic_dev_ring *ring,
unsigned int desc_count, unsigned int desc_size,
- __attribute__((unused)) unsigned int socket_id,
+ __rte_unused unsigned int socket_id,
char *z_name)
{
void *alloc_addr;
@@ -273,7 +273,7 @@ int vnic_dev_alloc_desc_ring(struct vnic_dev *vdev,
return 0;
}
-void vnic_dev_free_desc_ring(__attribute__((unused)) struct vnic_dev *vdev,
+void vnic_dev_free_desc_ring(__rte_unused struct vnic_dev *vdev,
struct vnic_dev_ring *ring)
{
if (ring->descs) {
diff --git a/drivers/net/hinic/hinic_pmd_rx.c b/drivers/net/hinic/hinic_pmd_rx.c
index f865f2f470..ade3d5baae 100644
--- a/drivers/net/hinic/hinic_pmd_rx.c
+++ b/drivers/net/hinic/hinic_pmd_rx.c
@@ -533,7 +533,7 @@ static void hinic_fillout_indir_tbl(struct hinic_nic_dev *nic_dev, u32 *indir)
}
static int hinic_rss_init(struct hinic_nic_dev *nic_dev,
- __attribute__((unused)) u8 *rq2iq_map,
+ __rte_unused u8 *rq2iq_map,
struct rte_eth_rss_conf *rss_conf)
{
u32 indir_tbl[HINIC_RSS_INDIR_SIZE] = {0};
diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c
index 918fbe076b..da3d72b0e2 100644
--- a/drivers/net/hns3/hns3_ethdev.c
+++ b/drivers/net/hns3/hns3_ethdev.c
@@ -1403,7 +1403,7 @@ hns3_add_uc_addr_common(struct hns3_hw *hw, struct rte_ether_addr *mac_addr)
static int
hns3_add_mac_addr(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr,
- uint32_t idx, __attribute__ ((unused)) uint32_t pool)
+ uint32_t idx, __rte_unused uint32_t pool)
{
struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
char mac_str[RTE_ETHER_ADDR_FMT_SIZE];
diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c
index 505525eba6..e49ed45b50 100644
--- a/drivers/net/hns3/hns3_ethdev_vf.c
+++ b/drivers/net/hns3/hns3_ethdev_vf.c
@@ -136,8 +136,8 @@ hns3vf_enable_msix(const struct rte_pci_device *device, bool op)
static int
hns3vf_add_mac_addr(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr,
- __attribute__ ((unused)) uint32_t idx,
- __attribute__ ((unused)) uint32_t pool)
+ __rte_unused uint32_t idx,
+ __rte_unused uint32_t pool)
{
struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
char mac_str[RTE_ETHER_ADDR_FMT_SIZE];
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 9fbda1c34c..af70ed3ee1 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -4489,7 +4489,7 @@ i40e_dev_rss_reta_query(struct rte_eth_dev *dev,
* @alignment: what to align the allocation to
**/
enum i40e_status_code
-i40e_allocate_dma_mem_d(__attribute__((unused)) struct i40e_hw *hw,
+i40e_allocate_dma_mem_d(__rte_unused struct i40e_hw *hw,
struct i40e_dma_mem *mem,
u64 size,
u32 alignment)
@@ -4523,7 +4523,7 @@ i40e_allocate_dma_mem_d(__attribute__((unused)) struct i40e_hw *hw,
* @mem: ptr to mem struct to free
**/
enum i40e_status_code
-i40e_free_dma_mem_d(__attribute__((unused)) struct i40e_hw *hw,
+i40e_free_dma_mem_d(__rte_unused struct i40e_hw *hw,
struct i40e_dma_mem *mem)
{
if (!mem)
@@ -4547,7 +4547,7 @@ i40e_free_dma_mem_d(__attribute__((unused)) struct i40e_hw *hw,
* @size: size of memory requested
**/
enum i40e_status_code
-i40e_allocate_virt_mem_d(__attribute__((unused)) struct i40e_hw *hw,
+i40e_allocate_virt_mem_d(__rte_unused struct i40e_hw *hw,
struct i40e_virt_mem *mem,
u32 size)
{
@@ -4569,7 +4569,7 @@ i40e_allocate_virt_mem_d(__attribute__((unused)) struct i40e_hw *hw,
* @mem: pointer to mem struct to free
**/
enum i40e_status_code
-i40e_free_virt_mem_d(__attribute__((unused)) struct i40e_hw *hw,
+i40e_free_virt_mem_d(__rte_unused struct i40e_hw *hw,
struct i40e_virt_mem *mem)
{
if (!mem)
@@ -4600,7 +4600,7 @@ i40e_release_spinlock_d(struct i40e_spinlock *sp)
}
void
-i40e_destroy_spinlock_d(__attribute__((unused)) struct i40e_spinlock *sp)
+i40e_destroy_spinlock_d(__rte_unused struct i40e_spinlock *sp)
{
return;
}
diff --git a/drivers/net/ice/base/ice_osdep.h b/drivers/net/ice/base/ice_osdep.h
index aac8969eb8..0955f565af 100644
--- a/drivers/net/ice/base/ice_osdep.h
+++ b/drivers/net/ice/base/ice_osdep.h
@@ -120,10 +120,10 @@ writeq(uint64_t value, volatile void *addr)
#endif /* __INTEL_NET_BASE_OSDEP__ */
#ifndef __always_unused
-#define __always_unused __attribute__((unused))
+#define __always_unused __rte_unused
#endif
#ifndef __maybe_unused
-#define __maybe_unused __attribute__((unused))
+#define __maybe_unused __rte_unused
#endif
#ifndef __packed
#define __packed __rte_packed
@@ -219,14 +219,14 @@ ice_release_lock(struct ice_lock *sp)
}
static inline void
-ice_destroy_lock(__attribute__((unused)) struct ice_lock *sp)
+ice_destroy_lock(__rte_unused struct ice_lock *sp)
{
}
struct ice_hw;
static inline void *
-ice_alloc_dma_mem(__attribute__((unused)) struct ice_hw *hw,
+ice_alloc_dma_mem(__rte_unused struct ice_hw *hw,
struct ice_dma_mem *mem, u64 size)
{
const struct rte_memzone *mz = NULL;
@@ -252,7 +252,7 @@ ice_alloc_dma_mem(__attribute__((unused)) struct ice_hw *hw,
}
static inline void
-ice_free_dma_mem(__attribute__((unused)) struct ice_hw *hw,
+ice_free_dma_mem(__rte_unused struct ice_hw *hw,
struct ice_dma_mem *mem)
{
PMD_DRV_LOG(DEBUG, "memzone %s to be freed with physical address: "
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 7ea1962f60..94ac24c44c 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -6203,8 +6203,8 @@ ixgbe_set_queue_rate_limit(struct rte_eth_dev *dev,
static int
ixgbevf_add_mac_addr(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr,
- __attribute__((unused)) uint32_t index,
- __attribute__((unused)) uint32_t pool)
+ __rte_unused uint32_t index,
+ __rte_unused uint32_t pool)
{
struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
int diag;
@@ -7006,7 +7006,7 @@ ixgbe_dev_filter_ctrl(struct rte_eth_dev *dev,
}
static u8 *
-ixgbe_dev_addr_list_itr(__attribute__((unused)) struct ixgbe_hw *hw,
+ixgbe_dev_addr_list_itr(__rte_unused struct ixgbe_hw *hw,
u8 **mc_addr_ptr, u32 *vmdq)
{
u8 *mc_addr;
diff --git a/drivers/net/pfe/base/pfe.h b/drivers/net/pfe/base/pfe.h
index ff108067d0..72741ba4a8 100644
--- a/drivers/net/pfe/base/pfe.h
+++ b/drivers/net/pfe/base/pfe.h
@@ -406,7 +406,7 @@ static inline void *pfe_mem_ptov(phys_addr_t paddr)
return rte_mem_iova2virt(paddr);
}
-static phys_addr_t pfe_mem_vtop(uint64_t vaddr) __attribute__((unused));
+static phys_addr_t pfe_mem_vtop(uint64_t vaddr) __rte_unused;
static inline phys_addr_t pfe_mem_vtop(uint64_t vaddr)
{
diff --git a/drivers/net/qede/base/bcm_osal.h b/drivers/net/qede/base/bcm_osal.h
index 513f6a8b42..8b2faec5b6 100644
--- a/drivers/net/qede/base/bcm_osal.h
+++ b/drivers/net/qede/base/bcm_osal.h
@@ -426,7 +426,7 @@ u32 qede_osal_log2(u32);
#define OSAL_PAGE_SIZE 4096
#define OSAL_CACHE_LINE_SIZE RTE_CACHE_LINE_SIZE
#define OSAL_IOMEM volatile
-#define OSAL_UNUSED __attribute__((unused))
+#define OSAL_UNUSED __rte_unused
#define OSAL_UNLIKELY(x) __builtin_expect(!!(x), 0)
#define OSAL_MIN_T(type, __min1, __min2) \
((type)(__min1) < (type)(__min2) ? (type)(__min1) : (type)(__min2))
diff --git a/drivers/net/qede/qede_filter.c b/drivers/net/qede/qede_filter.c
index b7ad59ad6d..bad55740a7 100644
--- a/drivers/net/qede/qede_filter.c
+++ b/drivers/net/qede/qede_filter.c
@@ -1030,7 +1030,7 @@ qede_set_ucast_tunn_cmn_param(struct ecore_filter_ucast *ucast,
static int
_qede_tunn_filter_config(struct rte_eth_dev *eth_dev,
const struct rte_eth_tunnel_filter_conf *conf,
- __attribute__((unused)) enum rte_filter_op filter_op,
+ __rte_unused enum rte_filter_op filter_op,
enum ecore_tunn_clss *clss,
bool add)
{
@@ -1168,7 +1168,7 @@ qede_tunn_filter_config(struct rte_eth_dev *eth_dev,
}
static int
-qede_flow_validate_attr(__attribute__((unused))struct rte_eth_dev *dev,
+qede_flow_validate_attr(__rte_unused struct rte_eth_dev *dev,
const struct rte_flow_attr *attr,
struct rte_flow_error *error)
{
@@ -1218,7 +1218,7 @@ qede_flow_validate_attr(__attribute__((unused))struct rte_eth_dev *dev,
}
static int
-qede_flow_parse_pattern(__attribute__((unused))struct rte_eth_dev *dev,
+qede_flow_parse_pattern(__rte_unused struct rte_eth_dev *dev,
const struct rte_flow_item pattern[],
struct rte_flow_error *error,
struct rte_flow *flow)
diff --git a/drivers/net/thunderx/base/nicvf_mbox.c b/drivers/net/thunderx/base/nicvf_mbox.c
index 8f83d41ddc..ddac635af9 100644
--- a/drivers/net/thunderx/base/nicvf_mbox.c
+++ b/drivers/net/thunderx/base/nicvf_mbox.c
@@ -36,7 +36,7 @@ static const char *mbox_message[NIC_MBOX_MSG_MAX] = {
[NIC_MBOX_MSG_SHUTDOWN] = "NIC_MBOX_MSG_SHUTDOWN",
};
-static inline const char * __attribute__((unused))
+static inline const char * __rte_unused
nicvf_mbox_msg_str(int msg)
{
assert(msg >= 0 && msg < NIC_MBOX_MSG_MAX);
diff --git a/drivers/raw/ifpga/base/ifpga_compat.h b/drivers/raw/ifpga/base/ifpga_compat.h
index 931c893854..cdeca70ca5 100644
--- a/drivers/raw/ifpga/base/ifpga_compat.h
+++ b/drivers/raw/ifpga/base/ifpga_compat.h
@@ -51,7 +51,7 @@
ret; \
})
-#define __maybe_unused __attribute__((__unused__))
+#define __maybe_unused __rte_unused
#define UNUSED(x) (void)(x)
diff --git a/examples/bond/main.c b/examples/bond/main.c
index ee8fa2d271..8608285b68 100644
--- a/examples/bond/main.c
+++ b/examples/bond/main.c
@@ -359,7 +359,7 @@ struct global_flag_stru_t *global_flag_stru_p = &global_flag_stru;
* Main thread that does the work, reading from INPUT_PORT
* and writing to OUTPUT_PORT
*/
-static int lcore_main(__attribute__((unused)) void *arg1)
+static int lcore_main(__rte_unused void *arg1)
{
struct rte_mbuf *pkts[MAX_PKT_BURST] __rte_cache_aligned;
struct rte_ether_addr d_addr;
@@ -481,8 +481,8 @@ static inline void get_string(struct cmd_obj_send_result *res, char *buf, uint8_
);
}
static void cmd_obj_send_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_obj_send_result *res = parsed_result;
@@ -569,9 +569,9 @@ struct cmd_start_result {
cmdline_fixed_string_t start;
};
-static void cmd_start_parsed(__attribute__((unused)) void *parsed_result,
+static void cmd_start_parsed(__rte_unused void *parsed_result,
struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
int slave_core_id = rte_lcore_id();
@@ -627,9 +627,9 @@ struct cmd_help_result {
cmdline_fixed_string_t help;
};
-static void cmd_help_parsed(__attribute__((unused)) void *parsed_result,
+static void cmd_help_parsed(__rte_unused void *parsed_result,
struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
cmdline_printf(cl,
"ALB - link bonding mode 6 example\n"
@@ -659,9 +659,9 @@ struct cmd_stop_result {
cmdline_fixed_string_t stop;
};
-static void cmd_stop_parsed(__attribute__((unused)) void *parsed_result,
+static void cmd_stop_parsed(__rte_unused void *parsed_result,
struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
rte_spinlock_trylock(&global_flag_stru_p->lock);
if (global_flag_stru_p->LcoreMainIsRunning == 0) {
@@ -700,9 +700,9 @@ struct cmd_quit_result {
cmdline_fixed_string_t quit;
};
-static void cmd_quit_parsed(__attribute__((unused)) void *parsed_result,
+static void cmd_quit_parsed(__rte_unused void *parsed_result,
struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
rte_spinlock_trylock(&global_flag_stru_p->lock);
if (global_flag_stru_p->LcoreMainIsRunning == 0) {
@@ -743,9 +743,9 @@ struct cmd_show_result {
cmdline_fixed_string_t show;
};
-static void cmd_show_parsed(__attribute__((unused)) void *parsed_result,
+static void cmd_show_parsed(__rte_unused void *parsed_result,
struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
uint16_t slaves[16] = {0};
uint8_t len = 16;
@@ -803,7 +803,7 @@ cmdline_parse_ctx_t main_ctx[] = {
};
/* prompt function, called from main on MASTER lcore */
-static void prompt(__attribute__((unused)) void *arg1)
+static void prompt(__rte_unused void *arg1)
{
struct cmdline *cl;
diff --git a/examples/cmdline/commands.c b/examples/cmdline/commands.c
index 4badffc257..0e2232f034 100644
--- a/examples/cmdline/commands.c
+++ b/examples/cmdline/commands.c
@@ -70,7 +70,7 @@ struct cmd_obj_del_show_result {
static void cmd_obj_del_show_parsed(void *parsed_result,
struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
struct cmd_obj_del_show_result *res = parsed_result;
char ip_str[INET6_ADDRSTRLEN];
@@ -122,7 +122,7 @@ struct cmd_obj_add_result {
static void cmd_obj_add_parsed(void *parsed_result,
struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
struct cmd_obj_add_result *res = parsed_result;
struct object *o;
@@ -181,9 +181,9 @@ struct cmd_help_result {
cmdline_fixed_string_t help;
};
-static void cmd_help_parsed(__attribute__((unused)) void *parsed_result,
+static void cmd_help_parsed(__rte_unused void *parsed_result,
struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
cmdline_printf(cl,
"Demo example of command line interface in RTE\n\n"
diff --git a/examples/cmdline/parse_obj_list.c b/examples/cmdline/parse_obj_list.c
index 5d29f9d59b..b04adbea58 100644
--- a/examples/cmdline/parse_obj_list.c
+++ b/examples/cmdline/parse_obj_list.c
@@ -104,7 +104,7 @@ int complete_get_elt_obj_list(cmdline_parse_token_hdr_t *tk,
}
-int get_help_obj_list(__attribute__((unused)) cmdline_parse_token_hdr_t *tk,
+int get_help_obj_list(__rte_unused cmdline_parse_token_hdr_t *tk,
char *dstbuf, unsigned int size)
{
snprintf(dstbuf, size, "Obj-List");
diff --git a/examples/ethtool/ethtool-app/main.c b/examples/ethtool/ethtool-app/main.c
index 29891012ac..7383413215 100644
--- a/examples/ethtool/ethtool-app/main.c
+++ b/examples/ethtool/ethtool-app/main.c
@@ -176,7 +176,7 @@ static void process_frame(struct app_port *ptr_port,
rte_ether_addr_copy(&ptr_port->mac_addr, &ptr_mac_hdr->s_addr);
}
-static int slave_main(__attribute__((unused)) void *ptr_data)
+static int slave_main(__rte_unused void *ptr_data)
{
struct app_port *ptr_port;
struct rte_mbuf *ptr_frame;
diff --git a/examples/fips_validation/fips_validation_aes.c b/examples/fips_validation/fips_validation_aes.c
index 010a82627a..b3c5e31f32 100644
--- a/examples/fips_validation/fips_validation_aes.c
+++ b/examples/fips_validation/fips_validation_aes.c
@@ -49,8 +49,8 @@ struct aes_test_algo {
static int
parse_interim_enc_dec(const char *key,
- __attribute__((__unused__)) char *text,
- __attribute__((__unused__)) struct fips_val *val)
+ __rte_unused char *text,
+ __rte_unused struct fips_val *val)
{
if (strcmp(key, OP_ENC_STR) == 0)
info.op = FIPS_TEST_ENC_AUTH_GEN;
diff --git a/examples/fips_validation/fips_validation_hmac.c b/examples/fips_validation/fips_validation_hmac.c
index 97ac7186e5..1285c9d283 100644
--- a/examples/fips_validation/fips_validation_hmac.c
+++ b/examples/fips_validation/fips_validation_hmac.c
@@ -31,9 +31,9 @@ struct hash_size_conversion {
};
static int
-parse_interim_algo(__attribute__((__unused__)) const char *key,
+parse_interim_algo(__rte_unused const char *key,
char *text,
- __attribute__((__unused__)) struct fips_val *val)
+ __rte_unused struct fips_val *val)
{
uint32_t i;
diff --git a/examples/fips_validation/fips_validation_sha.c b/examples/fips_validation/fips_validation_sha.c
index 2cca9cecc5..34c364c75a 100644
--- a/examples/fips_validation/fips_validation_sha.c
+++ b/examples/fips_validation/fips_validation_sha.c
@@ -29,9 +29,9 @@ struct plain_hash_size_conversion {
};
static int
-parse_interim_algo(__attribute__((__unused__)) const char *key,
+parse_interim_algo(__rte_unused const char *key,
char *text,
- __attribute__((__unused__)) struct fips_val *val)
+ __rte_unused struct fips_val *val)
{
uint32_t i;
diff --git a/examples/fips_validation/fips_validation_tdes.c b/examples/fips_validation/fips_validation_tdes.c
index 5b6737643a..84dd288e60 100644
--- a/examples/fips_validation/fips_validation_tdes.c
+++ b/examples/fips_validation/fips_validation_tdes.c
@@ -60,7 +60,7 @@ parse_tdes_uint8_hex_str(const char *key, char *src, struct fips_val *val);
static int
parse_tdes_interim(const char *key,
- __attribute__((__unused__)) char *text,
+ __rte_unused char *text,
struct fips_val *val);
struct fips_test_callback tdes_tests_vectors[] = {
@@ -95,8 +95,8 @@ struct fips_test_callback tdes_writeback_callbacks[] = {
static int
parse_tdes_interim(const char *key,
- __attribute__((__unused__)) char *text,
- __attribute__((__unused__)) struct fips_val *val)
+ __rte_unused char *text,
+ __rte_unused struct fips_val *val)
{
if (strstr(key, ENC_STR))
info.op = FIPS_TEST_ENC_AUTH_GEN;
diff --git a/examples/helloworld/main.c b/examples/helloworld/main.c
index c922cfbad7..968045f1b0 100644
--- a/examples/helloworld/main.c
+++ b/examples/helloworld/main.c
@@ -16,7 +16,7 @@
#include <rte_debug.h>
static int
-lcore_hello(__attribute__((unused)) void *arg)
+lcore_hello(__rte_unused void *arg)
{
unsigned lcore_id;
lcore_id = rte_lcore_id();
diff --git a/examples/ip_fragmentation/main.c b/examples/ip_fragmentation/main.c
index 104612339c..2a42122995 100644
--- a/examples/ip_fragmentation/main.c
+++ b/examples/ip_fragmentation/main.c
@@ -382,7 +382,7 @@ l3fwd_simple_forward(struct rte_mbuf *m, struct lcore_queue_conf *qconf,
/* main processing loop */
static int
-main_loop(__attribute__((unused)) void *dummy)
+main_loop(__rte_unused void *dummy)
{
struct rte_mbuf *pkts_burst[MAX_PKT_BURST];
unsigned lcore_id;
diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c
index d59e6d02ff..e34d8f0e12 100644
--- a/examples/ip_reassembly/main.c
+++ b/examples/ip_reassembly/main.c
@@ -420,7 +420,7 @@ reassemble(struct rte_mbuf *m, uint16_t portid, uint32_t queue,
/* main processing loop */
static int
-main_loop(__attribute__((unused)) void *dummy)
+main_loop(__rte_unused void *dummy)
{
struct rte_mbuf *pkts_burst[MAX_PKT_BURST];
unsigned lcore_id;
diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 4799bc90c5..28aa694beb 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -1099,7 +1099,7 @@ drain_outbound_crypto_queues(const struct lcore_conf *qconf,
/* main processing loop */
static int32_t
-main_loop(__attribute__((unused)) void *dummy)
+main_loop(__rte_unused void *dummy)
{
struct rte_mbuf *pkts[MAX_PKT_BURST];
uint32_t lcore_id;
diff --git a/examples/l2fwd-jobstats/main.c b/examples/l2fwd-jobstats/main.c
index f975aa12d0..c1ca100ed0 100644
--- a/examples/l2fwd-jobstats/main.c
+++ b/examples/l2fwd-jobstats/main.c
@@ -535,7 +535,7 @@ l2fwd_main_loop(void)
}
static int
-l2fwd_launch_one_lcore(__attribute__((unused)) void *dummy)
+l2fwd_launch_one_lcore(__rte_unused void *dummy)
{
l2fwd_main_loop();
return 0;
diff --git a/examples/l2fwd-keepalive/main.c b/examples/l2fwd-keepalive/main.c
index b36834974e..2ae5a3c6a9 100644
--- a/examples/l2fwd-keepalive/main.c
+++ b/examples/l2fwd-keepalive/main.c
@@ -117,8 +117,8 @@ static void handle_sigterm(__rte_unused int value)
/* Print out statistics on packets dropped */
static void
-print_stats(__attribute__((unused)) struct rte_timer *ptr_timer,
- __attribute__((unused)) void *ptr_data)
+print_stats(__rte_unused struct rte_timer *ptr_timer,
+ __rte_unused void *ptr_data)
{
uint64_t total_packets_dropped, total_packets_tx, total_packets_rx;
uint16_t portid;
@@ -278,7 +278,7 @@ l2fwd_main_loop(void)
}
static int
-l2fwd_launch_one_lcore(__attribute__((unused)) void *dummy)
+l2fwd_launch_one_lcore(__rte_unused void *dummy)
{
l2fwd_main_loop();
return 0;
diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c
index 09257aab1c..88ddfe5897 100644
--- a/examples/l2fwd/main.c
+++ b/examples/l2fwd/main.c
@@ -281,7 +281,7 @@ l2fwd_main_loop(void)
}
static int
-l2fwd_launch_one_lcore(__attribute__((unused)) void *dummy)
+l2fwd_launch_one_lcore(__rte_unused void *dummy)
{
l2fwd_main_loop();
return 0;
diff --git a/examples/l3fwd-acl/main.c b/examples/l3fwd-acl/main.c
index fa92a28297..cccf81929c 100644
--- a/examples/l3fwd-acl/main.c
+++ b/examples/l3fwd-acl/main.c
@@ -1326,7 +1326,7 @@ is_valid_ipv4_pkt(struct rte_ipv4_hdr *pkt, uint32_t link_len)
/* main processing loop */
static int
-main_loop(__attribute__((unused)) void *dummy)
+main_loop(__rte_unused void *dummy)
{
struct rte_mbuf *pkts_burst[MAX_PKT_BURST];
unsigned lcore_id;
diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index bb132441d9..fddc3850dc 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -461,8 +461,8 @@ signal_exit_now(int sigtype)
/* Freqency scale down timer callback */
static void
-power_timer_cb(__attribute__((unused)) struct rte_timer *tim,
- __attribute__((unused)) void *arg)
+power_timer_cb(__rte_unused struct rte_timer *tim,
+ __rte_unused void *arg)
{
uint64_t hz;
float sleep_time_ratio;
@@ -927,7 +927,7 @@ static int event_register(struct lcore_conf *qconf)
}
/* main processing loop */
static int
-main_telemetry_loop(__attribute__((unused)) void *dummy)
+main_telemetry_loop(__rte_unused void *dummy)
{
struct rte_mbuf *pkts_burst[MAX_PKT_BURST];
unsigned int lcore_id;
@@ -1047,7 +1047,7 @@ main_telemetry_loop(__attribute__((unused)) void *dummy)
}
/* main processing loop */
static int
-main_empty_poll_loop(__attribute__((unused)) void *dummy)
+main_empty_poll_loop(__rte_unused void *dummy)
{
struct rte_mbuf *pkts_burst[MAX_PKT_BURST];
unsigned int lcore_id;
@@ -1151,7 +1151,7 @@ main_empty_poll_loop(__attribute__((unused)) void *dummy)
}
/* main processing loop */
static int
-main_loop(__attribute__((unused)) void *dummy)
+main_loop(__rte_unused void *dummy)
{
struct rte_mbuf *pkts_burst[MAX_PKT_BURST];
unsigned lcore_id;
@@ -2078,8 +2078,8 @@ init_power_library(void)
return ret;
}
static void
-update_telemetry(__attribute__((unused)) struct rte_timer *tim,
- __attribute__((unused)) void *arg)
+update_telemetry(__rte_unused struct rte_timer *tim,
+ __rte_unused void *arg)
{
unsigned int lcore_id = rte_lcore_id();
struct lcore_conf *qconf;
diff --git a/examples/l3fwd/l3fwd.h b/examples/l3fwd/l3fwd.h
index c786f90628..67055431f7 100644
--- a/examples/l3fwd/l3fwd.h
+++ b/examples/l3fwd/l3fwd.h
@@ -202,28 +202,28 @@ lpm_cb_parse_ptype(uint16_t port, uint16_t queue, struct rte_mbuf *pkts[],
uint16_t nb_pkts, uint16_t max_pkts, void *user_param);
int
-em_main_loop(__attribute__((unused)) void *dummy);
+em_main_loop(__rte_unused void *dummy);
int
-lpm_main_loop(__attribute__((unused)) void *dummy);
+lpm_main_loop(__rte_unused void *dummy);
int
-lpm_event_main_loop_tx_d(__attribute__((unused)) void *dummy);
+lpm_event_main_loop_tx_d(__rte_unused void *dummy);
int
-lpm_event_main_loop_tx_d_burst(__attribute__((unused)) void *dummy);
+lpm_event_main_loop_tx_d_burst(__rte_unused void *dummy);
int
-lpm_event_main_loop_tx_q(__attribute__((unused)) void *dummy);
+lpm_event_main_loop_tx_q(__rte_unused void *dummy);
int
-lpm_event_main_loop_tx_q_burst(__attribute__((unused)) void *dummy);
+lpm_event_main_loop_tx_q_burst(__rte_unused void *dummy);
int
-em_event_main_loop_tx_d(__attribute__((unused)) void *dummy);
+em_event_main_loop_tx_d(__rte_unused void *dummy);
int
-em_event_main_loop_tx_d_burst(__attribute__((unused)) void *dummy);
+em_event_main_loop_tx_d_burst(__rte_unused void *dummy);
int
-em_event_main_loop_tx_q(__attribute__((unused)) void *dummy);
+em_event_main_loop_tx_q(__rte_unused void *dummy);
int
-em_event_main_loop_tx_q_burst(__attribute__((unused)) void *dummy);
+em_event_main_loop_tx_q_burst(__rte_unused void *dummy);
/* Return ipv4/ipv6 fwd lookup struct for LPM or EM. */
diff --git a/examples/l3fwd/l3fwd_em.c b/examples/l3fwd/l3fwd_em.c
index 7dab299526..fdbee70b44 100644
--- a/examples/l3fwd/l3fwd_em.c
+++ b/examples/l3fwd/l3fwd_em.c
@@ -618,7 +618,7 @@ em_cb_parse_ptype(uint16_t port __rte_unused, uint16_t queue __rte_unused,
/* main processing loop */
int
-em_main_loop(__attribute__((unused)) void *dummy)
+em_main_loop(__rte_unused void *dummy)
{
struct rte_mbuf *pkts_burst[MAX_PKT_BURST];
unsigned lcore_id;
@@ -835,7 +835,7 @@ em_event_loop(struct l3fwd_event_resources *evt_rsrc,
}
int __rte_noinline
-em_event_main_loop_tx_d(__attribute__((unused)) void *dummy)
+em_event_main_loop_tx_d(__rte_unused void *dummy)
{
struct l3fwd_event_resources *evt_rsrc =
l3fwd_get_eventdev_rsrc();
@@ -845,7 +845,7 @@ em_event_main_loop_tx_d(__attribute__((unused)) void *dummy)
}
int __rte_noinline
-em_event_main_loop_tx_d_burst(__attribute__((unused)) void *dummy)
+em_event_main_loop_tx_d_burst(__rte_unused void *dummy)
{
struct l3fwd_event_resources *evt_rsrc =
l3fwd_get_eventdev_rsrc();
@@ -855,7 +855,7 @@ em_event_main_loop_tx_d_burst(__attribute__((unused)) void *dummy)
}
int __rte_noinline
-em_event_main_loop_tx_q(__attribute__((unused)) void *dummy)
+em_event_main_loop_tx_q(__rte_unused void *dummy)
{
struct l3fwd_event_resources *evt_rsrc =
l3fwd_get_eventdev_rsrc();
@@ -865,7 +865,7 @@ em_event_main_loop_tx_q(__attribute__((unused)) void *dummy)
}
int __rte_noinline
-em_event_main_loop_tx_q_burst(__attribute__((unused)) void *dummy)
+em_event_main_loop_tx_q_burst(__rte_unused void *dummy)
{
struct l3fwd_event_resources *evt_rsrc =
l3fwd_get_eventdev_rsrc();
diff --git a/examples/l3fwd/l3fwd_lpm.c b/examples/l3fwd/l3fwd_lpm.c
index 6ad8b30b64..2fe1ecabbc 100644
--- a/examples/l3fwd/l3fwd_lpm.c
+++ b/examples/l3fwd/l3fwd_lpm.c
@@ -169,7 +169,7 @@ lpm_get_dst_port_with_ipv4(const struct lcore_conf *qconf, struct rte_mbuf *pkt,
/* main processing loop */
int
-lpm_main_loop(__attribute__((unused)) void *dummy)
+lpm_main_loop(__rte_unused void *dummy)
{
struct rte_mbuf *pkts_burst[MAX_PKT_BURST];
unsigned lcore_id;
@@ -413,7 +413,7 @@ lpm_event_loop(struct l3fwd_event_resources *evt_rsrc,
}
int __rte_noinline
-lpm_event_main_loop_tx_d(__attribute__((unused)) void *dummy)
+lpm_event_main_loop_tx_d(__rte_unused void *dummy)
{
struct l3fwd_event_resources *evt_rsrc =
l3fwd_get_eventdev_rsrc();
@@ -423,7 +423,7 @@ lpm_event_main_loop_tx_d(__attribute__((unused)) void *dummy)
}
int __rte_noinline
-lpm_event_main_loop_tx_d_burst(__attribute__((unused)) void *dummy)
+lpm_event_main_loop_tx_d_burst(__rte_unused void *dummy)
{
struct l3fwd_event_resources *evt_rsrc =
l3fwd_get_eventdev_rsrc();
@@ -433,7 +433,7 @@ lpm_event_main_loop_tx_d_burst(__attribute__((unused)) void *dummy)
}
int __rte_noinline
-lpm_event_main_loop_tx_q(__attribute__((unused)) void *dummy)
+lpm_event_main_loop_tx_q(__rte_unused void *dummy)
{
struct l3fwd_event_resources *evt_rsrc =
l3fwd_get_eventdev_rsrc();
@@ -443,7 +443,7 @@ lpm_event_main_loop_tx_q(__attribute__((unused)) void *dummy)
}
int __rte_noinline
-lpm_event_main_loop_tx_q_burst(__attribute__((unused)) void *dummy)
+lpm_event_main_loop_tx_q_burst(__rte_unused void *dummy)
{
struct l3fwd_event_resources *evt_rsrc =
l3fwd_get_eventdev_rsrc();
diff --git a/examples/link_status_interrupt/main.c b/examples/link_status_interrupt/main.c
index a924aa2313..38422f6ac5 100644
--- a/examples/link_status_interrupt/main.c
+++ b/examples/link_status_interrupt/main.c
@@ -286,7 +286,7 @@ lsi_main_loop(void)
}
static int
-lsi_launch_one_lcore(__attribute__((unused)) void *dummy)
+lsi_launch_one_lcore(__rte_unused void *dummy)
{
lsi_main_loop();
return 0;
diff --git a/examples/multi_process/client_server_mp/mp_server/main.c b/examples/multi_process/client_server_mp/mp_server/main.c
index 802e29d10d..280dab8672 100644
--- a/examples/multi_process/client_server_mp/mp_server/main.c
+++ b/examples/multi_process/client_server_mp/mp_server/main.c
@@ -152,7 +152,7 @@ do_stats_display(void)
* repeatedly sleeps.
*/
static int
-sleep_lcore(__attribute__((unused)) void *dummy)
+sleep_lcore(__rte_unused void *dummy)
{
/* Used to pick a display thread - static, so zero-initialised */
static rte_atomic32_t display_stats;
diff --git a/examples/multi_process/hotplug_mp/commands.c b/examples/multi_process/hotplug_mp/commands.c
index b068593939..a8a39d07f7 100644
--- a/examples/multi_process/hotplug_mp/commands.c
+++ b/examples/multi_process/hotplug_mp/commands.c
@@ -16,9 +16,9 @@ struct cmd_help_result {
cmdline_fixed_string_t help;
};
-static void cmd_help_parsed(__attribute__((unused)) void *parsed_result,
+static void cmd_help_parsed(__rte_unused void *parsed_result,
struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
cmdline_printf(cl,
"commands:\n"
@@ -46,9 +46,9 @@ struct cmd_quit_result {
cmdline_fixed_string_t quit;
};
-static void cmd_quit_parsed(__attribute__((unused)) void *parsed_result,
+static void cmd_quit_parsed(__rte_unused void *parsed_result,
struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
cmdline_quit(cl);
}
@@ -72,9 +72,9 @@ struct cmd_list_result {
cmdline_fixed_string_t list;
};
-static void cmd_list_parsed(__attribute__((unused)) void *parsed_result,
+static void cmd_list_parsed(__rte_unused void *parsed_result,
struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
uint16_t port_id;
char dev_name[RTE_DEV_NAME_MAX_LEN];
@@ -112,7 +112,7 @@ struct cmd_dev_attach_result {
static void cmd_dev_attach_parsed(void *parsed_result,
struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
struct cmd_dev_attach_result *res = parsed_result;
struct rte_devargs da;
@@ -159,7 +159,7 @@ struct cmd_dev_detach_result {
static void cmd_dev_detach_parsed(void *parsed_result,
struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
struct cmd_dev_detach_result *res = parsed_result;
struct rte_devargs da;
diff --git a/examples/multi_process/simple_mp/main.c b/examples/multi_process/simple_mp/main.c
index e6c69d6a33..fc79528462 100644
--- a/examples/multi_process/simple_mp/main.c
+++ b/examples/multi_process/simple_mp/main.c
@@ -53,7 +53,7 @@ struct rte_mempool *message_pool;
volatile int quit = 0;
static int
-lcore_recv(__attribute__((unused)) void *arg)
+lcore_recv(__rte_unused void *arg)
{
unsigned lcore_id = rte_lcore_id();
diff --git a/examples/multi_process/simple_mp/mp_commands.c b/examples/multi_process/simple_mp/mp_commands.c
index bdf4947720..311d0fe775 100644
--- a/examples/multi_process/simple_mp/mp_commands.c
+++ b/examples/multi_process/simple_mp/mp_commands.c
@@ -40,8 +40,8 @@ struct cmd_send_result {
};
static void cmd_send_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
void *msg = NULL;
struct cmd_send_result *res = parsed_result;
@@ -77,9 +77,9 @@ struct cmd_quit_result {
cmdline_fixed_string_t quit;
};
-static void cmd_quit_parsed(__attribute__((unused)) void *parsed_result,
+static void cmd_quit_parsed(__rte_unused void *parsed_result,
struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
quit = 1;
cmdline_quit(cl);
@@ -104,9 +104,9 @@ struct cmd_help_result {
cmdline_fixed_string_t help;
};
-static void cmd_help_parsed(__attribute__((unused)) void *parsed_result,
+static void cmd_help_parsed(__rte_unused void *parsed_result,
struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
cmdline_printf(cl, "Simple demo example of multi-process in RTE\n\n"
"This is a readline-like interface that can be used to\n"
diff --git a/examples/ntb/ntb_fwd.c b/examples/ntb/ntb_fwd.c
index 17eedcf0b8..d49189e175 100644
--- a/examples/ntb/ntb_fwd.c
+++ b/examples/ntb/ntb_fwd.c
@@ -109,9 +109,9 @@ struct cmd_help_result {
};
static void
-cmd_help_parsed(__attribute__((unused)) void *parsed_result,
+cmd_help_parsed(__rte_unused void *parsed_result,
struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
cmdline_printf(
cl,
@@ -154,9 +154,9 @@ struct cmd_quit_result {
};
static void
-cmd_quit_parsed(__attribute__((unused)) void *parsed_result,
+cmd_quit_parsed(__rte_unused void *parsed_result,
struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
struct ntb_fwd_lcore_conf *conf;
uint32_t lcore_id;
@@ -209,8 +209,8 @@ struct cmd_sendfile_result {
static void
cmd_sendfile_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_sendfile_result *res = parsed_result;
struct rte_rawdev_buf *pkts_send[NTB_MAX_PKT_BURST];
@@ -793,9 +793,9 @@ struct cmd_start_result {
};
static void
-cmd_start_parsed(__attribute__((unused)) void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+cmd_start_parsed(__rte_unused void *parsed_result,
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
start_pkt_fwd();
}
@@ -819,9 +819,9 @@ struct cmd_stop_result {
};
static void
-cmd_stop_parsed(__attribute__((unused)) void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+cmd_stop_parsed(__rte_unused void *parsed_result,
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct ntb_fwd_lcore_conf *conf;
uint32_t lcore_id;
@@ -983,8 +983,8 @@ struct cmd_stats_result {
static void
cmd_stats_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_stats_result *res = parsed_result;
if (!strcmp(res->show, "clear"))
@@ -1021,9 +1021,9 @@ struct cmd_set_fwd_mode_result {
};
static void
-cmd_set_fwd_mode_parsed(__attribute__((unused)) void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+cmd_set_fwd_mode_parsed(__rte_unused void *parsed_result,
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_set_fwd_mode_result *res = parsed_result;
int i;
diff --git a/examples/performance-thread/l3fwd-thread/main.c b/examples/performance-thread/l3fwd-thread/main.c
index 73a811c99e..8a1560b503 100644
--- a/examples/performance-thread/l3fwd-thread/main.c
+++ b/examples/performance-thread/l3fwd-thread/main.c
@@ -869,7 +869,7 @@ get_ipv6_dst_port(void *ipv6_hdr, uint16_t portid,
#endif
static inline void l3fwd_simple_forward(struct rte_mbuf *m, uint16_t portid)
- __attribute__((unused));
+ __rte_unused;
#if ((APP_LOOKUP_METHOD == APP_LOOKUP_EXACT_MATCH) && \
(ENABLE_MULTI_BUFFER_OPTIMIZE == 1))
@@ -1120,7 +1120,7 @@ simple_ipv6_fwd_8pkts(struct rte_mbuf *m[8], uint16_t portid)
struct rte_ether_hdr *eth_hdr[8];
union ipv6_5tuple_host key[8];
- __attribute__((unused)) struct rte_ipv6_hdr *ipv6_hdr[8];
+ __rte_unused struct rte_ipv6_hdr *ipv6_hdr[8];
eth_hdr[0] = rte_pktmbuf_mtod(m[0], struct rte_ether_hdr *);
eth_hdr[1] = rte_pktmbuf_mtod(m[1], struct rte_ether_hdr *);
diff --git a/examples/performance-thread/pthread_shim/main.c b/examples/performance-thread/pthread_shim/main.c
index 03ff394369..18f83059bc 100644
--- a/examples/performance-thread/pthread_shim/main.c
+++ b/examples/performance-thread/pthread_shim/main.c
@@ -118,7 +118,7 @@ void *helloworld_pthread(void *arg)
*/
__thread pthread_t tid[HELLOW_WORLD_MAX_LTHREADS];
-static void *initial_lthread(void *args __attribute__((unused)))
+static void *initial_lthread(void *args __rte_unused)
{
int lcore = (int) rte_lcore_id();
/*
@@ -204,7 +204,7 @@ static void *initial_lthread(void *args __attribute__((unused)))
* in the core mask
*/
static int
-lthread_scheduler(void *args __attribute__((unused)))
+lthread_scheduler(void *args __rte_unused)
{
/* create initial thread */
struct lthread *lt;
diff --git a/examples/qos_meter/main.c b/examples/qos_meter/main.c
index e8112c83a2..4dade4ca2f 100644
--- a/examples/qos_meter/main.c
+++ b/examples/qos_meter/main.c
@@ -167,7 +167,7 @@ app_pkt_handle(struct rte_mbuf *pkt, uint64_t time)
static __attribute__((noreturn)) int
-main_loop(__attribute__((unused)) void *dummy)
+main_loop(__rte_unused void *dummy)
{
uint64_t current_time, last_time = rte_rdtsc();
uint32_t lcore_id = rte_lcore_id();
diff --git a/examples/qos_sched/cmdline.c b/examples/qos_sched/cmdline.c
index 15f51830c1..ba68e0d026 100644
--- a/examples/qos_sched/cmdline.c
+++ b/examples/qos_sched/cmdline.c
@@ -21,9 +21,9 @@ struct cmd_help_result {
cmdline_fixed_string_t help;
};
-static void cmd_help_parsed(__attribute__((unused)) void *parsed_result,
+static void cmd_help_parsed(__rte_unused void *parsed_result,
struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
cmdline_printf(
cl,
@@ -64,9 +64,9 @@ struct cmd_quit_result {
cmdline_fixed_string_t quit;
};
-static void cmd_quit_parsed(__attribute__((unused)) void *parsed_result,
+static void cmd_quit_parsed(__rte_unused void *parsed_result,
struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
cmdline_quit(cl);
}
@@ -92,8 +92,8 @@ struct cmd_setqavg_result {
};
static void cmd_setqavg_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_setqavg_result *res = parsed_result;
@@ -133,9 +133,9 @@ struct cmd_appstats_result {
cmdline_fixed_string_t app_string;
};
-static void cmd_appstats_parsed(__attribute__((unused)) void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+static void cmd_appstats_parsed(__rte_unused void *parsed_result,
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
app_stat();
}
@@ -168,8 +168,8 @@ struct cmd_subportstats_result {
};
static void cmd_subportstats_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_subportstats_result *res = parsed_result;
@@ -219,8 +219,8 @@ struct cmd_pipestats_result {
};
static void cmd_pipestats_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_pipestats_result *res = parsed_result;
@@ -282,8 +282,8 @@ struct cmd_avg_q_result {
};
static void cmd_avg_q_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_avg_q_result *res = parsed_result;
@@ -359,8 +359,8 @@ struct cmd_avg_tcpipe_result {
};
static void cmd_avg_tcpipe_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_avg_tcpipe_result *res = parsed_result;
@@ -426,8 +426,8 @@ struct cmd_avg_pipe_result {
};
static void cmd_avg_pipe_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_avg_pipe_result *res = parsed_result;
@@ -485,8 +485,8 @@ struct cmd_avg_tcsubport_result {
};
static void cmd_avg_tcsubport_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_avg_tcsubport_result *res = parsed_result;
@@ -542,8 +542,8 @@ struct cmd_avg_subport_result {
};
static void cmd_avg_subport_parsed(void *parsed_result,
- __attribute__((unused)) struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
{
struct cmd_avg_subport_result *res = parsed_result;
diff --git a/examples/qos_sched/main.c b/examples/qos_sched/main.c
index c0ed16b68f..73864d66db 100644
--- a/examples/qos_sched/main.c
+++ b/examples/qos_sched/main.c
@@ -29,7 +29,7 @@ uint32_t qavg_ntimes = APP_QAVG_NTIMES;
/* main processing loop */
static int
-app_main_loop(__attribute__((unused))void *dummy)
+app_main_loop(__rte_unused void *dummy)
{
uint32_t lcore_id;
uint32_t i, mode;
diff --git a/examples/server_node_efd/server/main.c b/examples/server_node_efd/server/main.c
index 21c72acda2..05f961cff5 100644
--- a/examples/server_node_efd/server/main.c
+++ b/examples/server_node_efd/server/main.c
@@ -174,7 +174,7 @@ do_stats_display(void)
* repeatedly sleeps.
*/
static int
-sleep_lcore(__attribute__((unused)) void *dummy)
+sleep_lcore(__rte_unused void *dummy)
{
/* Used to pick a display thread - static, so zero-initialised */
static rte_atomic32_t display_stats;
diff --git a/examples/timer/main.c b/examples/timer/main.c
index 968a941367..00c251c409 100644
--- a/examples/timer/main.c
+++ b/examples/timer/main.c
@@ -25,8 +25,8 @@ static struct rte_timer timer1;
/* timer0 callback */
static void
-timer0_cb(__attribute__((unused)) struct rte_timer *tim,
- __attribute__((unused)) void *arg)
+timer0_cb(__rte_unused struct rte_timer *tim,
+ __rte_unused void *arg)
{
static unsigned counter = 0;
unsigned lcore_id = rte_lcore_id();
@@ -41,8 +41,8 @@ timer0_cb(__attribute__((unused)) struct rte_timer *tim,
/* timer1 callback */
static void
-timer1_cb(__attribute__((unused)) struct rte_timer *tim,
- __attribute__((unused)) void *arg)
+timer1_cb(__rte_unused struct rte_timer *tim,
+ __rte_unused void *arg)
{
unsigned lcore_id = rte_lcore_id();
uint64_t hz;
@@ -56,7 +56,7 @@ timer1_cb(__attribute__((unused)) struct rte_timer *tim,
}
static __attribute__((noreturn)) int
-lcore_mainloop(__attribute__((unused)) void *arg)
+lcore_mainloop(__rte_unused void *arg)
{
uint64_t prev_tsc = 0, cur_tsc, diff_tsc;
unsigned lcore_id;
diff --git a/examples/vdpa/main.c b/examples/vdpa/main.c
index d2e2cb7cd4..6d6831f349 100644
--- a/examples/vdpa/main.c
+++ b/examples/vdpa/main.c
@@ -228,9 +228,9 @@ struct cmd_help_result {
cmdline_fixed_string_t help;
};
-static void cmd_help_parsed(__attribute__((unused)) void *parsed_result,
+static void cmd_help_parsed(__rte_unused void *parsed_result,
struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
cmdline_printf(
cl,
@@ -263,9 +263,9 @@ struct cmd_list_result {
};
static void cmd_list_vdpa_devices_parsed(
- __attribute__((unused)) void *parsed_result,
+ __rte_unused void *parsed_result,
struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
int did;
uint32_t queue_num;
@@ -320,7 +320,7 @@ struct cmd_create_result {
static void cmd_create_vdpa_port_parsed(void *parsed_result,
struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
int did;
struct cmd_create_result *res = parsed_result;
@@ -368,9 +368,9 @@ struct cmd_quit_result {
cmdline_fixed_string_t quit;
};
-static void cmd_quit_parsed(__attribute__((unused)) void *parsed_result,
+static void cmd_quit_parsed(__rte_unused void *parsed_result,
struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
vdpa_sample_quit();
cmdline_quit(cl);
diff --git a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.h b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.h
index 0c2cc1374d..6ad14a3dea 100644
--- a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.h
+++ b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.h
@@ -17,7 +17,7 @@ int set_policy_mac(int port, int idx);
int set_policy_defaults(struct channel_packet *pkt);
-void run_cli(__attribute__((unused)) void *arg);
+void run_cli(__rte_unused void *arg);
#ifdef __cplusplus
}
diff --git a/examples/vm_power_manager/main.c b/examples/vm_power_manager/main.c
index d39f044c1e..dc6afb132c 100644
--- a/examples/vm_power_manager/main.c
+++ b/examples/vm_power_manager/main.c
@@ -302,7 +302,7 @@ check_all_ports_link_status(uint32_t port_mask)
}
}
static int
-run_monitor(__attribute__((unused)) void *arg)
+run_monitor(__rte_unused void *arg)
{
if (channel_monitor_init() < 0) {
printf("Unable to initialize channel monitor\n");
@@ -313,7 +313,7 @@ run_monitor(__attribute__((unused)) void *arg)
}
static int
-run_core_monitor(__attribute__((unused)) void *arg)
+run_core_monitor(__rte_unused void *arg)
{
if (branch_monitor_init() < 0) {
printf("Unable to initialize core monitor\n");
diff --git a/examples/vm_power_manager/oob_monitor_nop.c b/examples/vm_power_manager/oob_monitor_nop.c
index 7e7b8bc149..fc73ce18ef 100644
--- a/examples/vm_power_manager/oob_monitor_nop.c
+++ b/examples/vm_power_manager/oob_monitor_nop.c
@@ -8,20 +8,20 @@ void branch_monitor_exit(void)
{
}
-__attribute__((unused)) static float
-apply_policy(__attribute__((unused)) int core)
+__rte_unused static float
+apply_policy(__rte_unused int core)
{
return 0.0;
}
int
-add_core_to_monitor(__attribute__((unused)) int core)
+add_core_to_monitor(__rte_unused int core)
{
return 0;
}
int
-remove_core_from_monitor(__attribute__((unused)) int core)
+remove_core_from_monitor(__rte_unused int core)
{
return 0;
}
diff --git a/examples/vm_power_manager/vm_power_cli.c b/examples/vm_power_manager/vm_power_cli.c
index 5f64b83fb0..7edeaccda5 100644
--- a/examples/vm_power_manager/vm_power_cli.c
+++ b/examples/vm_power_manager/vm_power_cli.c
@@ -27,9 +27,9 @@ struct cmd_quit_result {
cmdline_fixed_string_t quit;
};
-static void cmd_quit_parsed(__attribute__((unused)) void *parsed_result,
+static void cmd_quit_parsed(__rte_unused void *parsed_result,
struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
channel_monitor_exit();
channel_manager_exit();
@@ -58,7 +58,7 @@ struct cmd_show_vm_result {
static void
cmd_show_vm_parsed(void *parsed_result, struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
struct cmd_show_vm_result *res = parsed_result;
struct vm_info info;
@@ -135,7 +135,7 @@ struct cmd_set_pcpu_result {
static void
cmd_set_pcpu_parsed(void *parsed_result, struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
struct cmd_set_pcpu_result *res = parsed_result;
@@ -182,7 +182,7 @@ struct cmd_vm_op_result {
static void
cmd_vm_op_parsed(void *parsed_result, struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
struct cmd_vm_op_result *res = parsed_result;
@@ -221,7 +221,7 @@ struct cmd_channels_op_result {
};
static void
cmd_channels_op_parsed(void *parsed_result, struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
unsigned num_channels = 0, channel_num, i;
int channels_added;
@@ -349,7 +349,7 @@ struct cmd_channels_status_op_result {
static void
cmd_channels_status_op_parsed(void *parsed_result, struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
unsigned num_channels = 0, channel_num;
int changed;
@@ -435,7 +435,7 @@ struct cmd_show_cpu_freq_result {
static void
cmd_show_cpu_freq_parsed(void *parsed_result, struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
struct cmd_show_cpu_freq_result *res = parsed_result;
uint32_t curr_freq = power_manager_get_current_frequency(res->core_num);
@@ -476,7 +476,7 @@ struct cmd_set_cpu_freq_result {
static void
cmd_set_cpu_freq_parsed(void *parsed_result, struct cmdline *cl,
- __attribute__((unused)) void *data)
+ __rte_unused void *data)
{
int ret = -1;
struct cmd_set_cpu_freq_result *res = parsed_result;
@@ -536,7 +536,7 @@ cmdline_parse_ctx_t main_ctx[] = {
};
void
-run_cli(__attribute__((unused)) void *arg)
+run_cli(__rte_unused void *arg)
{
struct cmdline *cl;
diff --git a/examples/vm_power_manager/vm_power_cli.h b/examples/vm_power_manager/vm_power_cli.h
index 075c255eef..6666cf72c0 100644
--- a/examples/vm_power_manager/vm_power_cli.h
+++ b/examples/vm_power_manager/vm_power_cli.h
@@ -9,7 +9,7 @@
extern "C" {
#endif
-void run_cli(__attribute__((unused)) void *arg);
+void run_cli(void *arg);
#ifdef __cplusplus
}
diff --git a/examples/vmdq/main.c b/examples/vmdq/main.c
index 0111109203..67aa558887 100644
--- a/examples/vmdq/main.c
+++ b/examples/vmdq/main.c
@@ -455,7 +455,7 @@ sighup_handler(int signum)
* and writing to OUTPUT_PORT
*/
static int
-lcore_main(__attribute__((__unused__)) void *dummy)
+lcore_main(__rte_unused void *dummy)
{
const uint16_t lcore_id = (uint16_t)rte_lcore_id();
const uint16_t num_cores = (uint16_t)rte_lcore_count();
diff --git a/lib/librte_cmdline/cmdline.c b/lib/librte_cmdline/cmdline.c
index 53cda84c13..cfd703e5b3 100644
--- a/lib/librte_cmdline/cmdline.c
+++ b/lib/librte_cmdline/cmdline.c
@@ -24,7 +24,7 @@
static void
cmdline_valid_buffer(struct rdline *rdl, const char *buf,
- __attribute__((unused)) unsigned int size)
+ __rte_unused unsigned int size)
{
struct cmdline *cl = rdl->opaque;
int ret;
diff --git a/lib/librte_cmdline/cmdline_parse_etheraddr.c b/lib/librte_cmdline/cmdline_parse_etheraddr.c
index 2cb8dd2a12..5cb10de321 100644
--- a/lib/librte_cmdline/cmdline_parse_etheraddr.c
+++ b/lib/librte_cmdline/cmdline_parse_etheraddr.c
@@ -27,7 +27,7 @@ struct cmdline_token_ops cmdline_token_etheraddr_ops = {
};
int
-cmdline_parse_etheraddr(__attribute__((unused)) cmdline_parse_token_hdr_t *tk,
+cmdline_parse_etheraddr(__rte_unused cmdline_parse_token_hdr_t *tk,
const char *buf, void *res, unsigned ressize)
{
unsigned int token_len = 0;
@@ -58,7 +58,7 @@ cmdline_parse_etheraddr(__attribute__((unused)) cmdline_parse_token_hdr_t *tk,
}
int
-cmdline_get_help_etheraddr(__attribute__((unused)) cmdline_parse_token_hdr_t *tk,
+cmdline_get_help_etheraddr(__rte_unused cmdline_parse_token_hdr_t *tk,
char *dstbuf, unsigned int size)
{
int ret;
diff --git a/lib/librte_cmdline/cmdline_parse_portlist.c b/lib/librte_cmdline/cmdline_parse_portlist.c
index ad43b522e9..e1aa07be4b 100644
--- a/lib/librte_cmdline/cmdline_parse_portlist.c
+++ b/lib/librte_cmdline/cmdline_parse_portlist.c
@@ -72,7 +72,7 @@ parse_ports(cmdline_portlist_t *pl, const char *str)
}
int
-cmdline_parse_portlist(__attribute__((unused)) cmdline_parse_token_hdr_t *tk,
+cmdline_parse_portlist(__rte_unused cmdline_parse_token_hdr_t *tk,
const char *buf, void *res, unsigned ressize)
{
unsigned int token_len = 0;
@@ -108,7 +108,7 @@ cmdline_parse_portlist(__attribute__((unused)) cmdline_parse_token_hdr_t *tk,
}
int
-cmdline_get_help_portlist(__attribute__((unused)) cmdline_parse_token_hdr_t *tk,
+cmdline_get_help_portlist(__rte_unused cmdline_parse_token_hdr_t *tk,
char *dstbuf, unsigned int size)
{
int ret;
diff --git a/lib/librte_eal/common/include/rte_common.h b/lib/librte_eal/common/include/rte_common.h
index 5145473415..fc66d9236a 100644
--- a/lib/librte_eal/common/include/rte_common.h
+++ b/lib/librte_eal/common/include/rte_common.h
@@ -687,7 +687,7 @@ rte_log2_u64(uint64_t v)
#ifndef container_of
#define container_of(ptr, type, member) __extension__ ({ \
const typeof(((type *)0)->member) *_ptr = (ptr); \
- __attribute__((unused)) type *_target_ptr = \
+ __rte_unused type *_target_ptr = \
(type *)(ptr); \
(type *)(((uintptr_t)_ptr) - offsetof(type, member)); \
})
diff --git a/lib/librte_eal/freebsd/eal/eal.c b/lib/librte_eal/freebsd/eal/eal.c
index 6ae37e7e69..80dc9aa78c 100644
--- a/lib/librte_eal/freebsd/eal/eal.c
+++ b/lib/librte_eal/freebsd/eal/eal.c
@@ -665,7 +665,7 @@ eal_check_mem_on_local_socket(void)
static int
-sync_func(__attribute__((unused)) void *arg)
+sync_func(__rte_unused void *arg)
{
return 0;
}
diff --git a/lib/librte_eal/freebsd/eal/eal_thread.c b/lib/librte_eal/freebsd/eal/eal_thread.c
index 309b587266..925737d34d 100644
--- a/lib/librte_eal/freebsd/eal/eal_thread.c
+++ b/lib/librte_eal/freebsd/eal/eal_thread.c
@@ -90,7 +90,7 @@ void eal_thread_init_master(unsigned lcore_id)
/* main loop of threads */
__attribute__((noreturn)) void *
-eal_thread_loop(__attribute__((unused)) void *arg)
+eal_thread_loop(__rte_unused void *arg)
{
char c;
int n, ret;
diff --git a/lib/librte_eal/linux/eal/eal.c b/lib/librte_eal/linux/eal/eal.c
index 9530ee55f8..d1e532fc1b 100644
--- a/lib/librte_eal/linux/eal/eal.c
+++ b/lib/librte_eal/linux/eal/eal.c
@@ -893,7 +893,7 @@ eal_check_mem_on_local_socket(void)
}
static int
-sync_func(__attribute__((unused)) void *arg)
+sync_func(__rte_unused void *arg)
{
return 0;
}
diff --git a/lib/librte_eal/linux/eal/eal_log.c b/lib/librte_eal/linux/eal/eal_log.c
index 9d02dddbed..43c8460bfb 100644
--- a/lib/librte_eal/linux/eal/eal_log.c
+++ b/lib/librte_eal/linux/eal/eal_log.c
@@ -23,7 +23,7 @@
* default log function
*/
static ssize_t
-console_log_write(__attribute__((unused)) void *c, const char *buf, size_t size)
+console_log_write(__rte_unused void *c, const char *buf, size_t size)
{
ssize_t ret;
diff --git a/lib/librte_eal/linux/eal/eal_thread.c b/lib/librte_eal/linux/eal/eal_thread.c
index 379773b683..575c96089b 100644
--- a/lib/librte_eal/linux/eal/eal_thread.c
+++ b/lib/librte_eal/linux/eal/eal_thread.c
@@ -90,7 +90,7 @@ void eal_thread_init_master(unsigned lcore_id)
/* main loop of threads */
__attribute__((noreturn)) void *
-eal_thread_loop(__attribute__((unused)) void *arg)
+eal_thread_loop(__rte_unused void *arg)
{
char c;
int n, ret;
diff --git a/lib/librte_eal/linux/eal/eal_timer.c b/lib/librte_eal/linux/eal/eal_timer.c
index a904a8297c..6dc6b565d7 100644
--- a/lib/librte_eal/linux/eal/eal_timer.c
+++ b/lib/librte_eal/linux/eal/eal_timer.c
@@ -88,7 +88,7 @@ static pthread_t msb_inc_thread_id;
* this because hpet is 32 bits by default under linux).
*/
static void *
-hpet_msb_inc(__attribute__((unused)) void *arg)
+hpet_msb_inc(__rte_unused void *arg)
{
uint32_t t;
diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c
index cd5794d4a5..220eb2fb0c 100644
--- a/lib/librte_mbuf/rte_mbuf.c
+++ b/lib/librte_mbuf/rte_mbuf.c
@@ -77,9 +77,9 @@ rte_pktmbuf_pool_init(struct rte_mempool *mp, void *opaque_arg)
*/
void
rte_pktmbuf_init(struct rte_mempool *mp,
- __attribute__((unused)) void *opaque_arg,
+ __rte_unused void *opaque_arg,
void *_m,
- __attribute__((unused)) unsigned i)
+ __rte_unused unsigned i)
{
struct rte_mbuf *m = _m;
uint32_t mbuf_size, buf_len, priv_size;
@@ -167,7 +167,7 @@ static void
__rte_pktmbuf_init_extmem(struct rte_mempool *mp,
void *opaque_arg,
void *_m,
- __attribute__((unused)) unsigned int i)
+ __rte_unused unsigned int i)
{
struct rte_mbuf *m = _m;
struct rte_pktmbuf_extmem_init_ctx *ctx = opaque_arg;
diff --git a/lib/librte_power/power_kvm_vm.c b/lib/librte_power/power_kvm_vm.c
index 277ebbeaeb..2bb17beb17 100644
--- a/lib/librte_power/power_kvm_vm.c
+++ b/lib/librte_power/power_kvm_vm.c
@@ -37,9 +37,9 @@ power_kvm_vm_exit(unsigned int lcore_id)
}
uint32_t
-power_kvm_vm_freqs(__attribute__((unused)) unsigned int lcore_id,
- __attribute__((unused)) uint32_t *freqs,
- __attribute__((unused)) uint32_t num)
+power_kvm_vm_freqs(__rte_unused unsigned int lcore_id,
+ __rte_unused uint32_t *freqs,
+ __rte_unused uint32_t num)
{
RTE_LOG(ERR, POWER, "rte_power_freqs is not implemented "
"for Virtual Machine Power Management\n");
@@ -47,7 +47,7 @@ power_kvm_vm_freqs(__attribute__((unused)) unsigned int lcore_id,
}
uint32_t
-power_kvm_vm_get_freq(__attribute__((unused)) unsigned int lcore_id)
+power_kvm_vm_get_freq(__rte_unused unsigned int lcore_id)
{
RTE_LOG(ERR, POWER, "rte_power_get_freq is not implemented "
"for Virtual Machine Power Management\n");
@@ -55,8 +55,8 @@ power_kvm_vm_get_freq(__attribute__((unused)) unsigned int lcore_id)
}
int
-power_kvm_vm_set_freq(__attribute__((unused)) unsigned int lcore_id,
- __attribute__((unused)) uint32_t index)
+power_kvm_vm_set_freq(__rte_unused unsigned int lcore_id,
+ __rte_unused uint32_t index)
{
RTE_LOG(ERR, POWER, "rte_power_set_freq is not implemented "
"for Virtual Machine Power Management\n");
@@ -107,7 +107,7 @@ power_kvm_vm_freq_min(unsigned int lcore_id)
}
int
-power_kvm_vm_turbo_status(__attribute__((unused)) unsigned int lcore_id)
+power_kvm_vm_turbo_status(__rte_unused unsigned int lcore_id)
{
RTE_LOG(ERR, POWER, "rte_power_turbo_status is not implemented for Virtual Machine Power Management\n");
return -ENOTSUP;
--
2.25.0
next prev parent reply other threads:[~2020-02-10 16:22 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-10 16:20 [dpdk-dev] [PATCH 20.05 00/15] clean-up use of __attribute__ Thomas Monjalon
2020-02-10 16:20 ` [dpdk-dev] [PATCH 20.05 01/15] app/bbdev: replace constructor syntax with common macro Thomas Monjalon
2020-02-10 21:06 ` Chautru, Nicolas
2020-02-10 16:20 ` [dpdk-dev] [PATCH 20.05 02/15] net/mlx5: replace destructor " Thomas Monjalon
2020-02-10 16:20 ` [dpdk-dev] [PATCH 20.05 03/15] net/memif: use common macros for cache line marker Thomas Monjalon
2020-02-10 16:20 ` [dpdk-dev] [PATCH 20.05 04/15] common/mlx5: replace alignas keyword Thomas Monjalon
2020-02-10 16:20 ` [dpdk-dev] [PATCH 20.05 05/15] replace alignment attributes Thomas Monjalon
2020-02-10 19:11 ` David Christensen
2020-02-10 16:20 ` [dpdk-dev] [PATCH 20.05 06/15] replace packed attributes Thomas Monjalon
2020-02-10 16:20 ` [dpdk-dev] [PATCH 20.05 07/15] replace always-inline attributes Thomas Monjalon
2020-02-10 16:20 ` [dpdk-dev] [PATCH 20.05 08/15] replace no-inline attributes Thomas Monjalon
2020-02-10 16:20 ` Thomas Monjalon [this message]
2020-02-10 16:20 ` [dpdk-dev] [PATCH 20.05 10/15] replace used attributes Thomas Monjalon
2020-02-10 16:20 ` [dpdk-dev] [PATCH 20.05 11/15] replace hot attributes Thomas Monjalon
2020-02-10 16:20 ` [dpdk-dev] [PATCH 20.05 12/15] replace cold attributes Thomas Monjalon
2020-02-10 19:14 ` David Christensen
2020-02-10 16:20 ` [dpdk-dev] [PATCH 20.05 13/15] replace no-return attributes Thomas Monjalon
2020-02-10 16:20 ` [dpdk-dev] [PATCH 20.05 14/15] replace printf format attributes Thomas Monjalon
2020-02-10 16:20 ` [dpdk-dev] [PATCH 20.05 15/15] devtools: check use of compiler attributes Thomas Monjalon
2020-04-16 16:34 ` [dpdk-dev] [PATCH 20.05 00/15] clean-up use of __attribute__ Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200210162032.1177478-10-thomas@monjalon.net \
--to=thomas@monjalon.net \
--cc=akhil.goyal@nxp.com \
--cc=anatoly.burakov@intel.com \
--cc=arybchenko@solarflare.com \
--cc=beilei.xing@intel.com \
--cc=bernard.iremonger@intel.com \
--cc=bruce.richardson@intel.com \
--cc=byron.marohn@intel.com \
--cc=chas3@att.com \
--cc=cloud.wangxiaoyun@huawei.com \
--cc=cristian.dumitrescu@intel.com \
--cc=david.hunt@intel.com \
--cc=declan.doherty@intel.com \
--cc=dev@dpdk.org \
--cc=erik.g.carrillo@intel.com \
--cc=g.singh@nxp.com \
--cc=harry.van.haaren@intel.com \
--cc=hemant.agrawal@nxp.com \
--cc=humin29@huawei.com \
--cc=hyonkim@cisco.com \
--cc=jasvinder.singh@intel.com \
--cc=jerinj@marvell.com \
--cc=jingjing.wu@intel.com \
--cc=john.mcnamara@intel.com \
--cc=johndale@cisco.com \
--cc=joyce.kong@arm.com \
--cc=kirill.rybalchenko@intel.com \
--cc=konstantin.ananyev@intel.com \
--cc=marko.kovacevic@intel.com \
--cc=maxime.coquelin@redhat.com \
--cc=mczekaj@marvell.com \
--cc=olivier.matz@6wind.com \
--cc=orika@mellanox.com \
--cc=pbhagavatula@marvell.com \
--cc=phil.yang@arm.com \
--cc=qi.z.zhang@intel.com \
--cc=qiming.yang@intel.com \
--cc=radu.nicolau@intel.com \
--cc=rmody@marvell.com \
--cc=rosen.xu@intel.com \
--cc=rsanford@akamai.com \
--cc=sachin.saxena@nxp.com \
--cc=sameh.gobriel@intel.com \
--cc=shshaikh@marvell.com \
--cc=skori@marvell.com \
--cc=tianfei.zhang@intel.com \
--cc=tiwei.bie@intel.com \
--cc=tomasz.kantecki@intel.com \
--cc=vladimir.medvedkin@intel.com \
--cc=wenzhuo.lu@intel.com \
--cc=xavier.huwei@huawei.com \
--cc=xiaoyun.li@intel.com \
--cc=xuanziyang2@huawei.com \
--cc=yipeng1.wang@intel.com \
--cc=yisen.zhuang@huawei.com \
--cc=zhihong.wang@intel.com \
--cc=zhouguoyang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).