From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 25A3F5A73 for ; Wed, 8 Apr 2015 22:59:01 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP; 08 Apr 2015 13:59:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,545,1422950400"; d="scan'208";a="553097559" Received: from unknown (HELO rkwiles-desk.ger.corp.intel.com) ([10.255.41.10]) by orsmga003.jf.intel.com with ESMTP; 08 Apr 2015 13:58:59 -0700 From: Keith Wiles To: dev@dpdk.org Date: Wed, 8 Apr 2015 15:58:37 -0500 Message-Id: <1428526720-50221-2-git-send-email-keith.wiles@intel.com> X-Mailer: git-send-email 2.3.0 In-Reply-To: <1428526720-50221-1-git-send-email-keith.wiles@intel.com> References: <1428526720-50221-1-git-send-email-keith.wiles@intel.com> Subject: [dpdk-dev] [RFC PATCH 1/4] Rename of device types to be generic device names. X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2015 20:59:03 -0000 Rename the RTE_ETH_PCI, VIRTUAL, ... to be RTE_DEV_PCI, ... names. Signed-off-by: Keith Wiles --- app/test/test_link_bonding.c | 10 +++++----- app/test/virtual_pmd.c | 4 ++-- examples/link_status_interrupt/main.c | 6 +++--- lib/librte_pmd_af_packet/rte_eth_af_packet.c | 2 +- lib/librte_pmd_bond/rte_eth_bond_api.c | 6 +++--- lib/librte_pmd_bond/rte_eth_bond_pmd.c | 12 ++++++------ lib/librte_pmd_bond/rte_eth_bond_private.h | 2 +- lib/librte_pmd_e1000/em_ethdev.c | 8 ++++---- lib/librte_pmd_e1000/em_rxtx.c | 4 ++-- lib/librte_pmd_e1000/igb_ethdev.c | 2 +- lib/librte_pmd_i40e/i40e_ethdev.c | 4 ++-- lib/librte_pmd_ixgbe/ixgbe_ethdev.c | 2 +- lib/librte_pmd_mlx4/mlx4.c | 2 +- lib/librte_pmd_null/rte_eth_null.c | 2 +- lib/librte_pmd_pcap/rte_eth_pcap.c | 2 +- lib/librte_pmd_ring/rte_eth_ring.c | 2 +- lib/librte_pmd_virtio/virtio_ethdev.c | 2 +- lib/librte_pmd_xenvirt/rte_eth_xenvirt.c | 2 +- 18 files changed, 37 insertions(+), 37 deletions(-) diff --git a/app/test/test_link_bonding.c b/app/test/test_link_bonding.c index 8c24314..1e1bc01 100644 --- a/app/test/test_link_bonding.c +++ b/app/test/test_link_bonding.c @@ -1179,7 +1179,7 @@ int test_lsc_interrupt_count; static void test_bonding_lsc_event_callback(uint8_t port_id __rte_unused, - enum rte_eth_event_type type __rte_unused, void *param __rte_unused) + enum rte_dev_event_type type __rte_unused, void *param __rte_unused) { pthread_mutex_lock(&mutex); test_lsc_interrupt_count++; @@ -1231,7 +1231,7 @@ test_status_interrupt(void) /* register link status change interrupt callback */ rte_eth_dev_callback_register(test_params->bonded_port_id, - RTE_ETH_EVENT_INTR_LSC, test_bonding_lsc_event_callback, + RTE_DEV_EVENT_INTR_LSC, test_bonding_lsc_event_callback, &test_params->bonded_port_id); slave_count = rte_eth_bond_active_slaves_get(test_params->bonded_port_id, @@ -1298,7 +1298,7 @@ test_status_interrupt(void) /* unregister lsc callback before exiting */ rte_eth_dev_callback_unregister(test_params->bonded_port_id, - RTE_ETH_EVENT_INTR_LSC, test_bonding_lsc_event_callback, + RTE_DEV_EVENT_INTR_LSC, test_bonding_lsc_event_callback, &test_params->bonded_port_id); /* Clean up and remove slaves from bonded device */ @@ -2031,7 +2031,7 @@ test_roundrobin_verfiy_polling_slave_link_status_change(void) /* Register link status change interrupt callback */ rte_eth_dev_callback_register(test_params->bonded_port_id, - RTE_ETH_EVENT_INTR_LSC, test_bonding_lsc_event_callback, + RTE_DEV_EVENT_INTR_LSC, test_bonding_lsc_event_callback, &test_params->bonded_port_id); /* link status change callback for first slave link up */ @@ -2059,7 +2059,7 @@ test_roundrobin_verfiy_polling_slave_link_status_change(void) /* Un-Register link status change interrupt callback */ rte_eth_dev_callback_unregister(test_params->bonded_port_id, - RTE_ETH_EVENT_INTR_LSC, test_bonding_lsc_event_callback, + RTE_DEV_EVENT_INTR_LSC, test_bonding_lsc_event_callback, &test_params->bonded_port_id); diff --git a/app/test/virtual_pmd.c b/app/test/virtual_pmd.c index f163562..6143bfb 100644 --- a/app/test/virtual_pmd.c +++ b/app/test/virtual_pmd.c @@ -478,7 +478,7 @@ virtual_ethdev_simulate_link_status_interrupt(uint8_t port_id, vrtl_eth_dev->data->dev_link.link_status = link_status; - _rte_eth_dev_callback_process(vrtl_eth_dev, RTE_ETH_EVENT_INTR_LSC); + _rte_eth_dev_callback_process(vrtl_eth_dev, RTE_DEV_EVENT_INTR_LSC); } int @@ -580,7 +580,7 @@ virtual_ethdev_create(const char *name, struct ether_addr *mac_addr, goto err; /* reserve an ethdev entry */ - eth_dev = rte_eth_dev_allocate(name, RTE_ETH_DEV_PCI); + eth_dev = rte_eth_dev_allocate(name, RTE_DEV_PCI); if (eth_dev == NULL) goto err; diff --git a/examples/link_status_interrupt/main.c b/examples/link_status_interrupt/main.c index e6fb218..9e31028 100644 --- a/examples/link_status_interrupt/main.c +++ b/examples/link_status_interrupt/main.c @@ -516,14 +516,14 @@ lsi_parse_args(int argc, char **argv) * void. */ static void -lsi_event_callback(uint8_t port_id, enum rte_eth_event_type type, void *param) +lsi_event_callback(uint8_t port_id, enum rte_dev_event_type type, void *param) { struct rte_eth_link link; RTE_SET_USED(param); printf("\n\nIn registered callback...\n"); - printf("Event type: %s\n", type == RTE_ETH_EVENT_INTR_LSC ? "LSC interrupt" : "unknown event"); + printf("Event type: %s\n", type == RTE_DEV_EVENT_INTR_LSC ? "LSC interrupt" : "unknown event"); rte_eth_link_get_nowait(port_id, &link); if (link.link_status) { printf("Port %d Link Up - speed %u Mbps - %s\n\n", @@ -703,7 +703,7 @@ main(int argc, char **argv) * be registered will never be called. */ rte_eth_dev_callback_register(portid, - RTE_ETH_EVENT_INTR_LSC, lsi_event_callback, NULL); + RTE_DEV_EVENT_INTR_LSC, lsi_event_callback, NULL); rte_eth_macaddr_get(portid, &lsi_ports_eth_addr[portid]); diff --git a/lib/librte_pmd_af_packet/rte_eth_af_packet.c b/lib/librte_pmd_af_packet/rte_eth_af_packet.c index 2ac50ba..48059fd 100644 --- a/lib/librte_pmd_af_packet/rte_eth_af_packet.c +++ b/lib/librte_pmd_af_packet/rte_eth_af_packet.c @@ -650,7 +650,7 @@ rte_pmd_init_internals(const char *name, } /* reserve an ethdev entry */ - *eth_dev = rte_eth_dev_allocate(name, RTE_ETH_DEV_VIRTUAL); + *eth_dev = rte_eth_dev_allocate(name, RTE_DEV_VIRTUAL); if (*eth_dev == NULL) goto error; diff --git a/lib/librte_pmd_bond/rte_eth_bond_api.c b/lib/librte_pmd_bond/rte_eth_bond_api.c index 13f3941..8318d09 100644 --- a/lib/librte_pmd_bond/rte_eth_bond_api.c +++ b/lib/librte_pmd_bond/rte_eth_bond_api.c @@ -254,7 +254,7 @@ rte_eth_bond_create(const char *name, uint8_t mode, uint8_t socket_id) } /* reserve an ethdev entry */ - eth_dev = rte_eth_dev_allocate(name, RTE_ETH_DEV_VIRTUAL); + eth_dev = rte_eth_dev_allocate(name, RTE_DEV_VIRTUAL); if (eth_dev == NULL) { RTE_BOND_LOG(ERR, "Unable to allocate rte_eth_dev"); goto err; @@ -422,7 +422,7 @@ __eth_bond_slave_add_lock_free(uint8_t bonded_port_id, uint8_t slave_port_id) /* Register link status change callback with bonded device pointer as * argument*/ - rte_eth_dev_callback_register(slave_port_id, RTE_ETH_EVENT_INTR_LSC, + rte_eth_dev_callback_register(slave_port_id, RTE_DEV_EVENT_INTR_LSC, bond_ethdev_lsc_event_callback, &bonded_eth_dev->data->port_id); /* If bonded device is started then we can add the slave to our active @@ -498,7 +498,7 @@ __eth_bond_slave_remove_lock_free(uint8_t bonded_port_id, uint8_t slave_port_id) /* Un-register link status change callback with bonded device pointer as * argument*/ - rte_eth_dev_callback_unregister(slave_port_id, RTE_ETH_EVENT_INTR_LSC, + rte_eth_dev_callback_unregister(slave_port_id, RTE_DEV_EVENT_INTR_LSC, bond_ethdev_lsc_event_callback, &rte_eth_devices[bonded_port_id].data->port_id); diff --git a/lib/librte_pmd_bond/rte_eth_bond_pmd.c b/lib/librte_pmd_bond/rte_eth_bond_pmd.c index c937e6b..14f90cf 100644 --- a/lib/librte_pmd_bond/rte_eth_bond_pmd.c +++ b/lib/librte_pmd_bond/rte_eth_bond_pmd.c @@ -1681,7 +1681,7 @@ bond_ethdev_slave_link_status_change_monitor(void *cb_arg) slave_ethdev->data->dev_link.link_status; bond_ethdev_lsc_event_callback(internals->slaves[i].port_id, - RTE_ETH_EVENT_INTR_LSC, + RTE_DEV_EVENT_INTR_LSC, &bonded_ethdev->data->port_id); } } @@ -1829,11 +1829,11 @@ bond_ethdev_delayed_lsc_propagation(void *arg) return; _rte_eth_dev_callback_process((struct rte_eth_dev *)arg, - RTE_ETH_EVENT_INTR_LSC); + RTE_DEV_EVENT_INTR_LSC); } void -bond_ethdev_lsc_event_callback(uint8_t port_id, enum rte_eth_event_type type, +bond_ethdev_lsc_event_callback(uint8_t port_id, enum rte_dev_event_type type, void *param) { struct rte_eth_dev *bonded_eth_dev, *slave_eth_dev; @@ -1844,7 +1844,7 @@ bond_ethdev_lsc_event_callback(uint8_t port_id, enum rte_eth_event_type type, uint8_t active_pos; uint8_t lsc_flag = 0; - if (type != RTE_ETH_EVENT_INTR_LSC || param == NULL) + if (type != RTE_DEV_EVENT_INTR_LSC || param == NULL) return; bonded_eth_dev = &rte_eth_devices[*(uint8_t *)param]; @@ -1940,7 +1940,7 @@ bond_ethdev_lsc_event_callback(uint8_t port_id, enum rte_eth_event_type type, (void *)bonded_eth_dev); else _rte_eth_dev_callback_process(bonded_eth_dev, - RTE_ETH_EVENT_INTR_LSC); + RTE_DEV_EVENT_INTR_LSC); } else { if (internals->link_down_delay_ms > 0) @@ -1949,7 +1949,7 @@ bond_ethdev_lsc_event_callback(uint8_t port_id, enum rte_eth_event_type type, (void *)bonded_eth_dev); else _rte_eth_dev_callback_process(bonded_eth_dev, - RTE_ETH_EVENT_INTR_LSC); + RTE_DEV_EVENT_INTR_LSC); } } } diff --git a/lib/librte_pmd_bond/rte_eth_bond_private.h b/lib/librte_pmd_bond/rte_eth_bond_private.h index 45e5c65..f285518 100644 --- a/lib/librte_pmd_bond/rte_eth_bond_private.h +++ b/lib/librte_pmd_bond/rte_eth_bond_private.h @@ -244,7 +244,7 @@ bond_ethdev_primary_set(struct bond_dev_private *internals, uint8_t slave_port_id); void -bond_ethdev_lsc_event_callback(uint8_t port_id, enum rte_eth_event_type type, +bond_ethdev_lsc_event_callback(uint8_t port_id, enum rte_dev_event_type type, void *param); int diff --git a/lib/librte_pmd_e1000/em_ethdev.c b/lib/librte_pmd_e1000/em_ethdev.c index 76f45c9..ffdb888 100644 --- a/lib/librte_pmd_e1000/em_ethdev.c +++ b/lib/librte_pmd_e1000/em_ethdev.c @@ -226,8 +226,8 @@ eth_em_dev_init(struct rte_eth_dev *eth_dev) pci_dev = eth_dev->pci_dev; eth_dev->dev_ops = ð_em_ops; - eth_dev->rx_pkt_burst = (eth_rx_burst_t)ð_em_recv_pkts; - eth_dev->tx_pkt_burst = (eth_tx_burst_t)ð_em_xmit_pkts; + eth_dev->rx_pkt_burst = (dev_rx_burst_t)ð_em_recv_pkts; + eth_dev->tx_pkt_burst = (dev_tx_burst_t)ð_em_xmit_pkts; /* for secondary processes, we don't initialise any further as primary * has already done this work. Only check we don't need a different @@ -235,7 +235,7 @@ eth_em_dev_init(struct rte_eth_dev *eth_dev) if (rte_eal_process_type() != RTE_PROC_PRIMARY){ if (eth_dev->data->scattered_rx) eth_dev->rx_pkt_burst = - (eth_rx_burst_t)ð_em_recv_scattered_pkts; + (dev_rx_burst_t)ð_em_recv_scattered_pkts; return 0; } @@ -1340,7 +1340,7 @@ eth_em_interrupt_handler(__rte_unused struct rte_intr_handle *handle, eth_em_interrupt_get_status(dev); eth_em_interrupt_action(dev); - _rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC); + _rte_eth_dev_callback_process(dev, RTE_DEV_EVENT_INTR_LSC); } static int diff --git a/lib/librte_pmd_e1000/em_rxtx.c b/lib/librte_pmd_e1000/em_rxtx.c index 8e20920..09dae30 100644 --- a/lib/librte_pmd_e1000/em_rxtx.c +++ b/lib/librte_pmd_e1000/em_rxtx.c @@ -1663,7 +1663,7 @@ eth_em_rx_init(struct rte_eth_dev *dev) if (hw->mac.type == e1000_82573) E1000_WRITE_REG(hw, E1000_RDTR, 0x20); - dev->rx_pkt_burst = (eth_rx_burst_t)eth_em_recv_pkts; + dev->rx_pkt_burst = (dev_rx_burst_t)eth_em_recv_pkts; /* Determine RX bufsize. */ rctl_bsize = EM_MAX_BUF_SIZE; @@ -1732,7 +1732,7 @@ eth_em_rx_init(struct rte_eth_dev *dev) if (!dev->data->scattered_rx) PMD_INIT_LOG(DEBUG, "forcing scatter mode"); dev->rx_pkt_burst = - (eth_rx_burst_t)eth_em_recv_scattered_pkts; + (dev_rx_burst_t)eth_em_recv_scattered_pkts; dev->data->scattered_rx = 1; } } diff --git a/lib/librte_pmd_e1000/igb_ethdev.c b/lib/librte_pmd_e1000/igb_ethdev.c index b3892a5..736035d 100644 --- a/lib/librte_pmd_e1000/igb_ethdev.c +++ b/lib/librte_pmd_e1000/igb_ethdev.c @@ -1935,7 +1935,7 @@ eth_igb_interrupt_action(struct rte_eth_dev *dev) E1000_WRITE_REG(hw, E1000_TCTL, tctl); E1000_WRITE_REG(hw, E1000_RCTL, rctl); E1000_WRITE_FLUSH(hw); - _rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC); + _rte_eth_dev_callback_process(dev, RTE_DEV_EVENT_INTR_LSC); } return 0; diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c b/lib/librte_pmd_i40e/i40e_ethdev.c index 6b8f96e..6e765f6 100644 --- a/lib/librte_pmd_i40e/i40e_ethdev.c +++ b/lib/librte_pmd_i40e/i40e_ethdev.c @@ -3947,7 +3947,7 @@ i40e_dev_interrupt_delayed_handler(void *param) /* handle the link up interrupt in an alarm callback */ i40e_dev_link_update(dev, 0); - _rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC); + _rte_eth_dev_callback_process(dev, RTE_DEV_EVENT_INTR_LSC); i40e_pf_enable_irq0(hw); rte_intr_enable(&(dev->pci_dev->intr_handle)); @@ -4031,7 +4031,7 @@ i40e_dev_interrupt_handler(__rte_unused struct rte_intr_handle *handle, return; else _rte_eth_dev_callback_process(dev, - RTE_ETH_EVENT_INTR_LSC); + RTE_DEV_EVENT_INTR_LSC); } done: diff --git a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c index 5caee22..21e91c8 100644 --- a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c +++ b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c @@ -2406,7 +2406,7 @@ ixgbe_dev_interrupt_delayed_handler(void *param) ixgbe_dev_link_update(dev, 0); intr->flags &= ~IXGBE_FLAG_NEED_LINK_UPDATE; ixgbe_dev_link_status_print(dev); - _rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC); + _rte_eth_dev_callback_process(dev, RTE_DEV_EVENT_INTR_LSC); } PMD_DRV_LOG(DEBUG, "enable intr in delayed handler S[%08x]", eicr); diff --git a/lib/librte_pmd_mlx4/mlx4.c b/lib/librte_pmd_mlx4/mlx4.c index fa749f4..7a3ccae 100644 --- a/lib/librte_pmd_mlx4/mlx4.c +++ b/lib/librte_pmd_mlx4/mlx4.c @@ -4578,7 +4578,7 @@ mlx4_pci_devinit(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) snprintf(name, sizeof(name), "%s port %u", ibv_get_device_name(ibv_dev), port); - eth_dev = rte_eth_dev_allocate(name, RTE_ETH_DEV_PCI); + eth_dev = rte_eth_dev_allocate(name, RTE_DEV_PCI); } if (eth_dev == NULL) { ERROR("can not allocate rte ethdev"); diff --git a/lib/librte_pmd_null/rte_eth_null.c b/lib/librte_pmd_null/rte_eth_null.c index 0e18502..61382d2 100644 --- a/lib/librte_pmd_null/rte_eth_null.c +++ b/lib/librte_pmd_null/rte_eth_null.c @@ -412,7 +412,7 @@ eth_dev_null_create(const char *name, goto error; /* reserve an ethdev entry */ - eth_dev = rte_eth_dev_allocate(name, RTE_ETH_DEV_VIRTUAL); + eth_dev = rte_eth_dev_allocate(name, RTE_DEV_VIRTUAL); if (eth_dev == NULL) goto error; diff --git a/lib/librte_pmd_pcap/rte_eth_pcap.c b/lib/librte_pmd_pcap/rte_eth_pcap.c index 204ae68..e295510 100644 --- a/lib/librte_pmd_pcap/rte_eth_pcap.c +++ b/lib/librte_pmd_pcap/rte_eth_pcap.c @@ -716,7 +716,7 @@ rte_pmd_init_internals(const char *name, const unsigned nb_rx_queues, goto error; /* reserve an ethdev entry */ - *eth_dev = rte_eth_dev_allocate(name, RTE_ETH_DEV_VIRTUAL); + *eth_dev = rte_eth_dev_allocate(name, RTE_DEV_VIRTUAL); if (*eth_dev == NULL) goto error; diff --git a/lib/librte_pmd_ring/rte_eth_ring.c b/lib/librte_pmd_ring/rte_eth_ring.c index 1e66d4e..914792a 100644 --- a/lib/librte_pmd_ring/rte_eth_ring.c +++ b/lib/librte_pmd_ring/rte_eth_ring.c @@ -297,7 +297,7 @@ rte_eth_from_rings(const char *name, struct rte_ring *const rx_queues[], goto error; /* reserve an ethdev entry */ - eth_dev = rte_eth_dev_allocate(name, RTE_ETH_DEV_VIRTUAL); + eth_dev = rte_eth_dev_allocate(name, RTE_DEV_VIRTUAL); if (eth_dev == NULL) goto error; diff --git a/lib/librte_pmd_virtio/virtio_ethdev.c b/lib/librte_pmd_virtio/virtio_ethdev.c index 7b83d9b..a71dbf6 100644 --- a/lib/librte_pmd_virtio/virtio_ethdev.c +++ b/lib/librte_pmd_virtio/virtio_ethdev.c @@ -1092,7 +1092,7 @@ virtio_interrupt_handler(__rte_unused struct rte_intr_handle *handle, if (isr & VIRTIO_PCI_ISR_CONFIG) { if (virtio_dev_link_update(dev, 0) == 0) _rte_eth_dev_callback_process(dev, - RTE_ETH_EVENT_INTR_LSC); + RTE_DEV_EVENT_INTR_LSC); } } diff --git a/lib/librte_pmd_xenvirt/rte_eth_xenvirt.c b/lib/librte_pmd_xenvirt/rte_eth_xenvirt.c index bc403d6..a63e041 100644 --- a/lib/librte_pmd_xenvirt/rte_eth_xenvirt.c +++ b/lib/librte_pmd_xenvirt/rte_eth_xenvirt.c @@ -648,7 +648,7 @@ eth_dev_xenvirt_create(const char *name, const char *params, goto err; /* reserve an ethdev entry */ - eth_dev = rte_eth_dev_allocate(name, RTE_ETH_DEV_VIRTUAL); + eth_dev = rte_eth_dev_allocate(name, RTE_DEV_VIRTUAL); if (eth_dev == NULL) goto err; -- 2.3.0