From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 66F8345BC0; Tue, 29 Oct 2024 18:19:42 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5045E432FA; Tue, 29 Oct 2024 18:18:04 +0100 (CET) Received: from egress-ip42b.ess.de.barracuda.com (egress-ip42b.ess.de.barracuda.com [18.185.115.246]) by mails.dpdk.org (Postfix) with ESMTP id 1254C4325A for ; Tue, 29 Oct 2024 18:17:59 +0100 (CET) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05lp2175.outbound.protection.outlook.com [104.47.17.175]) by mx-outbound17-86.eu-central-1b.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 29 Oct 2024 17:17:56 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=e+4Tb/mW15tAcs4F3q0DlFsbBKg9M6CmTNkSnypYML/lqi70OCJ6lxe2WGYy0F48NHscUWja+X02v7VEGlTDjbBp81bW9tpHVSQFhK3mwxT9GwJXqvkHYR3WVtiIQAw8v1Ze8wIYuxXj5vbQgzGmSJJIqbjCdqD6P7ieA0Dl+3iEy3Hq2q3aqPzc1pbAj8LNPzNaBRFNPVrx6LQAXMNxw5IQSY/BeuLA3qFLRchHDtJylZ0EaKIaVt2DwC0FvL5VxbPc58gILZPGjTUxZNX1CbZ5e1xhEN6muMYG7wJM3CNpGeIXGWE/91AjU1UnMHOT6R8IRfEOxM4JO7NUMRLtiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=A1nt9jeuqXrHUeVsbiI82Ntbb/mO1n2K8ueH3bImfdY=; b=pxZIbHL1SpuPiFTNa6E5UzzXM2sCsTEaS/zHr3w697TQz0ngKCmGMQId//SLS7jJ7rxBCxazYfJnCCpWM5lvRdca8ceZboRPLE2jz5/O6V1/b/jRsVcW7aFslH934+7I5MUqzFiVsEadC5YATH2VX2RG+csxsHCrGMxCkMjxZxvyJnPEasqNMfZRgDhDRwT11UDBxysrHNPIkhRBpxdL6t+6V6b3Z3rBMdjvQZuJBd57yGiJ4V3L6wpLaYCURTCuLztjeVLJpb2Jr6l7awX9npnEWZmql2cfzrt5/M9KIX+Ls+i5N2PdMp1kBVI3ahMTBWSSoTDsJ7GxTKwIyK0kHg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 178.72.21.4) smtp.rcpttodomain=dpdk.org smtp.mailfrom=napatech.com; dmarc=fail (p=reject sp=reject pct=100) action=oreject header.from=napatech.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=napatech.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=A1nt9jeuqXrHUeVsbiI82Ntbb/mO1n2K8ueH3bImfdY=; b=Kl/5LR8l5kgEJOHDXbdUvNy6awCMzz1zoh5aFiSy/+LsKOJTuk+D/YHgFKULKVG7YzUCGMMxaIinKpRO9Cn2RwxMivE5IdaFZOAalpAEsbbSQtZWIbsa6BrAqYE4JlhXt+FoXJfvvc9ngYd9uatEqiCPT8gdANZvQUYQO4Ud5wA= Received: from DUZPR01CA0195.eurprd01.prod.exchangelabs.com (2603:10a6:10:4b6::26) by AS4P190MB1734.EURP190.PROD.OUTLOOK.COM (2603:10a6:20b:4c2::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.32; Tue, 29 Oct 2024 16:44:11 +0000 Received: from DU2PEPF00028D06.eurprd03.prod.outlook.com (2603:10a6:10:4b6:cafe::5f) by DUZPR01CA0195.outlook.office365.com (2603:10a6:10:4b6::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.29 via Frontend Transport; Tue, 29 Oct 2024 16:44:10 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 178.72.21.4) smtp.mailfrom=napatech.com; dkim=none (message not signed) header.d=none;dmarc=fail action=oreject header.from=napatech.com; Received-SPF: Fail (protection.outlook.com: domain of napatech.com does not designate 178.72.21.4 as permitted sender) receiver=protection.outlook.com; client-ip=178.72.21.4; helo=localhost.localdomain; Received: from localhost.localdomain (178.72.21.4) by DU2PEPF00028D06.mail.protection.outlook.com (10.167.242.166) with Microsoft SMTP Server id 15.20.8114.16 via Frontend Transport; Tue, 29 Oct 2024 16:44:10 +0000 From: Serhii Iliushyk To: dev@dpdk.org Cc: mko-plv@napatech.com, sil-plv@napatech.com, ckm@napatech.com, andrew.rybchenko@oktetlabs.ru, ferruh.yigit@amd.com, stephen@networkplumber.org Subject: [PATCH v4 79/86] net/ntnic: remove unnecessary type cast Date: Tue, 29 Oct 2024 17:42:23 +0100 Message-ID: <20241029164243.1648775-80-sil-plv@napatech.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20241029164243.1648775-1-sil-plv@napatech.com> References: <20241021210527.2075431-1-sil-plv@napatech.com> <20241029164243.1648775-1-sil-plv@napatech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PEPF00028D06:EE_|AS4P190MB1734:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: d5d1edd1-5df2-4c63-dc1e-08dcf838ea20 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|36860700013|1800799024|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?Em+OuTmVF7pX4UmgFBczgwO6A4LEj0mL4lD6zARHyubvf52kbMKf3fvgGhyO?= =?us-ascii?Q?xEtUuF7Asb30ifMWgvaRGvi5l83I8+MImtu7+UIH1I8h6tn6/ftt2S3T5b08?= =?us-ascii?Q?ruubEXnUXw1/3TP/yQnGxU7DhaGqEHdxycPxvjY2KdHo+53+1N2+xPQpAVv6?= =?us-ascii?Q?st2L4CqDY7ctb6gcvdYCEcCiz8WnM2KmKyQLF1G3vNjogaKB1J6lGa67Hd2V?= =?us-ascii?Q?c7Xa+/XKkhqWpSmbvdLOxXZbvN3r17yUFscd1lys6FpNPJ87oHc3V6WIKD59?= =?us-ascii?Q?cQ8Eu7l3H6DkBD2OBfWa6ClIHEj9aZusfOt4G04KMPxsUmKEn00SQ8VTfZ4T?= =?us-ascii?Q?cG+zKH8zxqtEAjh3H0fvLYtBzIaPSz2eVBIRoZYCQc3EzsYm40xtQ0J76nnF?= =?us-ascii?Q?HpcBt/oC9UIT9HmUA1Wqf6qIZf9yl5s4lmEQAEza12LtUU7QuYJSFJzo1YWT?= =?us-ascii?Q?hmb4QEHBOYtwNgjpx+eqkk+cZ9aEUOFY5tX+45rzeih4FuVhNSdHIKcS08a1?= =?us-ascii?Q?Txd53SIqLtAIDM2Y7ISAVuLe1/huQnmpfXl3xjEIQyyzHJjSncm7u+IWGJjM?= =?us-ascii?Q?ckcAnIhO4KSuLNcPnd7u7hEkijbavHT9BtqHUiCK8NpXWTB6+GCJL/dxDXAh?= =?us-ascii?Q?aNe8B0kru+vMR15NNQ02+2I8vEOs8jEI99WRhA90I8LNnctnE2NnqH2vS4IY?= =?us-ascii?Q?oZY39mTl8OO3RgL/kwUtPOf6WqjGdyGngstJNpCe6KvM95Fm9kGz8WzhP4pP?= =?us-ascii?Q?op57oTXFOmgT7iRQACJfOsh6ndv55Y/ZfDY2hOOqVbOIBiJ/dmXgWhrfVQNq?= =?us-ascii?Q?0hExi0Ck83FhTIFR67m3XzxJgfVhMBFCpuIFYQAVNI0MeI6afMBjY+m+yZRj?= =?us-ascii?Q?BTL0zvcjMccByZX1GTcSKdz3HbAbtZF6arIi6IyHe0QBMtZh1WHGoa/soLbi?= =?us-ascii?Q?laaOpATAicXzvC9TFXlDwGmyRaTY3UTRUIiOsEpl4aT5rrCPr+f4XzmtFP6J?= =?us-ascii?Q?ONq8hcE47krej3yMC6v+y3jK+QhQmaoJ2d1tWGI8lkO8TvOJvQT3c/rTDV/m?= =?us-ascii?Q?FwBJ6SIy6GHohzQNY49KQhngCxE75gOwOC1hIpkHdyYNlvq2kdcWCthpYz4L?= =?us-ascii?Q?+Ktxtq6cwWHhi+62dEBLu3+KkHUp041b8/LPYCHeDCIS/DK56+GuG2nY4eUy?= =?us-ascii?Q?FAJ3tAtwBh859p4SwMSCpR7o4E6aa6sOJXsU8QA0UFOaY583GdFQt6NNtjHa?= =?us-ascii?Q?m/DbJp18ePZWcCKatqFKB9MGo2VxwjxYfyP2pQF9yoSph/gbKQPp+TmRv/8H?= =?us-ascii?Q?oV7c6JeBjwzr8iNT4+mRRP0ARpPlphXMTPxn4cYVBqeRghmfNmzyHXnG93t2?= =?us-ascii?Q?jQ/aIjsO6jcNS7Yc67BULLFr4qAY6Z/zBGfvsWh8/JdIdtMDIA=3D=3D?= X-Forefront-Antispam-Report: CIP:178.72.21.4; CTRY:DK; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:localhost.localdomain; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(376014)(36860700013)(1800799024)(82310400026); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: 4uh+dskSxfAnmqQI5p4ZI+gTFE9Ow9sW2iDJ/9XkJ3uVL/LEGJT0Im2rlEy2+Eu2JchJMBmwrX/rWB63YlIRIQp9g3bkoIYv9aqR9nfR4L+UHC5juc9V1narhZ62NlWT8RfjgxfP2p+FImBDotR+oWdtPFZSNbXWBPVKNYpk7cwRsYjQnwExvRT+AYjgQbBZY/JlCGBzWrjPfH3pknFpqzqo7NTQG5yqtUxYL3+F6EslYR6R4f+3eSdOZCFzd/sSjPXwiTZMP09eWH0OJgSQ+sS7753K0meuc+wJomX0P+rQCwembNgEZ9ia1iDjjSsg7V0eounxbs0AG8Tpm/Djw+OPB6vbD5rPZIdibn5xOESa2sjgD66qzcFV92eFNv/TjaHkgtVDDAQOE1DWPCY+ODZITX/pGyQcxZarxatjEY0PnoAdzkbKvoSKI7g8tm6t4v6WspsjNUmLpbXA3RohTFW26fM95Xx1oKHUGYrkkscny9lfPmpalFas1ZIFHfTtF/qTSK562fjYMAcKw+S8Mmy0VxBDUruuiEDsVoPlIUvWm6KuwiVjtH6e7a4NTAx+1yAlWZYRHMBMAqpaoEfwROR9VRfHHs3AM+alAnu2qu8zaxFnAn4EYfqclVgq6jxC+nkSqIu3S+0PC3sgL8+v6xvcySIfsw+ws4aLWGcUGRs= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Oct 2024 16:44:10.6990 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d5d1edd1-5df2-4c63-dc1e-08dcf838ea20 X-MS-Exchange-CrossTenant-Id: c4540d0b-728a-4233-9da5-9ea30c7ec3ed X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=c4540d0b-728a-4233-9da5-9ea30c7ec3ed; Ip=[178.72.21.4]; Helo=[localhost.localdomain] X-MS-Exchange-CrossTenant-AuthSource: DU2PEPF00028D06.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4P190MB1734 X-OriginatorOrg: napatech.com X-BESS-ID: 1730222275-304438-12707-32067-1 X-BESS-VER: 2019.1_20241018.1852 X-BESS-Apparent-Source-IP: 104.47.17.175 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVobmxgaWQGYGUNTYyCTVKCk51S jZ0MwgxdTE2Nwk1TLZ0CDN0tjUzNTUQqk2FgANWqdlQgAAAA== X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.260064 [from cloudscan16-169.eu-central-1b.ess.aws.cudaops.com] Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.00 using account:ESS113687 scores of KILL_LEVEL=7.0 tests=BSF_BESS_OUTBOUND X-BESS-BRTS-Status: 1 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The dev_private has type void * and type casting is not necessary. Signed-off-by: Serhii Iliushyk --- .../net/ntnic/nthw/ntnic_meter/ntnic_meter.c | 18 +++---- drivers/net/ntnic/ntnic_ethdev.c | 48 +++++++++---------- drivers/net/ntnic/ntnic_filter/ntnic_filter.c | 16 +++---- 3 files changed, 41 insertions(+), 41 deletions(-) diff --git a/drivers/net/ntnic/nthw/ntnic_meter/ntnic_meter.c b/drivers/net/ntnic/nthw/ntnic_meter/ntnic_meter.c index e4e8fe0c7d..33593927a4 100644 --- a/drivers/net/ntnic/nthw/ntnic_meter/ntnic_meter.c +++ b/drivers/net/ntnic/nthw/ntnic_meter/ntnic_meter.c @@ -42,7 +42,7 @@ static int eth_mtr_capabilities_get_inline(struct rte_eth_dev *eth_dev, return -1; } - struct pmd_internals *internals = (struct pmd_internals *)eth_dev->data->dev_private; + struct pmd_internals *internals = eth_dev->data->dev_private; uint8_t caller_id = get_caller_id(eth_dev->data->port_id); @@ -110,7 +110,7 @@ static int eth_mtr_meter_profile_add_inline(struct rte_eth_dev *eth_dev, return -1; } - struct pmd_internals *internals = (struct pmd_internals *)eth_dev->data->dev_private; + struct pmd_internals *internals = eth_dev->data->dev_private; if (meter_profile_id >= profile_inline_ops->flow_mtr_meter_policy_n_max()) return -rte_mtr_error_set(error, EINVAL, RTE_MTR_ERROR_TYPE_METER_PROFILE_ID, NULL, @@ -161,7 +161,7 @@ static int eth_mtr_meter_profile_delete_inline(struct rte_eth_dev *eth_dev, return -1; } - struct pmd_internals *internals = (struct pmd_internals *)eth_dev->data->dev_private; + struct pmd_internals *internals = eth_dev->data->dev_private; if (meter_profile_id >= profile_inline_ops->flow_mtr_meter_policy_n_max()) return -rte_mtr_error_set(error, EINVAL, RTE_MTR_ERROR_TYPE_METER_PROFILE_ID, NULL, @@ -184,7 +184,7 @@ static int eth_mtr_meter_policy_add_inline(struct rte_eth_dev *eth_dev, return -1; } - struct pmd_internals *internals = (struct pmd_internals *)eth_dev->data->dev_private; + struct pmd_internals *internals = eth_dev->data->dev_private; if (policy_id >= profile_inline_ops->flow_mtr_meter_policy_n_max()) return -rte_mtr_error_set(error, EINVAL, RTE_MTR_ERROR_TYPE_METER_POLICY_ID, NULL, @@ -250,7 +250,7 @@ static int eth_mtr_create_inline(struct rte_eth_dev *eth_dev, return -1; } - struct pmd_internals *internals = (struct pmd_internals *)eth_dev->data->dev_private; + struct pmd_internals *internals = eth_dev->data->dev_private; uint8_t caller_id = get_caller_id(eth_dev->data->port_id); @@ -316,7 +316,7 @@ static int eth_mtr_destroy_inline(struct rte_eth_dev *eth_dev, return -1; } - struct pmd_internals *internals = (struct pmd_internals *)eth_dev->data->dev_private; + struct pmd_internals *internals = eth_dev->data->dev_private; uint8_t caller_id = get_caller_id(eth_dev->data->port_id); @@ -348,7 +348,7 @@ static int eth_mtr_stats_adjust_inline(struct rte_eth_dev *eth_dev, const uint64_t adjust_bit = 1ULL << 63; const uint64_t probe_bit = 1ULL << 62; - struct pmd_internals *internals = (struct pmd_internals *)eth_dev->data->dev_private; + struct pmd_internals *internals = eth_dev->data->dev_private; uint8_t caller_id = get_caller_id(eth_dev->data->port_id); if (mtr_id >= @@ -409,7 +409,7 @@ static int eth_mtr_stats_read_inline(struct rte_eth_dev *eth_dev, return -1; } - struct pmd_internals *internals = (struct pmd_internals *)eth_dev->data->dev_private; + struct pmd_internals *internals = eth_dev->data->dev_private; uint8_t caller_id = get_caller_id(eth_dev->data->port_id); @@ -445,7 +445,7 @@ static const struct rte_mtr_ops mtr_ops_inline = { static int eth_mtr_ops_get(struct rte_eth_dev *eth_dev, void *ops) { - struct pmd_internals *internals = (struct pmd_internals *)eth_dev->data->dev_private; + struct pmd_internals *internals = eth_dev->data->dev_private; ntdrv_4ga_t *p_nt_drv = &internals->p_drv->ntdrv; enum fpga_info_profile profile = p_nt_drv->adapter_info.fpga_info.profile; diff --git a/drivers/net/ntnic/ntnic_ethdev.c b/drivers/net/ntnic/ntnic_ethdev.c index 91669caceb..068c3d932a 100644 --- a/drivers/net/ntnic/ntnic_ethdev.c +++ b/drivers/net/ntnic/ntnic_ethdev.c @@ -272,7 +272,7 @@ eth_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete __rte_unused) return -1; } - struct pmd_internals *internals = (struct pmd_internals *)eth_dev->data->dev_private; + struct pmd_internals *internals = eth_dev->data->dev_private; const int n_intf_no = internals->n_intf_no; struct adapter_info_s *p_adapter_info = &internals->p_drv->ntdrv.adapter_info; @@ -302,14 +302,14 @@ eth_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete __rte_unused) static int eth_stats_get(struct rte_eth_dev *eth_dev, struct rte_eth_stats *stats) { - struct pmd_internals *internals = (struct pmd_internals *)eth_dev->data->dev_private; + struct pmd_internals *internals = eth_dev->data->dev_private; dpdk_stats_collect(internals, stats); return 0; } static int eth_stats_reset(struct rte_eth_dev *eth_dev) { - struct pmd_internals *internals = (struct pmd_internals *)eth_dev->data->dev_private; + struct pmd_internals *internals = eth_dev->data->dev_private; struct drv_s *p_drv = internals->p_drv; struct ntdrv_4ga_s *p_nt_drv = &p_drv->ntdrv; const int if_index = internals->n_intf_no; @@ -327,7 +327,7 @@ eth_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *dev_info return -1; } - struct pmd_internals *internals = (struct pmd_internals *)eth_dev->data->dev_private; + struct pmd_internals *internals = eth_dev->data->dev_private; const int n_intf_no = internals->n_intf_no; struct adapter_info_s *p_adapter_info = &internals->p_drv->ntdrv.adapter_info; @@ -957,14 +957,14 @@ static int deallocate_hw_virtio_queues(struct hwq_s *hwq) static void eth_tx_queue_release(struct rte_eth_dev *eth_dev, uint16_t queue_id) { - struct pmd_internals *internals = (struct pmd_internals *)eth_dev->data->dev_private; + struct pmd_internals *internals = eth_dev->data->dev_private; struct ntnic_tx_queue *tx_q = &internals->txq_scg[queue_id]; deallocate_hw_virtio_queues(&tx_q->hwq); } static void eth_rx_queue_release(struct rte_eth_dev *eth_dev, uint16_t queue_id) { - struct pmd_internals *internals = (struct pmd_internals *)eth_dev->data->dev_private; + struct pmd_internals *internals = eth_dev->data->dev_private; struct ntnic_rx_queue *rx_q = &internals->rxq_scg[queue_id]; deallocate_hw_virtio_queues(&rx_q->hwq); } @@ -994,7 +994,7 @@ static int eth_rx_scg_queue_setup(struct rte_eth_dev *eth_dev, { NT_LOG_DBGX(DBG, NTNIC, "Rx queue setup"); struct rte_pktmbuf_pool_private *mbp_priv; - struct pmd_internals *internals = (struct pmd_internals *)eth_dev->data->dev_private; + struct pmd_internals *internals = eth_dev->data->dev_private; struct ntnic_rx_queue *rx_q = &internals->rxq_scg[rx_queue_id]; struct drv_s *p_drv = internals->p_drv; struct ntdrv_4ga_s *p_nt_drv = &p_drv->ntdrv; @@ -1062,7 +1062,7 @@ static int eth_tx_scg_queue_setup(struct rte_eth_dev *eth_dev, } NT_LOG_DBGX(DBG, NTNIC, "Tx queue setup"); - struct pmd_internals *internals = (struct pmd_internals *)eth_dev->data->dev_private; + struct pmd_internals *internals = eth_dev->data->dev_private; struct drv_s *p_drv = internals->p_drv; struct ntdrv_4ga_s *p_nt_drv = &p_drv->ntdrv; struct ntnic_tx_queue *tx_q = &internals->txq_scg[tx_queue_id]; @@ -1185,7 +1185,7 @@ eth_mac_addr_add(struct rte_eth_dev *eth_dev, if (index >= NUM_MAC_ADDRS_PER_PORT) { const struct pmd_internals *const internals = - (struct pmd_internals *)eth_dev->data->dev_private; + eth_dev->data->dev_private; NT_LOG_DBGX(DBG, NTNIC, "Port %i: illegal index %u (>= %u)", internals->n_intf_no, index, NUM_MAC_ADDRS_PER_PORT); return -1; @@ -1211,7 +1211,7 @@ eth_set_mc_addr_list(struct rte_eth_dev *eth_dev, struct rte_ether_addr *mc_addr_set, uint32_t nb_mc_addr) { - struct pmd_internals *const internals = (struct pmd_internals *)eth_dev->data->dev_private; + struct pmd_internals *const internals = eth_dev->data->dev_private; struct rte_ether_addr *const mc_addrs = internals->mc_addrs; size_t i; @@ -1252,7 +1252,7 @@ eth_dev_start(struct rte_eth_dev *eth_dev) return -1; } - struct pmd_internals *internals = (struct pmd_internals *)eth_dev->data->dev_private; + struct pmd_internals *internals = eth_dev->data->dev_private; const int n_intf_no = internals->n_intf_no; struct adapter_info_s *p_adapter_info = &internals->p_drv->ntdrv.adapter_info; @@ -1313,7 +1313,7 @@ eth_dev_start(struct rte_eth_dev *eth_dev) static int eth_dev_stop(struct rte_eth_dev *eth_dev) { - struct pmd_internals *internals = (struct pmd_internals *)eth_dev->data->dev_private; + struct pmd_internals *internals = eth_dev->data->dev_private; NT_LOG_DBGX(DBG, NTNIC, "Port %u", internals->n_intf_no); @@ -1341,7 +1341,7 @@ eth_dev_set_link_up(struct rte_eth_dev *eth_dev) return -1; } - struct pmd_internals *const internals = (struct pmd_internals *)eth_dev->data->dev_private; + struct pmd_internals *const internals = eth_dev->data->dev_private; struct adapter_info_s *p_adapter_info = &internals->p_drv->ntdrv.adapter_info; const int port = internals->n_intf_no; @@ -1367,7 +1367,7 @@ eth_dev_set_link_down(struct rte_eth_dev *eth_dev) return -1; } - struct pmd_internals *const internals = (struct pmd_internals *)eth_dev->data->dev_private; + struct pmd_internals *const internals = eth_dev->data->dev_private; struct adapter_info_s *p_adapter_info = &internals->p_drv->ntdrv.adapter_info; const int port = internals->n_intf_no; @@ -1440,7 +1440,7 @@ drv_deinit(struct drv_s *p_drv) static int eth_dev_close(struct rte_eth_dev *eth_dev) { - struct pmd_internals *internals = (struct pmd_internals *)eth_dev->data->dev_private; + struct pmd_internals *internals = eth_dev->data->dev_private; struct drv_s *p_drv = internals->p_drv; if (internals->type != PORT_TYPE_VIRTUAL) { @@ -1478,7 +1478,7 @@ eth_dev_close(struct rte_eth_dev *eth_dev) static int eth_fw_version_get(struct rte_eth_dev *eth_dev, char *fw_version, size_t fw_size) { - struct pmd_internals *internals = (struct pmd_internals *)eth_dev->data->dev_private; + struct pmd_internals *internals = eth_dev->data->dev_private; if (internals->type == PORT_TYPE_VIRTUAL || internals->type == PORT_TYPE_OVERRIDE) return 0; @@ -1506,7 +1506,7 @@ static int dev_flow_ops_get(struct rte_eth_dev *dev __rte_unused, const struct r static int eth_xstats_get(struct rte_eth_dev *eth_dev, struct rte_eth_xstat *stats, unsigned int n) { - struct pmd_internals *internals = (struct pmd_internals *)eth_dev->data->dev_private; + struct pmd_internals *internals = eth_dev->data->dev_private; struct drv_s *p_drv = internals->p_drv; ntdrv_4ga_t *p_nt_drv = &p_drv->ntdrv; nt4ga_stat_t *p_nt4ga_stat = &p_nt_drv->adapter_info.nt4ga_stat; @@ -1531,7 +1531,7 @@ static int eth_xstats_get_by_id(struct rte_eth_dev *eth_dev, uint64_t *values, unsigned int n) { - struct pmd_internals *internals = (struct pmd_internals *)eth_dev->data->dev_private; + struct pmd_internals *internals = eth_dev->data->dev_private; struct drv_s *p_drv = internals->p_drv; ntdrv_4ga_t *p_nt_drv = &p_drv->ntdrv; nt4ga_stat_t *p_nt4ga_stat = &p_nt_drv->adapter_info.nt4ga_stat; @@ -1554,7 +1554,7 @@ static int eth_xstats_get_by_id(struct rte_eth_dev *eth_dev, static int eth_xstats_reset(struct rte_eth_dev *eth_dev) { - struct pmd_internals *internals = (struct pmd_internals *)eth_dev->data->dev_private; + struct pmd_internals *internals = eth_dev->data->dev_private; struct drv_s *p_drv = internals->p_drv; ntdrv_4ga_t *p_nt_drv = &p_drv->ntdrv; nt4ga_stat_t *p_nt4ga_stat = &p_nt_drv->adapter_info.nt4ga_stat; @@ -1576,7 +1576,7 @@ static int eth_xstats_reset(struct rte_eth_dev *eth_dev) static int eth_xstats_get_names(struct rte_eth_dev *eth_dev, struct rte_eth_xstat_name *xstats_names, unsigned int size) { - struct pmd_internals *internals = (struct pmd_internals *)eth_dev->data->dev_private; + struct pmd_internals *internals = eth_dev->data->dev_private; struct drv_s *p_drv = internals->p_drv; ntdrv_4ga_t *p_nt_drv = &p_drv->ntdrv; nt4ga_stat_t *p_nt4ga_stat = &p_nt_drv->adapter_info.nt4ga_stat; @@ -1596,7 +1596,7 @@ static int eth_xstats_get_names_by_id(struct rte_eth_dev *eth_dev, struct rte_eth_xstat_name *xstats_names, unsigned int size) { - struct pmd_internals *internals = (struct pmd_internals *)eth_dev->data->dev_private; + struct pmd_internals *internals = eth_dev->data->dev_private; struct drv_s *p_drv = internals->p_drv; ntdrv_4ga_t *p_nt_drv = &p_drv->ntdrv; nt4ga_stat_t *p_nt4ga_stat = &p_nt_drv->adapter_info.nt4ga_stat; @@ -1627,7 +1627,7 @@ static int eth_dev_rss_hash_update(struct rte_eth_dev *eth_dev, struct rte_eth_r return -1; } - struct pmd_internals *internals = (struct pmd_internals *)eth_dev->data->dev_private; + struct pmd_internals *internals = eth_dev->data->dev_private; struct flow_nic_dev *ndev = internals->flw_dev->ndev; struct nt_eth_rss_conf tmp_rss_conf = { 0 }; @@ -1662,7 +1662,7 @@ static int eth_dev_rss_hash_update(struct rte_eth_dev *eth_dev, struct rte_eth_r static int rss_hash_conf_get(struct rte_eth_dev *eth_dev, struct rte_eth_rss_conf *rss_conf) { - struct pmd_internals *internals = (struct pmd_internals *)eth_dev->data->dev_private; + struct pmd_internals *internals = eth_dev->data->dev_private; struct flow_nic_dev *ndev = internals->flw_dev->ndev; rss_conf->algorithm = (enum rte_eth_hash_function)ndev->rss_conf.algorithm; @@ -1723,7 +1723,7 @@ static struct eth_dev_ops nthw_eth_dev_ops = { */ THREAD_FUNC port_event_thread_fn(void *context) { - struct pmd_internals *internals = (struct pmd_internals *)context; + struct pmd_internals *internals = context; struct drv_s *p_drv = internals->p_drv; ntdrv_4ga_t *p_nt_drv = &p_drv->ntdrv; struct adapter_info_s *p_adapter_info = &p_nt_drv->adapter_info; diff --git a/drivers/net/ntnic/ntnic_filter/ntnic_filter.c b/drivers/net/ntnic/ntnic_filter/ntnic_filter.c index 4c18088681..0e20606a41 100644 --- a/drivers/net/ntnic/ntnic_filter/ntnic_filter.c +++ b/drivers/net/ntnic/ntnic_filter/ntnic_filter.c @@ -491,7 +491,7 @@ static int convert_flow(struct rte_eth_dev *eth_dev, struct cnv_action_s *action, struct rte_flow_error *error) { - struct pmd_internals *internals = (struct pmd_internals *)eth_dev->data->dev_private; + struct pmd_internals *internals = eth_dev->data->dev_private; struct fpga_info_s *fpga_info = &internals->p_drv->ntdrv.adapter_info.fpga_info; static struct rte_flow_error flow_error = { @@ -554,7 +554,7 @@ eth_flow_destroy(struct rte_eth_dev *eth_dev, struct rte_flow *flow, struct rte_ return -1; } - struct pmd_internals *internals = (struct pmd_internals *)eth_dev->data->dev_private; + struct pmd_internals *internals = eth_dev->data->dev_private; static struct rte_flow_error flow_error = { .type = RTE_FLOW_ERROR_TYPE_NONE, .message = "none" }; @@ -595,7 +595,7 @@ static struct rte_flow *eth_flow_create(struct rte_eth_dev *eth_dev, return NULL; } - struct pmd_internals *internals = (struct pmd_internals *)eth_dev->data->dev_private; + struct pmd_internals *internals = eth_dev->data->dev_private; struct fpga_info_s *fpga_info = &internals->p_drv->ntdrv.adapter_info.fpga_info; @@ -673,7 +673,7 @@ static int eth_flow_flush(struct rte_eth_dev *eth_dev, struct rte_flow_error *er return -1; } - struct pmd_internals *internals = (struct pmd_internals *)eth_dev->data->dev_private; + struct pmd_internals *internals = eth_dev->data->dev_private; static struct rte_flow_error flow_error = { .type = RTE_FLOW_ERROR_TYPE_NONE, .message = "none" }; @@ -716,7 +716,7 @@ static int eth_flow_actions_update(struct rte_eth_dev *eth_dev, return -1; } - struct pmd_internals *internals = (struct pmd_internals *)eth_dev->data->dev_private; + struct pmd_internals *internals = eth_dev->data->dev_private; static struct rte_flow_error flow_error = { .type = RTE_FLOW_ERROR_TYPE_NONE, .message = "none" }; @@ -724,7 +724,7 @@ static int eth_flow_actions_update(struct rte_eth_dev *eth_dev, if (internals->flw_dev) { struct pmd_internals *dev_private = - (struct pmd_internals *)eth_dev->data->dev_private; + eth_dev->data->dev_private; struct fpga_info_s *fpga_info = &dev_private->p_drv->ntdrv.adapter_info.fpga_info; struct cnv_action_s action = { 0 }; @@ -780,7 +780,7 @@ static int eth_flow_dev_dump(struct rte_eth_dev *eth_dev, return -1; } - struct pmd_internals *internals = (struct pmd_internals *)eth_dev->data->dev_private; + struct pmd_internals *internals = eth_dev->data->dev_private; static struct rte_flow_error flow_error = { .type = RTE_FLOW_ERROR_TYPE_NONE, .message = "none" }; @@ -808,7 +808,7 @@ static int eth_flow_get_aged_flows(struct rte_eth_dev *eth_dev, return -1; } - struct pmd_internals *internals = (struct pmd_internals *)eth_dev->data->dev_private; + struct pmd_internals *internals = eth_dev->data->dev_private; static struct rte_flow_error flow_error = { .type = RTE_FLOW_ERROR_TYPE_NONE, -- 2.45.0