From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 19C8DA046B for ; Mon, 24 Jun 2019 17:25:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 02F101BED9; Mon, 24 Jun 2019 17:25:57 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id E247F1BED9 for ; Mon, 24 Jun 2019 17:25:55 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 51E793086214; Mon, 24 Jun 2019 15:25:50 +0000 (UTC) Received: from rh.redhat.com (ovpn-116-250.ams2.redhat.com [10.36.116.250]) by smtp.corp.redhat.com (Postfix) with ESMTP id 17A3519C69; Mon, 24 Jun 2019 15:25:48 +0000 (UTC) From: Kevin Traynor To: Stephen Hemminger Cc: Lance Richardson , dpdk stable Date: Mon, 24 Jun 2019 16:24:28 +0100 Message-Id: <20190624152525.19349-4-ktraynor@redhat.com> In-Reply-To: <20190624152525.19349-1-ktraynor@redhat.com> References: <20190624152525.19349-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Mon, 24 Jun 2019 15:25:55 +0000 (UTC) Subject: [dpdk-stable] patch 'net/bnxt: remove unnecessary cast' has been queued to LTS release 18.11.3 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: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to LTS release 18.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/27/19. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/7f972e6ae72de89ca9cfd8170f0712dac9444f6b Thanks. Kevin Traynor --- >From 7f972e6ae72de89ca9cfd8170f0712dac9444f6b Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 29 May 2019 12:14:53 -0700 Subject: [PATCH] net/bnxt: remove unnecessary cast [ upstream commit 78466c95f8ad7ae7e01766c7b1040b1f464478fb ] The device private pointer (dev_private) is of type void * therefore no cast is necessary in C. Signed-off-by: Stephen Hemminger Acked-by: Lance Richardson --- drivers/net/bnxt/bnxt_ethdev.c | 86 ++++++++++++++++----------------- drivers/net/bnxt/bnxt_flow.c | 10 ++-- drivers/net/bnxt/bnxt_irq.c | 2 +- drivers/net/bnxt/bnxt_rxq.c | 6 +-- drivers/net/bnxt/bnxt_stats.c | 6 +-- drivers/net/bnxt/bnxt_txq.c | 2 +- drivers/net/bnxt/bnxt_txr.c | 4 +- drivers/net/bnxt/rte_pmd_bnxt.c | 32 ++++++------ 8 files changed, 74 insertions(+), 74 deletions(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 00d758650..22ee725ad 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -442,5 +442,5 @@ static void bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *dev_info) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; uint16_t max_vnics, i, j, vpool, vrxq; unsigned int max_rx_rings; @@ -538,5 +538,5 @@ found: static int bnxt_dev_configure_op(struct rte_eth_dev *eth_dev) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; uint64_t rx_offloads = eth_dev->data->dev_conf.rxmode.offloads; int rc; @@ -621,5 +621,5 @@ static void bnxt_print_link_info(struct rte_eth_dev *eth_dev) static int bnxt_dev_start_op(struct rte_eth_dev *eth_dev) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; uint64_t rx_offloads = eth_dev->data->dev_conf.rxmode.offloads; int vlan_mask = 0; @@ -659,5 +659,5 @@ error: static int bnxt_dev_set_link_up_op(struct rte_eth_dev *eth_dev) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; int rc = 0; @@ -673,5 +673,5 @@ static int bnxt_dev_set_link_up_op(struct rte_eth_dev *eth_dev) static int bnxt_dev_set_link_down_op(struct rte_eth_dev *eth_dev) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; eth_dev->data->dev_link.link_status = 0; @@ -685,5 +685,5 @@ static int bnxt_dev_set_link_down_op(struct rte_eth_dev *eth_dev) static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; bp->flags &= ~BNXT_FLAG_INIT_DONE; @@ -702,5 +702,5 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev) static void bnxt_dev_close_op(struct rte_eth_dev *eth_dev) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; if (bp->dev_stopped == 0) @@ -722,5 +722,5 @@ static void bnxt_mac_addr_remove_op(struct rte_eth_dev *eth_dev, uint32_t index) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; uint64_t pool_mask = eth_dev->data->mac_pool_sel[index]; struct bnxt_vnic_info *vnic; @@ -758,5 +758,5 @@ static int bnxt_mac_addr_add_op(struct rte_eth_dev *eth_dev, uint32_t index, uint32_t pool) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; struct bnxt_vnic_info *vnic = &bp->vnic_info[pool]; struct bnxt_filter_info *filter; @@ -793,5 +793,5 @@ int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_complete) { int rc = 0; - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; struct rte_eth_link new; unsigned int cnt = BNXT_LINK_WAIT_CNT; @@ -833,5 +833,5 @@ out: static void bnxt_promiscuous_enable_op(struct rte_eth_dev *eth_dev) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; struct bnxt_vnic_info *vnic; @@ -847,5 +847,5 @@ static void bnxt_promiscuous_enable_op(struct rte_eth_dev *eth_dev) static void bnxt_promiscuous_disable_op(struct rte_eth_dev *eth_dev) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; struct bnxt_vnic_info *vnic; @@ -861,5 +861,5 @@ static void bnxt_promiscuous_disable_op(struct rte_eth_dev *eth_dev) static void bnxt_allmulticast_enable_op(struct rte_eth_dev *eth_dev) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; struct bnxt_vnic_info *vnic; @@ -875,5 +875,5 @@ static void bnxt_allmulticast_enable_op(struct rte_eth_dev *eth_dev) static void bnxt_allmulticast_disable_op(struct rte_eth_dev *eth_dev) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; struct bnxt_vnic_info *vnic; @@ -913,5 +913,5 @@ static int bnxt_reta_update_op(struct rte_eth_dev *eth_dev, uint16_t reta_size) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; struct rte_eth_conf *dev_conf = &bp->eth_dev->data->dev_conf; struct bnxt_vnic_info *vnic = &bp->vnic_info[0]; @@ -960,5 +960,5 @@ static int bnxt_reta_query_op(struct rte_eth_dev *eth_dev, uint16_t reta_size) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; struct bnxt_vnic_info *vnic = &bp->vnic_info[0]; uint16_t tbl_size = HW_HASH_INDEX_SIZE; @@ -1001,5 +1001,5 @@ static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev, struct rte_eth_rss_conf *rss_conf) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; struct rte_eth_conf *dev_conf = &bp->eth_dev->data->dev_conf; struct bnxt_vnic_info *vnic; @@ -1057,5 +1057,5 @@ static int bnxt_rss_hash_conf_get_op(struct rte_eth_dev *eth_dev, struct rte_eth_rss_conf *rss_conf) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; struct bnxt_vnic_info *vnic = &bp->vnic_info[0]; int len; @@ -1115,5 +1115,5 @@ static int bnxt_flow_ctrl_get_op(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; struct rte_eth_link link_info; int rc; @@ -1147,5 +1147,5 @@ static int bnxt_flow_ctrl_set_op(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; if (!BNXT_SINGLE_PF(bp) || BNXT_VF(bp)) { @@ -1203,5 +1203,5 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev, struct rte_eth_udp_tunnel *udp_tunnel) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; uint16_t tunnel_type = 0; int rc = 0; @@ -1251,5 +1251,5 @@ bnxt_udp_tunnel_port_del_op(struct rte_eth_dev *eth_dev, struct rte_eth_udp_tunnel *udp_tunnel) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; uint16_t tunnel_type = 0; uint16_t port = 0; @@ -1451,5 +1451,5 @@ static int bnxt_vlan_filter_set_op(struct rte_eth_dev *eth_dev, uint16_t vlan_id, int on) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; /* These operations apply to ALL existing MAC/VLAN filters */ @@ -1463,5 +1463,5 @@ static int bnxt_vlan_offload_set_op(struct rte_eth_dev *dev, int mask) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; uint64_t rx_offloads = dev->data->dev_conf.rxmode.offloads; unsigned int i; @@ -1500,5 +1500,5 @@ static int bnxt_set_default_mac_addr_op(struct rte_eth_dev *dev, struct ether_addr *addr) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; /* Default Filter is tied to VNIC 0 */ struct bnxt_vnic_info *vnic = &bp->vnic_info[0]; @@ -1539,5 +1539,5 @@ bnxt_dev_set_mc_addr_list_op(struct rte_eth_dev *eth_dev, uint32_t nb_mc_addr) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; char *mc_addr_list = (char *)mc_addr_set; struct bnxt_vnic_info *vnic; @@ -1567,5 +1567,5 @@ static int bnxt_fw_version_get(struct rte_eth_dev *dev, char *fw_version, size_t fw_size) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; uint8_t fw_major = (bp->fw_ver >> 24) & 0xff; uint8_t fw_minor = (bp->fw_ver >> 16) & 0xff; @@ -1676,5 +1676,5 @@ static int bnxt_vlan_pvid_set_op(struct rte_eth_dev *dev, uint16_t pvid, int on) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; uint16_t vlan = bp->vlan; int rc; @@ -1696,5 +1696,5 @@ static int bnxt_dev_led_on_op(struct rte_eth_dev *dev) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; return bnxt_hwrm_port_led_cfg(bp, true); @@ -1704,5 +1704,5 @@ static int bnxt_dev_led_off_op(struct rte_eth_dev *dev) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; return bnxt_hwrm_port_led_cfg(bp, false); @@ -1896,5 +1896,5 @@ bnxt_ethertype_filter(struct rte_eth_dev *dev, void *arg) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; struct rte_eth_ethertype_filter *efilter = (struct rte_eth_ethertype_filter *)arg; @@ -2200,5 +2200,5 @@ bnxt_ntuple_filter(struct rte_eth_dev *dev, void *arg) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; int ret; @@ -2516,5 +2516,5 @@ bnxt_fdir_filter(struct rte_eth_dev *dev, void *arg) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; struct rte_eth_fdir_filter *fdir = (struct rte_eth_fdir_filter *)arg; struct bnxt_filter_info *filter, *match; @@ -2802,5 +2802,5 @@ bnxt_timesync_write_time(struct rte_eth_dev *dev, const struct timespec *ts) { uint64_t ns; - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; struct bnxt_ptp_cfg *ptp = bp->ptp_cfg; @@ -2819,5 +2819,5 @@ bnxt_timesync_read_time(struct rte_eth_dev *dev, struct timespec *ts) { uint64_t ns, systime_cycles; - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; struct bnxt_ptp_cfg *ptp = bp->ptp_cfg; @@ -2834,5 +2834,5 @@ static int bnxt_timesync_enable(struct rte_eth_dev *dev) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; struct bnxt_ptp_cfg *ptp = bp->ptp_cfg; uint32_t shift = 0; @@ -2870,5 +2870,5 @@ static int bnxt_timesync_disable(struct rte_eth_dev *dev) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; struct bnxt_ptp_cfg *ptp = bp->ptp_cfg; @@ -2892,5 +2892,5 @@ bnxt_timesync_read_rx_timestamp(struct rte_eth_dev *dev, uint32_t flags __rte_unused) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; struct bnxt_ptp_cfg *ptp = bp->ptp_cfg; uint64_t rx_tstamp_cycles = 0; @@ -2910,5 +2910,5 @@ bnxt_timesync_read_tx_timestamp(struct rte_eth_dev *dev, struct timespec *timestamp) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; struct bnxt_ptp_cfg *ptp = bp->ptp_cfg; uint64_t tx_tstamp_cycles = 0; @@ -2928,5 +2928,5 @@ static int bnxt_timesync_adjust_time(struct rte_eth_dev *dev, int64_t delta) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; struct bnxt_ptp_cfg *ptp = bp->ptp_cfg; @@ -2942,5 +2942,5 @@ static int bnxt_get_eeprom_length_op(struct rte_eth_dev *dev) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; int rc; uint32_t dir_entries; @@ -2962,5 +2962,5 @@ bnxt_get_eeprom_op(struct rte_eth_dev *dev, struct rte_dev_eeprom_info *in_eeprom) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; uint32_t index; uint32_t offset; @@ -3033,5 +3033,5 @@ bnxt_set_eeprom_op(struct rte_eth_dev *dev, struct rte_dev_eeprom_info *in_eeprom) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; uint8_t index, dir_op; uint16_t type, ext, ordinal, attr; diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c index 1afe67407..6a5995389 100644 --- a/drivers/net/bnxt/bnxt_flow.c +++ b/drivers/net/bnxt/bnxt_flow.c @@ -716,5 +716,5 @@ bnxt_validate_and_parse_flow(struct rte_eth_dev *dev, const struct rte_flow_action *act = bnxt_flow_non_void_action(actions); - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; const struct rte_flow_action_queue *act_q; const struct rte_flow_action_vf *act_vf; @@ -901,5 +901,5 @@ bnxt_flow_validate(struct rte_eth_dev *dev, struct rte_flow_error *error) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; struct bnxt_filter_info *filter; int ret = 0; @@ -999,5 +999,5 @@ bnxt_flow_create(struct rte_eth_dev *dev, struct rte_flow_error *error) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; struct bnxt_filter_info *filter; struct bnxt_vnic_info *vnic = NULL; @@ -1100,5 +1100,5 @@ bnxt_flow_destroy(struct rte_eth_dev *dev, struct rte_flow_error *error) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; struct bnxt_filter_info *filter = flow->filter; struct bnxt_vnic_info *vnic = flow->vnic; @@ -1129,5 +1129,5 @@ static int bnxt_flow_flush(struct rte_eth_dev *dev, struct rte_flow_error *error) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; struct bnxt_vnic_info *vnic; struct rte_flow *flow; diff --git a/drivers/net/bnxt/bnxt_irq.c b/drivers/net/bnxt/bnxt_irq.c index 7ef7023eb..e03766b41 100644 --- a/drivers/net/bnxt/bnxt_irq.c +++ b/drivers/net/bnxt/bnxt_irq.c @@ -21,5 +21,5 @@ static void bnxt_int_handler(void *param) { struct rte_eth_dev *eth_dev = (struct rte_eth_dev *)param; - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; struct bnxt_cp_ring_info *cpr = bp->def_cp_ring; struct cmpl_base *cmp; diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c index 17e2909a7..efd5f947e 100644 --- a/drivers/net/bnxt/bnxt_rxq.c +++ b/drivers/net/bnxt/bnxt_rxq.c @@ -289,5 +289,5 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev, struct rte_mempool *mp) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; uint64_t rx_offloads = eth_dev->data->dev_conf.rxmode.offloads; struct bnxt_rx_queue *rxq; @@ -400,5 +400,5 @@ bnxt_rx_queue_intr_disable_op(struct rte_eth_dev *eth_dev, uint16_t queue_id) int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; struct rte_eth_conf *dev_conf = &bp->eth_dev->data->dev_conf; struct bnxt_rx_queue *rxq = bp->rx_queues[rx_queue_id]; @@ -440,5 +440,5 @@ int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id) int bnxt_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; struct rte_eth_conf *dev_conf = &bp->eth_dev->data->dev_conf; struct bnxt_vnic_info *vnic = NULL; diff --git a/drivers/net/bnxt/bnxt_stats.c b/drivers/net/bnxt/bnxt_stats.c index c16bf99da..77f855d48 100644 --- a/drivers/net/bnxt/bnxt_stats.c +++ b/drivers/net/bnxt/bnxt_stats.c @@ -387,5 +387,5 @@ int bnxt_stats_get_op(struct rte_eth_dev *eth_dev, void bnxt_stats_reset_op(struct rte_eth_dev *eth_dev) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; unsigned int i; @@ -406,5 +406,5 @@ int bnxt_dev_xstats_get_op(struct rte_eth_dev *eth_dev, struct rte_eth_xstat *xstats, unsigned int n) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; unsigned int count, i; @@ -537,5 +537,5 @@ int bnxt_dev_xstats_get_names_op(__rte_unused struct rte_eth_dev *eth_dev, void bnxt_dev_xstats_reset_op(struct rte_eth_dev *eth_dev) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; if (bp->flags & BNXT_FLAG_PORT_STATS && BNXT_SINGLE_PF(bp)) diff --git a/drivers/net/bnxt/bnxt_txq.c b/drivers/net/bnxt/bnxt_txq.c index b9b975e4c..d6b93b44a 100644 --- a/drivers/net/bnxt/bnxt_txq.c +++ b/drivers/net/bnxt/bnxt_txq.c @@ -80,5 +80,5 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev, const struct rte_eth_txconf *tx_conf) { - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; + struct bnxt *bp = eth_dev->data->dev_private; struct bnxt_tx_queue *txq; int rc = 0; diff --git a/drivers/net/bnxt/bnxt_txr.c b/drivers/net/bnxt/bnxt_txr.c index 82ab46501..95272c999 100644 --- a/drivers/net/bnxt/bnxt_txr.c +++ b/drivers/net/bnxt/bnxt_txr.c @@ -445,5 +445,5 @@ uint16_t bnxt_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, int bnxt_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; struct bnxt_tx_queue *txq = bp->tx_queues[tx_queue_id]; @@ -457,5 +457,5 @@ int bnxt_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id) int bnxt_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id) { - struct bnxt *bp = (struct bnxt *)dev->data->dev_private; + struct bnxt *bp = dev->data->dev_private; struct bnxt_tx_queue *txq = bp->tx_queues[tx_queue_id]; diff --git a/drivers/net/bnxt/rte_pmd_bnxt.c b/drivers/net/bnxt/rte_pmd_bnxt.c index c298de83c..56a58a2f8 100644 --- a/drivers/net/bnxt/rte_pmd_bnxt.c +++ b/drivers/net/bnxt/rte_pmd_bnxt.c @@ -55,5 +55,5 @@ int rte_pmd_bnxt_set_tx_loopback(uint16_t port, uint8_t on) return -ENOTSUP; - bp = (struct bnxt *)eth_dev->data->dev_private; + bp = eth_dev->data->dev_private; if (!BNXT_PF(bp)) { @@ -97,5 +97,5 @@ int rte_pmd_bnxt_set_all_queues_drop_en(uint16_t port, uint8_t on) return -ENOTSUP; - bp = (struct bnxt *)eth_dev->data->dev_private; + bp = eth_dev->data->dev_private; if (!BNXT_PF(bp)) { @@ -147,5 +147,5 @@ int rte_pmd_bnxt_set_vf_mac_addr(uint16_t port, uint16_t vf, rte_eth_dev_info_get(port, &dev_info); - bp = (struct bnxt *)dev->data->dev_private; + bp = dev->data->dev_private; if (vf >= dev_info.max_vfs || mac_addr == NULL) @@ -181,5 +181,5 @@ int rte_pmd_bnxt_set_vf_rate_limit(uint16_t port, uint16_t vf, rte_eth_dev_info_get(port, &dev_info); - bp = (struct bnxt *)eth_dev->data->dev_private; + bp = eth_dev->data->dev_private; if (!bp->pf.active_vfs) @@ -232,5 +232,5 @@ int rte_pmd_bnxt_set_vf_mac_anti_spoof(uint16_t port, uint16_t vf, uint8_t on) rte_eth_dev_info_get(port, &dev_info); - bp = (struct bnxt *)dev->data->dev_private; + bp = dev->data->dev_private; if (!BNXT_PF(bp)) { @@ -284,5 +284,5 @@ int rte_pmd_bnxt_set_vf_vlan_anti_spoof(uint16_t port, uint16_t vf, uint8_t on) rte_eth_dev_info_get(port, &dev_info); - bp = (struct bnxt *)dev->data->dev_private; + bp = dev->data->dev_private; if (!BNXT_PF(bp)) { @@ -334,5 +334,5 @@ rte_pmd_bnxt_set_vf_vlan_stripq(uint16_t port, uint16_t vf, uint8_t on) rte_eth_dev_info_get(port, &dev_info); - bp = (struct bnxt *)dev->data->dev_private; + bp = dev->data->dev_private; if (vf >= dev_info.max_vfs) @@ -371,5 +371,5 @@ int rte_pmd_bnxt_set_vf_rxmode(uint16_t port, uint16_t vf, rte_eth_dev_info_get(port, &dev_info); - bp = (struct bnxt *)dev->data->dev_private; + bp = dev->data->dev_private; if (!bp->pf.vf_info) @@ -463,5 +463,5 @@ int rte_pmd_bnxt_set_vf_vlan_filter(uint16_t port, uint16_t vlan, return -ENOTSUP; - bp = (struct bnxt *)dev->data->dev_private; + bp = dev->data->dev_private; if (!bp->pf.vf_info) return -EINVAL; @@ -552,5 +552,5 @@ int rte_pmd_bnxt_get_vf_stats(uint16_t port, rte_eth_dev_info_get(port, &dev_info); - bp = (struct bnxt *)dev->data->dev_private; + bp = dev->data->dev_private; if (vf_id >= dev_info.max_vfs) @@ -579,5 +579,5 @@ int rte_pmd_bnxt_reset_vf_stats(uint16_t port, rte_eth_dev_info_get(port, &dev_info); - bp = (struct bnxt *)dev->data->dev_private; + bp = dev->data->dev_private; if (vf_id >= dev_info.max_vfs) @@ -605,5 +605,5 @@ int rte_pmd_bnxt_get_vf_rx_status(uint16_t port, uint16_t vf_id) rte_eth_dev_info_get(port, &dev_info); - bp = (struct bnxt *)dev->data->dev_private; + bp = dev->data->dev_private; if (vf_id >= dev_info.max_vfs) @@ -632,5 +632,5 @@ int rte_pmd_bnxt_get_vf_tx_drop_count(uint16_t port, uint16_t vf_id, rte_eth_dev_info_get(port, &dev_info); - bp = (struct bnxt *)dev->data->dev_private; + bp = dev->data->dev_private; if (vf_id >= dev_info.max_vfs) @@ -664,5 +664,5 @@ int rte_pmd_bnxt_mac_addr_add(uint16_t port, struct ether_addr *addr, rte_eth_dev_info_get(port, &dev_info); - bp = (struct bnxt *)dev->data->dev_private; + bp = dev->data->dev_private; if (vf_id >= dev_info.max_vfs) @@ -740,5 +740,5 @@ rte_pmd_bnxt_set_vf_vlan_insert(uint16_t port, uint16_t vf, rte_eth_dev_info_get(port, &dev_info); - bp = (struct bnxt *)dev->data->dev_private; + bp = dev->data->dev_private; if (vf >= dev_info.max_vfs) @@ -777,5 +777,5 @@ int rte_pmd_bnxt_set_vf_persist_stats(uint16_t port, uint16_t vf, uint8_t on) dev = &rte_eth_devices[port]; rte_eth_dev_info_get(port, &dev_info); - bp = (struct bnxt *)dev->data->dev_private; + bp = dev->data->dev_private; if (!BNXT_PF(bp)) { -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-06-24 16:18:55.307486895 +0100 +++ 0004-net-bnxt-remove-unnecessary-cast.patch 2019-06-24 16:18:54.937433442 +0100 @@ -1 +1 @@ -From 78466c95f8ad7ae7e01766c7b1040b1f464478fb Mon Sep 17 00:00:00 2001 +From 7f972e6ae72de89ca9cfd8170f0712dac9444f6b Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 78466c95f8ad7ae7e01766c7b1040b1f464478fb ] + @@ -9,2 +10,0 @@ -Cc: stable@dpdk.org - @@ -25 +25 @@ -index b5ed0536c..61ae799e0 100644 +index 00d758650..22ee725ad 100644 @@ -42 +42 @@ -@@ -702,5 +702,5 @@ bnxt_transmit_function(__rte_unused struct rte_eth_dev *eth_dev) +@@ -621,5 +621,5 @@ static void bnxt_print_link_info(struct rte_eth_dev *eth_dev) @@ -49 +49 @@ -@@ -744,5 +744,5 @@ error: +@@ -659,5 +659,5 @@ error: @@ -56 +56 @@ -@@ -758,5 +758,5 @@ static int bnxt_dev_set_link_up_op(struct rte_eth_dev *eth_dev) +@@ -673,5 +673,5 @@ static int bnxt_dev_set_link_up_op(struct rte_eth_dev *eth_dev) @@ -63 +63 @@ -@@ -770,5 +770,5 @@ static int bnxt_dev_set_link_down_op(struct rte_eth_dev *eth_dev) +@@ -685,5 +685,5 @@ static int bnxt_dev_set_link_down_op(struct rte_eth_dev *eth_dev) @@ -70 +70 @@ -@@ -787,5 +787,5 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev) +@@ -702,5 +702,5 @@ static void bnxt_dev_stop_op(struct rte_eth_dev *eth_dev) @@ -77 +77 @@ -@@ -807,5 +807,5 @@ static void bnxt_mac_addr_remove_op(struct rte_eth_dev *eth_dev, +@@ -722,5 +722,5 @@ static void bnxt_mac_addr_remove_op(struct rte_eth_dev *eth_dev, @@ -84 +84 @@ -@@ -843,5 +843,5 @@ static int bnxt_mac_addr_add_op(struct rte_eth_dev *eth_dev, +@@ -758,5 +758,5 @@ static int bnxt_mac_addr_add_op(struct rte_eth_dev *eth_dev, @@ -91 +91 @@ -@@ -878,5 +878,5 @@ int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_complete) +@@ -793,5 +793,5 @@ int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_complete) @@ -98 +98 @@ -@@ -918,5 +918,5 @@ out: +@@ -833,5 +833,5 @@ out: @@ -105 +105 @@ -@@ -932,5 +932,5 @@ static void bnxt_promiscuous_enable_op(struct rte_eth_dev *eth_dev) +@@ -847,5 +847,5 @@ static void bnxt_promiscuous_enable_op(struct rte_eth_dev *eth_dev) @@ -112 +112 @@ -@@ -946,5 +946,5 @@ static void bnxt_promiscuous_disable_op(struct rte_eth_dev *eth_dev) +@@ -861,5 +861,5 @@ static void bnxt_promiscuous_disable_op(struct rte_eth_dev *eth_dev) @@ -119 +119 @@ -@@ -960,5 +960,5 @@ static void bnxt_allmulticast_enable_op(struct rte_eth_dev *eth_dev) +@@ -875,5 +875,5 @@ static void bnxt_allmulticast_enable_op(struct rte_eth_dev *eth_dev) @@ -126 +126 @@ -@@ -998,5 +998,5 @@ static int bnxt_reta_update_op(struct rte_eth_dev *eth_dev, +@@ -913,5 +913,5 @@ static int bnxt_reta_update_op(struct rte_eth_dev *eth_dev, @@ -133 +133 @@ -@@ -1045,5 +1045,5 @@ static int bnxt_reta_query_op(struct rte_eth_dev *eth_dev, +@@ -960,5 +960,5 @@ static int bnxt_reta_query_op(struct rte_eth_dev *eth_dev, @@ -140 +140 @@ -@@ -1086,5 +1086,5 @@ static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev, +@@ -1001,5 +1001,5 @@ static int bnxt_rss_hash_update_op(struct rte_eth_dev *eth_dev, @@ -147 +147 @@ -@@ -1142,5 +1142,5 @@ static int bnxt_rss_hash_conf_get_op(struct rte_eth_dev *eth_dev, +@@ -1057,5 +1057,5 @@ static int bnxt_rss_hash_conf_get_op(struct rte_eth_dev *eth_dev, @@ -154 +154 @@ -@@ -1200,5 +1200,5 @@ static int bnxt_flow_ctrl_get_op(struct rte_eth_dev *dev, +@@ -1115,5 +1115,5 @@ static int bnxt_flow_ctrl_get_op(struct rte_eth_dev *dev, @@ -161 +161 @@ -@@ -1232,5 +1232,5 @@ static int bnxt_flow_ctrl_set_op(struct rte_eth_dev *dev, +@@ -1147,5 +1147,5 @@ static int bnxt_flow_ctrl_set_op(struct rte_eth_dev *dev, @@ -168 +168 @@ -@@ -1288,5 +1288,5 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev, +@@ -1203,5 +1203,5 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev, @@ -175 +175 @@ -@@ -1336,5 +1336,5 @@ bnxt_udp_tunnel_port_del_op(struct rte_eth_dev *eth_dev, +@@ -1251,5 +1251,5 @@ bnxt_udp_tunnel_port_del_op(struct rte_eth_dev *eth_dev, @@ -182 +182 @@ -@@ -1536,5 +1536,5 @@ static int bnxt_vlan_filter_set_op(struct rte_eth_dev *eth_dev, +@@ -1451,5 +1451,5 @@ static int bnxt_vlan_filter_set_op(struct rte_eth_dev *eth_dev, @@ -189 +189 @@ -@@ -1548,5 +1548,5 @@ static int +@@ -1463,5 +1463,5 @@ static int @@ -196,2 +196,2 @@ -@@ -1586,5 +1586,5 @@ bnxt_set_default_mac_addr_op(struct rte_eth_dev *dev, - struct rte_ether_addr *addr) +@@ -1500,5 +1500,5 @@ static int + bnxt_set_default_mac_addr_op(struct rte_eth_dev *dev, struct ether_addr *addr) @@ -203 +203 @@ -@@ -1625,5 +1625,5 @@ bnxt_dev_set_mc_addr_list_op(struct rte_eth_dev *eth_dev, +@@ -1539,5 +1539,5 @@ bnxt_dev_set_mc_addr_list_op(struct rte_eth_dev *eth_dev, @@ -210 +210 @@ -@@ -1654,5 +1654,5 @@ static int +@@ -1567,5 +1567,5 @@ static int @@ -217 +217 @@ -@@ -1783,5 +1783,5 @@ static int +@@ -1676,5 +1676,5 @@ static int @@ -224 +224 @@ -@@ -1803,5 +1803,5 @@ static int +@@ -1696,5 +1696,5 @@ static int @@ -231 +231 @@ -@@ -1811,5 +1811,5 @@ static int +@@ -1704,5 +1704,5 @@ static int @@ -238 +238 @@ -@@ -2003,5 +2003,5 @@ bnxt_ethertype_filter(struct rte_eth_dev *dev, +@@ -1896,5 +1896,5 @@ bnxt_ethertype_filter(struct rte_eth_dev *dev, @@ -245 +245 @@ -@@ -2307,5 +2307,5 @@ bnxt_ntuple_filter(struct rte_eth_dev *dev, +@@ -2200,5 +2200,5 @@ bnxt_ntuple_filter(struct rte_eth_dev *dev, @@ -252 +252 @@ -@@ -2624,5 +2624,5 @@ bnxt_fdir_filter(struct rte_eth_dev *dev, +@@ -2516,5 +2516,5 @@ bnxt_fdir_filter(struct rte_eth_dev *dev, @@ -259 +259 @@ -@@ -2911,5 +2911,5 @@ bnxt_timesync_write_time(struct rte_eth_dev *dev, const struct timespec *ts) +@@ -2802,5 +2802,5 @@ bnxt_timesync_write_time(struct rte_eth_dev *dev, const struct timespec *ts) @@ -266 +266 @@ -@@ -2928,5 +2928,5 @@ bnxt_timesync_read_time(struct rte_eth_dev *dev, struct timespec *ts) +@@ -2819,5 +2819,5 @@ bnxt_timesync_read_time(struct rte_eth_dev *dev, struct timespec *ts) @@ -273 +273 @@ -@@ -2943,5 +2943,5 @@ static int +@@ -2834,5 +2834,5 @@ static int @@ -280 +280 @@ -@@ -2979,5 +2979,5 @@ static int +@@ -2870,5 +2870,5 @@ static int @@ -287 +287 @@ -@@ -3001,5 +3001,5 @@ bnxt_timesync_read_rx_timestamp(struct rte_eth_dev *dev, +@@ -2892,5 +2892,5 @@ bnxt_timesync_read_rx_timestamp(struct rte_eth_dev *dev, @@ -294 +294 @@ -@@ -3019,5 +3019,5 @@ bnxt_timesync_read_tx_timestamp(struct rte_eth_dev *dev, +@@ -2910,5 +2910,5 @@ bnxt_timesync_read_tx_timestamp(struct rte_eth_dev *dev, @@ -301 +301 @@ -@@ -3037,5 +3037,5 @@ static int +@@ -2928,5 +2928,5 @@ static int @@ -308 +308 @@ -@@ -3051,5 +3051,5 @@ static int +@@ -2942,5 +2942,5 @@ static int @@ -315 +315 @@ -@@ -3071,5 +3071,5 @@ bnxt_get_eeprom_op(struct rte_eth_dev *dev, +@@ -2962,5 +2962,5 @@ bnxt_get_eeprom_op(struct rte_eth_dev *dev, @@ -322 +322 @@ -@@ -3142,5 +3142,5 @@ bnxt_set_eeprom_op(struct rte_eth_dev *dev, +@@ -3033,5 +3033,5 @@ bnxt_set_eeprom_op(struct rte_eth_dev *dev, @@ -330 +330 @@ -index bb7f672fc..6f92e3de5 100644 +index 1afe67407..6a5995389 100644 @@ -347 +347 @@ -@@ -1000,5 +1000,5 @@ bnxt_flow_create(struct rte_eth_dev *dev, +@@ -999,5 +999,5 @@ bnxt_flow_create(struct rte_eth_dev *dev, @@ -354 +354 @@ -@@ -1101,5 +1101,5 @@ bnxt_flow_destroy(struct rte_eth_dev *dev, +@@ -1100,5 +1100,5 @@ bnxt_flow_destroy(struct rte_eth_dev *dev, @@ -361 +361 @@ -@@ -1130,5 +1130,5 @@ static int +@@ -1129,5 +1129,5 @@ static int @@ -380 +380 @@ -index 2ce2ef427..31ab38f1f 100644 +index 17e2909a7..efd5f947e 100644 @@ -390 +390 @@ -@@ -405,5 +405,5 @@ bnxt_rx_queue_intr_disable_op(struct rte_eth_dev *eth_dev, uint16_t queue_id) +@@ -400,5 +400,5 @@ bnxt_rx_queue_intr_disable_op(struct rte_eth_dev *eth_dev, uint16_t queue_id) @@ -397 +397 @@ -@@ -445,5 +445,5 @@ int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id) +@@ -440,5 +440,5 @@ int bnxt_rx_queue_start(struct rte_eth_dev *dev, uint16_t rx_queue_id) @@ -405 +405 @@ -index cae3b9ea2..ad2888774 100644 +index c16bf99da..77f855d48 100644 @@ -408 +408 @@ -@@ -388,5 +388,5 @@ int bnxt_stats_get_op(struct rte_eth_dev *eth_dev, +@@ -387,5 +387,5 @@ int bnxt_stats_get_op(struct rte_eth_dev *eth_dev, @@ -415 +415 @@ -@@ -407,5 +407,5 @@ int bnxt_dev_xstats_get_op(struct rte_eth_dev *eth_dev, +@@ -406,5 +406,5 @@ int bnxt_dev_xstats_get_op(struct rte_eth_dev *eth_dev, @@ -422 +422 @@ -@@ -533,5 +533,5 @@ int bnxt_dev_xstats_get_names_op(__rte_unused struct rte_eth_dev *eth_dev, +@@ -537,5 +537,5 @@ int bnxt_dev_xstats_get_names_op(__rte_unused struct rte_eth_dev *eth_dev, @@ -430 +430 @@ -index 5a7bfaf3e..665bfbc12 100644 +index b9b975e4c..d6b93b44a 100644 @@ -433 +433 @@ -@@ -81,5 +81,5 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev, +@@ -80,5 +80,5 @@ int bnxt_tx_queue_setup_op(struct rte_eth_dev *eth_dev, @@ -441 +441 @@ -index 16598ba63..5018c299a 100644 +index 82ab46501..95272c999 100644 @@ -444 +444 @@ -@@ -461,5 +461,5 @@ uint16_t bnxt_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, +@@ -445,5 +445,5 @@ uint16_t bnxt_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, @@ -451 +451 @@ -@@ -473,5 +473,5 @@ int bnxt_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id) +@@ -457,5 +457,5 @@ int bnxt_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id) @@ -459 +459 @@ -index f07789670..fbd2dd493 100644 +index c298de83c..56a58a2f8 100644 @@ -553 +553 @@ -@@ -664,5 +664,5 @@ int rte_pmd_bnxt_mac_addr_add(uint16_t port, struct rte_ether_addr *addr, +@@ -664,5 +664,5 @@ int rte_pmd_bnxt_mac_addr_add(uint16_t port, struct ether_addr *addr,