From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0051.outbound.protection.outlook.com [104.47.0.51]) by dpdk.org (Postfix) with ESMTP id 0E2A12C6D for ; Sun, 6 May 2018 08:06:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=ZM24DfzRxqKoPG6JrQtaLD8RVcJYJAh3laVsNDt6fDo=; b=Yw01TuYkOn1rFLLxe3y9m58iksbg9ngpJwAybeGpjuHScdEHnHq3mteJQD//+nGKPyN7lgKAAAJW0yOzJgjJEC5L1a2eCtDykKblZXpyeJZC3OF91Bw5msp+eQAMOOoWuEWncpoqb5XomjD3Mhjoob3cLXMP/Ku2yA+os5SaZwA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; Received: from mellanox.com (141.226.120.58) by AM6PR05MB4422.eurprd05.prod.outlook.com (2603:10a6:209:43::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.735.16; Sun, 6 May 2018 06:06:39 +0000 From: Shahaf Shuler To: bluca@debian.org Cc: stable@dpdk.org, nelio.laranjeiro@6wind.com, yskoh@mellanox.com, adrien.mazarguil@6wind.com Date: Sun, 6 May 2018 09:05:37 +0300 Message-Id: <027844e093fd806b2d9ff709f6fb9c3938fb3552.1525586525.git.shahafs@mellanox.com> X-Mailer: git-send-email 2.12.0 MIME-Version: 1.0 In-Reply-To: References: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Originating-IP: [141.226.120.58] X-ClientProxiedBy: LO2P265CA0008.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:62::20) To AM6PR05MB4422.eurprd05.prod.outlook.com (2603:10a6:209:43::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM6PR05MB4422; X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4422; 3:QYkT2aKZfeiS5XEiJQ5gommDosVm+BVYBHB++m1/YfZEEvr3QecvnJjsl9Zg7mzb8K8ls/1kK9cY/pM6nOa1MESsHQzg63kp8oYKpOJJffWB0j9JsNU6dro7KMn40S4JLQxToqGJtWi6smaTzav9HwhSApVu4K0FRxe17qZ79xKTN7V9Bcm/RSzm7qL4dG6tpVBV7UENT/KJuiTd30F6/ik/cgh3m6FGURoZq3tMv7AlJSP021aAVLCKwdvcqx7h; 25:4q2EYhzp/ChNitUUxPbn14BiIDle0b0uAJ0XCThTl7XXMm+w0MTmKK/xFL5QEDMpt8aO9A23ktSpxUINfjqPkdEhIAyCRBtHxcHadZug2QUBEcVyueD/6tvhpHbjHS2K4QNqN3cktRRpwx43xOo8ZRVs6GU868tvlbGokYlfdfeyQI0+05FOn/HhMbj4cey8RdYarsp8l73oVJ9mi4iW8sA2luJ8BlWLhvh0/ojAIySCDobcvk7snejk7pxi2CPNvHSzNIIvbx/4Yu9mvqQse4w7hXmoliW7R1f227Iw7iUY4eEWIxMCjqHwDayTOFwRqei+/UuPQuFfJNnZrTdehg==; 31:c6MgYy0uKQ52NPofPb/IVoGRjyZjn6KsJCRcHG8FnIluOcg3bchUGiAvNXmaTToHG6Fse/39AQK+m0/elCp6osIMRFw0xo81RVsnIYTrTiXp7mXhFK17LnQ16/g1RhDyLMK0jK079OGASmr3bGhzQCy2PqEciyvNhkZrqtvGLOLqUGP24N8Xh2DYjr5UyTbecAuJOZ/T0RdglshhdTevH0JJX/kqw3QQkA1C0SBJcIk= X-MS-TrafficTypeDiagnostic: AM6PR05MB4422: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4422; 20:wBVlprxkyehc+YBbUC13abNLldXb7TGVh35wwN6ZZ9GWJ5D1WkesZfeCTJ+kG+QuGFqmwEqNFV97x8959GS5mM5PCBgUz87BVGPfZBv3yJH6UOXX6Og9x0l5CipWbXLDPO9OxyFEm6VCwS8e/DiVuMnJTPwsds5rs6ahmJrBqDIOmfTYmB8PxTWw3w0J1VQL3Z1sK4cYcyyUvP6JS5bp8GZuRO8mhoqpRU6S0NOUMx2LddZSFjh2Gpom4pQGMkgm3ZlGpphJMZQSM7mhJRb3q9jNpX2aejSJ3QPOlb3dXI11GajvhBC8/u+4GjS9BplcCP42zzhJY3RRNOy//ka+gpOiFqht/22EwrXycqPFK4RCxyE2Nute55ZR2vPOj4LtyfSH1CiJL79CaYDZvIVswOe+USZT8MSeQLv5awkzYYXYkNjaYxjACgbWyzfB9mWHvvTe/kqwdtJwa4QWFn2Ldif88hsRTFQVHejD8BNaOtXxzc4AIzrUijwhxsMhvw4i; 4:IBC2AL00QvF9e8Li7XwbNVKYCTB2RvMa7gyWWpTxo5ZH2jVxZRdl8YEmi18HEkHRaJhr2BJnLIMybTJ6lA+JUNLd4ED29vwyeSTtnDbgGAElI14XW3Xr3g5JF25cHppyUZgrBLJKFJPpxwyu2MWkcOb03EqJfY3DVPgBpDCDY2RKUaXtnG3shd1Kr1AJgiXGYy5XsejAmtT72xT9c5Z1i+Fs4zOiXVDwg0m1IODhtYreasm7x5oXn4oK3RrmqszqtXLS6Jl9CPaEsGQbYee8iA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(3231254)(944501410)(52105095)(93006095)(93001095)(6055026)(6041310)(20161123564045)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(6072148)(201708071742011); SRVR:AM6PR05MB4422; BCL:0; PCL:0; RULEID:; SRVR:AM6PR05MB4422; X-Forefront-PRVS: 06640999CA X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(376002)(39380400002)(396003)(346002)(39860400002)(189003)(199004)(105586002)(8676002)(8936002)(316002)(2351001)(53936002)(86362001)(2361001)(6116002)(3846002)(106356001)(118296001)(66066001)(36756003)(47776003)(81156014)(55016002)(2906002)(2870700001)(50226002)(4326008)(68736007)(305945005)(7736002)(81166006)(50466002)(25786009)(486006)(5660300001)(476003)(2616005)(69596002)(16526019)(26005)(59450400001)(386003)(97736004)(956004)(186003)(478600001)(7696005)(52116002)(23676004)(6916009)(21086003)(446003)(11346002)(76176011); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR05MB4422; H:mellanox.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtBTTZQUjA1TUI0NDIyOzIzOmxOSXdZME9LdDJSQXlNaDRjekhjMHRHUGx6?= =?utf-8?B?Ujh2QzRTeGwxRW4rL2MvdkFweXE0UkdIRU4yRTl4a2hFWXM4aUg1R3IwY1Nm?= =?utf-8?B?NkxuQXBEb1RKamwybjE5ZWJmVXVWYjZER0I1dVJRWG5jQkhkdk51VGRCNlZk?= =?utf-8?B?YkRFQ3JZdWtOOFlYZ2FDZURUOE5zY2hiYVVuZUIwQmpXS2Q2Rng3QmVhTG40?= =?utf-8?B?bDYyYTRmaDlrR2RZNTM1TUYrUEhNSE15cUM0djRTQWNEWHhPZ2R6Nm5laGJM?= =?utf-8?B?RXBhU0ROeEl4U2lWeHdOQnpoZTBPY1pURjRKNW1wUlZHTHoyMHNVU2hPdWtP?= =?utf-8?B?R1U3bytqUmw4U1hYTE5oc3NkMzd3ampoT2o1SGdYUFVWd0hqUFJjNXlWWlRh?= =?utf-8?B?cHFRS01ES3Y5NE5mQ1JBTHZ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2O/jSI6tyREwvlZLENVX1N62TPSNxY86gIwl8hyuYr9yVyVPhXoAS58IgaqblSgx4rsNeBUo7wnnJXsAEiGs8JaFkafMZ4fRrqzetdn6mKj1A==; 5:3xvvLzxQvnwzIBnq4R5BrCCsjQJE86YYKH1tBQGBfJ5k0c9C0Bn1SxWApb4AgslRXn5M/fuKsQySlLw3zTixNH5+ly1TeOyXWKiGVLDDfAlpIfE+88g8P3EfkvWsOFtqEi4WHE8ZHTHkrD+Mmi1cLxei6AZ7u3ZVPVZWqiexyeg=; 24:zFh2ybIvyXzYvOe3d5FMrTr3DRF3eQWbVQ38nRLemcR5Rn5sT64+laUSuYpN7GjoylKkSaq047432Bz2yx5EHEfUYbfHIX5Gf2q4lerViLA= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4422; 7:oTOoiCPocIU6tXnek9PRdBgPWQppN10aeS3MMQBTAg80qIPSD25TqMRFUE+1ot+vXX8fbtWux9z+l1c+iQ9gmIKLxi8rO5plDUU3NxidvGbfskkGV20sgEg87xyc1ize2N1fDUpuTFLhbrXYemimPo9S1WS2RkJ0AUsOKBySW+xdzSGhEPql22UduFQoqA7KIdD5vxAm8M57tquEn5hm002bM4yxqCkwBANovXPO2ynohn6B3ug4eadbMavAnVyw X-MS-Office365-Filtering-Correlation-Id: 605f02cb-dbd5-4214-46d8-08d5b31788c7 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2018 06:06:39.7861 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 605f02cb-dbd5-4214-46d8-08d5b31788c7 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB4422 Subject: [dpdk-stable] [PATCH 08/33] net/mlx5: mark parameters with unused attribute X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 May 2018 06:06:42 -0000 From: NĂ©lio Laranjeiro [ upstream commit 56f08e1671f99a15cf6b00027c2f7d81d69c4f5f ] Replaces all (void)foo; by __rte_unused macro except when variables are under #if statements. Signed-off-by: Nelio Laranjeiro Acked-by: Adrien Mazarguil --- drivers/net/mlx5/mlx5.c | 4 +-- drivers/net/mlx5/mlx5_ethdev.c | 18 +++++-------- drivers/net/mlx5/mlx5_flow.c | 25 +++++++----------- drivers/net/mlx5/mlx5_mac.c | 3 +-- drivers/net/mlx5/mlx5_mr.c | 10 +++---- drivers/net/mlx5/mlx5_rxq.c | 4 +-- drivers/net/mlx5/mlx5_rxtx.c | 51 +++++++++++++++--------------------- drivers/net/mlx5/mlx5_stats.c | 2 +- drivers/net/mlx5/mlx5_trigger.c | 4 +-- drivers/net/mlx5/mlx5_txq.c | 19 ++++++-------- 10 files changed, 55 insertions(+), 85 deletions(-) diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index 03a6a05dee..5aaf568e59 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -571,7 +571,8 @@ priv_uar_init_secondary(struct priv *priv) * 0 on success, negative errno value on failure. */ static int -mlx5_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) +mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, + struct rte_pci_device *pci_dev) { struct ibv_device **list; struct ibv_device *ibv_dev; @@ -588,7 +589,6 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) struct ibv_counter_set_description cs_desc; #endif - (void)pci_drv; assert(pci_drv == &mlx5_driver); /* Get mlx5_dev[] index. */ idx = mlx5_dev_idx(&pci_dev->addr); diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c index f98fc4c3b0..0c383deba7 100644 --- a/drivers/net/mlx5/mlx5_ethdev.c +++ b/drivers/net/mlx5/mlx5_ethdev.c @@ -467,11 +467,9 @@ mlx5_dev_supported_ptypes_get(struct rte_eth_dev *dev) * * @param dev * Pointer to Ethernet device structure. - * @param wait_to_complete - * Wait for request completion (ignored). */ static int -mlx5_link_update_unlocked_gset(struct rte_eth_dev *dev, int wait_to_complete) +mlx5_link_update_unlocked_gset(struct rte_eth_dev *dev) { struct priv *priv = dev->data->dev_private; struct ethtool_cmd edata = { @@ -483,7 +481,6 @@ mlx5_link_update_unlocked_gset(struct rte_eth_dev *dev, int wait_to_complete) /* priv_lock() is not taken to allow concurrent calls. */ - (void)wait_to_complete; if (priv_ifreq(priv, SIOCGIFFLAGS, &ifr)) { WARN("ioctl(SIOCGIFFLAGS) failed: %s", strerror(errno)); return -1; @@ -533,11 +530,9 @@ mlx5_link_update_unlocked_gset(struct rte_eth_dev *dev, int wait_to_complete) * * @param dev * Pointer to Ethernet device structure. - * @param wait_to_complete - * Wait for request completion (ignored). */ static int -mlx5_link_update_unlocked_gs(struct rte_eth_dev *dev, int wait_to_complete) +mlx5_link_update_unlocked_gs(struct rte_eth_dev *dev) { struct priv *priv = dev->data->dev_private; struct ethtool_link_settings gcmd = { .cmd = ETHTOOL_GLINKSETTINGS }; @@ -545,7 +540,6 @@ mlx5_link_update_unlocked_gs(struct rte_eth_dev *dev, int wait_to_complete) struct rte_eth_link dev_link; uint64_t sc; - (void)wait_to_complete; if (priv_ifreq(priv, SIOCGIFFLAGS, &ifr)) { WARN("ioctl(SIOCGIFFLAGS) failed: %s", strerror(errno)); return -1; @@ -675,7 +669,7 @@ priv_link_stop(struct priv *priv) * Wait for request completion (ignored). */ int -priv_link_update(struct priv *priv, int wait_to_complete) +priv_link_update(struct priv *priv, int wait_to_complete __rte_unused) { struct rte_eth_dev *dev = priv->dev; struct utsname utsname; @@ -687,9 +681,9 @@ priv_link_update(struct priv *priv, int wait_to_complete) sscanf(utsname.release, "%d.%d.%d", &ver[0], &ver[1], &ver[2]) != 3 || KERNEL_VERSION(ver[0], ver[1], ver[2]) < KERNEL_VERSION(4, 9, 0)) - ret = mlx5_link_update_unlocked_gset(dev, wait_to_complete); + ret = mlx5_link_update_unlocked_gset(dev); else - ret = mlx5_link_update_unlocked_gs(dev, wait_to_complete); + ret = mlx5_link_update_unlocked_gs(dev); /* If lsc interrupt is disabled, should always be ready for traffic. */ if (!dev->data->dev_conf.intr_conf.lsc) { priv_link_start(priv); @@ -741,7 +735,7 @@ priv_force_link_status_change(struct priv *priv, int status) * Wait for request completion (ignored). */ int -mlx5_link_update(struct rte_eth_dev *dev, int wait_to_complete) +mlx5_link_update(struct rte_eth_dev *dev, int wait_to_complete __rte_unused) { struct priv *priv = dev->data->dev_private; int ret; diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index bf718f8947..f21d40a692 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -526,7 +526,7 @@ mlx5_flow_item_validate(const struct rte_flow_item *item, * 0 on success, errno value on failure. */ static int -priv_flow_convert_rss_conf(struct priv *priv, +priv_flow_convert_rss_conf(struct priv *priv __rte_unused, struct mlx5_flow_parse *parser, const struct rte_eth_rss_conf *rss_conf) { @@ -535,7 +535,6 @@ priv_flow_convert_rss_conf(struct priv *priv, * priv_flow_convert_actions() to initialize the parser with the * device default RSS configuration. */ - (void)priv; if (rss_conf) { if (rss_conf->rss_hf & MLX5_RSS_HF_MASK) return EINVAL; @@ -568,13 +567,11 @@ priv_flow_convert_rss_conf(struct priv *priv, * 0 on success, a negative errno value otherwise and rte_errno is set. */ static int -priv_flow_convert_attributes(struct priv *priv, +priv_flow_convert_attributes(struct priv *priv __rte_unused, const struct rte_flow_attr *attr, struct rte_flow_error *error, - struct mlx5_flow_parse *parser) + struct mlx5_flow_parse *parser __rte_unused) { - (void)priv; - (void)parser; if (attr->group) { rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ATTR_GROUP, @@ -779,7 +776,7 @@ priv_flow_convert_actions(struct priv *priv, * 0 on success, a negative errno value otherwise and rte_errno is set. */ static int -priv_flow_convert_items_validate(struct priv *priv, +priv_flow_convert_items_validate(struct priv *priv __rte_unused, const struct rte_flow_item items[], struct rte_flow_error *error, struct mlx5_flow_parse *parser) @@ -787,7 +784,6 @@ priv_flow_convert_items_validate(struct priv *priv, const struct mlx5_flow_items *cur_item = mlx5_flow_items; unsigned int i; - (void)priv; /* Initialise the offsets to start after verbs attribute. */ for (i = 0; i != hash_rxq_init_n; ++i) parser->queue[i].offset = sizeof(struct ibv_flow_attr); @@ -871,14 +867,13 @@ priv_flow_convert_items_validate(struct priv *priv, * A verbs flow attribute on success, NULL otherwise. */ static struct ibv_flow_attr* -priv_flow_convert_allocate(struct priv *priv, +priv_flow_convert_allocate(struct priv *priv __rte_unused, unsigned int priority, unsigned int size, struct rte_flow_error *error) { struct ibv_flow_attr *ibv_attr; - (void)priv; ibv_attr = rte_calloc(__func__, 1, size, 0); if (!ibv_attr) { rte_flow_error_set(error, ENOMEM, @@ -900,7 +895,8 @@ priv_flow_convert_allocate(struct priv *priv, * Internal parser structure. */ static void -priv_flow_convert_finalise(struct priv *priv, struct mlx5_flow_parse *parser) +priv_flow_convert_finalise(struct priv *priv __rte_unused, + struct mlx5_flow_parse *parser) { const unsigned int ipv4 = hash_rxq_init[parser->layer].ip_version == MLX5_IPV4; @@ -911,7 +907,6 @@ priv_flow_convert_finalise(struct priv *priv, struct mlx5_flow_parse *parser) const enum hash_rxq_type ip = ipv4 ? HASH_RXQ_IPV4 : HASH_RXQ_IPV6; unsigned int i; - (void)priv; /* Remove any other flow not matching the pattern. */ if (parser->queues_n == 1) { for (i = 0; i != hash_rxq_init_n; ++i) { @@ -2432,11 +2427,10 @@ mlx5_ctrl_flow(struct rte_eth_dev *dev, int mlx5_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow, - struct rte_flow_error *error) + struct rte_flow_error *error __rte_unused) { struct priv *priv = dev->data->dev_private; - (void)error; priv_lock(priv); priv_flow_destroy(priv, &priv->flows, flow); priv_unlock(priv); @@ -2451,11 +2445,10 @@ mlx5_flow_destroy(struct rte_eth_dev *dev, */ int mlx5_flow_flush(struct rte_eth_dev *dev, - struct rte_flow_error *error) + struct rte_flow_error *error __rte_unused) { struct priv *priv = dev->data->dev_private; - (void)error; priv_lock(priv); priv_flow_flush(priv, &priv->flows); priv_unlock(priv); diff --git a/drivers/net/mlx5/mlx5_mac.c b/drivers/net/mlx5/mlx5_mac.c index e8a8d45940..a529dfeac7 100644 --- a/drivers/net/mlx5/mlx5_mac.c +++ b/drivers/net/mlx5/mlx5_mac.c @@ -88,12 +88,11 @@ mlx5_mac_addr_remove(struct rte_eth_dev *dev, uint32_t index) */ int mlx5_mac_addr_add(struct rte_eth_dev *dev, struct ether_addr *mac, - uint32_t index, uint32_t vmdq) + uint32_t index, uint32_t vmdq __rte_unused) { unsigned int i; int ret = 0; - (void)vmdq; assert(index < MLX5_MAX_MAC_ADDRESSES); /* First, make sure this address isn't already configured. */ for (i = 0; (i != MLX5_MAX_MAC_ADDRESSES); ++i) { diff --git a/drivers/net/mlx5/mlx5_mr.c b/drivers/net/mlx5/mlx5_mr.c index 857dfcd837..38a8e2f409 100644 --- a/drivers/net/mlx5/mlx5_mr.c +++ b/drivers/net/mlx5/mlx5_mr.c @@ -26,15 +26,12 @@ struct mlx5_check_mempool_data { /* Called by mlx5_check_mempool() when iterating the memory chunks. */ static void -mlx5_check_mempool_cb(struct rte_mempool *mp, +mlx5_check_mempool_cb(struct rte_mempool *mp __rte_unused, void *opaque, struct rte_mempool_memhdr *memhdr, - unsigned int mem_idx) + unsigned int mem_idx __rte_unused) { struct mlx5_check_mempool_data *data = opaque; - (void)mp; - (void)mem_idx; - /* It already failed, skip the next chunks. */ if (data->ret != 0) return; @@ -336,9 +333,8 @@ priv_mr_get(struct priv *priv, struct rte_mempool *mp) * 0 on success, errno on failure. */ int -priv_mr_release(struct priv *priv, struct mlx5_mr *mr) +priv_mr_release(struct priv *priv __rte_unused, struct mlx5_mr *mr) { - (void)priv; assert(mr); DEBUG("Memory Region %p refcnt: %d", (void *)mr, rte_atomic32_read(&mr->refcnt)); diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c index 238fa7e563..8b9cc1dd04 100644 --- a/drivers/net/mlx5/mlx5_rxq.c +++ b/drivers/net/mlx5/mlx5_rxq.c @@ -910,9 +910,9 @@ mlx5_priv_rxq_ibv_verify(struct priv *priv) * Verbs Rx queue object. */ int -mlx5_priv_rxq_ibv_releasable(struct priv *priv, struct mlx5_rxq_ibv *rxq_ibv) +mlx5_priv_rxq_ibv_releasable(struct priv *priv __rte_unused, + struct mlx5_rxq_ibv *rxq_ibv) { - (void)priv; assert(rxq_ibv); return (rte_atomic32_read(&rxq_ibv->refcnt) == 1); } diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c index 049f7e6c1f..93d794ede7 100644 --- a/drivers/net/mlx5/mlx5_rxtx.c +++ b/drivers/net/mlx5/mlx5_rxtx.c @@ -1899,11 +1899,10 @@ mlx5_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n) * Number of packets successfully transmitted (<= pkts_n). */ uint16_t -removed_tx_burst(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n) +removed_tx_burst(void *dpdk_txq __rte_unused, + struct rte_mbuf **pkts __rte_unused, + uint16_t pkts_n __rte_unused) { - (void)dpdk_txq; - (void)pkts; - (void)pkts_n; return 0; } @@ -1924,11 +1923,10 @@ removed_tx_burst(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n) * Number of packets successfully received (<= pkts_n). */ uint16_t -removed_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n) +removed_rx_burst(void *dpdk_txq __rte_unused, + struct rte_mbuf **pkts __rte_unused, + uint16_t pkts_n __rte_unused) { - (void)dpdk_rxq; - (void)pkts; - (void)pkts_n; return 0; } @@ -1940,58 +1938,51 @@ removed_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n) */ uint16_t __attribute__((weak)) -mlx5_tx_burst_raw_vec(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n) +mlx5_tx_burst_raw_vec(void *dpdk_txq __rte_unused, + struct rte_mbuf **pkts __rte_unused, + uint16_t pkts_n __rte_unused) { - (void)dpdk_txq; - (void)pkts; - (void)pkts_n; return 0; } uint16_t __attribute__((weak)) -mlx5_tx_burst_vec(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n) +mlx5_tx_burst_vec(void *dpdk_txq __rte_unused, + struct rte_mbuf **pkts __rte_unused, + uint16_t pkts_n __rte_unused) { - (void)dpdk_txq; - (void)pkts; - (void)pkts_n; return 0; } uint16_t __attribute__((weak)) -mlx5_rx_burst_vec(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n) +mlx5_rx_burst_vec(void *dpdk_txq __rte_unused, + struct rte_mbuf **pkts __rte_unused, + uint16_t pkts_n __rte_unused) { - (void)dpdk_rxq; - (void)pkts; - (void)pkts_n; return 0; } int __attribute__((weak)) -priv_check_raw_vec_tx_support(struct priv *priv, struct rte_eth_dev *dev) +priv_check_raw_vec_tx_support(struct priv *priv __rte_unused, + struct rte_eth_dev *dev __rte_unused) { - (void)priv; - (void)dev; return -ENOTSUP; } int __attribute__((weak)) -priv_check_vec_tx_support(struct priv *priv, struct rte_eth_dev *dev) +priv_check_vec_tx_support(struct priv *priv __rte_unused, + struct rte_eth_dev *dev __rte_unused) { - (void)priv; - (void)dev; return -ENOTSUP; } int __attribute__((weak)) -rxq_check_vec_support(struct mlx5_rxq_data *rxq) +rxq_check_vec_support(struct mlx5_rxq_data *rxq __rte_unused) { - (void)rxq; return -ENOTSUP; } int __attribute__((weak)) -priv_check_vec_rx_support(struct priv *priv) +priv_check_vec_rx_support(struct priv *priv __rte_unused) { - (void)priv; return -ENOTSUP; } diff --git a/drivers/net/mlx5/mlx5_stats.c b/drivers/net/mlx5/mlx5_stats.c index eb9c65dcc9..167e405480 100644 --- a/drivers/net/mlx5/mlx5_stats.c +++ b/drivers/net/mlx5/mlx5_stats.c @@ -488,7 +488,7 @@ mlx5_xstats_reset(struct rte_eth_dev *dev) * Number of xstats names. */ int -mlx5_xstats_get_names(struct rte_eth_dev *dev, +mlx5_xstats_get_names(struct rte_eth_dev *dev __rte_unused, struct rte_eth_xstat_name *xstats_names, unsigned int n) { struct priv *priv = dev->data->dev_private; diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c index f5711a998b..72e8ff6440 100644 --- a/drivers/net/mlx5/mlx5_trigger.c +++ b/drivers/net/mlx5/mlx5_trigger.c @@ -340,9 +340,9 @@ priv_dev_traffic_enable(struct priv *priv, struct rte_eth_dev *dev) * 0 on success. */ int -priv_dev_traffic_disable(struct priv *priv, struct rte_eth_dev *dev) +priv_dev_traffic_disable(struct priv *priv, + struct rte_eth_dev *dev __rte_unused) { - (void)dev; priv_flow_flush(priv, &priv->ctrl_flows); return 0; } diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c index ed1c713ead..071d88a1f2 100644 --- a/drivers/net/mlx5/mlx5_txq.c +++ b/drivers/net/mlx5/mlx5_txq.c @@ -578,9 +578,9 @@ mlx5_priv_txq_ibv_get(struct priv *priv, uint16_t idx) * 0 on success, errno on failure. */ int -mlx5_priv_txq_ibv_release(struct priv *priv, struct mlx5_txq_ibv *txq_ibv) +mlx5_priv_txq_ibv_release(struct priv *priv __rte_unused, + struct mlx5_txq_ibv *txq_ibv) { - (void)priv; assert(txq_ibv); DEBUG("%p: Verbs Tx queue %p: refcnt %d", (void *)priv, (void *)txq_ibv, rte_atomic32_read(&txq_ibv->refcnt)); @@ -603,9 +603,9 @@ mlx5_priv_txq_ibv_release(struct priv *priv, struct mlx5_txq_ibv *txq_ibv) * Verbs Tx queue object. */ int -mlx5_priv_txq_ibv_releasable(struct priv *priv, struct mlx5_txq_ibv *txq_ibv) +mlx5_priv_txq_ibv_releasable(struct priv *priv __rte_unused, + struct mlx5_txq_ibv *txq_ibv) { - (void)priv; assert(txq_ibv); return (rte_atomic32_read(&txq_ibv->refcnt) == 1); } @@ -806,13 +806,10 @@ mlx5_priv_txq_get(struct priv *priv, uint16_t idx) mlx5_priv_txq_ibv_get(priv, idx); for (i = 0; i != MLX5_PMD_TX_MP_CACHE; ++i) { - struct mlx5_mr *mr = NULL; - - (void)mr; - if (ctrl->txq.mp2mr[i]) { - mr = priv_mr_get(priv, ctrl->txq.mp2mr[i]->mp); - assert(mr); - } + if (ctrl->txq.mp2mr[i]) + claim_nonzero + (priv_mr_get(priv, + ctrl->txq.mp2mr[i]->mp)); } rte_atomic32_inc(&ctrl->refcnt); DEBUG("%p: Tx queue %p: refcnt %d", (void *)priv, -- 2.12.0