* [dpdk-dev] [PATCH 0/9] clean deprecated code @ 2015-09-01 20:18 Thomas Monjalon 2015-09-01 21:30 ` [dpdk-dev] [PATCH 1/9] ethdev: remove Rx interrupt switch Thomas Monjalon ` (11 more replies) 0 siblings, 12 replies; 29+ messages in thread From: Thomas Monjalon @ 2015-09-01 20:18 UTC (permalink / raw) To: dev Before starting a new integration cycle (2.2.0-rc0), the deprecated code is removed. The hash library is not cleaned in this patchset and would be better done by its maintainers. Bruce, Pablo, please check the file doc/guides/rel_notes/deprecation.rst. Stephen Hemminger (2): kni: remove deprecated functions ring: remove deprecated functions Thomas Monjalon (7): ethdev: remove Rx interrupt switch mbuf: remove packet type from offload flags ethdev: remove SCTP flow entries switch eal: remove deprecated function mem: remove dummy malloc library lpm: remove deprecated field acl: remove old API MAINTAINERS | 1 - app/test-acl/main.c | 17 ++ app/test-pipeline/pipeline_hash.c | 12 - app/test-pmd/cmdline.c | 4 - app/test-pmd/csumonly.c | 14 - app/test-pmd/rxonly.c | 16 -- app/test/Makefile | 6 - app/test/packet_burst_generator.c | 12 - app/test/test_acl.c | 194 ++++++++++++++ app/test/test_acl.h | 59 +++++ app/test/test_func_reentrancy.c | 4 +- app/test/test_kni.c | 36 --- app/test/test_lpm.c | 4 +- doc/guides/prog_guide/dev_kit_build_system.rst | 2 +- doc/guides/prog_guide/env_abstraction_layer.rst | 2 +- doc/guides/prog_guide/kernel_nic_interface.rst | 2 - doc/guides/prog_guide/source_org.rst | 1 - .../thread_safety_intel_dpdk_functions.rst | 2 +- doc/guides/rel_notes/deprecation.rst | 33 --- doc/guides/sample_app_ug/kernel_nic_interface.rst | 9 - drivers/net/cxgbe/sge.c | 16 -- drivers/net/e1000/igb_ethdev.c | 26 -- drivers/net/e1000/igb_rxtx.c | 34 --- drivers/net/enic/enic_main.c | 25 -- drivers/net/fm10k/fm10k_rxtx.c | 15 -- drivers/net/i40e/i40e_fdir.c | 4 - drivers/net/i40e/i40e_rxtx.c | 293 --------------------- drivers/net/ixgbe/ixgbe_ethdev.c | 40 --- drivers/net/ixgbe/ixgbe_rxtx.c | 87 ------ drivers/net/ixgbe/ixgbe_rxtx_vec.c | 111 -------- drivers/net/mlx4/mlx4.c | 29 -- drivers/net/ring/rte_eth_ring.c | 56 ---- drivers/net/ring/rte_eth_ring.h | 3 - drivers/net/ring/rte_eth_ring_version.map | 2 - drivers/net/vmxnet3/vmxnet3_rxtx.c | 8 - examples/ip_fragmentation/main.c | 10 - examples/ip_reassembly/main.c | 10 - examples/l3fwd-acl/main.c | 44 ++-- examples/l3fwd-power/main.c | 11 - examples/l3fwd/main.c | 114 -------- examples/tep_termination/vxlan.c | 5 - lib/Makefile | 1 - lib/librte_acl/Makefile | 2 +- lib/librte_acl/rte_acl.c | 170 ------------ lib/librte_acl/rte_acl.h | 104 -------- lib/librte_acl/rte_acl_version.map | 2 - lib/librte_eal/bsdapp/eal/Makefile | 2 +- .../bsdapp/eal/include/exec-env/rte_interrupts.h | 2 - lib/librte_eal/bsdapp/eal/rte_eal_version.map | 1 - lib/librte_eal/common/eal_common_pci.c | 6 - lib/librte_eal/common/include/rte_pci.h | 2 - lib/librte_eal/linuxapp/eal/Makefile | 2 +- lib/librte_eal/linuxapp/eal/eal_interrupts.c | 53 ---- .../linuxapp/eal/include/exec-env/rte_interrupts.h | 2 - .../linuxapp/eal/include/exec-env/rte_kni_common.h | 6 - lib/librte_eal/linuxapp/eal/rte_eal_version.map | 1 - lib/librte_ether/Makefile | 2 +- lib/librte_ether/rte_eth_ctrl.h | 4 - lib/librte_ether/rte_ethdev.c | 40 --- lib/librte_ether/rte_ethdev.h | 4 - lib/librte_kni/rte_kni.c | 51 ---- lib/librte_kni/rte_kni.h | 54 ---- lib/librte_kni/rte_kni_version.map | 3 - lib/librte_lpm/Makefile | 2 +- lib/librte_lpm/rte_lpm.h | 11 - lib/librte_malloc/Makefile | 48 ---- lib/librte_malloc/rte_malloc_empty.c | 34 --- lib/librte_malloc/rte_malloc_version.map | 3 - lib/librte_mbuf/Makefile | 2 +- lib/librte_mbuf/rte_mbuf.c | 10 - lib/librte_mbuf/rte_mbuf.h | 28 +- mk/rte.app.mk | 1 - 72 files changed, 301 insertions(+), 1725 deletions(-) delete mode 100644 lib/librte_malloc/Makefile delete mode 100644 lib/librte_malloc/rte_malloc_empty.c delete mode 100644 lib/librte_malloc/rte_malloc_version.map -- 2.5.0 ^ permalink raw reply [flat|nested] 29+ messages in thread
* [dpdk-dev] [PATCH 1/9] ethdev: remove Rx interrupt switch 2015-09-01 20:18 [dpdk-dev] [PATCH 0/9] clean deprecated code Thomas Monjalon @ 2015-09-01 21:30 ` Thomas Monjalon 2015-09-01 21:30 ` [dpdk-dev] [PATCH 2/9] mbuf: remove packet type from offload flags Thomas Monjalon ` (10 subsequent siblings) 11 siblings, 0 replies; 29+ messages in thread From: Thomas Monjalon @ 2015-09-01 21:30 UTC (permalink / raw) To: dev The Rx interrupt feature is now part of the standard ABI. Because of changes in rte_intr_handle and struct rte_eth_conf, the eal and ethdev library versions are bumped. Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> --- doc/guides/rel_notes/deprecation.rst | 4 -- drivers/net/e1000/igb_ethdev.c | 26 ----------- drivers/net/ixgbe/ixgbe_ethdev.c | 40 ---------------- examples/l3fwd-power/main.c | 2 - lib/librte_eal/bsdapp/eal/Makefile | 2 +- .../bsdapp/eal/include/exec-env/rte_interrupts.h | 2 - lib/librte_eal/linuxapp/eal/Makefile | 2 +- lib/librte_eal/linuxapp/eal/eal_interrupts.c | 53 ---------------------- .../linuxapp/eal/include/exec-env/rte_interrupts.h | 2 - lib/librte_ether/Makefile | 2 +- lib/librte_ether/rte_ethdev.c | 40 ---------------- lib/librte_ether/rte_ethdev.h | 4 -- 12 files changed, 3 insertions(+), 176 deletions(-) diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index da17880..991a777 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -13,10 +13,6 @@ Deprecation Notices There is no backward compatibility planned from release 2.2. All binaries will need to be rebuilt from release 2.2. -* ABI changes are planned for struct rte_intr_handle, struct rte_eth_conf - and struct eth_dev_ops to support interrupt mode feature from release 2.1. - Those changes may be enabled in the release 2.1 with CONFIG_RTE_NEXT_ABI. - * The EAL function rte_eal_pci_close_one is deprecated because renamed to rte_eal_pci_detach. diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c index c7e6d55..848ef6e 100644 --- a/drivers/net/e1000/igb_ethdev.c +++ b/drivers/net/e1000/igb_ethdev.c @@ -106,9 +106,7 @@ static int eth_igb_flow_ctrl_get(struct rte_eth_dev *dev, static int eth_igb_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf); static int eth_igb_lsc_interrupt_setup(struct rte_eth_dev *dev); -#ifdef RTE_NEXT_ABI static int eth_igb_rxq_interrupt_setup(struct rte_eth_dev *dev); -#endif static int eth_igb_interrupt_get_status(struct rte_eth_dev *dev); static int eth_igb_interrupt_action(struct rte_eth_dev *dev); static void eth_igb_interrupt_handler(struct rte_intr_handle *handle, @@ -232,7 +230,6 @@ static int igb_timesync_read_rx_timestamp(struct rte_eth_dev *dev, uint32_t flags); static int igb_timesync_read_tx_timestamp(struct rte_eth_dev *dev, struct timespec *timestamp); -#ifdef RTE_NEXT_ABI static int eth_igb_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id); static int eth_igb_rx_queue_intr_disable(struct rte_eth_dev *dev, @@ -241,7 +238,6 @@ static void eth_igb_assign_msix_vector(struct e1000_hw *hw, int8_t direction, uint8_t queue, uint8_t msix_vector); static void eth_igb_write_ivar(struct e1000_hw *hw, uint8_t msix_vector, uint8_t index, uint8_t offset); -#endif static void eth_igb_configure_msix_intr(struct rte_eth_dev *dev); /* @@ -303,10 +299,8 @@ static const struct eth_dev_ops eth_igb_ops = { .vlan_tpid_set = eth_igb_vlan_tpid_set, .vlan_offload_set = eth_igb_vlan_offload_set, .rx_queue_setup = eth_igb_rx_queue_setup, -#ifdef RTE_NEXT_ABI .rx_queue_intr_enable = eth_igb_rx_queue_intr_enable, .rx_queue_intr_disable = eth_igb_rx_queue_intr_disable, -#endif .rx_queue_release = eth_igb_rx_queue_release, .rx_queue_count = eth_igb_rx_queue_count, .rx_descriptor_done = eth_igb_rx_descriptor_done, @@ -893,9 +887,7 @@ eth_igb_start(struct rte_eth_dev *dev) E1000_DEV_PRIVATE(dev->data->dev_private); struct rte_intr_handle *intr_handle = &dev->pci_dev->intr_handle; int ret, mask; -#ifdef RTE_NEXT_ABI uint32_t intr_vector = 0; -#endif uint32_t ctrl_ext; PMD_INIT_FUNC_TRACE(); @@ -936,7 +928,6 @@ eth_igb_start(struct rte_eth_dev *dev) /* configure PF module if SRIOV enabled */ igb_pf_host_configure(dev); -#ifdef RTE_NEXT_ABI /* check and configure queue intr-vector mapping */ if (dev->data->dev_conf.intr_conf.rxq != 0) intr_vector = dev->data->nb_rx_queues; @@ -954,7 +945,6 @@ eth_igb_start(struct rte_eth_dev *dev) return -ENOMEM; } } -#endif /* confiugre msix for rx interrupt */ eth_igb_configure_msix_intr(dev); @@ -1050,11 +1040,9 @@ eth_igb_start(struct rte_eth_dev *dev) " no intr multiplex\n"); } -#ifdef RTE_NEXT_ABI /* check if rxq interrupt is enabled */ if (dev->data->dev_conf.intr_conf.rxq != 0) eth_igb_rxq_interrupt_setup(dev); -#endif /* enable uio/vfio intr/eventfd mapping */ rte_intr_enable(intr_handle); @@ -1146,14 +1134,12 @@ eth_igb_stop(struct rte_eth_dev *dev) } filter_info->twotuple_mask = 0; -#ifdef RTE_NEXT_ABI /* Clean datapath event and queue/vec mapping */ rte_intr_efd_disable(intr_handle); if (intr_handle->intr_vec != NULL) { rte_free(intr_handle->intr_vec); intr_handle->intr_vec = NULL; } -#endif } static void @@ -1163,9 +1149,7 @@ eth_igb_close(struct rte_eth_dev *dev) struct e1000_adapter *adapter = E1000_DEV_PRIVATE(dev->data->dev_private); struct rte_eth_link link; -#ifdef RTE_NEXT_ABI struct rte_pci_device *pci_dev; -#endif eth_igb_stop(dev); adapter->stopped = 1; @@ -1185,13 +1169,11 @@ eth_igb_close(struct rte_eth_dev *dev) igb_dev_free_queues(dev); -#ifdef RTE_NEXT_ABI pci_dev = dev->pci_dev; if (pci_dev->intr_handle.intr_vec) { rte_free(pci_dev->intr_handle.intr_vec); pci_dev->intr_handle.intr_vec = NULL; } -#endif memset(&link, 0, sizeof(link)); rte_igb_dev_atomic_write_link_status(dev, &link); @@ -2017,7 +1999,6 @@ eth_igb_lsc_interrupt_setup(struct rte_eth_dev *dev) return 0; } -#ifdef RTE_NEXT_ABI /* It clears the interrupt causes and enables the interrupt. * It will be called once only during nic initialized. * @@ -2044,7 +2025,6 @@ static int eth_igb_rxq_interrupt_setup(struct rte_eth_dev *dev) return 0; } -#endif /* * It reads ICR and gets interrupt causes, check it and set a bit flag @@ -4144,7 +4124,6 @@ static struct rte_driver pmd_igbvf_drv = { .init = rte_igbvf_pmd_init, }; -#ifdef RTE_NEXT_ABI static int eth_igb_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id) { @@ -4219,7 +4198,6 @@ eth_igb_assign_msix_vector(struct e1000_hw *hw, int8_t direction, 8 * direction); } } -#endif /* Sets up the hardware to generate MSI-X interrupts properly * @hw @@ -4228,13 +4206,11 @@ eth_igb_assign_msix_vector(struct e1000_hw *hw, int8_t direction, static void eth_igb_configure_msix_intr(struct rte_eth_dev *dev) { -#ifdef RTE_NEXT_ABI int queue_id; uint32_t tmpval, regval, intr_mask; struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private); uint32_t vec = 0; -#endif struct rte_intr_handle *intr_handle = &dev->pci_dev->intr_handle; /* won't configure msix register if no mapping is done @@ -4243,7 +4219,6 @@ eth_igb_configure_msix_intr(struct rte_eth_dev *dev) if (!rte_intr_dp_is_en(intr_handle)) return; -#ifdef RTE_NEXT_ABI /* set interrupt vector for other causes */ if (hw->mac.type == e1000_82575) { tmpval = E1000_READ_REG(hw, E1000_CTRL_EXT); @@ -4299,7 +4274,6 @@ eth_igb_configure_msix_intr(struct rte_eth_dev *dev) } E1000_WRITE_FLUSH(hw); -#endif } PMD_REGISTER_DRIVER(pmd_igb_drv); diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index b8ee1e9..ec2918c 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -190,9 +190,7 @@ static int ixgbe_dev_rss_reta_query(struct rte_eth_dev *dev, uint16_t reta_size); static void ixgbe_dev_link_status_print(struct rte_eth_dev *dev); static int ixgbe_dev_lsc_interrupt_setup(struct rte_eth_dev *dev); -#ifdef RTE_NEXT_ABI static int ixgbe_dev_rxq_interrupt_setup(struct rte_eth_dev *dev); -#endif static int ixgbe_dev_interrupt_get_status(struct rte_eth_dev *dev); static int ixgbe_dev_interrupt_action(struct rte_eth_dev *dev); static void ixgbe_dev_interrupt_handler(struct rte_intr_handle *handle, @@ -227,14 +225,12 @@ static void ixgbevf_vlan_offload_set(struct rte_eth_dev *dev, int mask); static void ixgbevf_set_vfta_all(struct rte_eth_dev *dev, bool on); static void ixgbevf_dev_interrupt_handler(struct rte_intr_handle *handle, void *param); -#ifdef RTE_NEXT_ABI static int ixgbevf_dev_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id); static int ixgbevf_dev_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id); static void ixgbevf_set_ivar_map(struct ixgbe_hw *hw, int8_t direction, uint8_t queue, uint8_t msix_vector); -#endif static void ixgbevf_configure_msix(struct rte_eth_dev *dev); /* For Eth VMDQ APIs support */ @@ -252,14 +248,12 @@ static int ixgbe_mirror_rule_set(struct rte_eth_dev *dev, uint8_t rule_id, uint8_t on); static int ixgbe_mirror_rule_reset(struct rte_eth_dev *dev, uint8_t rule_id); -#ifdef RTE_NEXT_ABI static int ixgbe_dev_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id); static int ixgbe_dev_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id); static void ixgbe_set_ivar_map(struct ixgbe_hw *hw, int8_t direction, uint8_t queue, uint8_t msix_vector); -#endif static void ixgbe_configure_msix(struct rte_eth_dev *dev); static int ixgbe_set_queue_rate_limit(struct rte_eth_dev *dev, @@ -420,10 +414,8 @@ static const struct eth_dev_ops ixgbe_eth_dev_ops = { .tx_queue_start = ixgbe_dev_tx_queue_start, .tx_queue_stop = ixgbe_dev_tx_queue_stop, .rx_queue_setup = ixgbe_dev_rx_queue_setup, -#ifdef RTE_NEXT_ABI .rx_queue_intr_enable = ixgbe_dev_rx_queue_intr_enable, .rx_queue_intr_disable = ixgbe_dev_rx_queue_intr_disable, -#endif .rx_queue_release = ixgbe_dev_rx_queue_release, .rx_queue_count = ixgbe_dev_rx_queue_count, .rx_descriptor_done = ixgbe_dev_rx_descriptor_done, @@ -497,10 +489,8 @@ static const struct eth_dev_ops ixgbevf_eth_dev_ops = { .rx_descriptor_done = ixgbe_dev_rx_descriptor_done, .tx_queue_setup = ixgbe_dev_tx_queue_setup, .tx_queue_release = ixgbe_dev_tx_queue_release, -#ifdef RTE_NEXT_ABI .rx_queue_intr_enable = ixgbevf_dev_rx_queue_intr_enable, .rx_queue_intr_disable = ixgbevf_dev_rx_queue_intr_disable, -#endif .mac_addr_add = ixgbevf_add_mac_addr, .mac_addr_remove = ixgbevf_remove_mac_addr, .set_mc_addr_list = ixgbe_dev_set_mc_addr_list, @@ -1680,9 +1670,7 @@ ixgbe_dev_start(struct rte_eth_dev *dev) struct ixgbe_vf_info *vfinfo = *IXGBE_DEV_PRIVATE_TO_P_VFDATA(dev->data->dev_private); struct rte_intr_handle *intr_handle = &dev->pci_dev->intr_handle; -#ifdef RTE_NEXT_ABI uint32_t intr_vector = 0; -#endif int err, link_up = 0, negotiate = 0; uint32_t speed = 0; int mask = 0; @@ -1715,7 +1703,6 @@ ixgbe_dev_start(struct rte_eth_dev *dev) /* configure PF module if SRIOV enabled */ ixgbe_pf_host_configure(dev); -#ifdef RTE_NEXT_ABI /* check and configure queue intr-vector mapping */ if (dev->data->dev_conf.intr_conf.rxq != 0) intr_vector = dev->data->nb_rx_queues; @@ -1734,7 +1721,6 @@ ixgbe_dev_start(struct rte_eth_dev *dev) return -ENOMEM; } } -#endif /* confiugre msix for sleep until rx interrupt */ ixgbe_configure_msix(dev); @@ -1827,11 +1813,9 @@ skip_link_setup: " no intr multiplex\n"); } -#ifdef RTE_NEXT_ABI /* check if rxq interrupt is enabled */ if (dev->data->dev_conf.intr_conf.rxq != 0) ixgbe_dev_rxq_interrupt_setup(dev); -#endif /* enable uio/vfio intr/eventfd mapping */ rte_intr_enable(intr_handle); @@ -1942,14 +1926,12 @@ ixgbe_dev_stop(struct rte_eth_dev *dev) memset(filter_info->fivetuple_mask, 0, sizeof(uint32_t) * IXGBE_5TUPLE_ARRAY_SIZE); -#ifdef RTE_NEXT_ABI /* Clean datapath event and queue/vec mapping */ rte_intr_efd_disable(intr_handle); if (intr_handle->intr_vec != NULL) { rte_free(intr_handle->intr_vec); intr_handle->intr_vec = NULL; } -#endif } /* @@ -2623,7 +2605,6 @@ ixgbe_dev_lsc_interrupt_setup(struct rte_eth_dev *dev) * - On success, zero. * - On failure, a negative value. */ -#ifdef RTE_NEXT_ABI static int ixgbe_dev_rxq_interrupt_setup(struct rte_eth_dev *dev) { @@ -2634,7 +2615,6 @@ ixgbe_dev_rxq_interrupt_setup(struct rte_eth_dev *dev) return 0; } -#endif /* * It reads ICR and sets flag (IXGBE_EICR_LSC) for the link_update. @@ -3435,9 +3415,7 @@ ixgbevf_dev_start(struct rte_eth_dev *dev) { struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); -#ifdef RTE_NEXT_ABI uint32_t intr_vector = 0; -#endif struct rte_intr_handle *intr_handle = &dev->pci_dev->intr_handle; int err, mask = 0; @@ -3470,7 +3448,6 @@ ixgbevf_dev_start(struct rte_eth_dev *dev) ixgbevf_dev_rxtx_start(dev); -#ifdef RTE_NEXT_ABI /* check and configure queue intr-vector mapping */ if (dev->data->dev_conf.intr_conf.rxq != 0) intr_vector = dev->data->nb_rx_queues; @@ -3488,7 +3465,6 @@ ixgbevf_dev_start(struct rte_eth_dev *dev) return -ENOMEM; } } -#endif ixgbevf_configure_msix(dev); if (dev->data->dev_conf.intr_conf.lsc != 0) { @@ -3534,23 +3510,19 @@ ixgbevf_dev_stop(struct rte_eth_dev *dev) /* disable intr eventfd mapping */ rte_intr_disable(intr_handle); -#ifdef RTE_NEXT_ABI /* Clean datapath event and queue/vec mapping */ rte_intr_efd_disable(intr_handle); if (intr_handle->intr_vec != NULL) { rte_free(intr_handle->intr_vec); intr_handle->intr_vec = NULL; } -#endif } static void ixgbevf_dev_close(struct rte_eth_dev *dev) { struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); -#ifdef RTE_NEXT_ABI struct rte_pci_device *pci_dev; -#endif PMD_INIT_FUNC_TRACE(); @@ -3563,13 +3535,11 @@ ixgbevf_dev_close(struct rte_eth_dev *dev) /* reprogram the RAR[0] in case user changed it. */ ixgbe_set_rar(hw, 0, hw->mac.addr, 0, IXGBE_RAH_AV); -#ifdef RTE_NEXT_ABI pci_dev = dev->pci_dev; if (pci_dev->intr_handle.intr_vec) { rte_free(pci_dev->intr_handle.intr_vec); pci_dev->intr_handle.intr_vec = NULL; } -#endif } static void ixgbevf_set_vfta_all(struct rte_eth_dev *dev, bool on) @@ -4087,7 +4057,6 @@ ixgbe_mirror_rule_reset(struct rte_eth_dev *dev, uint8_t rule_id) return 0; } -#ifdef RTE_NEXT_ABI static int ixgbevf_dev_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id) { @@ -4240,18 +4209,15 @@ ixgbe_set_ivar_map(struct ixgbe_hw *hw, int8_t direction, } } } -#endif static void ixgbevf_configure_msix(struct rte_eth_dev *dev) { struct rte_intr_handle *intr_handle = &dev->pci_dev->intr_handle; -#ifdef RTE_NEXT_ABI struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); uint32_t q_idx; uint32_t vector_idx = 0; -#endif /* won't configure msix register if no mapping is done * between intr vector and event fd. @@ -4259,7 +4225,6 @@ ixgbevf_configure_msix(struct rte_eth_dev *dev) if (!rte_intr_dp_is_en(intr_handle)) return; -#ifdef RTE_NEXT_ABI /* Configure all RX queues of VF */ for (q_idx = 0; q_idx < dev->data->nb_rx_queues; q_idx++) { /* Force all queue use vector 0, @@ -4271,7 +4236,6 @@ ixgbevf_configure_msix(struct rte_eth_dev *dev) /* Configure VF Rx queue ivar */ ixgbevf_set_ivar_map(hw, -1, 1, vector_idx); -#endif } /** @@ -4283,13 +4247,11 @@ static void ixgbe_configure_msix(struct rte_eth_dev *dev) { struct rte_intr_handle *intr_handle = &dev->pci_dev->intr_handle; -#ifdef RTE_NEXT_ABI struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); uint32_t queue_id, vec = 0; uint32_t mask; uint32_t gpie; -#endif /* won't configure msix register if no mapping is done * between intr vector and event fd @@ -4297,7 +4259,6 @@ ixgbe_configure_msix(struct rte_eth_dev *dev) if (!rte_intr_dp_is_en(intr_handle)) return; -#ifdef RTE_NEXT_ABI /* setup GPIE for MSI-x mode */ gpie = IXGBE_READ_REG(hw, IXGBE_GPIE); gpie |= IXGBE_GPIE_MSIX_MODE | IXGBE_GPIE_PBA_SUPPORT | @@ -4347,7 +4308,6 @@ ixgbe_configure_msix(struct rte_eth_dev *dev) IXGBE_EIMS_LSC); IXGBE_WRITE_REG(hw, IXGBE_EIAC, mask); -#endif } static int ixgbe_set_queue_rate_limit(struct rte_eth_dev *dev, diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c index 2f205ea..086f29b 100644 --- a/examples/l3fwd-power/main.c +++ b/examples/l3fwd-power/main.c @@ -239,9 +239,7 @@ static struct rte_eth_conf port_conf = { }, .intr_conf = { .lsc = 1, -#ifdef RTE_NEXT_ABI .rxq = 1, -#endif }, }; diff --git a/lib/librte_eal/bsdapp/eal/Makefile b/lib/librte_eal/bsdapp/eal/Makefile index a969435..a49dcec 100644 --- a/lib/librte_eal/bsdapp/eal/Makefile +++ b/lib/librte_eal/bsdapp/eal/Makefile @@ -44,7 +44,7 @@ CFLAGS += $(WERROR_FLAGS) -O3 EXPORT_MAP := rte_eal_version.map -LIBABIVER := 1 +LIBABIVER := 2 # specific to linuxapp exec-env SRCS-$(CONFIG_RTE_LIBRTE_EAL_BSDAPP) := eal.c diff --git a/lib/librte_eal/bsdapp/eal/include/exec-env/rte_interrupts.h b/lib/librte_eal/bsdapp/eal/include/exec-env/rte_interrupts.h index bffa902..88d4ae1 100644 --- a/lib/librte_eal/bsdapp/eal/include/exec-env/rte_interrupts.h +++ b/lib/librte_eal/bsdapp/eal/include/exec-env/rte_interrupts.h @@ -50,11 +50,9 @@ struct rte_intr_handle { int fd; /**< file descriptor */ int uio_cfg_fd; /**< UIO config file descriptor */ enum rte_intr_handle_type type; /**< handle type */ -#ifdef RTE_NEXT_ABI int max_intr; /**< max interrupt requested */ uint32_t nb_efd; /**< number of available efds */ int *intr_vec; /**< intr vector number array */ -#endif }; /** diff --git a/lib/librte_eal/linuxapp/eal/Makefile b/lib/librte_eal/linuxapp/eal/Makefile index 376d275..d62196e 100644 --- a/lib/librte_eal/linuxapp/eal/Makefile +++ b/lib/librte_eal/linuxapp/eal/Makefile @@ -35,7 +35,7 @@ LIB = librte_eal.a EXPORT_MAP := rte_eal_version.map -LIBABIVER := 1 +LIBABIVER := 2 VPATH += $(RTE_SDK)/lib/librte_eal/common diff --git a/lib/librte_eal/linuxapp/eal/eal_interrupts.c b/lib/librte_eal/linuxapp/eal/eal_interrupts.c index 3f87875..66e1fe3 100644 --- a/lib/librte_eal/linuxapp/eal/eal_interrupts.c +++ b/lib/librte_eal/linuxapp/eal/eal_interrupts.c @@ -290,26 +290,18 @@ vfio_enable_msix(struct rte_intr_handle *intr_handle) { irq_set = (struct vfio_irq_set *) irq_set_buf; irq_set->argsz = len; -#ifdef RTE_NEXT_ABI if (!intr_handle->max_intr) intr_handle->max_intr = 1; else if (intr_handle->max_intr > RTE_MAX_RXTX_INTR_VEC_ID) intr_handle->max_intr = RTE_MAX_RXTX_INTR_VEC_ID + 1; irq_set->count = intr_handle->max_intr; -#else - irq_set->count = 1; -#endif irq_set->flags = VFIO_IRQ_SET_DATA_EVENTFD | VFIO_IRQ_SET_ACTION_TRIGGER; irq_set->index = VFIO_PCI_MSIX_IRQ_INDEX; irq_set->start = 0; fd_ptr = (int *) &irq_set->data; -#ifdef RTE_NEXT_ABI memcpy(fd_ptr, intr_handle->efds, sizeof(intr_handle->efds)); fd_ptr[intr_handle->max_intr - 1] = intr_handle->fd; -#else - fd_ptr[0] = intr_handle->fd; -#endif ret = ioctl(intr_handle->vfio_dev_fd, VFIO_DEVICE_SET_IRQS, irq_set); @@ -886,7 +878,6 @@ rte_eal_intr_init(void) return -ret; } -#ifdef RTE_NEXT_ABI static void eal_intr_proc_rxtx_intr(int fd, const struct rte_intr_handle *intr_handle) { @@ -929,7 +920,6 @@ eal_intr_proc_rxtx_intr(int fd, const struct rte_intr_handle *intr_handle) return; } while (1); } -#endif static int eal_epoll_process_event(struct epoll_event *evs, unsigned int n, @@ -1068,7 +1058,6 @@ rte_epoll_ctl(int epfd, int op, int fd, return 0; } -#ifdef RTE_NEXT_ABI int rte_intr_rx_ctl(struct rte_intr_handle *intr_handle, int epfd, int op, unsigned int vec, void *data) @@ -1192,45 +1181,3 @@ rte_intr_allow_others(struct rte_intr_handle *intr_handle) { return !!(intr_handle->max_intr - intr_handle->nb_efd); } - -#else -int -rte_intr_rx_ctl(struct rte_intr_handle *intr_handle, - int epfd, int op, unsigned int vec, void *data) -{ - RTE_SET_USED(intr_handle); - RTE_SET_USED(epfd); - RTE_SET_USED(op); - RTE_SET_USED(vec); - RTE_SET_USED(data); - return -ENOTSUP; -} - -int -rte_intr_efd_enable(struct rte_intr_handle *intr_handle, uint32_t nb_efd) -{ - RTE_SET_USED(intr_handle); - RTE_SET_USED(nb_efd); - return 0; -} - -void -rte_intr_efd_disable(struct rte_intr_handle *intr_handle) -{ - RTE_SET_USED(intr_handle); -} - -int -rte_intr_dp_is_en(struct rte_intr_handle *intr_handle) -{ - RTE_SET_USED(intr_handle); - return 0; -} - -int -rte_intr_allow_others(struct rte_intr_handle *intr_handle) -{ - RTE_SET_USED(intr_handle); - return 1; -} -#endif diff --git a/lib/librte_eal/linuxapp/eal/include/exec-env/rte_interrupts.h b/lib/librte_eal/linuxapp/eal/include/exec-env/rte_interrupts.h index b05f4c8..45071b7 100644 --- a/lib/librte_eal/linuxapp/eal/include/exec-env/rte_interrupts.h +++ b/lib/librte_eal/linuxapp/eal/include/exec-env/rte_interrupts.h @@ -86,14 +86,12 @@ struct rte_intr_handle { }; int fd; /**< interrupt event file descriptor */ enum rte_intr_handle_type type; /**< handle type */ -#ifdef RTE_NEXT_ABI uint32_t max_intr; /**< max interrupt requested */ uint32_t nb_efd; /**< number of available efd(event fd) */ int efds[RTE_MAX_RXTX_INTR_VEC_ID]; /**< intr vectors/efds mapping */ struct rte_epoll_event elist[RTE_MAX_RXTX_INTR_VEC_ID]; /**< intr vector epoll event */ int *intr_vec; /**< intr vector number array */ -#endif }; #define RTE_EPOLL_PER_THREAD -1 /**< to hint using per thread epfd */ diff --git a/lib/librte_ether/Makefile b/lib/librte_ether/Makefile index fc45a71..3e81a0e 100644 --- a/lib/librte_ether/Makefile +++ b/lib/librte_ether/Makefile @@ -41,7 +41,7 @@ CFLAGS += $(WERROR_FLAGS) EXPORT_MAP := rte_ether_version.map -LIBABIVER := 1 +LIBABIVER := 2 SRCS-y += rte_ethdev.c diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index 6b2400c..b309309 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -3033,7 +3033,6 @@ _rte_eth_dev_callback_process(struct rte_eth_dev *dev, rte_spinlock_unlock(&rte_eth_dev_cb_lock); } -#ifdef RTE_NEXT_ABI int rte_eth_dev_rx_intr_ctl(uint8_t port_id, int epfd, int op, void *data) { @@ -3139,45 +3138,6 @@ rte_eth_dev_rx_intr_disable(uint8_t port_id, FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_queue_intr_disable, -ENOTSUP); return (*dev->dev_ops->rx_queue_intr_disable)(dev, queue_id); } -#else -int -rte_eth_dev_rx_intr_enable(uint8_t port_id, uint16_t queue_id) -{ - RTE_SET_USED(port_id); - RTE_SET_USED(queue_id); - return -ENOTSUP; -} - -int -rte_eth_dev_rx_intr_disable(uint8_t port_id, uint16_t queue_id) -{ - RTE_SET_USED(port_id); - RTE_SET_USED(queue_id); - return -ENOTSUP; -} - -int -rte_eth_dev_rx_intr_ctl(uint8_t port_id, int epfd, int op, void *data) -{ - RTE_SET_USED(port_id); - RTE_SET_USED(epfd); - RTE_SET_USED(op); - RTE_SET_USED(data); - return -1; -} - -int -rte_eth_dev_rx_intr_ctl_q(uint8_t port_id, uint16_t queue_id, - int epfd, int op, void *data) -{ - RTE_SET_USED(port_id); - RTE_SET_USED(queue_id); - RTE_SET_USED(epfd); - RTE_SET_USED(op); - RTE_SET_USED(data); - return -1; -} -#endif #ifdef RTE_NIC_BYPASS int rte_eth_dev_bypass_init(uint8_t port_id) diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h index 544afe0..fa06554 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -845,10 +845,8 @@ struct rte_eth_fdir { struct rte_intr_conf { /** enable/disable lsc interrupt. 0 (default) - disable, 1 enable */ uint16_t lsc; -#ifdef RTE_NEXT_ABI /** enable/disable rxq interrupt. 0 (default) - disable, 1 enable */ uint16_t rxq; -#endif }; /** @@ -1392,12 +1390,10 @@ struct eth_dev_ops { eth_queue_release_t rx_queue_release;/**< Release RX queue.*/ eth_rx_queue_count_t rx_queue_count; /**< Get Rx queue count. */ eth_rx_descriptor_done_t rx_descriptor_done; /**< Check rxd DD bit */ -#ifdef RTE_NEXT_ABI /**< Enable Rx queue interrupt. */ eth_rx_enable_intr_t rx_queue_intr_enable; /**< Disable Rx queue interrupt.*/ eth_rx_disable_intr_t rx_queue_intr_disable; -#endif eth_tx_queue_setup_t tx_queue_setup;/**< Set up device TX queue.*/ eth_queue_release_t tx_queue_release;/**< Release TX queue.*/ eth_dev_led_on_t dev_led_on; /**< Turn on LED. */ -- 2.5.1 ^ permalink raw reply [flat|nested] 29+ messages in thread
* [dpdk-dev] [PATCH 2/9] mbuf: remove packet type from offload flags 2015-09-01 20:18 [dpdk-dev] [PATCH 0/9] clean deprecated code Thomas Monjalon 2015-09-01 21:30 ` [dpdk-dev] [PATCH 1/9] ethdev: remove Rx interrupt switch Thomas Monjalon @ 2015-09-01 21:30 ` Thomas Monjalon 2015-09-01 21:30 ` [dpdk-dev] [PATCH 3/9] ethdev: remove SCTP flow entries switch Thomas Monjalon ` (9 subsequent siblings) 11 siblings, 0 replies; 29+ messages in thread From: Thomas Monjalon @ 2015-09-01 21:30 UTC (permalink / raw) To: dev The extended unified packet type is now part of the standard ABI. As mbuf struct is changed, the mbuf library version is bumped. Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> --- app/test-pipeline/pipeline_hash.c | 12 - app/test-pmd/csumonly.c | 14 - app/test-pmd/rxonly.c | 16 -- app/test/packet_burst_generator.c | 12 - doc/guides/rel_notes/deprecation.rst | 5 - drivers/net/cxgbe/sge.c | 16 -- drivers/net/e1000/igb_rxtx.c | 34 --- drivers/net/enic/enic_main.c | 25 -- drivers/net/fm10k/fm10k_rxtx.c | 15 -- drivers/net/i40e/i40e_rxtx.c | 293 --------------------- drivers/net/ixgbe/ixgbe_rxtx.c | 87 ------ drivers/net/ixgbe/ixgbe_rxtx_vec.c | 111 -------- drivers/net/mlx4/mlx4.c | 29 -- drivers/net/vmxnet3/vmxnet3_rxtx.c | 8 - examples/ip_fragmentation/main.c | 10 - examples/ip_reassembly/main.c | 10 - examples/l3fwd-acl/main.c | 27 -- examples/l3fwd-power/main.c | 9 - examples/l3fwd/main.c | 114 -------- examples/tep_termination/vxlan.c | 5 - .../linuxapp/eal/include/exec-env/rte_kni_common.h | 6 - lib/librte_mbuf/Makefile | 2 +- lib/librte_mbuf/rte_mbuf.c | 10 - lib/librte_mbuf/rte_mbuf.h | 28 +- 24 files changed, 2 insertions(+), 896 deletions(-) diff --git a/app/test-pipeline/pipeline_hash.c b/app/test-pipeline/pipeline_hash.c index aa3f9e5..548615f 100644 --- a/app/test-pipeline/pipeline_hash.c +++ b/app/test-pipeline/pipeline_hash.c @@ -459,33 +459,21 @@ app_main_loop_rx_metadata(void) { signature = RTE_MBUF_METADATA_UINT32_PTR(m, 0); key = RTE_MBUF_METADATA_UINT8_PTR(m, 32); -#ifdef RTE_NEXT_ABI if (RTE_ETH_IS_IPV4_HDR(m->packet_type)) { -#else - if (m->ol_flags & PKT_RX_IPV4_HDR) { -#endif ip_hdr = (struct ipv4_hdr *) &m_data[sizeof(struct ether_hdr)]; ip_dst = ip_hdr->dst_addr; k32 = (uint32_t *) key; k32[0] = ip_dst & 0xFFFFFF00; -#ifdef RTE_NEXT_ABI } else if (RTE_ETH_IS_IPV6_HDR(m->packet_type)) { -#else - } else { -#endif ipv6_hdr = (struct ipv6_hdr *) &m_data[sizeof(struct ether_hdr)]; ipv6_dst = ipv6_hdr->dst_addr; memcpy(key, ipv6_dst, 16); -#ifdef RTE_NEXT_ABI } else continue; -#else - } -#endif *signature = test_hash(key, 0, 0); } diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c index 1bf3485..e561dde 100644 --- a/app/test-pmd/csumonly.c +++ b/app/test-pmd/csumonly.c @@ -202,14 +202,9 @@ parse_ethernet(struct ether_hdr *eth_hdr, struct testpmd_offload_info *info) /* Parse a vxlan header */ static void -#ifdef RTE_NEXT_ABI parse_vxlan(struct udp_hdr *udp_hdr, struct testpmd_offload_info *info, uint32_t pkt_type) -#else -parse_vxlan(struct udp_hdr *udp_hdr, struct testpmd_offload_info *info, - uint64_t mbuf_olflags) -#endif { struct ether_hdr *eth_hdr; @@ -217,12 +212,7 @@ parse_vxlan(struct udp_hdr *udp_hdr, struct testpmd_offload_info *info, * (rfc7348) or that the rx offload flag is set (i40e only * currently) */ if (udp_hdr->dst_port != _htons(4789) && -#ifdef RTE_NEXT_ABI RTE_ETH_IS_TUNNEL_PKT(pkt_type) == 0) -#else - (mbuf_olflags & (PKT_RX_TUNNEL_IPV4_HDR | - PKT_RX_TUNNEL_IPV6_HDR)) == 0) -#endif return; info->is_tunnel = 1; @@ -559,11 +549,7 @@ pkt_burst_checksum_forward(struct fwd_stream *fs) struct udp_hdr *udp_hdr; udp_hdr = (struct udp_hdr *)((char *)l3_hdr + info.l3_len); -#ifdef RTE_NEXT_ABI parse_vxlan(udp_hdr, &info, m->packet_type); -#else - parse_vxlan(udp_hdr, &info, m->ol_flags); -#endif } else if (info.l4_proto == IPPROTO_GRE) { struct simple_gre_hdr *gre_hdr; gre_hdr = (struct simple_gre_hdr *) diff --git a/app/test-pmd/rxonly.c b/app/test-pmd/rxonly.c index ee7fd8d..14555ab 100644 --- a/app/test-pmd/rxonly.c +++ b/app/test-pmd/rxonly.c @@ -91,11 +91,7 @@ pkt_burst_receive(struct fwd_stream *fs) uint64_t ol_flags; uint16_t nb_rx; uint16_t i, packet_type; -#ifdef RTE_NEXT_ABI uint16_t is_encapsulation; -#else - uint64_t is_encapsulation; -#endif #ifdef RTE_TEST_PMD_RECORD_CORE_CYCLES uint64_t start_tsc; @@ -138,13 +134,7 @@ pkt_burst_receive(struct fwd_stream *fs) eth_type = RTE_BE_TO_CPU_16(eth_hdr->ether_type); ol_flags = mb->ol_flags; packet_type = mb->packet_type; - -#ifdef RTE_NEXT_ABI is_encapsulation = RTE_ETH_IS_TUNNEL_PKT(packet_type); -#else - is_encapsulation = ol_flags & (PKT_RX_TUNNEL_IPV4_HDR | - PKT_RX_TUNNEL_IPV6_HDR); -#endif print_ether_addr(" src=", ð_hdr->s_addr); print_ether_addr(" - dst=", ð_hdr->d_addr); @@ -171,7 +161,6 @@ pkt_burst_receive(struct fwd_stream *fs) if (ol_flags & PKT_RX_QINQ_PKT) printf(" - QinQ VLAN tci=0x%x, VLAN tci outer=0x%x", mb->vlan_tci, mb->vlan_tci_outer); -#ifdef RTE_NEXT_ABI if (mb->packet_type) { uint32_t ptype; @@ -341,7 +330,6 @@ pkt_burst_receive(struct fwd_stream *fs) printf("\n"); } else printf("Unknown packet type\n"); -#endif /* RTE_NEXT_ABI */ if (is_encapsulation) { struct ipv4_hdr *ipv4_hdr; struct ipv6_hdr *ipv6_hdr; @@ -355,11 +343,7 @@ pkt_burst_receive(struct fwd_stream *fs) l2_len = sizeof(struct ether_hdr); /* Do not support ipv4 option field */ -#ifdef RTE_NEXT_ABI if (RTE_ETH_IS_IPV4_HDR(packet_type)) { -#else - if (ol_flags & PKT_RX_TUNNEL_IPV4_HDR) { -#endif l3_len = sizeof(struct ipv4_hdr); ipv4_hdr = rte_pktmbuf_mtod_offset(mb, struct ipv4_hdr *, diff --git a/app/test/packet_burst_generator.c b/app/test/packet_burst_generator.c index d9d808b..a93c3b5 100644 --- a/app/test/packet_burst_generator.c +++ b/app/test/packet_burst_generator.c @@ -273,21 +273,9 @@ nomore_mbuf: if (ipv4) { pkt->vlan_tci = ETHER_TYPE_IPv4; pkt->l3_len = sizeof(struct ipv4_hdr); -#ifndef RTE_NEXT_ABI - if (vlan_enabled) - pkt->ol_flags = PKT_RX_IPV4_HDR | PKT_RX_VLAN_PKT; - else - pkt->ol_flags = PKT_RX_IPV4_HDR; -#endif } else { pkt->vlan_tci = ETHER_TYPE_IPv6; pkt->l3_len = sizeof(struct ipv6_hdr); -#ifndef RTE_NEXT_ABI - if (vlan_enabled) - pkt->ol_flags = PKT_RX_IPV6_HDR | PKT_RX_VLAN_PKT; - else - pkt->ol_flags = PKT_RX_IPV6_HDR; -#endif } pkts_burst[nb_pkt] = pkt; diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 991a777..639ab18 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -24,11 +24,6 @@ Deprecation Notices * The field mem_location of the rte_lpm structure is deprecated and should be removed as well as the macros RTE_LPM_HEAP and RTE_LPM_MEMZONE. -* Significant ABI changes are planned for struct rte_mbuf, struct rte_kni_mbuf, - and several ``PKT_RX_`` flags will be removed, to support unified packet type - from release 2.1. Those changes may be enabled in the upcoming release 2.1 - with CONFIG_RTE_NEXT_ABI. - * librte_malloc library has been integrated into librte_eal. The 2.1 release creates a dummy/empty malloc library to fulfill binaries with dynamic linking dependencies on librte_malloc.so. Such dummy library will not be created from diff --git a/drivers/net/cxgbe/sge.c b/drivers/net/cxgbe/sge.c index d570d33..6eb1244 100644 --- a/drivers/net/cxgbe/sge.c +++ b/drivers/net/cxgbe/sge.c @@ -1299,22 +1299,14 @@ int t4_ethrx_handler(struct sge_rspq *q, const __be64 *rsp, mbuf->port = pkt->iff; if (pkt->l2info & htonl(F_RXF_IP)) { -#ifdef RTE_NEXT_ABI mbuf->packet_type = RTE_PTYPE_L3_IPV4; -#else - mbuf->ol_flags |= PKT_RX_IPV4_HDR; -#endif if (unlikely(!csum_ok)) mbuf->ol_flags |= PKT_RX_IP_CKSUM_BAD; if ((pkt->l2info & htonl(F_RXF_UDP | F_RXF_TCP)) && !csum_ok) mbuf->ol_flags |= PKT_RX_L4_CKSUM_BAD; } else if (pkt->l2info & htonl(F_RXF_IP6)) { -#ifdef RTE_NEXT_ABI mbuf->packet_type = RTE_PTYPE_L3_IPV6; -#else - mbuf->ol_flags |= PKT_RX_IPV6_HDR; -#endif } mbuf->port = pkt->iff; @@ -1419,11 +1411,7 @@ static int process_responses(struct sge_rspq *q, int budget, unmap_rx_buf(&rxq->fl); if (cpl->l2info & htonl(F_RXF_IP)) { -#ifdef RTE_NEXT_ABI pkt->packet_type = RTE_PTYPE_L3_IPV4; -#else - pkt->ol_flags |= PKT_RX_IPV4_HDR; -#endif if (unlikely(!csum_ok)) pkt->ol_flags |= PKT_RX_IP_CKSUM_BAD; @@ -1431,11 +1419,7 @@ static int process_responses(struct sge_rspq *q, int budget, htonl(F_RXF_UDP | F_RXF_TCP)) && !csum_ok) pkt->ol_flags |= PKT_RX_L4_CKSUM_BAD; } else if (cpl->l2info & htonl(F_RXF_IP6)) { -#ifdef RTE_NEXT_ABI pkt->packet_type = RTE_PTYPE_L3_IPV6; -#else - pkt->ol_flags |= PKT_RX_IPV6_HDR; -#endif } if (!rss_hdr->filter_tid && rss_hdr->hash_type) { diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c index b13930e..19905fd 100644 --- a/drivers/net/e1000/igb_rxtx.c +++ b/drivers/net/e1000/igb_rxtx.c @@ -590,7 +590,6 @@ eth_igb_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, * RX functions * **********************************************************************/ -#ifdef RTE_NEXT_ABI #define IGB_PACKET_TYPE_IPV4 0X01 #define IGB_PACKET_TYPE_IPV4_TCP 0X11 #define IGB_PACKET_TYPE_IPV4_UDP 0X21 @@ -684,35 +683,6 @@ rx_desc_hlen_type_rss_to_pkt_flags(uint32_t hl_tp_rs) return pkt_flags; } -#else /* RTE_NEXT_ABI */ -static inline uint64_t -rx_desc_hlen_type_rss_to_pkt_flags(uint32_t hl_tp_rs) -{ - uint64_t pkt_flags; - - static uint64_t ip_pkt_types_map[16] = { - 0, PKT_RX_IPV4_HDR, PKT_RX_IPV4_HDR_EXT, PKT_RX_IPV4_HDR_EXT, - PKT_RX_IPV6_HDR, 0, 0, 0, - PKT_RX_IPV6_HDR_EXT, 0, 0, 0, - PKT_RX_IPV6_HDR_EXT, 0, 0, 0, - }; - -#if defined(RTE_LIBRTE_IEEE1588) - static uint32_t ip_pkt_etqf_map[8] = { - 0, 0, 0, PKT_RX_IEEE1588_PTP, - 0, 0, 0, 0, - }; - - pkt_flags = (hl_tp_rs & E1000_RXDADV_PKTTYPE_ETQF) ? - ip_pkt_etqf_map[(hl_tp_rs >> 4) & 0x07] : - ip_pkt_types_map[(hl_tp_rs >> 4) & 0x0F]; -#else - pkt_flags = (hl_tp_rs & E1000_RXDADV_PKTTYPE_ETQF) ? 0 : - ip_pkt_types_map[(hl_tp_rs >> 4) & 0x0F]; -#endif - return pkt_flags | (((hl_tp_rs & 0x0F) == 0) ? 0 : PKT_RX_RSS_HASH); -} -#endif /* RTE_NEXT_ABI */ static inline uint64_t rx_desc_status_to_pkt_flags(uint32_t rx_status) @@ -886,10 +856,8 @@ eth_igb_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, pkt_flags = pkt_flags | rx_desc_status_to_pkt_flags(staterr); pkt_flags = pkt_flags | rx_desc_error_to_pkt_flags(staterr); rxm->ol_flags = pkt_flags; -#ifdef RTE_NEXT_ABI rxm->packet_type = igb_rxd_pkt_info_to_pkt_type(rxd.wb.lower. lo_dword.hs_rss.pkt_info); -#endif /* * Store the mbuf address into the next entry of the array @@ -1124,10 +1092,8 @@ eth_igb_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, pkt_flags = pkt_flags | rx_desc_status_to_pkt_flags(staterr); pkt_flags = pkt_flags | rx_desc_error_to_pkt_flags(staterr); first_seg->ol_flags = pkt_flags; -#ifdef RTE_NEXT_ABI first_seg->packet_type = igb_rxd_pkt_info_to_pkt_type(rxd.wb. lower.lo_dword.hs_rss.pkt_info); -#endif /* Prefetch data of first segment, if configured to do so. */ rte_packet_prefetch((char *)first_seg->buf_addr + diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c index f47e96c..3b8719f 100644 --- a/drivers/net/enic/enic_main.c +++ b/drivers/net/enic/enic_main.c @@ -423,11 +423,7 @@ static int enic_rq_indicate_buf(struct vnic_rq *rq, rx_pkt->pkt_len = bytes_written; if (ipv4) { -#ifdef RTE_NEXT_ABI rx_pkt->packet_type = RTE_PTYPE_L3_IPV4; -#else - rx_pkt->ol_flags |= PKT_RX_IPV4_HDR; -#endif if (!csum_not_calc) { if (unlikely(!ipv4_csum_ok)) rx_pkt->ol_flags |= PKT_RX_IP_CKSUM_BAD; @@ -436,11 +432,7 @@ static int enic_rq_indicate_buf(struct vnic_rq *rq, rx_pkt->ol_flags |= PKT_RX_L4_CKSUM_BAD; } } else if (ipv6) -#ifdef RTE_NEXT_ABI rx_pkt->packet_type = RTE_PTYPE_L3_IPV6; -#else - rx_pkt->ol_flags |= PKT_RX_IPV6_HDR; -#endif } else { /* Header split */ if (sop && !eop) { @@ -453,11 +445,7 @@ static int enic_rq_indicate_buf(struct vnic_rq *rq, *rx_pkt_bucket = rx_pkt; rx_pkt->pkt_len = bytes_written; if (ipv4) { -#ifdef RTE_NEXT_ABI rx_pkt->packet_type = RTE_PTYPE_L3_IPV4; -#else - rx_pkt->ol_flags |= PKT_RX_IPV4_HDR; -#endif if (!csum_not_calc) { if (unlikely(!ipv4_csum_ok)) rx_pkt->ol_flags |= @@ -469,22 +457,14 @@ static int enic_rq_indicate_buf(struct vnic_rq *rq, PKT_RX_L4_CKSUM_BAD; } } else if (ipv6) -#ifdef RTE_NEXT_ABI rx_pkt->packet_type = RTE_PTYPE_L3_IPV6; -#else - rx_pkt->ol_flags |= PKT_RX_IPV6_HDR; -#endif } else { /* Payload */ hdr_rx_pkt = *rx_pkt_bucket; hdr_rx_pkt->pkt_len += bytes_written; if (ipv4) { -#ifdef RTE_NEXT_ABI hdr_rx_pkt->packet_type = RTE_PTYPE_L3_IPV4; -#else - hdr_rx_pkt->ol_flags |= PKT_RX_IPV4_HDR; -#endif if (!csum_not_calc) { if (unlikely(!ipv4_csum_ok)) hdr_rx_pkt->ol_flags |= @@ -496,13 +476,8 @@ static int enic_rq_indicate_buf(struct vnic_rq *rq, PKT_RX_L4_CKSUM_BAD; } } else if (ipv6) -#ifdef RTE_NEXT_ABI hdr_rx_pkt->packet_type = RTE_PTYPE_L3_IPV6; -#else - hdr_rx_pkt->ol_flags |= PKT_RX_IPV6_HDR; -#endif - } } } diff --git a/drivers/net/fm10k/fm10k_rxtx.c b/drivers/net/fm10k/fm10k_rxtx.c index b5fa2e6..d3f7b89 100644 --- a/drivers/net/fm10k/fm10k_rxtx.c +++ b/drivers/net/fm10k/fm10k_rxtx.c @@ -68,7 +68,6 @@ static inline void dump_rxd(union fm10k_rx_desc *rxd) static inline void rx_desc_to_ol_flags(struct rte_mbuf *m, const union fm10k_rx_desc *d) { -#ifdef RTE_NEXT_ABI static const uint32_t ptype_table[FM10K_RXD_PKTTYPE_MASK >> FM10K_RXD_PKTTYPE_SHIFT] __rte_cache_aligned = { @@ -91,14 +90,6 @@ rx_desc_to_ol_flags(struct rte_mbuf *m, const union fm10k_rx_desc *d) m->packet_type = ptype_table[(d->w.pkt_info & FM10K_RXD_PKTTYPE_MASK) >> FM10K_RXD_PKTTYPE_SHIFT]; -#else /* RTE_NEXT_ABI */ - uint16_t ptype; - static const uint16_t pt_lut[] = { 0, - PKT_RX_IPV4_HDR, PKT_RX_IPV4_HDR_EXT, - PKT_RX_IPV6_HDR, PKT_RX_IPV6_HDR_EXT, - 0, 0, 0 - }; -#endif /* RTE_NEXT_ABI */ if (d->w.pkt_info & FM10K_RXD_RSSTYPE_MASK) m->ol_flags |= PKT_RX_RSS_HASH; @@ -121,12 +112,6 @@ rx_desc_to_ol_flags(struct rte_mbuf *m, const union fm10k_rx_desc *d) if (unlikely(d->d.staterr & FM10K_RXD_STATUS_RXE)) m->ol_flags |= PKT_RX_RECIP_ERR; - -#ifndef RTE_NEXT_ABI - ptype = (d->d.data & FM10K_RXD_PKTTYPE_MASK_L3) >> - FM10K_RXD_PKTTYPE_SHIFT; - m->ol_flags |= pt_lut[(uint8_t)ptype]; -#endif } uint16_t diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c index eae4ab0..fd656d5 100644 --- a/drivers/net/i40e/i40e_rxtx.c +++ b/drivers/net/i40e/i40e_rxtx.c @@ -188,11 +188,9 @@ i40e_get_iee15888_flags(struct rte_mbuf *mb, uint64_t qword) | I40E_RXD_QW1_STATUS_TSYNINDX_MASK)) >> I40E_RX_DESC_STATUS_TSYNINDX_SHIFT; -#ifdef RTE_NEXT_ABI if ((mb->packet_type & RTE_PTYPE_L2_MASK) == RTE_PTYPE_L2_ETHER_TIMESYNC) pkt_flags = PKT_RX_IEEE1588_PTP; -#endif if (tsyn & 0x04) { pkt_flags |= PKT_RX_IEEE1588_TMST; mb->timesync = tsyn & 0x03; @@ -202,7 +200,6 @@ i40e_get_iee15888_flags(struct rte_mbuf *mb, uint64_t qword) } #endif -#ifdef RTE_NEXT_ABI /* For each value it means, datasheet of hardware can tell more details */ static inline uint32_t i40e_rxd_pkt_type_mapping(uint8_t ptype) @@ -735,275 +732,6 @@ i40e_rxd_pkt_type_mapping(uint8_t ptype) return ptype_table[ptype]; } -#else /* RTE_NEXT_ABI */ -/* Translate pkt types to pkt flags */ -static inline uint64_t -i40e_rxd_ptype_to_pkt_flags(uint64_t qword) -{ - uint8_t ptype = (uint8_t)((qword & I40E_RXD_QW1_PTYPE_MASK) >> - I40E_RXD_QW1_PTYPE_SHIFT); - static const uint64_t ip_ptype_map[I40E_MAX_PKT_TYPE] = { - 0, /* PTYPE 0 */ - 0, /* PTYPE 1 */ - PKT_RX_IEEE1588_PTP, /* PTYPE 2 */ - 0, /* PTYPE 3 */ - 0, /* PTYPE 4 */ - 0, /* PTYPE 5 */ - 0, /* PTYPE 6 */ - 0, /* PTYPE 7 */ - 0, /* PTYPE 8 */ - 0, /* PTYPE 9 */ - 0, /* PTYPE 10 */ - 0, /* PTYPE 11 */ - 0, /* PTYPE 12 */ - 0, /* PTYPE 13 */ - 0, /* PTYPE 14 */ - 0, /* PTYPE 15 */ - 0, /* PTYPE 16 */ - 0, /* PTYPE 17 */ - 0, /* PTYPE 18 */ - 0, /* PTYPE 19 */ - 0, /* PTYPE 20 */ - 0, /* PTYPE 21 */ - PKT_RX_IPV4_HDR, /* PTYPE 22 */ - PKT_RX_IPV4_HDR, /* PTYPE 23 */ - PKT_RX_IPV4_HDR, /* PTYPE 24 */ - 0, /* PTYPE 25 */ - PKT_RX_IPV4_HDR, /* PTYPE 26 */ - PKT_RX_IPV4_HDR, /* PTYPE 27 */ - PKT_RX_IPV4_HDR, /* PTYPE 28 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 29 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 30 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 31 */ - 0, /* PTYPE 32 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 33 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 34 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 35 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 36 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 37 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 38 */ - 0, /* PTYPE 39 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 40 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 41 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 42 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 43 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 44 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 45 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 46 */ - 0, /* PTYPE 47 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 48 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 49 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 50 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 51 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 52 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 53 */ - 0, /* PTYPE 54 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 55 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 56 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 57 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 58 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 59 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 60 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 61 */ - 0, /* PTYPE 62 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 63 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 64 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 65 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 66 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 67 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 68 */ - 0, /* PTYPE 69 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 70 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 71 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 72 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 73 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 74 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 75 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 76 */ - 0, /* PTYPE 77 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 78 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 79 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 80 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 81 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 82 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 83 */ - 0, /* PTYPE 84 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 85 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 86 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 87 */ - PKT_RX_IPV6_HDR, /* PTYPE 88 */ - PKT_RX_IPV6_HDR, /* PTYPE 89 */ - PKT_RX_IPV6_HDR, /* PTYPE 90 */ - 0, /* PTYPE 91 */ - PKT_RX_IPV6_HDR, /* PTYPE 92 */ - PKT_RX_IPV6_HDR, /* PTYPE 93 */ - PKT_RX_IPV6_HDR, /* PTYPE 94 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 95 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 96 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 97 */ - 0, /* PTYPE 98 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 99 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 100 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 101 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 102 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 103 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 104 */ - 0, /* PTYPE 105 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 106 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 107 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 108 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 109 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 110 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 111 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 112 */ - 0, /* PTYPE 113 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 114 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 115 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 116 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 117 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 118 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 119 */ - 0, /* PTYPE 120 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 121 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 122 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 123 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 124 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 125 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 126 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 127 */ - 0, /* PTYPE 128 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 129 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 130 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 131 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 132 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 133 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 134 */ - 0, /* PTYPE 135 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 136 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 137 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 138 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 139 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 140 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 141 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 142 */ - 0, /* PTYPE 143 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 144 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 145 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 146 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 147 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 148 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 149 */ - 0, /* PTYPE 150 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 151 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 152 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 153 */ - 0, /* PTYPE 154 */ - 0, /* PTYPE 155 */ - 0, /* PTYPE 156 */ - 0, /* PTYPE 157 */ - 0, /* PTYPE 158 */ - 0, /* PTYPE 159 */ - 0, /* PTYPE 160 */ - 0, /* PTYPE 161 */ - 0, /* PTYPE 162 */ - 0, /* PTYPE 163 */ - 0, /* PTYPE 164 */ - 0, /* PTYPE 165 */ - 0, /* PTYPE 166 */ - 0, /* PTYPE 167 */ - 0, /* PTYPE 168 */ - 0, /* PTYPE 169 */ - 0, /* PTYPE 170 */ - 0, /* PTYPE 171 */ - 0, /* PTYPE 172 */ - 0, /* PTYPE 173 */ - 0, /* PTYPE 174 */ - 0, /* PTYPE 175 */ - 0, /* PTYPE 176 */ - 0, /* PTYPE 177 */ - 0, /* PTYPE 178 */ - 0, /* PTYPE 179 */ - 0, /* PTYPE 180 */ - 0, /* PTYPE 181 */ - 0, /* PTYPE 182 */ - 0, /* PTYPE 183 */ - 0, /* PTYPE 184 */ - 0, /* PTYPE 185 */ - 0, /* PTYPE 186 */ - 0, /* PTYPE 187 */ - 0, /* PTYPE 188 */ - 0, /* PTYPE 189 */ - 0, /* PTYPE 190 */ - 0, /* PTYPE 191 */ - 0, /* PTYPE 192 */ - 0, /* PTYPE 193 */ - 0, /* PTYPE 194 */ - 0, /* PTYPE 195 */ - 0, /* PTYPE 196 */ - 0, /* PTYPE 197 */ - 0, /* PTYPE 198 */ - 0, /* PTYPE 199 */ - 0, /* PTYPE 200 */ - 0, /* PTYPE 201 */ - 0, /* PTYPE 202 */ - 0, /* PTYPE 203 */ - 0, /* PTYPE 204 */ - 0, /* PTYPE 205 */ - 0, /* PTYPE 206 */ - 0, /* PTYPE 207 */ - 0, /* PTYPE 208 */ - 0, /* PTYPE 209 */ - 0, /* PTYPE 210 */ - 0, /* PTYPE 211 */ - 0, /* PTYPE 212 */ - 0, /* PTYPE 213 */ - 0, /* PTYPE 214 */ - 0, /* PTYPE 215 */ - 0, /* PTYPE 216 */ - 0, /* PTYPE 217 */ - 0, /* PTYPE 218 */ - 0, /* PTYPE 219 */ - 0, /* PTYPE 220 */ - 0, /* PTYPE 221 */ - 0, /* PTYPE 222 */ - 0, /* PTYPE 223 */ - 0, /* PTYPE 224 */ - 0, /* PTYPE 225 */ - 0, /* PTYPE 226 */ - 0, /* PTYPE 227 */ - 0, /* PTYPE 228 */ - 0, /* PTYPE 229 */ - 0, /* PTYPE 230 */ - 0, /* PTYPE 231 */ - 0, /* PTYPE 232 */ - 0, /* PTYPE 233 */ - 0, /* PTYPE 234 */ - 0, /* PTYPE 235 */ - 0, /* PTYPE 236 */ - 0, /* PTYPE 237 */ - 0, /* PTYPE 238 */ - 0, /* PTYPE 239 */ - 0, /* PTYPE 240 */ - 0, /* PTYPE 241 */ - 0, /* PTYPE 242 */ - 0, /* PTYPE 243 */ - 0, /* PTYPE 244 */ - 0, /* PTYPE 245 */ - 0, /* PTYPE 246 */ - 0, /* PTYPE 247 */ - 0, /* PTYPE 248 */ - 0, /* PTYPE 249 */ - 0, /* PTYPE 250 */ - 0, /* PTYPE 251 */ - 0, /* PTYPE 252 */ - 0, /* PTYPE 253 */ - 0, /* PTYPE 254 */ - 0, /* PTYPE 255 */ - }; - - return ip_ptype_map[ptype]; -} -#endif /* RTE_NEXT_ABI */ #define I40E_RX_DESC_EXT_STATUS_FLEXBH_MASK 0x03 #define I40E_RX_DESC_EXT_STATUS_FLEXBH_FD_ID 0x01 @@ -1292,18 +1020,10 @@ i40e_rx_scan_hw_ring(struct i40e_rx_queue *rxq) i40e_rxd_to_vlan_tci(mb, &rxdp[j]); pkt_flags = i40e_rxd_status_to_pkt_flags(qword1); pkt_flags |= i40e_rxd_error_to_pkt_flags(qword1); -#ifdef RTE_NEXT_ABI mb->packet_type = i40e_rxd_pkt_type_mapping((uint8_t)((qword1 & I40E_RXD_QW1_PTYPE_MASK) >> I40E_RXD_QW1_PTYPE_SHIFT)); -#else - pkt_flags |= i40e_rxd_ptype_to_pkt_flags(qword1); - - mb->packet_type = (uint16_t)((qword1 & - I40E_RXD_QW1_PTYPE_MASK) >> - I40E_RXD_QW1_PTYPE_SHIFT); -#endif /* RTE_NEXT_ABI */ if (pkt_flags & PKT_RX_RSS_HASH) mb->hash.rss = rte_le_to_cpu_32(\ rxdp[j].wb.qword0.hi_dword.rss); @@ -1549,15 +1269,9 @@ i40e_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) i40e_rxd_to_vlan_tci(rxm, &rxd); pkt_flags = i40e_rxd_status_to_pkt_flags(qword1); pkt_flags |= i40e_rxd_error_to_pkt_flags(qword1); -#ifdef RTE_NEXT_ABI rxm->packet_type = i40e_rxd_pkt_type_mapping((uint8_t)((qword1 & I40E_RXD_QW1_PTYPE_MASK) >> I40E_RXD_QW1_PTYPE_SHIFT)); -#else - pkt_flags |= i40e_rxd_ptype_to_pkt_flags(qword1); - rxm->packet_type = (uint16_t)((qword1 & I40E_RXD_QW1_PTYPE_MASK) >> - I40E_RXD_QW1_PTYPE_SHIFT); -#endif /* RTE_NEXT_ABI */ if (pkt_flags & PKT_RX_RSS_HASH) rxm->hash.rss = rte_le_to_cpu_32(rxd.wb.qword0.hi_dword.rss); @@ -1717,16 +1431,9 @@ i40e_recv_scattered_pkts(void *rx_queue, i40e_rxd_to_vlan_tci(first_seg, &rxd); pkt_flags = i40e_rxd_status_to_pkt_flags(qword1); pkt_flags |= i40e_rxd_error_to_pkt_flags(qword1); -#ifdef RTE_NEXT_ABI first_seg->packet_type = i40e_rxd_pkt_type_mapping((uint8_t)((qword1 & I40E_RXD_QW1_PTYPE_MASK) >> I40E_RXD_QW1_PTYPE_SHIFT)); -#else - pkt_flags |= i40e_rxd_ptype_to_pkt_flags(qword1); - first_seg->packet_type = (uint16_t)((qword1 & - I40E_RXD_QW1_PTYPE_MASK) >> - I40E_RXD_QW1_PTYPE_SHIFT); -#endif /* RTE_NEXT_ABI */ if (pkt_flags & PKT_RX_RSS_HASH) rxm->hash.rss = rte_le_to_cpu_32(rxd.wb.qword0.hi_dword.rss); diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c index 91023b9..a710102 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx.c +++ b/drivers/net/ixgbe/ixgbe_rxtx.c @@ -864,7 +864,6 @@ end_of_tx: * RX functions * **********************************************************************/ -#ifdef RTE_NEXT_ABI #define IXGBE_PACKET_TYPE_IPV4 0X01 #define IXGBE_PACKET_TYPE_IPV4_TCP 0X11 #define IXGBE_PACKET_TYPE_IPV4_UDP 0X21 @@ -967,43 +966,6 @@ ixgbe_rxd_pkt_info_to_pkt_flags(uint16_t pkt_info) return ip_rss_types_map[pkt_info & 0XF]; #endif } -#else /* RTE_NEXT_ABI */ -static inline uint64_t -rx_desc_hlen_type_rss_to_pkt_flags(uint32_t hl_tp_rs) -{ - uint64_t pkt_flags; - - static const uint64_t ip_pkt_types_map[16] = { - 0, PKT_RX_IPV4_HDR, PKT_RX_IPV4_HDR_EXT, PKT_RX_IPV4_HDR_EXT, - PKT_RX_IPV6_HDR, 0, 0, 0, - PKT_RX_IPV6_HDR_EXT, 0, 0, 0, - PKT_RX_IPV6_HDR_EXT, 0, 0, 0, - }; - - static const uint64_t ip_rss_types_map[16] = { - 0, PKT_RX_RSS_HASH, PKT_RX_RSS_HASH, PKT_RX_RSS_HASH, - 0, PKT_RX_RSS_HASH, 0, PKT_RX_RSS_HASH, - PKT_RX_RSS_HASH, 0, 0, 0, - 0, 0, 0, PKT_RX_FDIR, - }; - -#ifdef RTE_LIBRTE_IEEE1588 - static uint64_t ip_pkt_etqf_map[8] = { - 0, 0, 0, PKT_RX_IEEE1588_PTP, - 0, 0, 0, 0, - }; - - pkt_flags = (hl_tp_rs & IXGBE_RXDADV_PKTTYPE_ETQF) ? - ip_pkt_etqf_map[(hl_tp_rs >> 4) & 0x07] : - ip_pkt_types_map[(hl_tp_rs >> 4) & 0x0F]; -#else - pkt_flags = (hl_tp_rs & IXGBE_RXDADV_PKTTYPE_ETQF) ? 0 : - ip_pkt_types_map[(hl_tp_rs >> 4) & 0x0F]; - -#endif - return pkt_flags | ip_rss_types_map[hl_tp_rs & 0xF]; -} -#endif /* RTE_NEXT_ABI */ static inline uint64_t rx_desc_status_to_pkt_flags(uint32_t rx_status) @@ -1058,13 +1020,9 @@ ixgbe_rx_scan_hw_ring(struct ixgbe_rx_queue *rxq) struct rte_mbuf *mb; uint16_t pkt_len; uint64_t pkt_flags; -#ifdef RTE_NEXT_ABI int nb_dd; uint32_t s[LOOK_AHEAD]; uint16_t pkt_info[LOOK_AHEAD]; -#else - int s[LOOK_AHEAD], nb_dd; -#endif /* RTE_NEXT_ABI */ int i, j, nb_rx = 0; uint32_t status; @@ -1088,11 +1046,9 @@ ixgbe_rx_scan_hw_ring(struct ixgbe_rx_queue *rxq) for (j = LOOK_AHEAD-1; j >= 0; --j) s[j] = rte_le_to_cpu_32(rxdp[j].wb.upper.status_error); -#ifdef RTE_NEXT_ABI for (j = LOOK_AHEAD - 1; j >= 0; --j) pkt_info[j] = rxdp[j].wb.lower.lo_dword. hs_rss.pkt_info; -#endif /* RTE_NEXT_ABI */ /* Compute how many status bits were set */ nb_dd = 0; @@ -1111,7 +1067,6 @@ ixgbe_rx_scan_hw_ring(struct ixgbe_rx_queue *rxq) mb->vlan_tci = rte_le_to_cpu_16(rxdp[j].wb.upper.vlan); /* convert descriptor fields to rte mbuf flags */ -#ifdef RTE_NEXT_ABI pkt_flags = rx_desc_status_to_pkt_flags(s[j]); pkt_flags |= rx_desc_error_to_pkt_flags(s[j]); pkt_flags |= @@ -1119,15 +1074,6 @@ ixgbe_rx_scan_hw_ring(struct ixgbe_rx_queue *rxq) mb->ol_flags = pkt_flags; mb->packet_type = ixgbe_rxd_pkt_info_to_pkt_type(pkt_info[j]); -#else /* RTE_NEXT_ABI */ - pkt_flags = rx_desc_hlen_type_rss_to_pkt_flags( - rte_le_to_cpu_32( - rxdp[j].wb.lower.lo_dword.data)); - /* reuse status field from scan list */ - pkt_flags |= rx_desc_status_to_pkt_flags(s[j]); - pkt_flags |= rx_desc_error_to_pkt_flags(s[j]); - mb->ol_flags = pkt_flags; -#endif /* RTE_NEXT_ABI */ if (likely(pkt_flags & PKT_RX_RSS_HASH)) mb->hash.rss = rte_le_to_cpu_32( @@ -1328,11 +1274,7 @@ ixgbe_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, union ixgbe_adv_rx_desc rxd; uint64_t dma_addr; uint32_t staterr; -#ifdef RTE_NEXT_ABI uint32_t pkt_info; -#else - uint32_t hlen_type_rss; -#endif uint16_t pkt_len; uint16_t rx_id; uint16_t nb_rx; @@ -1450,7 +1392,6 @@ ixgbe_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, rxm->data_len = pkt_len; rxm->port = rxq->port_id; -#ifdef RTE_NEXT_ABI pkt_info = rte_le_to_cpu_32(rxd.wb.lower.lo_dword.hs_rss. pkt_info); /* Only valid if PKT_RX_VLAN_PKT set in pkt_flags */ @@ -1462,16 +1403,6 @@ ixgbe_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, ixgbe_rxd_pkt_info_to_pkt_flags(pkt_info); rxm->ol_flags = pkt_flags; rxm->packet_type = ixgbe_rxd_pkt_info_to_pkt_type(pkt_info); -#else /* RTE_NEXT_ABI */ - hlen_type_rss = rte_le_to_cpu_32(rxd.wb.lower.lo_dword.data); - /* Only valid if PKT_RX_VLAN_PKT set in pkt_flags */ - rxm->vlan_tci = rte_le_to_cpu_16(rxd.wb.upper.vlan); - - pkt_flags = rx_desc_hlen_type_rss_to_pkt_flags(hlen_type_rss); - pkt_flags = pkt_flags | rx_desc_status_to_pkt_flags(staterr); - pkt_flags = pkt_flags | rx_desc_error_to_pkt_flags(staterr); - rxm->ol_flags = pkt_flags; -#endif /* RTE_NEXT_ABI */ if (likely(pkt_flags & PKT_RX_RSS_HASH)) rxm->hash.rss = rte_le_to_cpu_32( @@ -1547,7 +1478,6 @@ ixgbe_fill_cluster_head_buf( uint8_t port_id, uint32_t staterr) { -#ifdef RTE_NEXT_ABI uint16_t pkt_info; uint64_t pkt_flags; @@ -1563,23 +1493,6 @@ ixgbe_fill_cluster_head_buf( pkt_flags |= ixgbe_rxd_pkt_info_to_pkt_flags(pkt_info); head->ol_flags = pkt_flags; head->packet_type = ixgbe_rxd_pkt_info_to_pkt_type(pkt_info); -#else /* RTE_NEXT_ABI */ - uint32_t hlen_type_rss; - uint64_t pkt_flags; - - head->port = port_id; - - /* - * The vlan_tci field is only valid when PKT_RX_VLAN_PKT is - * set in the pkt_flags field. - */ - head->vlan_tci = rte_le_to_cpu_16(desc->wb.upper.vlan); - hlen_type_rss = rte_le_to_cpu_32(desc->wb.lower.lo_dword.data); - pkt_flags = rx_desc_hlen_type_rss_to_pkt_flags(hlen_type_rss); - pkt_flags |= rx_desc_status_to_pkt_flags(staterr); - pkt_flags |= rx_desc_error_to_pkt_flags(staterr); - head->ol_flags = pkt_flags; -#endif /* RTE_NEXT_ABI */ if (likely(pkt_flags & PKT_RX_RSS_HASH)) head->hash.rss = rte_le_to_cpu_32(desc->wb.lower.hi_dword.rss); diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec.c b/drivers/net/ixgbe/ixgbe_rxtx_vec.c index cf25a53..6979b1e 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx_vec.c +++ b/drivers/net/ixgbe/ixgbe_rxtx_vec.c @@ -140,19 +140,11 @@ ixgbe_rxq_rearm(struct ixgbe_rx_queue *rxq) */ #ifdef RTE_IXGBE_RX_OLFLAGS_ENABLE -#ifndef RTE_NEXT_ABI -#define OLFLAGS_MASK ((uint16_t)(PKT_RX_VLAN_PKT | PKT_RX_IPV4_HDR |\ - PKT_RX_IPV4_HDR_EXT | PKT_RX_IPV6_HDR |\ - PKT_RX_IPV6_HDR_EXT)) -#define PTYPE_SHIFT (1) -#endif /* RTE_NEXT_ABI */ - #define VTAG_SHIFT (3) static inline void desc_to_olflags_v(__m128i descs[4], struct rte_mbuf **rx_pkts) { -#ifdef RTE_NEXT_ABI __m128i ptype0, ptype1, vtag0, vtag1; union { uint16_t e[4]; @@ -190,50 +182,6 @@ desc_to_olflags_v(__m128i descs[4], struct rte_mbuf **rx_pkts) vtag1 = _mm_or_si128(ptype0, vtag1); vol.dword = _mm_cvtsi128_si64(vtag1); -#else - __m128i ptype0, ptype1, vtag0, vtag1; - union { - uint16_t e[4]; - uint64_t dword; - } vol; - - /* pkt type + vlan olflags mask */ - const __m128i pkttype_msk = _mm_set_epi16( - 0x0000, 0x0000, 0x0000, 0x0000, - OLFLAGS_MASK, OLFLAGS_MASK, OLFLAGS_MASK, OLFLAGS_MASK); - - /* mask everything except rss type */ - const __m128i rsstype_msk = _mm_set_epi16( - 0x0000, 0x0000, 0x0000, 0x0000, - 0x000F, 0x000F, 0x000F, 0x000F); - - /* rss type to PKT_RX_RSS_HASH translation */ - const __m128i rss_flags = _mm_set_epi8(PKT_RX_FDIR, 0, 0, 0, - 0, 0, 0, PKT_RX_RSS_HASH, - PKT_RX_RSS_HASH, 0, PKT_RX_RSS_HASH, 0, - PKT_RX_RSS_HASH, PKT_RX_RSS_HASH, PKT_RX_RSS_HASH, 0); - - ptype0 = _mm_unpacklo_epi16(descs[0], descs[1]); - ptype1 = _mm_unpacklo_epi16(descs[2], descs[3]); - vtag0 = _mm_unpackhi_epi16(descs[0], descs[1]); - vtag1 = _mm_unpackhi_epi16(descs[2], descs[3]); - - ptype1 = _mm_unpacklo_epi32(ptype0, ptype1); - vtag1 = _mm_unpacklo_epi32(vtag0, vtag1); - - ptype0 = _mm_and_si128(ptype1, rsstype_msk); - ptype0 = _mm_shuffle_epi8(rss_flags, ptype0); - - ptype1 = _mm_slli_epi16(ptype1, PTYPE_SHIFT); - vtag1 = _mm_srli_epi16(vtag1, VTAG_SHIFT); - - ptype1 = _mm_or_si128(ptype1, vtag1); - ptype1 = _mm_and_si128(ptype1, pkttype_msk); - - ptype0 = _mm_or_si128(ptype0, ptype1); - - vol.dword = _mm_cvtsi128_si64(ptype0); -#endif /* RTE_NEXT_ABI */ rx_pkts[0]->ol_flags = vol.e[0]; rx_pkts[1]->ol_flags = vol.e[1]; @@ -264,7 +212,6 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts, int pos; uint64_t var; __m128i shuf_msk; -#ifdef RTE_NEXT_ABI __m128i crc_adjust = _mm_set_epi16( 0, 0, 0, /* ignore non-length fields */ -rxq->crc_len, /* sub crc on data_len */ @@ -275,16 +222,6 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts, __m128i dd_check, eop_check; __m128i desc_mask = _mm_set_epi32(0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFF07F0); -#else - __m128i crc_adjust = _mm_set_epi16( - 0, 0, 0, 0, /* ignore non-length fields */ - 0, /* ignore high-16bits of pkt_len */ - -rxq->crc_len, /* sub crc on pkt_len */ - -rxq->crc_len, /* sub crc on data_len */ - 0 /* ignore pkt_type field */ - ); - __m128i dd_check, eop_check; -#endif /* RTE_NEXT_ABI */ if (unlikely(nb_pkts < RTE_IXGBE_VPMD_RX_BURST)) return 0; @@ -313,7 +250,6 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts, eop_check = _mm_set_epi64x(0x0000000200000002LL, 0x0000000200000002LL); /* mask to shuffle from desc. to mbuf */ -#ifdef RTE_NEXT_ABI shuf_msk = _mm_set_epi8( 7, 6, 5, 4, /* octet 4~7, 32bits rss */ 15, 14, /* octet 14~15, low 16 bits vlan_macip */ @@ -324,23 +260,11 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts, 1, /* octet 1, 8 bits pkt_type field */ 0 /* octet 0, 4 bits offset 4 pkt_type field */ ); -#else - shuf_msk = _mm_set_epi8( - 7, 6, 5, 4, /* octet 4~7, 32bits rss */ - 0xFF, 0xFF, /* skip high 16 bits vlan_macip, zero out */ - 15, 14, /* octet 14~15, low 16 bits vlan_macip */ - 0xFF, 0xFF, /* skip high 16 bits pkt_len, zero out */ - 13, 12, /* octet 12~13, low 16 bits pkt_len */ - 13, 12, /* octet 12~13, 16 bits data_len */ - 0xFF, 0xFF /* skip pkt_type field */ - ); -#endif /* RTE_NEXT_ABI */ /* Cache is empty -> need to scan the buffer rings, but first move * the next 'n' mbufs into the cache */ sw_ring = &rxq->sw_ring[rxq->rx_tail]; -#ifdef RTE_NEXT_ABI /* A. load 4 packet in one loop * [A*. mask out 4 unused dirty field in desc] * B. copy 4 mbuf point from swring to rx_pkts @@ -348,20 +272,10 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts, * [C*. extract the end-of-packet bit, if requested] * D. fill info. from desc to mbuf */ -#else - /* A. load 4 packet in one loop - * B. copy 4 mbuf point from swring to rx_pkts - * C. calc the number of DD bits among the 4 packets - * [C*. extract the end-of-packet bit, if requested] - * D. fill info. from desc to mbuf - */ -#endif /* RTE_NEXT_ABI */ for (pos = 0, nb_pkts_recd = 0; pos < RTE_IXGBE_VPMD_RX_BURST; pos += RTE_IXGBE_DESCS_PER_LOOP, rxdp += RTE_IXGBE_DESCS_PER_LOOP) { -#ifdef RTE_NEXT_ABI __m128i descs0[RTE_IXGBE_DESCS_PER_LOOP]; -#endif /* RTE_NEXT_ABI */ __m128i descs[RTE_IXGBE_DESCS_PER_LOOP]; __m128i pkt_mb1, pkt_mb2, pkt_mb3, pkt_mb4; __m128i zero, staterr, sterr_tmp1, sterr_tmp2; @@ -377,7 +291,6 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts, /* B.1 load 1 mbuf point */ mbp1 = _mm_loadu_si128((__m128i *)&sw_ring[pos]); -#ifdef RTE_NEXT_ABI /* Read desc statuses backwards to avoid race condition */ /* A.1 load 4 pkts desc */ descs0[3] = _mm_loadu_si128((__m128i *)(rxdp + 3)); @@ -403,25 +316,6 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts, /* A* mask out 0~3 bits RSS type */ descs[1] = _mm_and_si128(descs0[1], desc_mask); descs[0] = _mm_and_si128(descs0[0], desc_mask); -#else - /* Read desc statuses backwards to avoid race condition */ - /* A.1 load 4 pkts desc */ - descs[3] = _mm_loadu_si128((__m128i *)(rxdp + 3)); - - /* B.2 copy 2 mbuf point into rx_pkts */ - _mm_storeu_si128((__m128i *)&rx_pkts[pos], mbp1); - - /* B.1 load 1 mbuf point */ - mbp2 = _mm_loadu_si128((__m128i *)&sw_ring[pos + 2]); - - descs[2] = _mm_loadu_si128((__m128i *)(rxdp + 2)); - /* B.1 load 2 mbuf point */ - descs[1] = _mm_loadu_si128((__m128i *)(rxdp + 1)); - descs[0] = _mm_loadu_si128((__m128i *)(rxdp)); - - /* B.2 copy 2 mbuf point into rx_pkts */ - _mm_storeu_si128((__m128i *)&rx_pkts[pos + 2], mbp2); -#endif /* RTE_NEXT_ABI */ /* avoid compiler reorder optimization */ rte_compiler_barrier(); @@ -435,13 +329,8 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts, /* C.1 4=>2 filter staterr info only */ sterr_tmp1 = _mm_unpackhi_epi32(descs[1], descs[0]); -#ifdef RTE_NEXT_ABI /* set ol_flags with vlan packet type */ desc_to_olflags_v(descs0, &rx_pkts[pos]); -#else - /* set ol_flags with packet type and vlan tag */ - desc_to_olflags_v(descs, &rx_pkts[pos]); -#endif /* RTE_NEXT_ABI */ /* D.2 pkt 3,4 set in_port/nb_seg and remove crc */ pkt_mb4 = _mm_add_epi16(pkt_mb4, crc_adjust); diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index fa3cb7e..6c6342f 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -1264,16 +1264,7 @@ mlx4_tx_burst(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n) * offsets but automatically recognizes the packet * type. For inner L3/L4 checksums, only VXLAN (UDP) * tunnels are currently supported. */ -#ifdef RTE_NEXT_ABI if (RTE_ETH_IS_TUNNEL_PKT(buf->packet_type)) -#else - /* FIXME: since PKT_TX_UDP_TUNNEL_PKT has been removed, - * the outer packet type is unknown. All we know is - * that the L2 header is of unusual length (not - * ETHER_HDR_LEN with or without 802.1Q header). */ - if ((buf->l2_len != ETHER_HDR_LEN) && - (buf->l2_len != (ETHER_HDR_LEN + 4))) -#endif send_flags |= IBV_EXP_QP_BURST_TUNNEL; } if (likely(segs == 1)) { @@ -2488,7 +2479,6 @@ rxq_cleanup(struct rxq *rxq) memset(rxq, 0, sizeof(*rxq)); } -#ifdef RTE_NEXT_ABI /** * Translate RX completion flags to packet type. * @@ -2521,7 +2511,6 @@ rxq_cq_to_pkt_type(uint32_t flags) IBV_EXP_CQ_RX_IPV6_PACKET, RTE_PTYPE_L3_IPV6); return pkt_type; } -#endif /* RTE_NEXT_ABI */ /** * Translate RX completion flags to offload flags. @@ -2539,11 +2528,6 @@ rxq_cq_to_ol_flags(const struct rxq *rxq, uint32_t flags) { uint32_t ol_flags = 0; -#ifndef RTE_NEXT_ABI - ol_flags = - TRANSPOSE(flags, IBV_EXP_CQ_RX_IPV4_PACKET, PKT_RX_IPV4_HDR) | - TRANSPOSE(flags, IBV_EXP_CQ_RX_IPV6_PACKET, PKT_RX_IPV6_HDR); -#endif if (rxq->csum) ol_flags |= TRANSPOSE(~flags, @@ -2559,14 +2543,6 @@ rxq_cq_to_ol_flags(const struct rxq *rxq, uint32_t flags) */ if ((flags & IBV_EXP_CQ_RX_TUNNEL_PACKET) && (rxq->csum_l2tun)) ol_flags |= -#ifndef RTE_NEXT_ABI - TRANSPOSE(flags, - IBV_EXP_CQ_RX_OUTER_IPV4_PACKET, - PKT_RX_TUNNEL_IPV4_HDR) | - TRANSPOSE(flags, - IBV_EXP_CQ_RX_OUTER_IPV6_PACKET, - PKT_RX_TUNNEL_IPV6_HDR) | -#endif TRANSPOSE(~flags, IBV_EXP_CQ_RX_OUTER_IP_CSUM_OK, PKT_RX_IP_CKSUM_BAD) | @@ -2758,10 +2734,7 @@ mlx4_rx_burst_sp(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n) NB_SEGS(pkt_buf) = j; PORT(pkt_buf) = rxq->port_id; PKT_LEN(pkt_buf) = pkt_buf_len; -#ifdef RTE_NEXT_ABI pkt_buf->packet_type = rxq_cq_to_pkt_type(flags); -#endif - pkt_buf->ol_flags = rxq_cq_to_ol_flags(rxq, flags); /* Return packet. */ *(pkts++) = pkt_buf; @@ -2921,9 +2894,7 @@ mlx4_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n) NEXT(seg) = NULL; PKT_LEN(seg) = len; DATA_LEN(seg) = len; -#ifdef RTE_NEXT_ABI seg->packet_type = rxq_cq_to_pkt_type(flags); -#endif seg->ol_flags = rxq_cq_to_ol_flags(rxq, flags); /* Return packet. */ diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c index 39ad6ef..4de5d89 100644 --- a/drivers/net/vmxnet3/vmxnet3_rxtx.c +++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c @@ -520,17 +520,9 @@ vmxnet3_rx_offload(const Vmxnet3_RxCompDesc *rcd, struct rte_mbuf *rxm) struct ipv4_hdr *ip = (struct ipv4_hdr *)(eth + 1); if (((ip->version_ihl & 0xf) << 2) > (int)sizeof(struct ipv4_hdr)) -#ifdef RTE_NEXT_ABI rxm->packet_type = RTE_PTYPE_L3_IPV4_EXT; -#else - rxm->ol_flags |= PKT_RX_IPV4_HDR_EXT; -#endif else -#ifdef RTE_NEXT_ABI rxm->packet_type = RTE_PTYPE_L3_IPV4; -#else - rxm->ol_flags |= PKT_RX_IPV4_HDR; -#endif if (!rcd->cnc) { if (!rcd->ipc) diff --git a/examples/ip_fragmentation/main.c b/examples/ip_fragmentation/main.c index b71d05f..fbc0b8d 100644 --- a/examples/ip_fragmentation/main.c +++ b/examples/ip_fragmentation/main.c @@ -283,11 +283,7 @@ l3fwd_simple_forward(struct rte_mbuf *m, struct lcore_queue_conf *qconf, len = qconf->tx_mbufs[port_out].len; /* if this is an IPv4 packet */ -#ifdef RTE_NEXT_ABI if (RTE_ETH_IS_IPV4_HDR(m->packet_type)) { -#else - if (m->ol_flags & PKT_RX_IPV4_HDR) { -#endif struct ipv4_hdr *ip_hdr; uint32_t ip_dst; /* Read the lookup key (i.e. ip_dst) from the input packet */ @@ -321,14 +317,8 @@ l3fwd_simple_forward(struct rte_mbuf *m, struct lcore_queue_conf *qconf, if (unlikely (len2 < 0)) return; } -#ifdef RTE_NEXT_ABI } else if (RTE_ETH_IS_IPV6_HDR(m->packet_type)) { /* if this is an IPv6 packet */ -#else - } - /* if this is an IPv6 packet */ - else if (m->ol_flags & PKT_RX_IPV6_HDR) { -#endif struct ipv6_hdr *ip_hdr; ipv6 = 1; diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c index f1c47ad..741c398 100644 --- a/examples/ip_reassembly/main.c +++ b/examples/ip_reassembly/main.c @@ -356,11 +356,7 @@ reassemble(struct rte_mbuf *m, uint8_t portid, uint32_t queue, dst_port = portid; /* if packet is IPv4 */ -#ifdef RTE_NEXT_ABI if (RTE_ETH_IS_IPV4_HDR(m->packet_type)) { -#else - if (m->ol_flags & (PKT_RX_IPV4_HDR)) { -#endif struct ipv4_hdr *ip_hdr; uint32_t ip_dst; @@ -400,14 +396,8 @@ reassemble(struct rte_mbuf *m, uint8_t portid, uint32_t queue, } eth_hdr->ether_type = rte_be_to_cpu_16(ETHER_TYPE_IPv4); -#ifdef RTE_NEXT_ABI } else if (RTE_ETH_IS_IPV6_HDR(m->packet_type)) { /* if packet is IPv6 */ -#else - } - /* if packet is IPv6 */ - else if (m->ol_flags & (PKT_RX_IPV6_HDR | PKT_RX_IPV6_HDR_EXT)) { -#endif struct ipv6_extension_fragment *frag_hdr; struct ipv6_hdr *ip_hdr; diff --git a/examples/l3fwd-acl/main.c b/examples/l3fwd-acl/main.c index b2bdf2f..f612671 100644 --- a/examples/l3fwd-acl/main.c +++ b/examples/l3fwd-acl/main.c @@ -645,13 +645,7 @@ prepare_one_packet(struct rte_mbuf **pkts_in, struct acl_search_t *acl, struct ipv4_hdr *ipv4_hdr; struct rte_mbuf *pkt = pkts_in[index]; -#ifdef RTE_NEXT_ABI if (RTE_ETH_IS_IPV4_HDR(pkt->packet_type)) { -#else - int type = pkt->ol_flags & (PKT_RX_IPV4_HDR | PKT_RX_IPV6_HDR); - - if (type == PKT_RX_IPV4_HDR) { -#endif ipv4_hdr = rte_pktmbuf_mtod_offset(pkt, struct ipv4_hdr *, sizeof(struct ether_hdr)); @@ -670,11 +664,7 @@ prepare_one_packet(struct rte_mbuf **pkts_in, struct acl_search_t *acl, /* Not a valid IPv4 packet */ rte_pktmbuf_free(pkt); } -#ifdef RTE_NEXT_ABI } else if (RTE_ETH_IS_IPV6_HDR(pkt->packet_type)) { -#else - } else if (type == PKT_RX_IPV6_HDR) { -#endif /* Fill acl structure */ acl->data_ipv6[acl->num_ipv6] = MBUF_IPV6_2PROTO(pkt); acl->m_ipv6[(acl->num_ipv6)++] = pkt; @@ -692,22 +682,12 @@ prepare_one_packet(struct rte_mbuf **pkts_in, struct acl_search_t *acl, { struct rte_mbuf *pkt = pkts_in[index]; -#ifdef RTE_NEXT_ABI if (RTE_ETH_IS_IPV4_HDR(pkt->packet_type)) { -#else - int type = pkt->ol_flags & (PKT_RX_IPV4_HDR | PKT_RX_IPV6_HDR); - - if (type == PKT_RX_IPV4_HDR) { -#endif /* Fill acl structure */ acl->data_ipv4[acl->num_ipv4] = MBUF_IPV4_2PROTO(pkt); acl->m_ipv4[(acl->num_ipv4)++] = pkt; -#ifdef RTE_NEXT_ABI } else if (RTE_ETH_IS_IPV6_HDR(pkt->packet_type)) { -#else - } else if (type == PKT_RX_IPV6_HDR) { -#endif /* Fill acl structure */ acl->data_ipv6[acl->num_ipv6] = MBUF_IPV6_2PROTO(pkt); acl->m_ipv6[(acl->num_ipv6)++] = pkt; @@ -755,17 +735,10 @@ send_one_packet(struct rte_mbuf *m, uint32_t res) /* in the ACL list, drop it */ #ifdef L3FWDACL_DEBUG if ((res & ACL_DENY_SIGNATURE) != 0) { -#ifdef RTE_NEXT_ABI if (RTE_ETH_IS_IPV4_HDR(m->packet_type)) dump_acl4_rule(m, res); else if (RTE_ETH_IS_IPV6_HDR(m->packet_type)) dump_acl6_rule(m, res); -#else - if (m->ol_flags & PKT_RX_IPV4_HDR) - dump_acl4_rule(m, res); - else - dump_acl6_rule(m, res); -#endif /* RTE_NEXT_ABI */ } #endif rte_pktmbuf_free(m); diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c index 086f29b..8bb88ce 100644 --- a/examples/l3fwd-power/main.c +++ b/examples/l3fwd-power/main.c @@ -650,11 +650,7 @@ l3fwd_simple_forward(struct rte_mbuf *m, uint8_t portid, eth_hdr = rte_pktmbuf_mtod(m, struct ether_hdr *); -#ifdef RTE_NEXT_ABI if (RTE_ETH_IS_IPV4_HDR(m->packet_type)) { -#else - if (m->ol_flags & PKT_RX_IPV4_HDR) { -#endif /* Handle IPv4 headers.*/ ipv4_hdr = rte_pktmbuf_mtod_offset(m, struct ipv4_hdr *, @@ -689,12 +685,7 @@ l3fwd_simple_forward(struct rte_mbuf *m, uint8_t portid, ether_addr_copy(&ports_eth_addr[dst_port], ð_hdr->s_addr); send_single_packet(m, dst_port); -#ifdef RTE_NEXT_ABI } else if (RTE_ETH_IS_IPV6_HDR(m->packet_type)) { -#else - } - else { -#endif /* Handle IPv6 headers.*/ #if (APP_LOOKUP_METHOD == APP_LOOKUP_EXACT_MATCH) struct ipv6_hdr *ipv6_hdr; diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c index fe5a257..1f3e5c6 100644 --- a/examples/l3fwd/main.c +++ b/examples/l3fwd/main.c @@ -1073,11 +1073,7 @@ l3fwd_simple_forward(struct rte_mbuf *m, uint8_t portid, struct lcore_conf *qcon eth_hdr = rte_pktmbuf_mtod(m, struct ether_hdr *); -#ifdef RTE_NEXT_ABI if (RTE_ETH_IS_IPV4_HDR(m->packet_type)) { -#else - if (m->ol_flags & PKT_RX_IPV4_HDR) { -#endif /* Handle IPv4 headers.*/ ipv4_hdr = rte_pktmbuf_mtod_offset(m, struct ipv4_hdr *, sizeof(struct ether_hdr)); @@ -1108,11 +1104,7 @@ l3fwd_simple_forward(struct rte_mbuf *m, uint8_t portid, struct lcore_conf *qcon ether_addr_copy(&ports_eth_addr[dst_port], ð_hdr->s_addr); send_single_packet(m, dst_port); -#ifdef RTE_NEXT_ABI } else if (RTE_ETH_IS_IPV6_HDR(m->packet_type)) { -#else - } else { -#endif /* Handle IPv6 headers.*/ struct ipv6_hdr *ipv6_hdr; @@ -1131,13 +1123,9 @@ l3fwd_simple_forward(struct rte_mbuf *m, uint8_t portid, struct lcore_conf *qcon ether_addr_copy(&ports_eth_addr[dst_port], ð_hdr->s_addr); send_single_packet(m, dst_port); -#ifdef RTE_NEXT_ABI } else /* Free the mbuf that contains non-IPV4/IPV6 packet */ rte_pktmbuf_free(m); -#else - } -#endif } #if ((APP_LOOKUP_METHOD == APP_LOOKUP_LPM) && \ @@ -1163,19 +1151,11 @@ l3fwd_simple_forward(struct rte_mbuf *m, uint8_t portid, struct lcore_conf *qcon * to BAD_PORT value. */ static inline __attribute__((always_inline)) void -#ifdef RTE_NEXT_ABI rfc1812_process(struct ipv4_hdr *ipv4_hdr, uint16_t *dp, uint32_t ptype) -#else -rfc1812_process(struct ipv4_hdr *ipv4_hdr, uint16_t *dp, uint32_t flags) -#endif { uint8_t ihl; -#ifdef RTE_NEXT_ABI if (RTE_ETH_IS_IPV4_HDR(ptype)) { -#else - if ((flags & PKT_RX_IPV4_HDR) != 0) { -#endif ihl = ipv4_hdr->version_ihl - IPV4_MIN_VER_IHL; ipv4_hdr->time_to_live--; @@ -1206,19 +1186,11 @@ get_dst_port(const struct lcore_conf *qconf, struct rte_mbuf *pkt, struct ipv6_hdr *ipv6_hdr; struct ether_hdr *eth_hdr; -#ifdef RTE_NEXT_ABI if (RTE_ETH_IS_IPV4_HDR(pkt->packet_type)) { -#else - if (pkt->ol_flags & PKT_RX_IPV4_HDR) { -#endif if (rte_lpm_lookup(qconf->ipv4_lookup_struct, dst_ipv4, &next_hop) != 0) next_hop = portid; -#ifdef RTE_NEXT_ABI } else if (RTE_ETH_IS_IPV6_HDR(pkt->packet_type)) { -#else - } else if (pkt->ol_flags & PKT_RX_IPV6_HDR) { -#endif eth_hdr = rte_pktmbuf_mtod(pkt, struct ether_hdr *); ipv6_hdr = (struct ipv6_hdr *)(eth_hdr + 1); if (rte_lpm6_lookup(qconf->ipv6_lookup_struct, @@ -1252,17 +1224,12 @@ process_packet(struct lcore_conf *qconf, struct rte_mbuf *pkt, ve = val_eth[dp]; dst_port[0] = dp; -#ifdef RTE_NEXT_ABI rfc1812_process(ipv4_hdr, dst_port, pkt->packet_type); -#else - rfc1812_process(ipv4_hdr, dst_port, pkt->ol_flags); -#endif te = _mm_blend_epi16(te, ve, MASK_ETH); _mm_store_si128((__m128i *)eth_hdr, te); } -#ifdef RTE_NEXT_ABI /* * Read packet_type and destination IPV4 addresses from 4 mbufs. */ @@ -1297,57 +1264,18 @@ processx4_step1(struct rte_mbuf *pkt[FWDSTEP], dip[0] = _mm_set_epi32(x3, x2, x1, x0); } -#else /* RTE_NEXT_ABI */ -/* - * Read ol_flags and destination IPV4 addresses from 4 mbufs. - */ -static inline void -processx4_step1(struct rte_mbuf *pkt[FWDSTEP], __m128i *dip, uint32_t *flag) -{ - struct ipv4_hdr *ipv4_hdr; - struct ether_hdr *eth_hdr; - uint32_t x0, x1, x2, x3; - - eth_hdr = rte_pktmbuf_mtod(pkt[0], struct ether_hdr *); - ipv4_hdr = (struct ipv4_hdr *)(eth_hdr + 1); - x0 = ipv4_hdr->dst_addr; - flag[0] = pkt[0]->ol_flags & PKT_RX_IPV4_HDR; - - eth_hdr = rte_pktmbuf_mtod(pkt[1], struct ether_hdr *); - ipv4_hdr = (struct ipv4_hdr *)(eth_hdr + 1); - x1 = ipv4_hdr->dst_addr; - flag[0] &= pkt[1]->ol_flags; - - eth_hdr = rte_pktmbuf_mtod(pkt[2], struct ether_hdr *); - ipv4_hdr = (struct ipv4_hdr *)(eth_hdr + 1); - x2 = ipv4_hdr->dst_addr; - flag[0] &= pkt[2]->ol_flags; - - eth_hdr = rte_pktmbuf_mtod(pkt[3], struct ether_hdr *); - ipv4_hdr = (struct ipv4_hdr *)(eth_hdr + 1); - x3 = ipv4_hdr->dst_addr; - flag[0] &= pkt[3]->ol_flags; - - dip[0] = _mm_set_epi32(x3, x2, x1, x0); -} -#endif /* RTE_NEXT_ABI */ /* * Lookup into LPM for destination port. * If lookup fails, use incoming port (portid) as destination port. */ static inline void -#ifdef RTE_NEXT_ABI processx4_step2(const struct lcore_conf *qconf, __m128i dip, uint32_t ipv4_flag, uint8_t portid, struct rte_mbuf *pkt[FWDSTEP], uint16_t dprt[FWDSTEP]) -#else -processx4_step2(const struct lcore_conf *qconf, __m128i dip, uint32_t flag, - uint8_t portid, struct rte_mbuf *pkt[FWDSTEP], uint16_t dprt[FWDSTEP]) -#endif /* RTE_NEXT_ABI */ { rte_xmm_t dst; const __m128i bswap_mask = _mm_set_epi8(12, 13, 14, 15, 8, 9, 10, 11, @@ -1357,11 +1285,7 @@ processx4_step2(const struct lcore_conf *qconf, __m128i dip, uint32_t flag, dip = _mm_shuffle_epi8(dip, bswap_mask); /* if all 4 packets are IPV4. */ -#ifdef RTE_NEXT_ABI if (likely(ipv4_flag)) { -#else - if (likely(flag != 0)) { -#endif rte_lpm_lookupx4(qconf->ipv4_lookup_struct, dip, dprt, portid); } else { dst.x = dip; @@ -1411,7 +1335,6 @@ processx4_step3(struct rte_mbuf *pkt[FWDSTEP], uint16_t dst_port[FWDSTEP]) _mm_store_si128(p[2], te[2]); _mm_store_si128(p[3], te[3]); -#ifdef RTE_NEXT_ABI rfc1812_process((struct ipv4_hdr *)((struct ether_hdr *)p[0] + 1), &dst_port[0], pkt[0]->packet_type); rfc1812_process((struct ipv4_hdr *)((struct ether_hdr *)p[1] + 1), @@ -1420,16 +1343,6 @@ processx4_step3(struct rte_mbuf *pkt[FWDSTEP], uint16_t dst_port[FWDSTEP]) &dst_port[2], pkt[2]->packet_type); rfc1812_process((struct ipv4_hdr *)((struct ether_hdr *)p[3] + 1), &dst_port[3], pkt[3]->packet_type); -#else /* RTE_NEXT_ABI */ - rfc1812_process((struct ipv4_hdr *)((struct ether_hdr *)p[0] + 1), - &dst_port[0], pkt[0]->ol_flags); - rfc1812_process((struct ipv4_hdr *)((struct ether_hdr *)p[1] + 1), - &dst_port[1], pkt[1]->ol_flags); - rfc1812_process((struct ipv4_hdr *)((struct ether_hdr *)p[2] + 1), - &dst_port[2], pkt[2]->ol_flags); - rfc1812_process((struct ipv4_hdr *)((struct ether_hdr *)p[3] + 1), - &dst_port[3], pkt[3]->ol_flags); -#endif /* RTE_NEXT_ABI */ } /* @@ -1616,11 +1529,7 @@ main_loop(__attribute__((unused)) void *dummy) uint16_t *lp; uint16_t dst_port[MAX_PKT_BURST]; __m128i dip[MAX_PKT_BURST / FWDSTEP]; -#ifdef RTE_NEXT_ABI uint32_t ipv4_flag[MAX_PKT_BURST / FWDSTEP]; -#else - uint32_t flag[MAX_PKT_BURST / FWDSTEP]; -#endif uint16_t pnum[MAX_PKT_BURST + 1]; #endif @@ -1690,7 +1599,6 @@ main_loop(__attribute__((unused)) void *dummy) */ int32_t n = RTE_ALIGN_FLOOR(nb_rx, 8); for (j = 0; j < n; j += 8) { -#ifdef RTE_NEXT_ABI uint32_t pkt_type = pkts_burst[j]->packet_type & pkts_burst[j+1]->packet_type & @@ -1705,20 +1613,6 @@ main_loop(__attribute__((unused)) void *dummy) &pkts_burst[j], portid, qconf); } else if (pkt_type & RTE_PTYPE_L3_IPV6) { -#else /* RTE_NEXT_ABI */ - uint32_t ol_flag = pkts_burst[j]->ol_flags - & pkts_burst[j+1]->ol_flags - & pkts_burst[j+2]->ol_flags - & pkts_burst[j+3]->ol_flags - & pkts_burst[j+4]->ol_flags - & pkts_burst[j+5]->ol_flags - & pkts_burst[j+6]->ol_flags - & pkts_burst[j+7]->ol_flags; - if (ol_flag & PKT_RX_IPV4_HDR ) { - simple_ipv4_fwd_8pkts(&pkts_burst[j], - portid, qconf); - } else if (ol_flag & PKT_RX_IPV6_HDR) { -#endif /* RTE_NEXT_ABI */ simple_ipv6_fwd_8pkts(&pkts_burst[j], portid, qconf); } else { @@ -1751,21 +1645,13 @@ main_loop(__attribute__((unused)) void *dummy) for (j = 0; j != k; j += FWDSTEP) { processx4_step1(&pkts_burst[j], &dip[j / FWDSTEP], -#ifdef RTE_NEXT_ABI &ipv4_flag[j / FWDSTEP]); -#else - &flag[j / FWDSTEP]); -#endif } k = RTE_ALIGN_FLOOR(nb_rx, FWDSTEP); for (j = 0; j != k; j += FWDSTEP) { processx4_step2(qconf, dip[j / FWDSTEP], -#ifdef RTE_NEXT_ABI ipv4_flag[j / FWDSTEP], portid, -#else - flag[j / FWDSTEP], portid, -#endif &pkts_burst[j], &dst_port[j]); } diff --git a/examples/tep_termination/vxlan.c b/examples/tep_termination/vxlan.c index e98a29f..5ee1f95 100644 --- a/examples/tep_termination/vxlan.c +++ b/examples/tep_termination/vxlan.c @@ -180,12 +180,7 @@ decapsulation(struct rte_mbuf *pkt) * (rfc7348) or that the rx offload flag is set (i40e only * currently)*/ if (udp_hdr->dst_port != rte_cpu_to_be_16(DEFAULT_VXLAN_PORT) && -#ifdef RTE_NEXT_ABI (pkt->packet_type & RTE_PTYPE_TUNNEL_MASK) == 0) -#else - (pkt->ol_flags & (PKT_RX_TUNNEL_IPV4_HDR | - PKT_RX_TUNNEL_IPV6_HDR)) == 0) -#endif return -1; outer_header_len = info.outer_l2_len + info.outer_l3_len + sizeof(struct udp_hdr) + sizeof(struct vxlan_hdr); diff --git a/lib/librte_eal/linuxapp/eal/include/exec-env/rte_kni_common.h b/lib/librte_eal/linuxapp/eal/include/exec-env/rte_kni_common.h index e9f38bd..bd1cc09 100644 --- a/lib/librte_eal/linuxapp/eal/include/exec-env/rte_kni_common.h +++ b/lib/librte_eal/linuxapp/eal/include/exec-env/rte_kni_common.h @@ -117,15 +117,9 @@ struct rte_kni_mbuf { uint16_t data_off; /**< Start address of data in segment buffer. */ char pad1[4]; uint64_t ol_flags; /**< Offload features. */ -#ifdef RTE_NEXT_ABI char pad2[4]; uint32_t pkt_len; /**< Total pkt len: sum of all segment data_len. */ uint16_t data_len; /**< Amount of data in segment buffer. */ -#else - char pad2[2]; - uint16_t data_len; /**< Amount of data in segment buffer. */ - uint32_t pkt_len; /**< Total pkt len: sum of all segment data_len. */ -#endif /* fields on second cache line */ char pad3[8] __attribute__((__aligned__(RTE_CACHE_LINE_SIZE))); diff --git a/lib/librte_mbuf/Makefile b/lib/librte_mbuf/Makefile index 080f3cf..8d62b0d 100644 --- a/lib/librte_mbuf/Makefile +++ b/lib/librte_mbuf/Makefile @@ -38,7 +38,7 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 EXPORT_MAP := rte_mbuf_version.map -LIBABIVER := 1 +LIBABIVER := 2 # all source are stored in SRCS-y SRCS-$(CONFIG_RTE_LIBRTE_MBUF) := rte_mbuf.c diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c index e416312..c18b438 100644 --- a/lib/librte_mbuf/rte_mbuf.c +++ b/lib/librte_mbuf/rte_mbuf.c @@ -258,18 +258,8 @@ const char *rte_get_rx_ol_flag_name(uint64_t mask) /* case PKT_RX_HBUF_OVERFLOW: return "PKT_RX_HBUF_OVERFLOW"; */ /* case PKT_RX_RECIP_ERR: return "PKT_RX_RECIP_ERR"; */ /* case PKT_RX_MAC_ERR: return "PKT_RX_MAC_ERR"; */ -#ifndef RTE_NEXT_ABI - case PKT_RX_IPV4_HDR: return "PKT_RX_IPV4_HDR"; - case PKT_RX_IPV4_HDR_EXT: return "PKT_RX_IPV4_HDR_EXT"; - case PKT_RX_IPV6_HDR: return "PKT_RX_IPV6_HDR"; - case PKT_RX_IPV6_HDR_EXT: return "PKT_RX_IPV6_HDR_EXT"; -#endif /* RTE_NEXT_ABI */ case PKT_RX_IEEE1588_PTP: return "PKT_RX_IEEE1588_PTP"; case PKT_RX_IEEE1588_TMST: return "PKT_RX_IEEE1588_TMST"; -#ifndef RTE_NEXT_ABI - case PKT_RX_TUNNEL_IPV4_HDR: return "PKT_RX_TUNNEL_IPV4_HDR"; - case PKT_RX_TUNNEL_IPV6_HDR: return "PKT_RX_TUNNEL_IPV6_HDR"; -#endif /* RTE_NEXT_ABI */ default: return NULL; } } diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index 8c2db1b..d7c9030 100644 --- a/lib/librte_mbuf/rte_mbuf.h +++ b/lib/librte_mbuf/rte_mbuf.h @@ -93,18 +93,8 @@ extern "C" { #define PKT_RX_HBUF_OVERFLOW (0ULL << 0) /**< Header buffer overflow. */ #define PKT_RX_RECIP_ERR (0ULL << 0) /**< Hardware processing error. */ #define PKT_RX_MAC_ERR (0ULL << 0) /**< MAC error. */ -#ifndef RTE_NEXT_ABI -#define PKT_RX_IPV4_HDR (1ULL << 5) /**< RX packet with IPv4 header. */ -#define PKT_RX_IPV4_HDR_EXT (1ULL << 6) /**< RX packet with extended IPv4 header. */ -#define PKT_RX_IPV6_HDR (1ULL << 7) /**< RX packet with IPv6 header. */ -#define PKT_RX_IPV6_HDR_EXT (1ULL << 8) /**< RX packet with extended IPv6 header. */ -#endif /* RTE_NEXT_ABI */ #define PKT_RX_IEEE1588_PTP (1ULL << 9) /**< RX IEEE1588 L2 Ethernet PT Packet. */ #define PKT_RX_IEEE1588_TMST (1ULL << 10) /**< RX IEEE1588 L2/L4 timestamped packet.*/ -#ifndef RTE_NEXT_ABI -#define PKT_RX_TUNNEL_IPV4_HDR (1ULL << 11) /**< RX tunnel packet with IPv4 header.*/ -#define PKT_RX_TUNNEL_IPV6_HDR (1ULL << 12) /**< RX tunnel packet with IPv6 header. */ -#endif /* RTE_NEXT_ABI */ #define PKT_RX_FDIR_ID (1ULL << 13) /**< FD id reported if FDIR match. */ #define PKT_RX_FDIR_FLX (1ULL << 14) /**< Flexible bytes reported if FDIR match. */ #define PKT_RX_QINQ_PKT (1ULL << 15) /**< RX packet with double VLAN stripped. */ @@ -209,7 +199,6 @@ extern "C" { /* Use final bit of flags to indicate a control mbuf */ #define CTRL_MBUF_FLAG (1ULL << 63) /**< Mbuf contains control data */ -#ifdef RTE_NEXT_ABI /* * 32 bits are divided into several fields to mark packet types. Note that * each field is indexical. @@ -696,7 +685,6 @@ extern "C" { RTE_PTYPE_INNER_L2_MASK | \ RTE_PTYPE_INNER_L3_MASK | \ RTE_PTYPE_INNER_L4_MASK)) -#endif /* RTE_NEXT_ABI */ /** Alignment constraint of mbuf private area. */ #define RTE_MBUF_PRIV_ALIGN 8 @@ -775,7 +763,6 @@ struct rte_mbuf { /* remaining bytes are set on RX when pulling packet from descriptor */ MARKER rx_descriptor_fields1; -#ifdef RTE_NEXT_ABI /* * The packet type, which is the combination of outer/inner L2, L3, L4 * and tunnel types. @@ -796,19 +783,7 @@ struct rte_mbuf { uint32_t pkt_len; /**< Total pkt len: sum of all segments. */ uint16_t data_len; /**< Amount of data in segment buffer. */ uint16_t vlan_tci; /**< VLAN Tag Control Identifier (CPU order) */ -#else /* RTE_NEXT_ABI */ - /** - * The packet type, which is used to indicate ordinary packet and also - * tunneled packet format, i.e. each number is represented a type of - * packet. - */ - uint16_t packet_type; - uint16_t data_len; /**< Amount of data in segment buffer. */ - uint32_t pkt_len; /**< Total pkt len: sum of all segments. */ - uint16_t vlan_tci; /**< VLAN Tag Control Identifier (CPU order) */ - uint16_t vlan_tci_outer; /**< Outer VLAN Tag Control Identifier (CPU order) */ -#endif /* RTE_NEXT_ABI */ union { uint32_t rss; /**< RSS hash result if RSS enabled */ struct { @@ -829,9 +804,8 @@ struct rte_mbuf { } hash; /**< hash information */ uint32_t seqn; /**< Sequence number. See also rte_reorder_insert() */ -#ifdef RTE_NEXT_ABI + uint16_t vlan_tci_outer; /**< Outer VLAN Tag Control Identifier (CPU order) */ -#endif /* RTE_NEXT_ABI */ /* second cache line - fields only used in slow path or on TX */ MARKER cacheline1 __rte_cache_aligned; -- 2.5.1 ^ permalink raw reply [flat|nested] 29+ messages in thread
* [dpdk-dev] [PATCH 3/9] ethdev: remove SCTP flow entries switch 2015-09-01 20:18 [dpdk-dev] [PATCH 0/9] clean deprecated code Thomas Monjalon 2015-09-01 21:30 ` [dpdk-dev] [PATCH 1/9] ethdev: remove Rx interrupt switch Thomas Monjalon 2015-09-01 21:30 ` [dpdk-dev] [PATCH 2/9] mbuf: remove packet type from offload flags Thomas Monjalon @ 2015-09-01 21:30 ` Thomas Monjalon 2015-09-01 21:30 ` [dpdk-dev] [PATCH 4/9] eal: remove deprecated function Thomas Monjalon ` (8 subsequent siblings) 11 siblings, 0 replies; 29+ messages in thread From: Thomas Monjalon @ 2015-09-01 21:30 UTC (permalink / raw) To: dev The extended SCTP flow entries are now part of the standard API. Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> --- app/test-pmd/cmdline.c | 4 ---- doc/guides/rel_notes/deprecation.rst | 3 --- drivers/net/i40e/i40e_fdir.c | 4 ---- lib/librte_ether/rte_eth_ctrl.h | 4 ---- 4 files changed, 15 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 5799c9c..0f8f48f 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -7888,12 +7888,10 @@ cmd_flow_director_filter_parsed(void *parsed_result, IPV4_ADDR_TO_UINT(res->ip_src, entry.input.flow.sctp4_flow.ip.src_ip); /* need convert to big endian. */ -#ifdef RTE_NEXT_ABI entry.input.flow.sctp4_flow.dst_port = rte_cpu_to_be_16(res->port_dst); entry.input.flow.sctp4_flow.src_port = rte_cpu_to_be_16(res->port_src); -#endif entry.input.flow.sctp4_flow.verify_tag = rte_cpu_to_be_32(res->verify_tag_value); break; @@ -7917,12 +7915,10 @@ cmd_flow_director_filter_parsed(void *parsed_result, IPV6_ADDR_TO_ARRAY(res->ip_src, entry.input.flow.sctp6_flow.ip.src_ip); /* need convert to big endian. */ -#ifdef RTE_NEXT_ABI entry.input.flow.sctp6_flow.dst_port = rte_cpu_to_be_16(res->port_dst); entry.input.flow.sctp6_flow.src_port = rte_cpu_to_be_16(res->port_src); -#endif entry.input.flow.sctp6_flow.verify_tag = rte_cpu_to_be_32(res->verify_tag_value); break; diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 639ab18..cf5cd17 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -44,9 +44,6 @@ Deprecation Notices flow director filtering in VF. The release 2.1 does not contain these ABI changes, but release 2.2 will, and no backwards compatibility is planned. -* ABI change is planned to extend the SCTP flow's key input from release 2.1. - The change may be enabled in the release 2.1 with CONFIG_RTE_NEXT_ABI. - * ABI changes are planned for struct rte_eth_fdir_filter and rte_eth_fdir_masks in order to support new flow director modes, MAC VLAN and Cloud, on x550. The MAC VLAN mode means the MAC and diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c index 8208273..c9ce98f 100644 --- a/drivers/net/i40e/i40e_fdir.c +++ b/drivers/net/i40e/i40e_fdir.c @@ -822,7 +822,6 @@ i40e_fdir_construct_pkt(struct i40e_pf *pf, sctp = (struct sctp_hdr *)(raw_pkt + sizeof(struct ether_hdr) + sizeof(struct ipv4_hdr)); payload = (unsigned char *)sctp + sizeof(struct sctp_hdr); -#ifdef RTE_NEXT_ABI /* * The source and destination fields in the transmitted packet * need to be presented in a reversed order with respect @@ -830,7 +829,6 @@ i40e_fdir_construct_pkt(struct i40e_pf *pf, */ sctp->src_port = fdir_input->flow.sctp4_flow.dst_port; sctp->dst_port = fdir_input->flow.sctp4_flow.src_port; -#endif sctp->tag = fdir_input->flow.sctp4_flow.verify_tag; break; @@ -873,7 +871,6 @@ i40e_fdir_construct_pkt(struct i40e_pf *pf, sctp = (struct sctp_hdr *)(raw_pkt + sizeof(struct ether_hdr) + sizeof(struct ipv6_hdr)); payload = (unsigned char *)sctp + sizeof(struct sctp_hdr); -#ifdef RTE_NEXT_ABI /* * The source and destination fields in the transmitted packet * need to be presented in a reversed order with respect @@ -881,7 +878,6 @@ i40e_fdir_construct_pkt(struct i40e_pf *pf, */ sctp->src_port = fdir_input->flow.sctp6_flow.dst_port; sctp->dst_port = fdir_input->flow.sctp6_flow.src_port; -#endif sctp->tag = fdir_input->flow.sctp6_flow.verify_tag; break; diff --git a/lib/librte_ether/rte_eth_ctrl.h b/lib/librte_ether/rte_eth_ctrl.h index 4beb981..26b7b33 100644 --- a/lib/librte_ether/rte_eth_ctrl.h +++ b/lib/librte_ether/rte_eth_ctrl.h @@ -335,10 +335,8 @@ struct rte_eth_tcpv4_flow { */ struct rte_eth_sctpv4_flow { struct rte_eth_ipv4_flow ip; /**< IPv4 fields to match. */ -#ifdef RTE_NEXT_ABI uint16_t src_port; /**< SCTP source port to match. */ uint16_t dst_port; /**< SCTP destination port to match. */ -#endif uint32_t verify_tag; /**< Verify tag to match */ }; @@ -373,10 +371,8 @@ struct rte_eth_tcpv6_flow { */ struct rte_eth_sctpv6_flow { struct rte_eth_ipv6_flow ip; /**< IPv6 fields to match. */ -#ifdef RTE_NEXT_ABI uint16_t src_port; /**< SCTP source port to match. */ uint16_t dst_port; /**< SCTP destination port to match. */ -#endif uint32_t verify_tag; /**< Verify tag to match */ }; -- 2.5.1 ^ permalink raw reply [flat|nested] 29+ messages in thread
* [dpdk-dev] [PATCH 4/9] eal: remove deprecated function 2015-09-01 20:18 [dpdk-dev] [PATCH 0/9] clean deprecated code Thomas Monjalon ` (2 preceding siblings ...) 2015-09-01 21:30 ` [dpdk-dev] [PATCH 3/9] ethdev: remove SCTP flow entries switch Thomas Monjalon @ 2015-09-01 21:30 ` Thomas Monjalon 2015-09-01 21:30 ` [dpdk-dev] [PATCH 5/9] mem: remove dummy malloc library Thomas Monjalon ` (7 subsequent siblings) 11 siblings, 0 replies; 29+ messages in thread From: Thomas Monjalon @ 2015-09-01 21:30 UTC (permalink / raw) To: dev The function rte_eal_pci_close_one() was renamed rte_eal_pci_detach(). Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> --- doc/guides/rel_notes/deprecation.rst | 3 --- lib/librte_eal/bsdapp/eal/rte_eal_version.map | 1 - lib/librte_eal/common/eal_common_pci.c | 6 ------ lib/librte_eal/common/include/rte_pci.h | 2 -- lib/librte_eal/linuxapp/eal/rte_eal_version.map | 1 - 5 files changed, 13 deletions(-) diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index cf5cd17..604a899 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -13,9 +13,6 @@ Deprecation Notices There is no backward compatibility planned from release 2.2. All binaries will need to be rebuilt from release 2.2. -* The EAL function rte_eal_pci_close_one is deprecated because renamed to - rte_eal_pci_detach. - * The Macros RTE_HASH_BUCKET_ENTRIES_MAX and RTE_HASH_KEY_LENGTH_MAX are deprecated and will be removed with version 2.2. diff --git a/lib/librte_eal/bsdapp/eal/rte_eal_version.map b/lib/librte_eal/bsdapp/eal/rte_eal_version.map index 2758848..64fdfb1 100644 --- a/lib/librte_eal/bsdapp/eal/rte_eal_version.map +++ b/lib/librte_eal/bsdapp/eal/rte_eal_version.map @@ -40,7 +40,6 @@ DPDK_2.0 { rte_eal_mp_remote_launch; rte_eal_mp_wait_lcore; rte_eal_parse_devargs_str; - rte_eal_pci_close_one; rte_eal_pci_dump; rte_eal_pci_probe; rte_eal_pci_probe_one; diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c index 16e8629..dcfe947 100644 --- a/lib/librte_eal/common/eal_common_pci.c +++ b/lib/librte_eal/common/eal_common_pci.c @@ -348,12 +348,6 @@ err_return: return -1; } -int __attribute__ ((deprecated)) -rte_eal_pci_close_one(const struct rte_pci_addr *addr) -{ - return rte_eal_pci_detach(addr); -} - /* * Detach device specified by its pci address. */ diff --git a/lib/librte_eal/common/include/rte_pci.h b/lib/librte_eal/common/include/rte_pci.h index 3fb2d3a..83e3c28 100644 --- a/lib/librte_eal/common/include/rte_pci.h +++ b/lib/librte_eal/common/include/rte_pci.h @@ -426,8 +426,6 @@ int rte_eal_pci_probe_one(const struct rte_pci_addr *addr); * - Negative on error. */ int rte_eal_pci_detach(const struct rte_pci_addr *addr); -int __attribute__ ((deprecated)) -rte_eal_pci_close_one(const struct rte_pci_addr *addr); /** * Dump the content of the PCI bus. diff --git a/lib/librte_eal/linuxapp/eal/rte_eal_version.map b/lib/librte_eal/linuxapp/eal/rte_eal_version.map index 59b1717..dbb8fa1 100644 --- a/lib/librte_eal/linuxapp/eal/rte_eal_version.map +++ b/lib/librte_eal/linuxapp/eal/rte_eal_version.map @@ -40,7 +40,6 @@ DPDK_2.0 { rte_eal_mp_remote_launch; rte_eal_mp_wait_lcore; rte_eal_parse_devargs_str; - rte_eal_pci_close_one; rte_eal_pci_dump; rte_eal_pci_probe; rte_eal_pci_probe_one; -- 2.5.1 ^ permalink raw reply [flat|nested] 29+ messages in thread
* [dpdk-dev] [PATCH 5/9] mem: remove dummy malloc library 2015-09-01 20:18 [dpdk-dev] [PATCH 0/9] clean deprecated code Thomas Monjalon ` (3 preceding siblings ...) 2015-09-01 21:30 ` [dpdk-dev] [PATCH 4/9] eal: remove deprecated function Thomas Monjalon @ 2015-09-01 21:30 ` Thomas Monjalon 2015-09-01 21:30 ` [dpdk-dev] [PATCH 6/9] lpm: remove deprecated field Thomas Monjalon ` (6 subsequent siblings) 11 siblings, 0 replies; 29+ messages in thread From: Thomas Monjalon @ 2015-09-01 21:30 UTC (permalink / raw) To: dev The malloc library is now part of the EAL. Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> --- MAINTAINERS | 1 - doc/guides/prog_guide/dev_kit_build_system.rst | 2 +- doc/guides/prog_guide/env_abstraction_layer.rst | 2 +- doc/guides/prog_guide/source_org.rst | 1 - .../thread_safety_intel_dpdk_functions.rst | 2 +- doc/guides/rel_notes/deprecation.rst | 5 --- lib/Makefile | 1 - lib/librte_malloc/Makefile | 48 ---------------------- lib/librte_malloc/rte_malloc_empty.c | 34 --------------- lib/librte_malloc/rte_malloc_version.map | 3 -- mk/rte.app.mk | 1 - 11 files changed, 3 insertions(+), 97 deletions(-) delete mode 100644 lib/librte_malloc/Makefile delete mode 100644 lib/librte_malloc/rte_malloc_empty.c delete mode 100644 lib/librte_malloc/rte_malloc_version.map diff --git a/MAINTAINERS b/MAINTAINERS index 17d4265..080a8e8 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -102,7 +102,6 @@ F: lib/librte_eal/common/include/rte_malloc.h F: lib/librte_eal/common/*malloc* F: lib/librte_eal/common/eal_common_mem* F: lib/librte_eal/common/eal_hugepages.h -F: lib/librte_malloc/ F: doc/guides/prog_guide/env_abstraction_layer.rst F: app/test/test_func_reentrancy.c F: app/test/test_malloc.c diff --git a/doc/guides/prog_guide/dev_kit_build_system.rst b/doc/guides/prog_guide/dev_kit_build_system.rst index 7dc2de6..dd3e3d0 100644 --- a/doc/guides/prog_guide/dev_kit_build_system.rst +++ b/doc/guides/prog_guide/dev_kit_build_system.rst @@ -85,7 +85,7 @@ Each build directory contains include files, libraries, and applications: librte_cmdline.a librte_lpm.a librte_mempool.a librte_ring.a - librte_eal.a librte_malloc.a librte_pmd_e1000.a librte_timer.a + librte_eal.a librte_pmd_e1000.a librte_timer.a ~/DEV/DPDK$ ls i686-native-linuxapp-gcc/include/ diff --git a/doc/guides/prog_guide/env_abstraction_layer.rst b/doc/guides/prog_guide/env_abstraction_layer.rst index f1b3ff1..a03e40d 100644 --- a/doc/guides/prog_guide/env_abstraction_layer.rst +++ b/doc/guides/prog_guide/env_abstraction_layer.rst @@ -115,7 +115,7 @@ The physical address of the reserved memory for that memory zone is also returne .. note:: - Memory reservations done using the APIs provided by the rte_malloc library are also backed by pages from the hugetlbfs filesystem. + Memory reservations done using the APIs provided by rte_malloc are also backed by pages from the hugetlbfs filesystem. Xen Dom0 support without hugetbls ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/doc/guides/prog_guide/source_org.rst b/doc/guides/prog_guide/source_org.rst index b81e965..ae11b3b 100644 --- a/doc/guides/prog_guide/source_org.rst +++ b/doc/guides/prog_guide/source_org.rst @@ -74,7 +74,6 @@ The lib directory contains:: +-- librte_kni # Kernel NIC interface +-- librte_kvargs # Argument parsing library +-- librte_lpm # Longest prefix match library - +-- librte_malloc # Malloc-like functions +-- librte_mbuf # Packet and control mbuf manipulation +-- librte_mempool # Memory pool manager (fixed sized objects) +-- librte_meter # QoS metering library diff --git a/doc/guides/prog_guide/thread_safety_intel_dpdk_functions.rst b/doc/guides/prog_guide/thread_safety_intel_dpdk_functions.rst index 0034bf4..403e5fc 100644 --- a/doc/guides/prog_guide/thread_safety_intel_dpdk_functions.rst +++ b/doc/guides/prog_guide/thread_safety_intel_dpdk_functions.rst @@ -73,7 +73,7 @@ Performance Insensitive API Outside of the performance sensitive areas described in Section 25.1, the DPDK provides a thread-safe API for most other libraries. -For example, malloc(librte_malloc) and memzone functions are safe for use in multi-threaded and multi-process environments. +For example, malloc and memzone functions are safe for use in multi-threaded and multi-process environments. The setup and configuration of the PMD is not performance sensitive, but is not thread safe either. It is possible that the multiple read/writes during PMD setup and configuration could be corrupted in a multi-thread environment. diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 604a899..3fa4c90 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -21,11 +21,6 @@ Deprecation Notices * The field mem_location of the rte_lpm structure is deprecated and should be removed as well as the macros RTE_LPM_HEAP and RTE_LPM_MEMZONE. -* librte_malloc library has been integrated into librte_eal. The 2.1 release - creates a dummy/empty malloc library to fulfill binaries with dynamic linking - dependencies on librte_malloc.so. Such dummy library will not be created from - release 2.2 so binaries will need to be rebuilt. - * The following fields have been deprecated in rte_eth_stats: imissed, ibadcrc, ibadlen, imcasts, fdirmatch, fdirmiss, tx_pause_xon, rx_pause_xon, tx_pause_xoff, rx_pause_xoff diff --git a/lib/Makefile b/lib/Makefile index 2055539..9727b83 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -33,7 +33,6 @@ include $(RTE_SDK)/mk/rte.vars.mk DIRS-y += librte_compat DIRS-$(CONFIG_RTE_LIBRTE_EAL) += librte_eal -DIRS-$(CONFIG_RTE_LIBRTE_EAL) += librte_malloc DIRS-$(CONFIG_RTE_LIBRTE_RING) += librte_ring DIRS-$(CONFIG_RTE_LIBRTE_MEMPOOL) += librte_mempool DIRS-$(CONFIG_RTE_LIBRTE_MBUF) += librte_mbuf diff --git a/lib/librte_malloc/Makefile b/lib/librte_malloc/Makefile deleted file mode 100644 index 9558f3d..0000000 --- a/lib/librte_malloc/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# BSD LICENSE -# -# Copyright(c) 2010-2014 Intel Corporation. All rights reserved. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Intel Corporation nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -include $(RTE_SDK)/mk/rte.vars.mk - -# library name -LIB = librte_malloc.a - -LIBABIVER := 1 - -CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 - -EXPORT_MAP := rte_malloc_version.map - -# all source are stored in SRCS-y -SRCS-$(CONFIG_RTE_LIBRTE_EAL) := rte_malloc_empty.c - -# this lib needs eal -DEPDIRS-$(CONFIG_RTE_LIBRTE_EAL) += lib/librte_eal - -include $(RTE_SDK)/mk/rte.lib.mk diff --git a/lib/librte_malloc/rte_malloc_empty.c b/lib/librte_malloc/rte_malloc_empty.c deleted file mode 100644 index 4892a61..0000000 --- a/lib/librte_malloc/rte_malloc_empty.c +++ /dev/null @@ -1,34 +0,0 @@ -/*- - * BSD LICENSE - * - * Copyright(c) 2010-2015 Intel Corporation. All rights reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* Empty file to be able to create a dummy library for deprecation policy */ diff --git a/lib/librte_malloc/rte_malloc_version.map b/lib/librte_malloc/rte_malloc_version.map deleted file mode 100644 index 63cb5fc..0000000 --- a/lib/librte_malloc/rte_malloc_version.map +++ /dev/null @@ -1,3 +0,0 @@ -DPDK_2.0 { - local: *; -}; diff --git a/mk/rte.app.mk b/mk/rte.app.mk index 3871205..9e1909e 100644 --- a/mk/rte.app.mk +++ b/mk/rte.app.mk @@ -114,7 +114,6 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_KVARGS) += -lrte_kvargs _LDLIBS-$(CONFIG_RTE_LIBRTE_MBUF) += -lrte_mbuf _LDLIBS-$(CONFIG_RTE_LIBRTE_IP_FRAG) += -lrte_ip_frag _LDLIBS-$(CONFIG_RTE_LIBRTE_ETHER) += -lethdev -_LDLIBS-$(CONFIG_RTE_LIBRTE_MALLOC) += -lrte_malloc _LDLIBS-$(CONFIG_RTE_LIBRTE_MEMPOOL) += -lrte_mempool _LDLIBS-$(CONFIG_RTE_LIBRTE_RING) += -lrte_ring _LDLIBS-$(CONFIG_RTE_LIBRTE_EAL) += -lrte_eal -- 2.5.1 ^ permalink raw reply [flat|nested] 29+ messages in thread
* [dpdk-dev] [PATCH 6/9] lpm: remove deprecated field 2015-09-01 20:18 [dpdk-dev] [PATCH 0/9] clean deprecated code Thomas Monjalon ` (4 preceding siblings ...) 2015-09-01 21:30 ` [dpdk-dev] [PATCH 5/9] mem: remove dummy malloc library Thomas Monjalon @ 2015-09-01 21:30 ` Thomas Monjalon 2015-09-01 21:31 ` [dpdk-dev] [PATCH 7/9] acl: remove old API Thomas Monjalon ` (5 subsequent siblings) 11 siblings, 0 replies; 29+ messages in thread From: Thomas Monjalon @ 2015-09-01 21:30 UTC (permalink / raw) To: dev Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> --- app/test/test_func_reentrancy.c | 4 ++-- app/test/test_lpm.c | 4 ++-- doc/guides/rel_notes/deprecation.rst | 3 --- lib/librte_lpm/Makefile | 2 +- lib/librte_lpm/rte_lpm.h | 11 ----------- 5 files changed, 5 insertions(+), 19 deletions(-) diff --git a/app/test/test_func_reentrancy.c b/app/test/test_func_reentrancy.c index be61773..dbecc52 100644 --- a/app/test/test_func_reentrancy.c +++ b/app/test/test_func_reentrancy.c @@ -366,7 +366,7 @@ lpm_create_free(__attribute__((unused)) void *arg) /* create the same lpm simultaneously on all threads */ for (i = 0; i < MAX_ITER_TIMES; i++) { - lpm = rte_lpm_create("fr_test_once", SOCKET_ID_ANY, 4, RTE_LPM_HEAP); + lpm = rte_lpm_create("fr_test_once", SOCKET_ID_ANY, 4, 0); if ((NULL == lpm) && (rte_lpm_find_existing("fr_test_once") == NULL)) return -1; } @@ -374,7 +374,7 @@ lpm_create_free(__attribute__((unused)) void *arg) /* create mutiple fbk tables simultaneously */ for (i = 0; i < MAX_LPM_ITER_TIMES; i++) { snprintf(lpm_name, sizeof(lpm_name), "fr_test_%d_%d", lcore_self, i); - lpm = rte_lpm_create(lpm_name, SOCKET_ID_ANY, 4, RTE_LPM_HEAP); + lpm = rte_lpm_create(lpm_name, SOCKET_ID_ANY, 4, 0); if (NULL == lpm) return -1; diff --git a/app/test/test_lpm.c b/app/test/test_lpm.c index 6d8823e..8b4ded9 100644 --- a/app/test/test_lpm.c +++ b/app/test/test_lpm.c @@ -165,7 +165,7 @@ test2(void) { struct rte_lpm *lpm = NULL; - lpm = rte_lpm_create(__func__, SOCKET_ID_ANY, MAX_RULES, RTE_LPM_HEAP); + lpm = rte_lpm_create(__func__, SOCKET_ID_ANY, MAX_RULES, 0); TEST_LPM_ASSERT(lpm != NULL); rte_lpm_free(lpm); @@ -607,7 +607,7 @@ test10(void) /* Add rule that covers a TBL24 range previously invalid & lookup * (& delete & lookup) */ - lpm = rte_lpm_create(__func__, SOCKET_ID_ANY, MAX_RULES, RTE_LPM_HEAP); + lpm = rte_lpm_create(__func__, SOCKET_ID_ANY, MAX_RULES, 0); TEST_LPM_ASSERT(lpm != NULL); ip = IPv4(128, 0, 0, 0); diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 3fa4c90..c40764a 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -18,9 +18,6 @@ Deprecation Notices * The function rte_jhash2 is deprecated and should be removed. -* The field mem_location of the rte_lpm structure is deprecated and should be - removed as well as the macros RTE_LPM_HEAP and RTE_LPM_MEMZONE. - * The following fields have been deprecated in rte_eth_stats: imissed, ibadcrc, ibadlen, imcasts, fdirmatch, fdirmiss, tx_pause_xon, rx_pause_xon, tx_pause_xoff, rx_pause_xoff diff --git a/lib/librte_lpm/Makefile b/lib/librte_lpm/Makefile index 0a7a888..688cfc9 100644 --- a/lib/librte_lpm/Makefile +++ b/lib/librte_lpm/Makefile @@ -39,7 +39,7 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) EXPORT_MAP := rte_lpm_version.map -LIBABIVER := 1 +LIBABIVER := 2 # all source are stored in SRCS-y SRCS-$(CONFIG_RTE_LIBRTE_LPM) := rte_lpm.c rte_lpm6.c diff --git a/lib/librte_lpm/rte_lpm.h b/lib/librte_lpm/rte_lpm.h index 11f0c04..c299ce2 100644 --- a/lib/librte_lpm/rte_lpm.h +++ b/lib/librte_lpm/rte_lpm.h @@ -56,16 +56,6 @@ extern "C" { /** Max number of characters in LPM name. */ #define RTE_LPM_NAMESIZE 32 -/** @deprecated Possible location to allocate memory. This was for last - * parameter of rte_lpm_create(), but is now redundant. The LPM table is always - * allocated in memory using librte_malloc which uses a memzone. */ -#define RTE_LPM_HEAP 0 - -/** @deprecated Possible location to allocate memory. This was for last - * parameter of rte_lpm_create(), but is now redundant. The LPM table is always - * allocated in memory using librte_malloc which uses a memzone. */ -#define RTE_LPM_MEMZONE 1 - /** Maximum depth value possible for IPv4 LPM. */ #define RTE_LPM_MAX_DEPTH 32 @@ -154,7 +144,6 @@ struct rte_lpm_rule_info { struct rte_lpm { /* LPM metadata. */ char name[RTE_LPM_NAMESIZE]; /**< Name of the lpm. */ - int mem_location; /**< @deprecated @see RTE_LPM_HEAP and RTE_LPM_MEMZONE. */ uint32_t max_rules; /**< Max. balanced rules per lpm. */ struct rte_lpm_rule_info rule_info[RTE_LPM_MAX_DEPTH]; /**< Rule info table. */ -- 2.5.1 ^ permalink raw reply [flat|nested] 29+ messages in thread
* [dpdk-dev] [PATCH 7/9] acl: remove old API 2015-09-01 20:18 [dpdk-dev] [PATCH 0/9] clean deprecated code Thomas Monjalon ` (5 preceding siblings ...) 2015-09-01 21:30 ` [dpdk-dev] [PATCH 6/9] lpm: remove deprecated field Thomas Monjalon @ 2015-09-01 21:31 ` Thomas Monjalon 2015-09-01 21:31 ` [dpdk-dev] [PATCH 8/9] kni: remove deprecated functions Thomas Monjalon ` (4 subsequent siblings) 11 siblings, 0 replies; 29+ messages in thread From: Thomas Monjalon @ 2015-09-01 21:31 UTC (permalink / raw) To: dev The functions and structures are moved to app/test in order to keep existing unit tests. Some minor changes were done in these functions because of library scope restrictions. An enum is also copied in two other applications to keep existing code. Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> --- app/test-acl/main.c | 17 +++ app/test/test_acl.c | 194 +++++++++++++++++++++++++++++++++++ app/test/test_acl.h | 59 +++++++++++ doc/guides/rel_notes/deprecation.rst | 4 - examples/l3fwd-acl/main.c | 17 +++ lib/librte_acl/Makefile | 2 +- lib/librte_acl/rte_acl.c | 170 ------------------------------ lib/librte_acl/rte_acl.h | 104 ------------------- lib/librte_acl/rte_acl_version.map | 2 - 9 files changed, 288 insertions(+), 281 deletions(-) diff --git a/app/test-acl/main.c b/app/test-acl/main.c index be3d773..72ce83c 100644 --- a/app/test-acl/main.c +++ b/app/test-acl/main.c @@ -162,6 +162,23 @@ enum { NUM_FIELDS_IPV4 }; +/* + * That effectively defines order of IPV4VLAN classifications: + * - PROTO + * - VLAN (TAG and DOMAIN) + * - SRC IP ADDRESS + * - DST IP ADDRESS + * - PORTS (SRC and DST) + */ +enum { + RTE_ACL_IPV4VLAN_PROTO, + RTE_ACL_IPV4VLAN_VLAN, + RTE_ACL_IPV4VLAN_SRC, + RTE_ACL_IPV4VLAN_DST, + RTE_ACL_IPV4VLAN_PORTS, + RTE_ACL_IPV4VLAN_NUM +}; + struct rte_acl_field_def ipv4_defs[NUM_FIELDS_IPV4] = { { .type = RTE_ACL_FIELD_TYPE_BITMASK, diff --git a/app/test/test_acl.c b/app/test/test_acl.c index b4a107d..2b82790 100644 --- a/app/test/test_acl.c +++ b/app/test/test_acl.c @@ -45,6 +45,8 @@ #include "test_acl.h" +#define BIT_SIZEOF(x) (sizeof(x) * CHAR_BIT) + #define LEN RTE_ACL_MAX_CATEGORIES RTE_ACL_RULE_DEF(acl_ipv4vlan_rule, RTE_ACL_IPV4VLAN_NUM_FIELDS); @@ -100,6 +102,198 @@ bswap_test_data(struct ipv4_7tuple *data, int len, int to_be) } } +static int +acl_ipv4vlan_check_rule(const struct rte_acl_ipv4vlan_rule *rule) +{ + if (rule->src_port_low > rule->src_port_high || + rule->dst_port_low > rule->dst_port_high || + rule->src_mask_len > BIT_SIZEOF(rule->src_addr) || + rule->dst_mask_len > BIT_SIZEOF(rule->dst_addr)) + return -EINVAL; + return 0; +} + +static void +acl_ipv4vlan_convert_rule(const struct rte_acl_ipv4vlan_rule *ri, + struct acl_ipv4vlan_rule *ro) +{ + ro->data = ri->data; + + ro->field[RTE_ACL_IPV4VLAN_PROTO_FIELD].value.u8 = ri->proto; + ro->field[RTE_ACL_IPV4VLAN_VLAN1_FIELD].value.u16 = ri->vlan; + ro->field[RTE_ACL_IPV4VLAN_VLAN2_FIELD].value.u16 = ri->domain; + ro->field[RTE_ACL_IPV4VLAN_SRC_FIELD].value.u32 = ri->src_addr; + ro->field[RTE_ACL_IPV4VLAN_DST_FIELD].value.u32 = ri->dst_addr; + ro->field[RTE_ACL_IPV4VLAN_SRCP_FIELD].value.u16 = ri->src_port_low; + ro->field[RTE_ACL_IPV4VLAN_DSTP_FIELD].value.u16 = ri->dst_port_low; + + ro->field[RTE_ACL_IPV4VLAN_PROTO_FIELD].mask_range.u8 = ri->proto_mask; + ro->field[RTE_ACL_IPV4VLAN_VLAN1_FIELD].mask_range.u16 = ri->vlan_mask; + ro->field[RTE_ACL_IPV4VLAN_VLAN2_FIELD].mask_range.u16 = + ri->domain_mask; + ro->field[RTE_ACL_IPV4VLAN_SRC_FIELD].mask_range.u32 = + ri->src_mask_len; + ro->field[RTE_ACL_IPV4VLAN_DST_FIELD].mask_range.u32 = ri->dst_mask_len; + ro->field[RTE_ACL_IPV4VLAN_SRCP_FIELD].mask_range.u16 = + ri->src_port_high; + ro->field[RTE_ACL_IPV4VLAN_DSTP_FIELD].mask_range.u16 = + ri->dst_port_high; +} + +/* + * Add ipv4vlan rules to an existing ACL context. + * This function is not multi-thread safe. + * + * @param ctx + * ACL context to add patterns to. + * @param rules + * Array of rules to add to the ACL context. + * Note that all fields in rte_acl_ipv4vlan_rule structures are expected + * to be in host byte order. + * @param num + * Number of elements in the input array of rules. + * @return + * - -ENOMEM if there is no space in the ACL context for these rules. + * - -EINVAL if the parameters are invalid. + * - Zero if operation completed successfully. + */ +static int +rte_acl_ipv4vlan_add_rules(struct rte_acl_ctx *ctx, + const struct rte_acl_ipv4vlan_rule *rules, + uint32_t num) +{ + int32_t rc; + uint32_t i; + struct acl_ipv4vlan_rule rv; + + if (ctx == NULL || rules == NULL) + return -EINVAL; + + /* check input rules. */ + for (i = 0; i != num; i++) { + rc = acl_ipv4vlan_check_rule(rules + i); + if (rc != 0) { + RTE_LOG(ERR, ACL, "%s: rule #%u is invalid\n", + __func__, i + 1); + return rc; + } + } + + /* perform conversion to the internal format and add to the context. */ + for (i = 0, rc = 0; i != num && rc == 0; i++) { + acl_ipv4vlan_convert_rule(rules + i, &rv); + rc = rte_acl_add_rules(ctx, (struct rte_acl_rule *)&rv, 1); + } + + return rc; +} + +static void +acl_ipv4vlan_config(struct rte_acl_config *cfg, + const uint32_t layout[RTE_ACL_IPV4VLAN_NUM], + uint32_t num_categories) +{ + static const struct rte_acl_field_def + ipv4_defs[RTE_ACL_IPV4VLAN_NUM_FIELDS] = { + { + .type = RTE_ACL_FIELD_TYPE_BITMASK, + .size = sizeof(uint8_t), + .field_index = RTE_ACL_IPV4VLAN_PROTO_FIELD, + .input_index = RTE_ACL_IPV4VLAN_PROTO, + }, + { + .type = RTE_ACL_FIELD_TYPE_BITMASK, + .size = sizeof(uint16_t), + .field_index = RTE_ACL_IPV4VLAN_VLAN1_FIELD, + .input_index = RTE_ACL_IPV4VLAN_VLAN, + }, + { + .type = RTE_ACL_FIELD_TYPE_BITMASK, + .size = sizeof(uint16_t), + .field_index = RTE_ACL_IPV4VLAN_VLAN2_FIELD, + .input_index = RTE_ACL_IPV4VLAN_VLAN, + }, + { + .type = RTE_ACL_FIELD_TYPE_MASK, + .size = sizeof(uint32_t), + .field_index = RTE_ACL_IPV4VLAN_SRC_FIELD, + .input_index = RTE_ACL_IPV4VLAN_SRC, + }, + { + .type = RTE_ACL_FIELD_TYPE_MASK, + .size = sizeof(uint32_t), + .field_index = RTE_ACL_IPV4VLAN_DST_FIELD, + .input_index = RTE_ACL_IPV4VLAN_DST, + }, + { + .type = RTE_ACL_FIELD_TYPE_RANGE, + .size = sizeof(uint16_t), + .field_index = RTE_ACL_IPV4VLAN_SRCP_FIELD, + .input_index = RTE_ACL_IPV4VLAN_PORTS, + }, + { + .type = RTE_ACL_FIELD_TYPE_RANGE, + .size = sizeof(uint16_t), + .field_index = RTE_ACL_IPV4VLAN_DSTP_FIELD, + .input_index = RTE_ACL_IPV4VLAN_PORTS, + }, + }; + + memcpy(&cfg->defs, ipv4_defs, sizeof(ipv4_defs)); + cfg->num_fields = RTE_DIM(ipv4_defs); + + cfg->defs[RTE_ACL_IPV4VLAN_PROTO_FIELD].offset = + layout[RTE_ACL_IPV4VLAN_PROTO]; + cfg->defs[RTE_ACL_IPV4VLAN_VLAN1_FIELD].offset = + layout[RTE_ACL_IPV4VLAN_VLAN]; + cfg->defs[RTE_ACL_IPV4VLAN_VLAN2_FIELD].offset = + layout[RTE_ACL_IPV4VLAN_VLAN] + + cfg->defs[RTE_ACL_IPV4VLAN_VLAN1_FIELD].size; + cfg->defs[RTE_ACL_IPV4VLAN_SRC_FIELD].offset = + layout[RTE_ACL_IPV4VLAN_SRC]; + cfg->defs[RTE_ACL_IPV4VLAN_DST_FIELD].offset = + layout[RTE_ACL_IPV4VLAN_DST]; + cfg->defs[RTE_ACL_IPV4VLAN_SRCP_FIELD].offset = + layout[RTE_ACL_IPV4VLAN_PORTS]; + cfg->defs[RTE_ACL_IPV4VLAN_DSTP_FIELD].offset = + layout[RTE_ACL_IPV4VLAN_PORTS] + + cfg->defs[RTE_ACL_IPV4VLAN_SRCP_FIELD].size; + + cfg->num_categories = num_categories; +} + +/* + * Analyze set of ipv4vlan rules and build required internal + * run-time structures. + * This function is not multi-thread safe. + * + * @param ctx + * ACL context to build. + * @param layout + * Layout of input data to search through. + * @param num_categories + * Maximum number of categories to use in that build. + * @return + * - -ENOMEM if couldn't allocate enough memory. + * - -EINVAL if the parameters are invalid. + * - Negative error code if operation failed. + * - Zero if operation completed successfully. + */ +static int +rte_acl_ipv4vlan_build(struct rte_acl_ctx *ctx, + const uint32_t layout[RTE_ACL_IPV4VLAN_NUM], + uint32_t num_categories) +{ + struct rte_acl_config cfg; + + if (ctx == NULL || layout == NULL) + return -EINVAL; + + memset(&cfg, 0, sizeof(cfg)); + acl_ipv4vlan_config(&cfg, layout, num_categories); + return rte_acl_build(ctx, &cfg); +} + /* * Test scalar and SSE ACL lookup. */ diff --git a/app/test/test_acl.h b/app/test/test_acl.h index 9813569..421f310 100644 --- a/app/test/test_acl.h +++ b/app/test/test_acl.h @@ -46,6 +46,65 @@ struct ipv4_7tuple { uint32_t deny; }; +/** + * Legacy support for 7-tuple IPv4 and VLAN rule. + * This structure and corresponding API is deprecated. + */ +struct rte_acl_ipv4vlan_rule { + struct rte_acl_rule_data data; /**< Miscellaneous data for the rule. */ + uint8_t proto; /**< IPv4 protocol ID. */ + uint8_t proto_mask; /**< IPv4 protocol ID mask. */ + uint16_t vlan; /**< VLAN ID. */ + uint16_t vlan_mask; /**< VLAN ID mask. */ + uint16_t domain; /**< VLAN domain. */ + uint16_t domain_mask; /**< VLAN domain mask. */ + uint32_t src_addr; /**< IPv4 source address. */ + uint32_t src_mask_len; /**< IPv4 source address mask. */ + uint32_t dst_addr; /**< IPv4 destination address. */ + uint32_t dst_mask_len; /**< IPv4 destination address mask. */ + uint16_t src_port_low; /**< L4 source port low. */ + uint16_t src_port_high; /**< L4 source port high. */ + uint16_t dst_port_low; /**< L4 destination port low. */ + uint16_t dst_port_high; /**< L4 destination port high. */ +}; + +/** + * Specifies fields layout inside rte_acl_rule for rte_acl_ipv4vlan_rule. + */ +enum { + RTE_ACL_IPV4VLAN_PROTO_FIELD, + RTE_ACL_IPV4VLAN_VLAN1_FIELD, + RTE_ACL_IPV4VLAN_VLAN2_FIELD, + RTE_ACL_IPV4VLAN_SRC_FIELD, + RTE_ACL_IPV4VLAN_DST_FIELD, + RTE_ACL_IPV4VLAN_SRCP_FIELD, + RTE_ACL_IPV4VLAN_DSTP_FIELD, + RTE_ACL_IPV4VLAN_NUM_FIELDS +}; + +/** + * Macro to define rule size for rte_acl_ipv4vlan_rule. + */ +#define RTE_ACL_IPV4VLAN_RULE_SZ \ + RTE_ACL_RULE_SZ(RTE_ACL_IPV4VLAN_NUM_FIELDS) + +/* + * That effectively defines order of IPV4VLAN classifications: + * - PROTO + * - VLAN (TAG and DOMAIN) + * - SRC IP ADDRESS + * - DST IP ADDRESS + * - PORTS (SRC and DST) + */ +enum { + RTE_ACL_IPV4VLAN_PROTO, + RTE_ACL_IPV4VLAN_VLAN, + RTE_ACL_IPV4VLAN_SRC, + RTE_ACL_IPV4VLAN_DST, + RTE_ACL_IPV4VLAN_PORTS, + RTE_ACL_IPV4VLAN_NUM +}; + /* rules for invalid layout test */ struct rte_acl_ipv4vlan_rule invalid_layout_rules[] = { /* test src and dst address */ diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index c40764a..e7e213c 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -59,10 +59,6 @@ Deprecation Notices * The scheduler statistics structure will change to allow keeping track of RED actions. -* librte_acl: The structure rte_acl_ipv4vlan_rule is deprecated and should - be removed as well as the associated functions rte_acl_ipv4vlan_add_rules - and rte_acl_ipv4vlan_build. - * librte_cfgfile: In order to allow for longer names and values, the value of macros CFG_NAME_LEN and CFG_NAME_VAL will be increased. Most likely, the new values will be 64 and 256, respectively. diff --git a/examples/l3fwd-acl/main.c b/examples/l3fwd-acl/main.c index f612671..f676d14 100644 --- a/examples/l3fwd-acl/main.c +++ b/examples/l3fwd-acl/main.c @@ -261,6 +261,23 @@ enum { NUM_FIELDS_IPV4 }; +/* + * That effectively defines order of IPV4VLAN classifications: + * - PROTO + * - VLAN (TAG and DOMAIN) + * - SRC IP ADDRESS + * - DST IP ADDRESS + * - PORTS (SRC and DST) + */ +enum { + RTE_ACL_IPV4VLAN_PROTO, + RTE_ACL_IPV4VLAN_VLAN, + RTE_ACL_IPV4VLAN_SRC, + RTE_ACL_IPV4VLAN_DST, + RTE_ACL_IPV4VLAN_PORTS, + RTE_ACL_IPV4VLAN_NUM +}; + struct rte_acl_field_def ipv4_defs[NUM_FIELDS_IPV4] = { { .type = RTE_ACL_FIELD_TYPE_BITMASK, diff --git a/lib/librte_acl/Makefile b/lib/librte_acl/Makefile index 46acc2b..7a1cf8a 100644 --- a/lib/librte_acl/Makefile +++ b/lib/librte_acl/Makefile @@ -39,7 +39,7 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) EXPORT_MAP := rte_acl_version.map -LIBABIVER := 1 +LIBABIVER := 2 # all source are stored in SRCS-y SRCS-$(CONFIG_RTE_LIBRTE_ACL) += tb_mem.c diff --git a/lib/librte_acl/rte_acl.c b/lib/librte_acl/rte_acl.c index a54d531..d60219f 100644 --- a/lib/librte_acl/rte_acl.c +++ b/lib/librte_acl/rte_acl.c @@ -34,8 +34,6 @@ #include <rte_acl.h> #include "acl.h" -#define BIT_SIZEOF(x) (sizeof(x) * CHAR_BIT) - TAILQ_HEAD(rte_acl_list, rte_tailq_entry); static struct rte_tailq_elem rte_acl_tailq = { @@ -365,171 +363,3 @@ rte_acl_list_dump(void) } rte_rwlock_read_unlock(RTE_EAL_TAILQ_RWLOCK); } - -/* - * Support for legacy ipv4vlan rules. - */ - -RTE_ACL_RULE_DEF(acl_ipv4vlan_rule, RTE_ACL_IPV4VLAN_NUM_FIELDS); - -static int -acl_ipv4vlan_check_rule(const struct rte_acl_ipv4vlan_rule *rule) -{ - if (rule->src_port_low > rule->src_port_high || - rule->dst_port_low > rule->dst_port_high || - rule->src_mask_len > BIT_SIZEOF(rule->src_addr) || - rule->dst_mask_len > BIT_SIZEOF(rule->dst_addr)) - return -EINVAL; - - return acl_check_rule(&rule->data); -} - -static void -acl_ipv4vlan_convert_rule(const struct rte_acl_ipv4vlan_rule *ri, - struct acl_ipv4vlan_rule *ro) -{ - ro->data = ri->data; - - ro->field[RTE_ACL_IPV4VLAN_PROTO_FIELD].value.u8 = ri->proto; - ro->field[RTE_ACL_IPV4VLAN_VLAN1_FIELD].value.u16 = ri->vlan; - ro->field[RTE_ACL_IPV4VLAN_VLAN2_FIELD].value.u16 = ri->domain; - ro->field[RTE_ACL_IPV4VLAN_SRC_FIELD].value.u32 = ri->src_addr; - ro->field[RTE_ACL_IPV4VLAN_DST_FIELD].value.u32 = ri->dst_addr; - ro->field[RTE_ACL_IPV4VLAN_SRCP_FIELD].value.u16 = ri->src_port_low; - ro->field[RTE_ACL_IPV4VLAN_DSTP_FIELD].value.u16 = ri->dst_port_low; - - ro->field[RTE_ACL_IPV4VLAN_PROTO_FIELD].mask_range.u8 = ri->proto_mask; - ro->field[RTE_ACL_IPV4VLAN_VLAN1_FIELD].mask_range.u16 = ri->vlan_mask; - ro->field[RTE_ACL_IPV4VLAN_VLAN2_FIELD].mask_range.u16 = - ri->domain_mask; - ro->field[RTE_ACL_IPV4VLAN_SRC_FIELD].mask_range.u32 = - ri->src_mask_len; - ro->field[RTE_ACL_IPV4VLAN_DST_FIELD].mask_range.u32 = ri->dst_mask_len; - ro->field[RTE_ACL_IPV4VLAN_SRCP_FIELD].mask_range.u16 = - ri->src_port_high; - ro->field[RTE_ACL_IPV4VLAN_DSTP_FIELD].mask_range.u16 = - ri->dst_port_high; -} - -int -rte_acl_ipv4vlan_add_rules(struct rte_acl_ctx *ctx, - const struct rte_acl_ipv4vlan_rule *rules, - uint32_t num) -{ - int32_t rc; - uint32_t i; - struct acl_ipv4vlan_rule rv; - - if (ctx == NULL || rules == NULL || ctx->rule_sz != sizeof(rv)) - return -EINVAL; - - /* check input rules. */ - for (i = 0; i != num; i++) { - rc = acl_ipv4vlan_check_rule(rules + i); - if (rc != 0) { - RTE_LOG(ERR, ACL, "%s(%s): rule #%u is invalid\n", - __func__, ctx->name, i + 1); - return rc; - } - } - - if (num + ctx->num_rules > ctx->max_rules) - return -ENOMEM; - - /* perform conversion to the internal format and add to the context. */ - for (i = 0, rc = 0; i != num && rc == 0; i++) { - acl_ipv4vlan_convert_rule(rules + i, &rv); - rc = acl_add_rules(ctx, &rv, 1); - } - - return rc; -} - -static void -acl_ipv4vlan_config(struct rte_acl_config *cfg, - const uint32_t layout[RTE_ACL_IPV4VLAN_NUM], - uint32_t num_categories) -{ - static const struct rte_acl_field_def - ipv4_defs[RTE_ACL_IPV4VLAN_NUM_FIELDS] = { - { - .type = RTE_ACL_FIELD_TYPE_BITMASK, - .size = sizeof(uint8_t), - .field_index = RTE_ACL_IPV4VLAN_PROTO_FIELD, - .input_index = RTE_ACL_IPV4VLAN_PROTO, - }, - { - .type = RTE_ACL_FIELD_TYPE_BITMASK, - .size = sizeof(uint16_t), - .field_index = RTE_ACL_IPV4VLAN_VLAN1_FIELD, - .input_index = RTE_ACL_IPV4VLAN_VLAN, - }, - { - .type = RTE_ACL_FIELD_TYPE_BITMASK, - .size = sizeof(uint16_t), - .field_index = RTE_ACL_IPV4VLAN_VLAN2_FIELD, - .input_index = RTE_ACL_IPV4VLAN_VLAN, - }, - { - .type = RTE_ACL_FIELD_TYPE_MASK, - .size = sizeof(uint32_t), - .field_index = RTE_ACL_IPV4VLAN_SRC_FIELD, - .input_index = RTE_ACL_IPV4VLAN_SRC, - }, - { - .type = RTE_ACL_FIELD_TYPE_MASK, - .size = sizeof(uint32_t), - .field_index = RTE_ACL_IPV4VLAN_DST_FIELD, - .input_index = RTE_ACL_IPV4VLAN_DST, - }, - { - .type = RTE_ACL_FIELD_TYPE_RANGE, - .size = sizeof(uint16_t), - .field_index = RTE_ACL_IPV4VLAN_SRCP_FIELD, - .input_index = RTE_ACL_IPV4VLAN_PORTS, - }, - { - .type = RTE_ACL_FIELD_TYPE_RANGE, - .size = sizeof(uint16_t), - .field_index = RTE_ACL_IPV4VLAN_DSTP_FIELD, - .input_index = RTE_ACL_IPV4VLAN_PORTS, - }, - }; - - memcpy(&cfg->defs, ipv4_defs, sizeof(ipv4_defs)); - cfg->num_fields = RTE_DIM(ipv4_defs); - - cfg->defs[RTE_ACL_IPV4VLAN_PROTO_FIELD].offset = - layout[RTE_ACL_IPV4VLAN_PROTO]; - cfg->defs[RTE_ACL_IPV4VLAN_VLAN1_FIELD].offset = - layout[RTE_ACL_IPV4VLAN_VLAN]; - cfg->defs[RTE_ACL_IPV4VLAN_VLAN2_FIELD].offset = - layout[RTE_ACL_IPV4VLAN_VLAN] + - cfg->defs[RTE_ACL_IPV4VLAN_VLAN1_FIELD].size; - cfg->defs[RTE_ACL_IPV4VLAN_SRC_FIELD].offset = - layout[RTE_ACL_IPV4VLAN_SRC]; - cfg->defs[RTE_ACL_IPV4VLAN_DST_FIELD].offset = - layout[RTE_ACL_IPV4VLAN_DST]; - cfg->defs[RTE_ACL_IPV4VLAN_SRCP_FIELD].offset = - layout[RTE_ACL_IPV4VLAN_PORTS]; - cfg->defs[RTE_ACL_IPV4VLAN_DSTP_FIELD].offset = - layout[RTE_ACL_IPV4VLAN_PORTS] + - cfg->defs[RTE_ACL_IPV4VLAN_SRCP_FIELD].size; - - cfg->num_categories = num_categories; -} - -int -rte_acl_ipv4vlan_build(struct rte_acl_ctx *ctx, - const uint32_t layout[RTE_ACL_IPV4VLAN_NUM], - uint32_t num_categories) -{ - struct rte_acl_config cfg; - - if (ctx == NULL || layout == NULL) - return -EINVAL; - - memset(&cfg, 0, sizeof(cfg)); - acl_ipv4vlan_config(&cfg, layout, num_categories); - return rte_acl_build(ctx, &cfg); -} diff --git a/lib/librte_acl/rte_acl.h b/lib/librte_acl/rte_acl.h index bd8f892..98ef2fc 100644 --- a/lib/librte_acl/rte_acl.h +++ b/lib/librte_acl/rte_acl.h @@ -380,110 +380,6 @@ rte_acl_dump(const struct rte_acl_ctx *ctx); void rte_acl_list_dump(void); -/** - * Legacy support for 7-tuple IPv4 and VLAN rule. - * This structure and corresponding API is deprecated. - */ -struct rte_acl_ipv4vlan_rule { - struct rte_acl_rule_data data; /**< Miscellaneous data for the rule. */ - uint8_t proto; /**< IPv4 protocol ID. */ - uint8_t proto_mask; /**< IPv4 protocol ID mask. */ - uint16_t vlan; /**< VLAN ID. */ - uint16_t vlan_mask; /**< VLAN ID mask. */ - uint16_t domain; /**< VLAN domain. */ - uint16_t domain_mask; /**< VLAN domain mask. */ - uint32_t src_addr; /**< IPv4 source address. */ - uint32_t src_mask_len; /**< IPv4 source address mask. */ - uint32_t dst_addr; /**< IPv4 destination address. */ - uint32_t dst_mask_len; /**< IPv4 destination address mask. */ - uint16_t src_port_low; /**< L4 source port low. */ - uint16_t src_port_high; /**< L4 source port high. */ - uint16_t dst_port_low; /**< L4 destination port low. */ - uint16_t dst_port_high; /**< L4 destination port high. */ -}; - -/** - * Specifies fields layout inside rte_acl_rule for rte_acl_ipv4vlan_rule. - */ -enum { - RTE_ACL_IPV4VLAN_PROTO_FIELD, - RTE_ACL_IPV4VLAN_VLAN1_FIELD, - RTE_ACL_IPV4VLAN_VLAN2_FIELD, - RTE_ACL_IPV4VLAN_SRC_FIELD, - RTE_ACL_IPV4VLAN_DST_FIELD, - RTE_ACL_IPV4VLAN_SRCP_FIELD, - RTE_ACL_IPV4VLAN_DSTP_FIELD, - RTE_ACL_IPV4VLAN_NUM_FIELDS -}; - -/** - * Macro to define rule size for rte_acl_ipv4vlan_rule. - */ -#define RTE_ACL_IPV4VLAN_RULE_SZ \ - RTE_ACL_RULE_SZ(RTE_ACL_IPV4VLAN_NUM_FIELDS) - -/* - * That effectively defines order of IPV4VLAN classifications: - * - PROTO - * - VLAN (TAG and DOMAIN) - * - SRC IP ADDRESS - * - DST IP ADDRESS - * - PORTS (SRC and DST) - */ -enum { - RTE_ACL_IPV4VLAN_PROTO, - RTE_ACL_IPV4VLAN_VLAN, - RTE_ACL_IPV4VLAN_SRC, - RTE_ACL_IPV4VLAN_DST, - RTE_ACL_IPV4VLAN_PORTS, - RTE_ACL_IPV4VLAN_NUM -}; - -/** - * Add ipv4vlan rules to an existing ACL context. - * This function is not multi-thread safe. - * - * @param ctx - * ACL context to add patterns to. - * @param rules - * Array of rules to add to the ACL context. - * Note that all fields in rte_acl_ipv4vlan_rule structures are expected - * to be in host byte order. - * @param num - * Number of elements in the input array of rules. - * @return - * - -ENOMEM if there is no space in the ACL context for these rules. - * - -EINVAL if the parameters are invalid. - * - Zero if operation completed successfully. - */ -int -rte_acl_ipv4vlan_add_rules(struct rte_acl_ctx *ctx, - const struct rte_acl_ipv4vlan_rule *rules, - uint32_t num); - -/** - * Analyze set of ipv4vlan rules and build required internal - * run-time structures. - * This function is not multi-thread safe. - * - * @param ctx - * ACL context to build. - * @param layout - * Layout of input data to search through. - * @param num_categories - * Maximum number of categories to use in that build. - * @return - * - -ENOMEM if couldn't allocate enough memory. - * - -EINVAL if the parameters are invalid. - * - Negative error code if operation failed. - * - Zero if operation completed successfully. - */ -int -rte_acl_ipv4vlan_build(struct rte_acl_ctx *ctx, - const uint32_t layout[RTE_ACL_IPV4VLAN_NUM], - uint32_t num_categories); - - #ifdef __cplusplus } #endif diff --git a/lib/librte_acl/rte_acl_version.map b/lib/librte_acl/rte_acl_version.map index 3f9c810..b09370a 100644 --- a/lib/librte_acl/rte_acl_version.map +++ b/lib/librte_acl/rte_acl_version.map @@ -10,8 +10,6 @@ DPDK_2.0 { rte_acl_dump; rte_acl_find_existing; rte_acl_free; - rte_acl_ipv4vlan_add_rules; - rte_acl_ipv4vlan_build; rte_acl_list_dump; rte_acl_reset; rte_acl_reset_rules; -- 2.5.1 ^ permalink raw reply [flat|nested] 29+ messages in thread
* [dpdk-dev] [PATCH 8/9] kni: remove deprecated functions 2015-09-01 20:18 [dpdk-dev] [PATCH 0/9] clean deprecated code Thomas Monjalon ` (6 preceding siblings ...) 2015-09-01 21:31 ` [dpdk-dev] [PATCH 7/9] acl: remove old API Thomas Monjalon @ 2015-09-01 21:31 ` Thomas Monjalon 2015-09-01 21:31 ` [dpdk-dev] [PATCH 9/9] ring: " Thomas Monjalon ` (3 subsequent siblings) 11 siblings, 0 replies; 29+ messages in thread From: Thomas Monjalon @ 2015-09-01 21:31 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger From: Stephen Hemminger <shemming@brocade.com> These functions were tagged as deprecated in 2.0 so they can be removed in 2.2 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Helin Zhang <helin.zhang@intel.com> [Thomas: update doc] Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> --- app/test/Makefile | 6 --- app/test/test_kni.c | 36 --------------- doc/guides/prog_guide/kernel_nic_interface.rst | 2 - doc/guides/rel_notes/deprecation.rst | 3 -- doc/guides/sample_app_ug/kernel_nic_interface.rst | 9 ---- lib/librte_kni/rte_kni.c | 51 --------------------- lib/librte_kni/rte_kni.h | 54 ----------------------- lib/librte_kni/rte_kni_version.map | 3 -- 8 files changed, 164 deletions(-) diff --git a/app/test/Makefile b/app/test/Makefile index e7f148f..7778e1c 100644 --- a/app/test/Makefile +++ b/app/test/Makefile @@ -146,12 +146,6 @@ SRCS-$(CONFIG_RTE_LIBRTE_KVARGS) += test_kvargs.c CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) -# Disable warnings of deprecated-declarations in test_kni.c -ifeq ($(CC), icc) -CFLAGS_test_kni.o += -wd1478 -else -CFLAGS_test_kni.o += -Wno-deprecated-declarations -endif CFLAGS += -D_GNU_SOURCE # Disable VTA for memcpy test diff --git a/app/test/test_kni.c b/app/test/test_kni.c index 506b543..9dad988 100644 --- a/app/test/test_kni.c +++ b/app/test/test_kni.c @@ -398,17 +398,6 @@ test_kni_processing(uint8_t port_id, struct rte_mempool *mp) printf("fail to create kni\n"); return -1; } - if (rte_kni_get_port_id(kni) != port_id) { - printf("fail to get port id\n"); - ret = -1; - goto fail_kni; - } - - if (rte_kni_info_get(RTE_MAX_ETHPORTS)) { - printf("Unexpectedly get a KNI successfully\n"); - ret = -1; - goto fail_kni; - } test_kni_ctx = kni; test_kni_processing_flag = 0; @@ -591,14 +580,6 @@ test_kni(void) goto fail; } - /* test of getting port id according to NULL kni context */ - if (rte_kni_get_port_id(NULL) < RTE_MAX_ETHPORTS) { - ret = -1; - printf("unexpectedly get port id successfully by NULL kni " - "pointer\n"); - goto fail; - } - /* test of releasing NULL kni context */ ret = rte_kni_release(NULL); if (ret == 0) { @@ -645,23 +626,6 @@ test_kni(void) goto fail; } - /* test the interface of creating a KNI, for backward compatibility */ - memset(&ops, 0, sizeof(ops)); - ops = kni_ops; - kni = rte_kni_create(port_id, MAX_PACKET_SZ, mp, &ops); - if (!kni) { - ret = -1; - printf("Fail to create a KNI device for port %d\n", port_id); - goto fail; - } - - ret = rte_kni_release(kni); - if (ret < 0) { - printf("Fail to release a KNI device\n"); - goto fail; - } - - ret = 0; fail: rte_eth_dev_stop(port_id); diff --git a/doc/guides/prog_guide/kernel_nic_interface.rst b/doc/guides/prog_guide/kernel_nic_interface.rst index 713d30b..0d91476 100644 --- a/doc/guides/prog_guide/kernel_nic_interface.rst +++ b/doc/guides/prog_guide/kernel_nic_interface.rst @@ -100,8 +100,6 @@ Refer to rte_kni_common.h in the DPDK source code for more details. The physical addresses will be re-mapped into the kernel address space and stored in separate KNI contexts. -Once KNI interfaces are created, the KNI context information can be queried by calling the rte_kni_info_get() function. - The KNI interfaces can be deleted by a DPDK application dynamically after being created. Furthermore, all those KNI interfaces not deleted will be deleted on the release operation of the miscellaneous device (when the DPDK application is closed). diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index e7e213c..04819fa 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -40,9 +40,6 @@ Deprecation Notices the tunnel type, TNI/VNI, inner MAC and inner VLAN are monitored. The release 2.2 will contain these changes without backwards compatibility. -* librte_kni: Functions based on port id are deprecated for a long time and - should be removed (rte_kni_create, rte_kni_get_port_id and rte_kni_info_get). - * librte_pmd_ring: The deprecated functions rte_eth_ring_pair_create and rte_eth_ring_pair_attach should be removed. diff --git a/doc/guides/sample_app_ug/kernel_nic_interface.rst b/doc/guides/sample_app_ug/kernel_nic_interface.rst index 02dde59..f1deca9 100644 --- a/doc/guides/sample_app_ug/kernel_nic_interface.rst +++ b/doc/guides/sample_app_ug/kernel_nic_interface.rst @@ -242,15 +242,6 @@ Setup of mbuf pool, driver and queues is similar to the setup done in the L2 For In addition, one or more kernel NIC interfaces are allocated for each of the configured ports according to the command line parameters. -The code for creating the kernel NIC interface for a specific port is as follows: - -.. code-block:: c - - kni = rte_kni_create(port, MAX_PACKET_SZ, pktmbuf_pool, &kni_ops); - if (kni == NULL) - rte_exit(EXIT_FAILURE, "Fail to create kni dev " - "for port: %d\n", port); - The code for allocating the kernel NIC interfaces for a specific port is as follows: .. code-block:: c diff --git a/lib/librte_kni/rte_kni.c b/lib/librte_kni/rte_kni.c index 08155db..ea9baf4 100644 --- a/lib/librte_kni/rte_kni.c +++ b/lib/librte_kni/rte_kni.c @@ -311,31 +311,6 @@ kni_fail: max_kni_ifaces); } -/* It is deprecated and just for backward compatibility */ -struct rte_kni * -rte_kni_create(uint8_t port_id, - unsigned mbuf_size, - struct rte_mempool *pktmbuf_pool, - struct rte_kni_ops *ops) -{ - struct rte_kni_conf conf; - struct rte_eth_dev_info info; - - memset(&info, 0, sizeof(info)); - memset(&conf, 0, sizeof(conf)); - rte_eth_dev_info_get(port_id, &info); - - snprintf(conf.name, sizeof(conf.name), "vEth%u", port_id); - conf.addr = info.pci_dev->addr; - conf.id = info.pci_dev->id; - conf.group_id = (uint16_t)port_id; - conf.mbuf_size = mbuf_size; - - /* Save the port id for request handling */ - ops->port_id = port_id; - - return rte_kni_alloc(pktmbuf_pool, &conf, ops); -} struct rte_kni * rte_kni_alloc(struct rte_mempool *pktmbuf_pool, @@ -650,16 +625,6 @@ kni_allocate_mbufs(struct rte_kni *kni) } } -/* It is deprecated and just for backward compatibility */ -uint8_t -rte_kni_get_port_id(struct rte_kni *kni) -{ - if (!kni) - return ~0x0; - - return kni->ops.port_id; -} - struct rte_kni * rte_kni_get(const char *name) { @@ -686,22 +651,6 @@ rte_kni_get_name(const struct rte_kni *kni) return kni->name; } -/* - * It is deprecated and just for backward compatibility. - */ -struct rte_kni * -rte_kni_info_get(uint8_t port_id) -{ - char name[RTE_MEMZONE_NAMESIZE]; - - if (port_id >= RTE_MAX_ETHPORTS) - return NULL; - - snprintf(name, RTE_MEMZONE_NAMESIZE, "vEth%u", port_id); - - return rte_kni_get(name); -} - static enum kni_ops_status kni_check_request_register(struct rte_kni_ops *ops) { diff --git a/lib/librte_kni/rte_kni.h b/lib/librte_kni/rte_kni.h index 52ffdb7..ef9faa9 100644 --- a/lib/librte_kni/rte_kni.h +++ b/lib/librte_kni/rte_kni.h @@ -129,30 +129,6 @@ extern struct rte_kni *rte_kni_alloc(struct rte_mempool *pktmbuf_pool, struct rte_kni_ops *ops); /** - * It create a KNI device for specific port. - * - * Note: It is deprecated and just for backward compatibility. - * - * @param port_id - * Port ID. - * @param mbuf_size - * mbuf size. - * @param pktmbuf_pool - * The mempool for allocting mbufs for packets. - * @param ops - * The pointer to the callbacks for the KNI kernel requests. - * - * @return - * - The pointer to the context of a KNI interface. - * - NULL indicate error. - */ -extern struct rte_kni *rte_kni_create(uint8_t port_id, - unsigned mbuf_size, - struct rte_mempool *pktmbuf_pool, - struct rte_kni_ops *ops) \ - __attribute__ ((deprecated)); - -/** * Release KNI interface according to the context. It will also release the * paired KNI interface in kernel space. All processing on the specific KNI * context need to be stopped before calling this interface. @@ -221,21 +197,6 @@ extern unsigned rte_kni_tx_burst(struct rte_kni *kni, struct rte_mbuf **mbufs, unsigned num); /** - * Get the port id from KNI interface. - * - * Note: It is deprecated and just for backward compatibility. - * - * @param kni - * The KNI interface context. - * - * @return - * On success: The port id. - * On failure: ~0x0 - */ -extern uint8_t rte_kni_get_port_id(struct rte_kni *kni) \ - __attribute__ ((deprecated)); - -/** * Get the KNI context of its name. * * @param name @@ -258,21 +219,6 @@ extern struct rte_kni *rte_kni_get(const char *name); extern const char *rte_kni_get_name(const struct rte_kni *kni); /** - * Get the KNI context of the specific port. - * - * Note: It is deprecated and just for backward compatibility. - * - * @param port_id - * the port id. - * - * @return - * On success: Pointer to KNI interface. - * On failure: NULL - */ -extern struct rte_kni *rte_kni_info_get(uint8_t port_id) \ - __attribute__ ((deprecated)); - -/** * Register KNI request handling for a specified port,and it can * be called by master process or slave process. * diff --git a/lib/librte_kni/rte_kni_version.map b/lib/librte_kni/rte_kni_version.map index a987d31..acd515e 100644 --- a/lib/librte_kni/rte_kni_version.map +++ b/lib/librte_kni/rte_kni_version.map @@ -3,12 +3,9 @@ DPDK_2.0 { rte_kni_alloc; rte_kni_close; - rte_kni_create; rte_kni_get; rte_kni_get_name; - rte_kni_get_port_id; rte_kni_handle_request; - rte_kni_info_get; rte_kni_init; rte_kni_register_handlers; rte_kni_release; -- 2.5.1 ^ permalink raw reply [flat|nested] 29+ messages in thread
* [dpdk-dev] [PATCH 9/9] ring: remove deprecated functions 2015-09-01 20:18 [dpdk-dev] [PATCH 0/9] clean deprecated code Thomas Monjalon ` (7 preceding siblings ...) 2015-09-01 21:31 ` [dpdk-dev] [PATCH 8/9] kni: remove deprecated functions Thomas Monjalon @ 2015-09-01 21:31 ` Thomas Monjalon 2015-09-01 22:10 ` [dpdk-dev] [PATCH 0/9] clean deprecated code Stephen Hemminger ` (2 subsequent siblings) 11 siblings, 0 replies; 29+ messages in thread From: Thomas Monjalon @ 2015-09-01 21:31 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger From: Stephen Hemminger <shemming@brocade.com> These were deprecated in 2.0 so remove them from 2.2 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> --- doc/guides/rel_notes/deprecation.rst | 3 -- drivers/net/ring/rte_eth_ring.c | 56 ------------------------------- drivers/net/ring/rte_eth_ring.h | 3 -- drivers/net/ring/rte_eth_ring_version.map | 2 -- 4 files changed, 64 deletions(-) diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 04819fa..5f6079b 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -40,9 +40,6 @@ Deprecation Notices the tunnel type, TNI/VNI, inner MAC and inner VLAN are monitored. The release 2.2 will contain these changes without backwards compatibility. -* librte_pmd_ring: The deprecated functions rte_eth_ring_pair_create and - rte_eth_ring_pair_attach should be removed. - * ABI changes are planned for struct virtio_net in order to support vhost-user multiple queues feature. It should be integrated in release 2.2 without backward compatibility. diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c index 6fd3d0a..0ba36d5 100644 --- a/drivers/net/ring/rte_eth_ring.c +++ b/drivers/net/ring/rte_eth_ring.c @@ -391,62 +391,6 @@ eth_dev_ring_create(const char *name, const unsigned numa_node, return 0; } - -static int -eth_dev_ring_pair_create(const char *name, const unsigned numa_node, - enum dev_action action) -{ - /* rx and tx are so-called from point of view of first port. - * They are inverted from the point of view of second port - */ - struct rte_ring *rx[RTE_PMD_RING_MAX_RX_RINGS]; - struct rte_ring *tx[RTE_PMD_RING_MAX_TX_RINGS]; - unsigned i; - char rx_rng_name[RTE_RING_NAMESIZE]; - char tx_rng_name[RTE_RING_NAMESIZE]; - unsigned num_rings = RTE_MIN(RTE_PMD_RING_MAX_RX_RINGS, - RTE_PMD_RING_MAX_TX_RINGS); - - for (i = 0; i < num_rings; i++) { - snprintf(rx_rng_name, sizeof(rx_rng_name), "ETH_RX%u_%s", i, name); - rx[i] = (action == DEV_CREATE) ? - rte_ring_create(rx_rng_name, 1024, numa_node, - RING_F_SP_ENQ|RING_F_SC_DEQ) : - rte_ring_lookup(rx_rng_name); - if (rx[i] == NULL) - return -1; - snprintf(tx_rng_name, sizeof(tx_rng_name), "ETH_TX%u_%s", i, name); - tx[i] = (action == DEV_CREATE) ? - rte_ring_create(tx_rng_name, 1024, numa_node, - RING_F_SP_ENQ|RING_F_SC_DEQ): - rte_ring_lookup(tx_rng_name); - if (tx[i] == NULL) - return -1; - } - - if (rte_eth_from_rings(rx_rng_name, rx, num_rings, tx, num_rings, - numa_node) < 0 || - rte_eth_from_rings(tx_rng_name, tx, num_rings, rx, - num_rings, numa_node) < 0) - return -1; - - return 0; -} - -int -rte_eth_ring_pair_create(const char *name, const unsigned numa_node) -{ - RTE_LOG(WARNING, PMD, "rte_eth_ring_pair_create is deprecated\n"); - return eth_dev_ring_pair_create(name, numa_node, DEV_CREATE); -} - -int -rte_eth_ring_pair_attach(const char *name, const unsigned numa_node) -{ - RTE_LOG(WARNING, PMD, "rte_eth_ring_pair_attach is deprecated\n"); - return eth_dev_ring_pair_create(name, numa_node, DEV_ATTACH); -} - struct node_action_pair { char name[PATH_MAX]; unsigned node; diff --git a/drivers/net/ring/rte_eth_ring.h b/drivers/net/ring/rte_eth_ring.h index 2262249..5a69bff 100644 --- a/drivers/net/ring/rte_eth_ring.h +++ b/drivers/net/ring/rte_eth_ring.h @@ -65,9 +65,6 @@ int rte_eth_from_rings(const char *name, const unsigned nb_tx_queues, const unsigned numa_node); -int rte_eth_ring_pair_create(const char *name, const unsigned numa_node); -int rte_eth_ring_pair_attach(const char *name, const unsigned numa_node); - #ifdef __cplusplus } #endif diff --git a/drivers/net/ring/rte_eth_ring_version.map b/drivers/net/ring/rte_eth_ring_version.map index 8ad107d..0875e25 100644 --- a/drivers/net/ring/rte_eth_ring_version.map +++ b/drivers/net/ring/rte_eth_ring_version.map @@ -2,8 +2,6 @@ DPDK_2.0 { global: rte_eth_from_rings; - rte_eth_ring_pair_attach; - rte_eth_ring_pair_create; local: *; }; -- 2.5.1 ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [dpdk-dev] [PATCH 0/9] clean deprecated code 2015-09-01 20:18 [dpdk-dev] [PATCH 0/9] clean deprecated code Thomas Monjalon ` (8 preceding siblings ...) 2015-09-01 21:31 ` [dpdk-dev] [PATCH 9/9] ring: " Thomas Monjalon @ 2015-09-01 22:10 ` Stephen Hemminger 2015-09-02 10:30 ` Neil Horman 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 00/10] " Thomas Monjalon 11 siblings, 0 replies; 29+ messages in thread From: Stephen Hemminger @ 2015-09-01 22:10 UTC (permalink / raw) To: Thomas Monjalon; +Cc: dev On Tue, 1 Sep 2015 22:18:08 +0200 Thomas Monjalon <thomas.monjalon@6wind.com> wrote: > Before starting a new integration cycle (2.2.0-rc0), > the deprecated code is removed. > > The hash library is not cleaned in this patchset and would be > better done by its maintainers. Bruce, Pablo, please check the > file doc/guides/rel_notes/deprecation.rst. > > Stephen Hemminger (2): > kni: remove deprecated functions > ring: remove deprecated functions > > Thomas Monjalon (7): > ethdev: remove Rx interrupt switch > mbuf: remove packet type from offload flags > ethdev: remove SCTP flow entries switch > eal: remove deprecated function > mem: remove dummy malloc library > lpm: remove deprecated field > acl: remove old API > > MAINTAINERS | 1 - > app/test-acl/main.c | 17 ++ > app/test-pipeline/pipeline_hash.c | 12 - > app/test-pmd/cmdline.c | 4 - > app/test-pmd/csumonly.c | 14 - > app/test-pmd/rxonly.c | 16 -- > app/test/Makefile | 6 - > app/test/packet_burst_generator.c | 12 - > app/test/test_acl.c | 194 ++++++++++++++ > app/test/test_acl.h | 59 +++++ > app/test/test_func_reentrancy.c | 4 +- > app/test/test_kni.c | 36 --- > app/test/test_lpm.c | 4 +- > doc/guides/prog_guide/dev_kit_build_system.rst | 2 +- > doc/guides/prog_guide/env_abstraction_layer.rst | 2 +- > doc/guides/prog_guide/kernel_nic_interface.rst | 2 - > doc/guides/prog_guide/source_org.rst | 1 - > .../thread_safety_intel_dpdk_functions.rst | 2 +- > doc/guides/rel_notes/deprecation.rst | 33 --- > doc/guides/sample_app_ug/kernel_nic_interface.rst | 9 - > drivers/net/cxgbe/sge.c | 16 -- > drivers/net/e1000/igb_ethdev.c | 26 -- > drivers/net/e1000/igb_rxtx.c | 34 --- > drivers/net/enic/enic_main.c | 25 -- > drivers/net/fm10k/fm10k_rxtx.c | 15 -- > drivers/net/i40e/i40e_fdir.c | 4 - > drivers/net/i40e/i40e_rxtx.c | 293 --------------------- > drivers/net/ixgbe/ixgbe_ethdev.c | 40 --- > drivers/net/ixgbe/ixgbe_rxtx.c | 87 ------ > drivers/net/ixgbe/ixgbe_rxtx_vec.c | 111 -------- > drivers/net/mlx4/mlx4.c | 29 -- > drivers/net/ring/rte_eth_ring.c | 56 ---- > drivers/net/ring/rte_eth_ring.h | 3 - > drivers/net/ring/rte_eth_ring_version.map | 2 - > drivers/net/vmxnet3/vmxnet3_rxtx.c | 8 - > examples/ip_fragmentation/main.c | 10 - > examples/ip_reassembly/main.c | 10 - > examples/l3fwd-acl/main.c | 44 ++-- > examples/l3fwd-power/main.c | 11 - > examples/l3fwd/main.c | 114 -------- > examples/tep_termination/vxlan.c | 5 - > lib/Makefile | 1 - > lib/librte_acl/Makefile | 2 +- > lib/librte_acl/rte_acl.c | 170 ------------ > lib/librte_acl/rte_acl.h | 104 -------- > lib/librte_acl/rte_acl_version.map | 2 - > lib/librte_eal/bsdapp/eal/Makefile | 2 +- > .../bsdapp/eal/include/exec-env/rte_interrupts.h | 2 - > lib/librte_eal/bsdapp/eal/rte_eal_version.map | 1 - > lib/librte_eal/common/eal_common_pci.c | 6 - > lib/librte_eal/common/include/rte_pci.h | 2 - > lib/librte_eal/linuxapp/eal/Makefile | 2 +- > lib/librte_eal/linuxapp/eal/eal_interrupts.c | 53 ---- > .../linuxapp/eal/include/exec-env/rte_interrupts.h | 2 - > .../linuxapp/eal/include/exec-env/rte_kni_common.h | 6 - > lib/librte_eal/linuxapp/eal/rte_eal_version.map | 1 - > lib/librte_ether/Makefile | 2 +- > lib/librte_ether/rte_eth_ctrl.h | 4 - > lib/librte_ether/rte_ethdev.c | 40 --- > lib/librte_ether/rte_ethdev.h | 4 - > lib/librte_kni/rte_kni.c | 51 ---- > lib/librte_kni/rte_kni.h | 54 ---- > lib/librte_kni/rte_kni_version.map | 3 - > lib/librte_lpm/Makefile | 2 +- > lib/librte_lpm/rte_lpm.h | 11 - > lib/librte_malloc/Makefile | 48 ---- > lib/librte_malloc/rte_malloc_empty.c | 34 --- > lib/librte_malloc/rte_malloc_version.map | 3 - > lib/librte_mbuf/Makefile | 2 +- > lib/librte_mbuf/rte_mbuf.c | 10 - > lib/librte_mbuf/rte_mbuf.h | 28 +- > mk/rte.app.mk | 1 - > 72 files changed, 301 insertions(+), 1725 deletions(-) > delete mode 100644 lib/librte_malloc/Makefile > delete mode 100644 lib/librte_malloc/rte_malloc_empty.c > delete mode 100644 lib/librte_malloc/rte_malloc_version.map > Acked-by: Stephen Hemminger <stephen@networkplumber.org> ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [dpdk-dev] [PATCH 0/9] clean deprecated code 2015-09-01 20:18 [dpdk-dev] [PATCH 0/9] clean deprecated code Thomas Monjalon ` (9 preceding siblings ...) 2015-09-01 22:10 ` [dpdk-dev] [PATCH 0/9] clean deprecated code Stephen Hemminger @ 2015-09-02 10:30 ` Neil Horman 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 00/10] " Thomas Monjalon 11 siblings, 0 replies; 29+ messages in thread From: Neil Horman @ 2015-09-02 10:30 UTC (permalink / raw) To: Thomas Monjalon; +Cc: dev On Tue, Sep 01, 2015 at 10:18:08PM +0200, Thomas Monjalon wrote: > Before starting a new integration cycle (2.2.0-rc0), > the deprecated code is removed. > > The hash library is not cleaned in this patchset and would be > better done by its maintainers. Bruce, Pablo, please check the > file doc/guides/rel_notes/deprecation.rst. > > Stephen Hemminger (2): > kni: remove deprecated functions > ring: remove deprecated functions > > Thomas Monjalon (7): > ethdev: remove Rx interrupt switch > mbuf: remove packet type from offload flags > ethdev: remove SCTP flow entries switch > eal: remove deprecated function > mem: remove dummy malloc library > lpm: remove deprecated field > acl: remove old API > > MAINTAINERS | 1 - > app/test-acl/main.c | 17 ++ > app/test-pipeline/pipeline_hash.c | 12 - > app/test-pmd/cmdline.c | 4 - > app/test-pmd/csumonly.c | 14 - > app/test-pmd/rxonly.c | 16 -- > app/test/Makefile | 6 - > app/test/packet_burst_generator.c | 12 - > app/test/test_acl.c | 194 ++++++++++++++ > app/test/test_acl.h | 59 +++++ > app/test/test_func_reentrancy.c | 4 +- > app/test/test_kni.c | 36 --- > app/test/test_lpm.c | 4 +- > doc/guides/prog_guide/dev_kit_build_system.rst | 2 +- > doc/guides/prog_guide/env_abstraction_layer.rst | 2 +- > doc/guides/prog_guide/kernel_nic_interface.rst | 2 - > doc/guides/prog_guide/source_org.rst | 1 - > .../thread_safety_intel_dpdk_functions.rst | 2 +- > doc/guides/rel_notes/deprecation.rst | 33 --- > doc/guides/sample_app_ug/kernel_nic_interface.rst | 9 - > drivers/net/cxgbe/sge.c | 16 -- > drivers/net/e1000/igb_ethdev.c | 26 -- > drivers/net/e1000/igb_rxtx.c | 34 --- > drivers/net/enic/enic_main.c | 25 -- > drivers/net/fm10k/fm10k_rxtx.c | 15 -- > drivers/net/i40e/i40e_fdir.c | 4 - > drivers/net/i40e/i40e_rxtx.c | 293 --------------------- > drivers/net/ixgbe/ixgbe_ethdev.c | 40 --- > drivers/net/ixgbe/ixgbe_rxtx.c | 87 ------ > drivers/net/ixgbe/ixgbe_rxtx_vec.c | 111 -------- > drivers/net/mlx4/mlx4.c | 29 -- > drivers/net/ring/rte_eth_ring.c | 56 ---- > drivers/net/ring/rte_eth_ring.h | 3 - > drivers/net/ring/rte_eth_ring_version.map | 2 - > drivers/net/vmxnet3/vmxnet3_rxtx.c | 8 - > examples/ip_fragmentation/main.c | 10 - > examples/ip_reassembly/main.c | 10 - > examples/l3fwd-acl/main.c | 44 ++-- > examples/l3fwd-power/main.c | 11 - > examples/l3fwd/main.c | 114 -------- > examples/tep_termination/vxlan.c | 5 - > lib/Makefile | 1 - > lib/librte_acl/Makefile | 2 +- > lib/librte_acl/rte_acl.c | 170 ------------ > lib/librte_acl/rte_acl.h | 104 -------- > lib/librte_acl/rte_acl_version.map | 2 - > lib/librte_eal/bsdapp/eal/Makefile | 2 +- > .../bsdapp/eal/include/exec-env/rte_interrupts.h | 2 - > lib/librte_eal/bsdapp/eal/rte_eal_version.map | 1 - > lib/librte_eal/common/eal_common_pci.c | 6 - > lib/librte_eal/common/include/rte_pci.h | 2 - > lib/librte_eal/linuxapp/eal/Makefile | 2 +- > lib/librte_eal/linuxapp/eal/eal_interrupts.c | 53 ---- > .../linuxapp/eal/include/exec-env/rte_interrupts.h | 2 - > .../linuxapp/eal/include/exec-env/rte_kni_common.h | 6 - > lib/librte_eal/linuxapp/eal/rte_eal_version.map | 1 - > lib/librte_ether/Makefile | 2 +- > lib/librte_ether/rte_eth_ctrl.h | 4 - > lib/librte_ether/rte_ethdev.c | 40 --- > lib/librte_ether/rte_ethdev.h | 4 - > lib/librte_kni/rte_kni.c | 51 ---- > lib/librte_kni/rte_kni.h | 54 ---- > lib/librte_kni/rte_kni_version.map | 3 - > lib/librte_lpm/Makefile | 2 +- > lib/librte_lpm/rte_lpm.h | 11 - > lib/librte_malloc/Makefile | 48 ---- > lib/librte_malloc/rte_malloc_empty.c | 34 --- > lib/librte_malloc/rte_malloc_version.map | 3 - > lib/librte_mbuf/Makefile | 2 +- > lib/librte_mbuf/rte_mbuf.c | 10 - > lib/librte_mbuf/rte_mbuf.h | 28 +- > mk/rte.app.mk | 1 - > 72 files changed, 301 insertions(+), 1725 deletions(-) > delete mode 100644 lib/librte_malloc/Makefile > delete mode 100644 lib/librte_malloc/rte_malloc_empty.c > delete mode 100644 lib/librte_malloc/rte_malloc_version.map > > -- > 2.5.0 > > Acked-by: Neil Horman <nhorman@tuxdriver.com> ^ permalink raw reply [flat|nested] 29+ messages in thread
* [dpdk-dev] [PATCH v2 00/10] clean deprecated code 2015-09-01 20:18 [dpdk-dev] [PATCH 0/9] clean deprecated code Thomas Monjalon ` (10 preceding siblings ...) 2015-09-02 10:30 ` Neil Horman @ 2015-09-02 13:16 ` Thomas Monjalon 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 01/10] doc: init next release notes Thomas Monjalon ` (10 more replies) 11 siblings, 11 replies; 29+ messages in thread From: Thomas Monjalon @ 2015-09-02 13:16 UTC (permalink / raw) To: dev Before starting a new integration cycle (2.2.0-rc0), the deprecated code is removed. The hash library is not cleaned in this patchset and would be better done by its maintainers. Bruce, Pablo, please check the file doc/guides/rel_notes/deprecation.rst. Changes in v2: - increment KNI and ring PMD versions - list library versions in release notes - list API/ABI changes in release notes Stephen Hemminger (2): kni: remove deprecated functions ring: remove deprecated functions Thomas Monjalon (8): doc: init next release notes ethdev: remove Rx interrupt switch mbuf: remove packet type from offload flags ethdev: remove SCTP flow entries switch eal: remove deprecated function mem: remove dummy malloc library lpm: remove deprecated field acl: remove old API MAINTAINERS | 1 - app/test-acl/main.c | 17 ++ app/test-pipeline/pipeline_hash.c | 12 - app/test-pmd/cmdline.c | 4 - app/test-pmd/csumonly.c | 14 - app/test-pmd/rxonly.c | 16 -- app/test/Makefile | 6 - app/test/packet_burst_generator.c | 12 - app/test/test_acl.c | 194 ++++++++++++++ app/test/test_acl.h | 59 +++++ app/test/test_func_reentrancy.c | 4 +- app/test/test_kni.c | 36 --- app/test/test_lpm.c | 4 +- doc/guides/prog_guide/dev_kit_build_system.rst | 2 +- doc/guides/prog_guide/env_abstraction_layer.rst | 2 +- doc/guides/prog_guide/kernel_nic_interface.rst | 2 - doc/guides/prog_guide/source_org.rst | 1 - .../thread_safety_intel_dpdk_functions.rst | 2 +- doc/guides/rel_notes/deprecation.rst | 33 --- doc/guides/rel_notes/index.rst | 1 + doc/guides/rel_notes/release_2_2.rst | 81 ++++++ doc/guides/sample_app_ug/kernel_nic_interface.rst | 9 - drivers/net/cxgbe/sge.c | 16 -- drivers/net/e1000/igb_ethdev.c | 26 -- drivers/net/e1000/igb_rxtx.c | 34 --- drivers/net/enic/enic_main.c | 25 -- drivers/net/fm10k/fm10k_rxtx.c | 15 -- drivers/net/i40e/i40e_fdir.c | 4 - drivers/net/i40e/i40e_rxtx.c | 293 --------------------- drivers/net/ixgbe/ixgbe_ethdev.c | 40 --- drivers/net/ixgbe/ixgbe_rxtx.c | 87 ------ drivers/net/ixgbe/ixgbe_rxtx_vec.c | 111 -------- drivers/net/mlx4/mlx4.c | 29 -- drivers/net/ring/Makefile | 2 +- drivers/net/ring/rte_eth_ring.c | 56 ---- drivers/net/ring/rte_eth_ring.h | 3 - drivers/net/ring/rte_eth_ring_version.map | 2 - drivers/net/vmxnet3/vmxnet3_rxtx.c | 8 - examples/ip_fragmentation/main.c | 10 - examples/ip_reassembly/main.c | 10 - examples/l3fwd-acl/main.c | 44 ++-- examples/l3fwd-power/main.c | 11 - examples/l3fwd/main.c | 114 -------- examples/tep_termination/vxlan.c | 5 - lib/Makefile | 1 - lib/librte_acl/Makefile | 2 +- lib/librte_acl/rte_acl.c | 170 ------------ lib/librte_acl/rte_acl.h | 104 -------- lib/librte_acl/rte_acl_version.map | 2 - lib/librte_eal/bsdapp/eal/Makefile | 2 +- .../bsdapp/eal/include/exec-env/rte_interrupts.h | 2 - lib/librte_eal/bsdapp/eal/rte_eal_version.map | 1 - lib/librte_eal/common/eal_common_pci.c | 6 - lib/librte_eal/common/include/rte_pci.h | 2 - lib/librte_eal/linuxapp/eal/Makefile | 2 +- lib/librte_eal/linuxapp/eal/eal_interrupts.c | 53 ---- .../linuxapp/eal/include/exec-env/rte_interrupts.h | 2 - .../linuxapp/eal/include/exec-env/rte_kni_common.h | 6 - lib/librte_eal/linuxapp/eal/rte_eal_version.map | 1 - lib/librte_ether/Makefile | 2 +- lib/librte_ether/rte_eth_ctrl.h | 4 - lib/librte_ether/rte_ethdev.c | 40 --- lib/librte_ether/rte_ethdev.h | 4 - lib/librte_kni/Makefile | 2 +- lib/librte_kni/rte_kni.c | 51 ---- lib/librte_kni/rte_kni.h | 54 ---- lib/librte_kni/rte_kni_version.map | 3 - lib/librte_lpm/Makefile | 2 +- lib/librte_lpm/rte_lpm.h | 11 - lib/librte_malloc/Makefile | 48 ---- lib/librte_malloc/rte_malloc_empty.c | 34 --- lib/librte_malloc/rte_malloc_version.map | 3 - lib/librte_mbuf/Makefile | 2 +- lib/librte_mbuf/rte_mbuf.c | 10 - lib/librte_mbuf/rte_mbuf.h | 28 +- mk/rte.app.mk | 1 - 76 files changed, 385 insertions(+), 1727 deletions(-) create mode 100644 doc/guides/rel_notes/release_2_2.rst delete mode 100644 lib/librte_malloc/Makefile delete mode 100644 lib/librte_malloc/rte_malloc_empty.c delete mode 100644 lib/librte_malloc/rte_malloc_version.map -- 2.5.1 ^ permalink raw reply [flat|nested] 29+ messages in thread
* [dpdk-dev] [PATCH v2 01/10] doc: init next release notes 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 00/10] " Thomas Monjalon @ 2015-09-02 13:16 ` Thomas Monjalon 2015-09-03 15:39 ` Mcnamara, John 2015-09-03 15:44 ` Mcnamara, John 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 02/10] ethdev: remove Rx interrupt switch Thomas Monjalon ` (9 subsequent siblings) 10 siblings, 2 replies; 29+ messages in thread From: Thomas Monjalon @ 2015-09-02 13:16 UTC (permalink / raw) To: dev Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> --- doc/guides/rel_notes/index.rst | 1 + doc/guides/rel_notes/release_2_2.rst | 58 ++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 doc/guides/rel_notes/release_2_2.rst diff --git a/doc/guides/rel_notes/index.rst b/doc/guides/rel_notes/index.rst index d01cbc8..d8cadeb 100644 --- a/doc/guides/rel_notes/index.rst +++ b/doc/guides/rel_notes/index.rst @@ -40,6 +40,7 @@ Contents :numbered: rel_description + release_2_2 release_2_1 release_2_0 release_1_8 diff --git a/doc/guides/rel_notes/release_2_2.rst b/doc/guides/rel_notes/release_2_2.rst new file mode 100644 index 0000000..494b4eb --- /dev/null +++ b/doc/guides/rel_notes/release_2_2.rst @@ -0,0 +1,58 @@ +DPDK Release 2.2 +================ + +New Features +------------ + + +Resolved Issues +--------------- + + +Known Issues +------------ + + +API Changes +----------- + + +ABI Changes +----------- + + +Shared Library Versions +----------------------- + +The libraries prepended with a plus sign were incremented in this version. + +.. code-block:: diff + + libethdev.so.1 + librte_acl.so.1 + librte_cfgfile.so.1 + librte_cmdline.so.1 + librte_distributor.so.1 + librte_eal.so.1 + librte_hash.so.1 + librte_ip_frag.so.1 + librte_ivshmem.so.1 + librte_jobstats.so.1 + librte_kni.so.1 + librte_kvargs.so.1 + librte_lpm.so.1 + librte_malloc.so.1 + librte_mbuf.so.1 + librte_mempool.so.1 + librte_meter.so.1 + librte_pipeline.so.1 + librte_pmd_bond.so.1 + librte_pmd_ring.so.1 + librte_port.so.1 + librte_power.so.1 + librte_reorder.so.1 + librte_ring.so.1 + librte_sched.so.1 + librte_table.so.1 + librte_timer.so.1 + librte_vhost.so.1 -- 2.5.1 ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [dpdk-dev] [PATCH v2 01/10] doc: init next release notes 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 01/10] doc: init next release notes Thomas Monjalon @ 2015-09-03 15:39 ` Mcnamara, John 2015-09-03 15:44 ` Mcnamara, John 1 sibling, 0 replies; 29+ messages in thread From: Mcnamara, John @ 2015-09-03 15:39 UTC (permalink / raw) To: Thomas Monjalon, dev > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon > Sent: Wednesday, September 2, 2015 2:17 PM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH v2 01/10] doc: init next release notes > > Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> Acked-by: John McNamara <john.mcnamara@intel.com> ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [dpdk-dev] [PATCH v2 01/10] doc: init next release notes 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 01/10] doc: init next release notes Thomas Monjalon 2015-09-03 15:39 ` Mcnamara, John @ 2015-09-03 15:44 ` Mcnamara, John 2015-09-04 7:50 ` Thomas Monjalon 1 sibling, 1 reply; 29+ messages in thread From: Mcnamara, John @ 2015-09-03 15:44 UTC (permalink / raw) To: Thomas Monjalon, dev > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon > Sent: Wednesday, September 2, 2015 2:17 PM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH v2 01/10] doc: init next release notes P.S. Perhaps we should announce, or maybe this will do as an announcement, that from this release forward the Release Notes should be updated as part of a patchset that contains one of the following: * New Features * Resolved Issues (in relation to features existing in the previous releases) * Known Issues * API Changes * ABI Changes * Shared Library Versions John. -- ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [dpdk-dev] [PATCH v2 01/10] doc: init next release notes 2015-09-03 15:44 ` Mcnamara, John @ 2015-09-04 7:50 ` Thomas Monjalon 0 siblings, 0 replies; 29+ messages in thread From: Thomas Monjalon @ 2015-09-04 7:50 UTC (permalink / raw) To: Mcnamara, John; +Cc: dev 2015-09-03 15:44, Mcnamara, John: > P.S. Perhaps we should announce, or maybe this will do as an announcement, that from this release forward the Release Notes should be updated as part of a patchset that contains one of the following: > > * New Features > * Resolved Issues (in relation to features existing in the previous releases) > * Known Issues > * API Changes > * ABI Changes > * Shared Library Versions Maybe we should update doc/guides/contributing/documentation.rst to clearly state it. ^ permalink raw reply [flat|nested] 29+ messages in thread
* [dpdk-dev] [PATCH v2 02/10] ethdev: remove Rx interrupt switch 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 00/10] " Thomas Monjalon 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 01/10] doc: init next release notes Thomas Monjalon @ 2015-09-02 13:16 ` Thomas Monjalon 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 03/10] mbuf: remove packet type from offload flags Thomas Monjalon ` (8 subsequent siblings) 10 siblings, 0 replies; 29+ messages in thread From: Thomas Monjalon @ 2015-09-02 13:16 UTC (permalink / raw) To: dev The Rx interrupt feature is now part of the standard ABI. Because of changes in rte_intr_handle and struct rte_eth_conf, the eal and ethdev library versions are incremented. Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Neil Horman <nhorman@tuxdriver.com> --- doc/guides/rel_notes/deprecation.rst | 4 -- doc/guides/rel_notes/release_2_2.rst | 7 ++- drivers/net/e1000/igb_ethdev.c | 26 ----------- drivers/net/ixgbe/ixgbe_ethdev.c | 40 ---------------- examples/l3fwd-power/main.c | 2 - lib/librte_eal/bsdapp/eal/Makefile | 2 +- .../bsdapp/eal/include/exec-env/rte_interrupts.h | 2 - lib/librte_eal/linuxapp/eal/Makefile | 2 +- lib/librte_eal/linuxapp/eal/eal_interrupts.c | 53 ---------------------- .../linuxapp/eal/include/exec-env/rte_interrupts.h | 2 - lib/librte_ether/Makefile | 2 +- lib/librte_ether/rte_ethdev.c | 40 ---------------- lib/librte_ether/rte_ethdev.h | 4 -- 13 files changed, 8 insertions(+), 178 deletions(-) diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index da17880..991a777 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -13,10 +13,6 @@ Deprecation Notices There is no backward compatibility planned from release 2.2. All binaries will need to be rebuilt from release 2.2. -* ABI changes are planned for struct rte_intr_handle, struct rte_eth_conf - and struct eth_dev_ops to support interrupt mode feature from release 2.1. - Those changes may be enabled in the release 2.1 with CONFIG_RTE_NEXT_ABI. - * The EAL function rte_eal_pci_close_one is deprecated because renamed to rte_eal_pci_detach. diff --git a/doc/guides/rel_notes/release_2_2.rst b/doc/guides/rel_notes/release_2_2.rst index 494b4eb..388d2e3 100644 --- a/doc/guides/rel_notes/release_2_2.rst +++ b/doc/guides/rel_notes/release_2_2.rst @@ -20,6 +20,9 @@ API Changes ABI Changes ----------- +* The EAL and ethdev structures rte_intr_handle and rte_eth_conf were changed + to support Rx interrupt. It was already done in 2.1 for CONFIG_RTE_NEXT_ABI. + Shared Library Versions ----------------------- @@ -28,12 +31,12 @@ The libraries prepended with a plus sign were incremented in this version. .. code-block:: diff - libethdev.so.1 + + libethdev.so.2 librte_acl.so.1 librte_cfgfile.so.1 librte_cmdline.so.1 librte_distributor.so.1 - librte_eal.so.1 + + librte_eal.so.2 librte_hash.so.1 librte_ip_frag.so.1 librte_ivshmem.so.1 diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c index c7e6d55..848ef6e 100644 --- a/drivers/net/e1000/igb_ethdev.c +++ b/drivers/net/e1000/igb_ethdev.c @@ -106,9 +106,7 @@ static int eth_igb_flow_ctrl_get(struct rte_eth_dev *dev, static int eth_igb_flow_ctrl_set(struct rte_eth_dev *dev, struct rte_eth_fc_conf *fc_conf); static int eth_igb_lsc_interrupt_setup(struct rte_eth_dev *dev); -#ifdef RTE_NEXT_ABI static int eth_igb_rxq_interrupt_setup(struct rte_eth_dev *dev); -#endif static int eth_igb_interrupt_get_status(struct rte_eth_dev *dev); static int eth_igb_interrupt_action(struct rte_eth_dev *dev); static void eth_igb_interrupt_handler(struct rte_intr_handle *handle, @@ -232,7 +230,6 @@ static int igb_timesync_read_rx_timestamp(struct rte_eth_dev *dev, uint32_t flags); static int igb_timesync_read_tx_timestamp(struct rte_eth_dev *dev, struct timespec *timestamp); -#ifdef RTE_NEXT_ABI static int eth_igb_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id); static int eth_igb_rx_queue_intr_disable(struct rte_eth_dev *dev, @@ -241,7 +238,6 @@ static void eth_igb_assign_msix_vector(struct e1000_hw *hw, int8_t direction, uint8_t queue, uint8_t msix_vector); static void eth_igb_write_ivar(struct e1000_hw *hw, uint8_t msix_vector, uint8_t index, uint8_t offset); -#endif static void eth_igb_configure_msix_intr(struct rte_eth_dev *dev); /* @@ -303,10 +299,8 @@ static const struct eth_dev_ops eth_igb_ops = { .vlan_tpid_set = eth_igb_vlan_tpid_set, .vlan_offload_set = eth_igb_vlan_offload_set, .rx_queue_setup = eth_igb_rx_queue_setup, -#ifdef RTE_NEXT_ABI .rx_queue_intr_enable = eth_igb_rx_queue_intr_enable, .rx_queue_intr_disable = eth_igb_rx_queue_intr_disable, -#endif .rx_queue_release = eth_igb_rx_queue_release, .rx_queue_count = eth_igb_rx_queue_count, .rx_descriptor_done = eth_igb_rx_descriptor_done, @@ -893,9 +887,7 @@ eth_igb_start(struct rte_eth_dev *dev) E1000_DEV_PRIVATE(dev->data->dev_private); struct rte_intr_handle *intr_handle = &dev->pci_dev->intr_handle; int ret, mask; -#ifdef RTE_NEXT_ABI uint32_t intr_vector = 0; -#endif uint32_t ctrl_ext; PMD_INIT_FUNC_TRACE(); @@ -936,7 +928,6 @@ eth_igb_start(struct rte_eth_dev *dev) /* configure PF module if SRIOV enabled */ igb_pf_host_configure(dev); -#ifdef RTE_NEXT_ABI /* check and configure queue intr-vector mapping */ if (dev->data->dev_conf.intr_conf.rxq != 0) intr_vector = dev->data->nb_rx_queues; @@ -954,7 +945,6 @@ eth_igb_start(struct rte_eth_dev *dev) return -ENOMEM; } } -#endif /* confiugre msix for rx interrupt */ eth_igb_configure_msix_intr(dev); @@ -1050,11 +1040,9 @@ eth_igb_start(struct rte_eth_dev *dev) " no intr multiplex\n"); } -#ifdef RTE_NEXT_ABI /* check if rxq interrupt is enabled */ if (dev->data->dev_conf.intr_conf.rxq != 0) eth_igb_rxq_interrupt_setup(dev); -#endif /* enable uio/vfio intr/eventfd mapping */ rte_intr_enable(intr_handle); @@ -1146,14 +1134,12 @@ eth_igb_stop(struct rte_eth_dev *dev) } filter_info->twotuple_mask = 0; -#ifdef RTE_NEXT_ABI /* Clean datapath event and queue/vec mapping */ rte_intr_efd_disable(intr_handle); if (intr_handle->intr_vec != NULL) { rte_free(intr_handle->intr_vec); intr_handle->intr_vec = NULL; } -#endif } static void @@ -1163,9 +1149,7 @@ eth_igb_close(struct rte_eth_dev *dev) struct e1000_adapter *adapter = E1000_DEV_PRIVATE(dev->data->dev_private); struct rte_eth_link link; -#ifdef RTE_NEXT_ABI struct rte_pci_device *pci_dev; -#endif eth_igb_stop(dev); adapter->stopped = 1; @@ -1185,13 +1169,11 @@ eth_igb_close(struct rte_eth_dev *dev) igb_dev_free_queues(dev); -#ifdef RTE_NEXT_ABI pci_dev = dev->pci_dev; if (pci_dev->intr_handle.intr_vec) { rte_free(pci_dev->intr_handle.intr_vec); pci_dev->intr_handle.intr_vec = NULL; } -#endif memset(&link, 0, sizeof(link)); rte_igb_dev_atomic_write_link_status(dev, &link); @@ -2017,7 +1999,6 @@ eth_igb_lsc_interrupt_setup(struct rte_eth_dev *dev) return 0; } -#ifdef RTE_NEXT_ABI /* It clears the interrupt causes and enables the interrupt. * It will be called once only during nic initialized. * @@ -2044,7 +2025,6 @@ static int eth_igb_rxq_interrupt_setup(struct rte_eth_dev *dev) return 0; } -#endif /* * It reads ICR and gets interrupt causes, check it and set a bit flag @@ -4144,7 +4124,6 @@ static struct rte_driver pmd_igbvf_drv = { .init = rte_igbvf_pmd_init, }; -#ifdef RTE_NEXT_ABI static int eth_igb_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id) { @@ -4219,7 +4198,6 @@ eth_igb_assign_msix_vector(struct e1000_hw *hw, int8_t direction, 8 * direction); } } -#endif /* Sets up the hardware to generate MSI-X interrupts properly * @hw @@ -4228,13 +4206,11 @@ eth_igb_assign_msix_vector(struct e1000_hw *hw, int8_t direction, static void eth_igb_configure_msix_intr(struct rte_eth_dev *dev) { -#ifdef RTE_NEXT_ABI int queue_id; uint32_t tmpval, regval, intr_mask; struct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private); uint32_t vec = 0; -#endif struct rte_intr_handle *intr_handle = &dev->pci_dev->intr_handle; /* won't configure msix register if no mapping is done @@ -4243,7 +4219,6 @@ eth_igb_configure_msix_intr(struct rte_eth_dev *dev) if (!rte_intr_dp_is_en(intr_handle)) return; -#ifdef RTE_NEXT_ABI /* set interrupt vector for other causes */ if (hw->mac.type == e1000_82575) { tmpval = E1000_READ_REG(hw, E1000_CTRL_EXT); @@ -4299,7 +4274,6 @@ eth_igb_configure_msix_intr(struct rte_eth_dev *dev) } E1000_WRITE_FLUSH(hw); -#endif } PMD_REGISTER_DRIVER(pmd_igb_drv); diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index b8ee1e9..ec2918c 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -190,9 +190,7 @@ static int ixgbe_dev_rss_reta_query(struct rte_eth_dev *dev, uint16_t reta_size); static void ixgbe_dev_link_status_print(struct rte_eth_dev *dev); static int ixgbe_dev_lsc_interrupt_setup(struct rte_eth_dev *dev); -#ifdef RTE_NEXT_ABI static int ixgbe_dev_rxq_interrupt_setup(struct rte_eth_dev *dev); -#endif static int ixgbe_dev_interrupt_get_status(struct rte_eth_dev *dev); static int ixgbe_dev_interrupt_action(struct rte_eth_dev *dev); static void ixgbe_dev_interrupt_handler(struct rte_intr_handle *handle, @@ -227,14 +225,12 @@ static void ixgbevf_vlan_offload_set(struct rte_eth_dev *dev, int mask); static void ixgbevf_set_vfta_all(struct rte_eth_dev *dev, bool on); static void ixgbevf_dev_interrupt_handler(struct rte_intr_handle *handle, void *param); -#ifdef RTE_NEXT_ABI static int ixgbevf_dev_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id); static int ixgbevf_dev_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id); static void ixgbevf_set_ivar_map(struct ixgbe_hw *hw, int8_t direction, uint8_t queue, uint8_t msix_vector); -#endif static void ixgbevf_configure_msix(struct rte_eth_dev *dev); /* For Eth VMDQ APIs support */ @@ -252,14 +248,12 @@ static int ixgbe_mirror_rule_set(struct rte_eth_dev *dev, uint8_t rule_id, uint8_t on); static int ixgbe_mirror_rule_reset(struct rte_eth_dev *dev, uint8_t rule_id); -#ifdef RTE_NEXT_ABI static int ixgbe_dev_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id); static int ixgbe_dev_rx_queue_intr_disable(struct rte_eth_dev *dev, uint16_t queue_id); static void ixgbe_set_ivar_map(struct ixgbe_hw *hw, int8_t direction, uint8_t queue, uint8_t msix_vector); -#endif static void ixgbe_configure_msix(struct rte_eth_dev *dev); static int ixgbe_set_queue_rate_limit(struct rte_eth_dev *dev, @@ -420,10 +414,8 @@ static const struct eth_dev_ops ixgbe_eth_dev_ops = { .tx_queue_start = ixgbe_dev_tx_queue_start, .tx_queue_stop = ixgbe_dev_tx_queue_stop, .rx_queue_setup = ixgbe_dev_rx_queue_setup, -#ifdef RTE_NEXT_ABI .rx_queue_intr_enable = ixgbe_dev_rx_queue_intr_enable, .rx_queue_intr_disable = ixgbe_dev_rx_queue_intr_disable, -#endif .rx_queue_release = ixgbe_dev_rx_queue_release, .rx_queue_count = ixgbe_dev_rx_queue_count, .rx_descriptor_done = ixgbe_dev_rx_descriptor_done, @@ -497,10 +489,8 @@ static const struct eth_dev_ops ixgbevf_eth_dev_ops = { .rx_descriptor_done = ixgbe_dev_rx_descriptor_done, .tx_queue_setup = ixgbe_dev_tx_queue_setup, .tx_queue_release = ixgbe_dev_tx_queue_release, -#ifdef RTE_NEXT_ABI .rx_queue_intr_enable = ixgbevf_dev_rx_queue_intr_enable, .rx_queue_intr_disable = ixgbevf_dev_rx_queue_intr_disable, -#endif .mac_addr_add = ixgbevf_add_mac_addr, .mac_addr_remove = ixgbevf_remove_mac_addr, .set_mc_addr_list = ixgbe_dev_set_mc_addr_list, @@ -1680,9 +1670,7 @@ ixgbe_dev_start(struct rte_eth_dev *dev) struct ixgbe_vf_info *vfinfo = *IXGBE_DEV_PRIVATE_TO_P_VFDATA(dev->data->dev_private); struct rte_intr_handle *intr_handle = &dev->pci_dev->intr_handle; -#ifdef RTE_NEXT_ABI uint32_t intr_vector = 0; -#endif int err, link_up = 0, negotiate = 0; uint32_t speed = 0; int mask = 0; @@ -1715,7 +1703,6 @@ ixgbe_dev_start(struct rte_eth_dev *dev) /* configure PF module if SRIOV enabled */ ixgbe_pf_host_configure(dev); -#ifdef RTE_NEXT_ABI /* check and configure queue intr-vector mapping */ if (dev->data->dev_conf.intr_conf.rxq != 0) intr_vector = dev->data->nb_rx_queues; @@ -1734,7 +1721,6 @@ ixgbe_dev_start(struct rte_eth_dev *dev) return -ENOMEM; } } -#endif /* confiugre msix for sleep until rx interrupt */ ixgbe_configure_msix(dev); @@ -1827,11 +1813,9 @@ skip_link_setup: " no intr multiplex\n"); } -#ifdef RTE_NEXT_ABI /* check if rxq interrupt is enabled */ if (dev->data->dev_conf.intr_conf.rxq != 0) ixgbe_dev_rxq_interrupt_setup(dev); -#endif /* enable uio/vfio intr/eventfd mapping */ rte_intr_enable(intr_handle); @@ -1942,14 +1926,12 @@ ixgbe_dev_stop(struct rte_eth_dev *dev) memset(filter_info->fivetuple_mask, 0, sizeof(uint32_t) * IXGBE_5TUPLE_ARRAY_SIZE); -#ifdef RTE_NEXT_ABI /* Clean datapath event and queue/vec mapping */ rte_intr_efd_disable(intr_handle); if (intr_handle->intr_vec != NULL) { rte_free(intr_handle->intr_vec); intr_handle->intr_vec = NULL; } -#endif } /* @@ -2623,7 +2605,6 @@ ixgbe_dev_lsc_interrupt_setup(struct rte_eth_dev *dev) * - On success, zero. * - On failure, a negative value. */ -#ifdef RTE_NEXT_ABI static int ixgbe_dev_rxq_interrupt_setup(struct rte_eth_dev *dev) { @@ -2634,7 +2615,6 @@ ixgbe_dev_rxq_interrupt_setup(struct rte_eth_dev *dev) return 0; } -#endif /* * It reads ICR and sets flag (IXGBE_EICR_LSC) for the link_update. @@ -3435,9 +3415,7 @@ ixgbevf_dev_start(struct rte_eth_dev *dev) { struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); -#ifdef RTE_NEXT_ABI uint32_t intr_vector = 0; -#endif struct rte_intr_handle *intr_handle = &dev->pci_dev->intr_handle; int err, mask = 0; @@ -3470,7 +3448,6 @@ ixgbevf_dev_start(struct rte_eth_dev *dev) ixgbevf_dev_rxtx_start(dev); -#ifdef RTE_NEXT_ABI /* check and configure queue intr-vector mapping */ if (dev->data->dev_conf.intr_conf.rxq != 0) intr_vector = dev->data->nb_rx_queues; @@ -3488,7 +3465,6 @@ ixgbevf_dev_start(struct rte_eth_dev *dev) return -ENOMEM; } } -#endif ixgbevf_configure_msix(dev); if (dev->data->dev_conf.intr_conf.lsc != 0) { @@ -3534,23 +3510,19 @@ ixgbevf_dev_stop(struct rte_eth_dev *dev) /* disable intr eventfd mapping */ rte_intr_disable(intr_handle); -#ifdef RTE_NEXT_ABI /* Clean datapath event and queue/vec mapping */ rte_intr_efd_disable(intr_handle); if (intr_handle->intr_vec != NULL) { rte_free(intr_handle->intr_vec); intr_handle->intr_vec = NULL; } -#endif } static void ixgbevf_dev_close(struct rte_eth_dev *dev) { struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); -#ifdef RTE_NEXT_ABI struct rte_pci_device *pci_dev; -#endif PMD_INIT_FUNC_TRACE(); @@ -3563,13 +3535,11 @@ ixgbevf_dev_close(struct rte_eth_dev *dev) /* reprogram the RAR[0] in case user changed it. */ ixgbe_set_rar(hw, 0, hw->mac.addr, 0, IXGBE_RAH_AV); -#ifdef RTE_NEXT_ABI pci_dev = dev->pci_dev; if (pci_dev->intr_handle.intr_vec) { rte_free(pci_dev->intr_handle.intr_vec); pci_dev->intr_handle.intr_vec = NULL; } -#endif } static void ixgbevf_set_vfta_all(struct rte_eth_dev *dev, bool on) @@ -4087,7 +4057,6 @@ ixgbe_mirror_rule_reset(struct rte_eth_dev *dev, uint8_t rule_id) return 0; } -#ifdef RTE_NEXT_ABI static int ixgbevf_dev_rx_queue_intr_enable(struct rte_eth_dev *dev, uint16_t queue_id) { @@ -4240,18 +4209,15 @@ ixgbe_set_ivar_map(struct ixgbe_hw *hw, int8_t direction, } } } -#endif static void ixgbevf_configure_msix(struct rte_eth_dev *dev) { struct rte_intr_handle *intr_handle = &dev->pci_dev->intr_handle; -#ifdef RTE_NEXT_ABI struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); uint32_t q_idx; uint32_t vector_idx = 0; -#endif /* won't configure msix register if no mapping is done * between intr vector and event fd. @@ -4259,7 +4225,6 @@ ixgbevf_configure_msix(struct rte_eth_dev *dev) if (!rte_intr_dp_is_en(intr_handle)) return; -#ifdef RTE_NEXT_ABI /* Configure all RX queues of VF */ for (q_idx = 0; q_idx < dev->data->nb_rx_queues; q_idx++) { /* Force all queue use vector 0, @@ -4271,7 +4236,6 @@ ixgbevf_configure_msix(struct rte_eth_dev *dev) /* Configure VF Rx queue ivar */ ixgbevf_set_ivar_map(hw, -1, 1, vector_idx); -#endif } /** @@ -4283,13 +4247,11 @@ static void ixgbe_configure_msix(struct rte_eth_dev *dev) { struct rte_intr_handle *intr_handle = &dev->pci_dev->intr_handle; -#ifdef RTE_NEXT_ABI struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); uint32_t queue_id, vec = 0; uint32_t mask; uint32_t gpie; -#endif /* won't configure msix register if no mapping is done * between intr vector and event fd @@ -4297,7 +4259,6 @@ ixgbe_configure_msix(struct rte_eth_dev *dev) if (!rte_intr_dp_is_en(intr_handle)) return; -#ifdef RTE_NEXT_ABI /* setup GPIE for MSI-x mode */ gpie = IXGBE_READ_REG(hw, IXGBE_GPIE); gpie |= IXGBE_GPIE_MSIX_MODE | IXGBE_GPIE_PBA_SUPPORT | @@ -4347,7 +4308,6 @@ ixgbe_configure_msix(struct rte_eth_dev *dev) IXGBE_EIMS_LSC); IXGBE_WRITE_REG(hw, IXGBE_EIAC, mask); -#endif } static int ixgbe_set_queue_rate_limit(struct rte_eth_dev *dev, diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c index 2f205ea..086f29b 100644 --- a/examples/l3fwd-power/main.c +++ b/examples/l3fwd-power/main.c @@ -239,9 +239,7 @@ static struct rte_eth_conf port_conf = { }, .intr_conf = { .lsc = 1, -#ifdef RTE_NEXT_ABI .rxq = 1, -#endif }, }; diff --git a/lib/librte_eal/bsdapp/eal/Makefile b/lib/librte_eal/bsdapp/eal/Makefile index a969435..a49dcec 100644 --- a/lib/librte_eal/bsdapp/eal/Makefile +++ b/lib/librte_eal/bsdapp/eal/Makefile @@ -44,7 +44,7 @@ CFLAGS += $(WERROR_FLAGS) -O3 EXPORT_MAP := rte_eal_version.map -LIBABIVER := 1 +LIBABIVER := 2 # specific to linuxapp exec-env SRCS-$(CONFIG_RTE_LIBRTE_EAL_BSDAPP) := eal.c diff --git a/lib/librte_eal/bsdapp/eal/include/exec-env/rte_interrupts.h b/lib/librte_eal/bsdapp/eal/include/exec-env/rte_interrupts.h index bffa902..88d4ae1 100644 --- a/lib/librte_eal/bsdapp/eal/include/exec-env/rte_interrupts.h +++ b/lib/librte_eal/bsdapp/eal/include/exec-env/rte_interrupts.h @@ -50,11 +50,9 @@ struct rte_intr_handle { int fd; /**< file descriptor */ int uio_cfg_fd; /**< UIO config file descriptor */ enum rte_intr_handle_type type; /**< handle type */ -#ifdef RTE_NEXT_ABI int max_intr; /**< max interrupt requested */ uint32_t nb_efd; /**< number of available efds */ int *intr_vec; /**< intr vector number array */ -#endif }; /** diff --git a/lib/librte_eal/linuxapp/eal/Makefile b/lib/librte_eal/linuxapp/eal/Makefile index 376d275..d62196e 100644 --- a/lib/librte_eal/linuxapp/eal/Makefile +++ b/lib/librte_eal/linuxapp/eal/Makefile @@ -35,7 +35,7 @@ LIB = librte_eal.a EXPORT_MAP := rte_eal_version.map -LIBABIVER := 1 +LIBABIVER := 2 VPATH += $(RTE_SDK)/lib/librte_eal/common diff --git a/lib/librte_eal/linuxapp/eal/eal_interrupts.c b/lib/librte_eal/linuxapp/eal/eal_interrupts.c index 3f87875..66e1fe3 100644 --- a/lib/librte_eal/linuxapp/eal/eal_interrupts.c +++ b/lib/librte_eal/linuxapp/eal/eal_interrupts.c @@ -290,26 +290,18 @@ vfio_enable_msix(struct rte_intr_handle *intr_handle) { irq_set = (struct vfio_irq_set *) irq_set_buf; irq_set->argsz = len; -#ifdef RTE_NEXT_ABI if (!intr_handle->max_intr) intr_handle->max_intr = 1; else if (intr_handle->max_intr > RTE_MAX_RXTX_INTR_VEC_ID) intr_handle->max_intr = RTE_MAX_RXTX_INTR_VEC_ID + 1; irq_set->count = intr_handle->max_intr; -#else - irq_set->count = 1; -#endif irq_set->flags = VFIO_IRQ_SET_DATA_EVENTFD | VFIO_IRQ_SET_ACTION_TRIGGER; irq_set->index = VFIO_PCI_MSIX_IRQ_INDEX; irq_set->start = 0; fd_ptr = (int *) &irq_set->data; -#ifdef RTE_NEXT_ABI memcpy(fd_ptr, intr_handle->efds, sizeof(intr_handle->efds)); fd_ptr[intr_handle->max_intr - 1] = intr_handle->fd; -#else - fd_ptr[0] = intr_handle->fd; -#endif ret = ioctl(intr_handle->vfio_dev_fd, VFIO_DEVICE_SET_IRQS, irq_set); @@ -886,7 +878,6 @@ rte_eal_intr_init(void) return -ret; } -#ifdef RTE_NEXT_ABI static void eal_intr_proc_rxtx_intr(int fd, const struct rte_intr_handle *intr_handle) { @@ -929,7 +920,6 @@ eal_intr_proc_rxtx_intr(int fd, const struct rte_intr_handle *intr_handle) return; } while (1); } -#endif static int eal_epoll_process_event(struct epoll_event *evs, unsigned int n, @@ -1068,7 +1058,6 @@ rte_epoll_ctl(int epfd, int op, int fd, return 0; } -#ifdef RTE_NEXT_ABI int rte_intr_rx_ctl(struct rte_intr_handle *intr_handle, int epfd, int op, unsigned int vec, void *data) @@ -1192,45 +1181,3 @@ rte_intr_allow_others(struct rte_intr_handle *intr_handle) { return !!(intr_handle->max_intr - intr_handle->nb_efd); } - -#else -int -rte_intr_rx_ctl(struct rte_intr_handle *intr_handle, - int epfd, int op, unsigned int vec, void *data) -{ - RTE_SET_USED(intr_handle); - RTE_SET_USED(epfd); - RTE_SET_USED(op); - RTE_SET_USED(vec); - RTE_SET_USED(data); - return -ENOTSUP; -} - -int -rte_intr_efd_enable(struct rte_intr_handle *intr_handle, uint32_t nb_efd) -{ - RTE_SET_USED(intr_handle); - RTE_SET_USED(nb_efd); - return 0; -} - -void -rte_intr_efd_disable(struct rte_intr_handle *intr_handle) -{ - RTE_SET_USED(intr_handle); -} - -int -rte_intr_dp_is_en(struct rte_intr_handle *intr_handle) -{ - RTE_SET_USED(intr_handle); - return 0; -} - -int -rte_intr_allow_others(struct rte_intr_handle *intr_handle) -{ - RTE_SET_USED(intr_handle); - return 1; -} -#endif diff --git a/lib/librte_eal/linuxapp/eal/include/exec-env/rte_interrupts.h b/lib/librte_eal/linuxapp/eal/include/exec-env/rte_interrupts.h index b05f4c8..45071b7 100644 --- a/lib/librte_eal/linuxapp/eal/include/exec-env/rte_interrupts.h +++ b/lib/librte_eal/linuxapp/eal/include/exec-env/rte_interrupts.h @@ -86,14 +86,12 @@ struct rte_intr_handle { }; int fd; /**< interrupt event file descriptor */ enum rte_intr_handle_type type; /**< handle type */ -#ifdef RTE_NEXT_ABI uint32_t max_intr; /**< max interrupt requested */ uint32_t nb_efd; /**< number of available efd(event fd) */ int efds[RTE_MAX_RXTX_INTR_VEC_ID]; /**< intr vectors/efds mapping */ struct rte_epoll_event elist[RTE_MAX_RXTX_INTR_VEC_ID]; /**< intr vector epoll event */ int *intr_vec; /**< intr vector number array */ -#endif }; #define RTE_EPOLL_PER_THREAD -1 /**< to hint using per thread epfd */ diff --git a/lib/librte_ether/Makefile b/lib/librte_ether/Makefile index fc45a71..3e81a0e 100644 --- a/lib/librte_ether/Makefile +++ b/lib/librte_ether/Makefile @@ -41,7 +41,7 @@ CFLAGS += $(WERROR_FLAGS) EXPORT_MAP := rte_ether_version.map -LIBABIVER := 1 +LIBABIVER := 2 SRCS-y += rte_ethdev.c diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index 6b2400c..b309309 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -3033,7 +3033,6 @@ _rte_eth_dev_callback_process(struct rte_eth_dev *dev, rte_spinlock_unlock(&rte_eth_dev_cb_lock); } -#ifdef RTE_NEXT_ABI int rte_eth_dev_rx_intr_ctl(uint8_t port_id, int epfd, int op, void *data) { @@ -3139,45 +3138,6 @@ rte_eth_dev_rx_intr_disable(uint8_t port_id, FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_queue_intr_disable, -ENOTSUP); return (*dev->dev_ops->rx_queue_intr_disable)(dev, queue_id); } -#else -int -rte_eth_dev_rx_intr_enable(uint8_t port_id, uint16_t queue_id) -{ - RTE_SET_USED(port_id); - RTE_SET_USED(queue_id); - return -ENOTSUP; -} - -int -rte_eth_dev_rx_intr_disable(uint8_t port_id, uint16_t queue_id) -{ - RTE_SET_USED(port_id); - RTE_SET_USED(queue_id); - return -ENOTSUP; -} - -int -rte_eth_dev_rx_intr_ctl(uint8_t port_id, int epfd, int op, void *data) -{ - RTE_SET_USED(port_id); - RTE_SET_USED(epfd); - RTE_SET_USED(op); - RTE_SET_USED(data); - return -1; -} - -int -rte_eth_dev_rx_intr_ctl_q(uint8_t port_id, uint16_t queue_id, - int epfd, int op, void *data) -{ - RTE_SET_USED(port_id); - RTE_SET_USED(queue_id); - RTE_SET_USED(epfd); - RTE_SET_USED(op); - RTE_SET_USED(data); - return -1; -} -#endif #ifdef RTE_NIC_BYPASS int rte_eth_dev_bypass_init(uint8_t port_id) diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h index 544afe0..fa06554 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -845,10 +845,8 @@ struct rte_eth_fdir { struct rte_intr_conf { /** enable/disable lsc interrupt. 0 (default) - disable, 1 enable */ uint16_t lsc; -#ifdef RTE_NEXT_ABI /** enable/disable rxq interrupt. 0 (default) - disable, 1 enable */ uint16_t rxq; -#endif }; /** @@ -1392,12 +1390,10 @@ struct eth_dev_ops { eth_queue_release_t rx_queue_release;/**< Release RX queue.*/ eth_rx_queue_count_t rx_queue_count; /**< Get Rx queue count. */ eth_rx_descriptor_done_t rx_descriptor_done; /**< Check rxd DD bit */ -#ifdef RTE_NEXT_ABI /**< Enable Rx queue interrupt. */ eth_rx_enable_intr_t rx_queue_intr_enable; /**< Disable Rx queue interrupt.*/ eth_rx_disable_intr_t rx_queue_intr_disable; -#endif eth_tx_queue_setup_t tx_queue_setup;/**< Set up device TX queue.*/ eth_queue_release_t tx_queue_release;/**< Release TX queue.*/ eth_dev_led_on_t dev_led_on; /**< Turn on LED. */ -- 2.5.1 ^ permalink raw reply [flat|nested] 29+ messages in thread
* [dpdk-dev] [PATCH v2 03/10] mbuf: remove packet type from offload flags 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 00/10] " Thomas Monjalon 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 01/10] doc: init next release notes Thomas Monjalon 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 02/10] ethdev: remove Rx interrupt switch Thomas Monjalon @ 2015-09-02 13:16 ` Thomas Monjalon 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 04/10] ethdev: remove SCTP flow entries switch Thomas Monjalon ` (7 subsequent siblings) 10 siblings, 0 replies; 29+ messages in thread From: Thomas Monjalon @ 2015-09-02 13:16 UTC (permalink / raw) To: dev The extended unified packet type is now part of the standard ABI. As mbuf struct is changed, the mbuf library version is incremented. Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Neil Horman <nhorman@tuxdriver.com> --- app/test-pipeline/pipeline_hash.c | 12 - app/test-pmd/csumonly.c | 14 - app/test-pmd/rxonly.c | 16 -- app/test/packet_burst_generator.c | 12 - doc/guides/rel_notes/deprecation.rst | 5 - doc/guides/rel_notes/release_2_2.rst | 5 +- drivers/net/cxgbe/sge.c | 16 -- drivers/net/e1000/igb_rxtx.c | 34 --- drivers/net/enic/enic_main.c | 25 -- drivers/net/fm10k/fm10k_rxtx.c | 15 -- drivers/net/i40e/i40e_rxtx.c | 293 --------------------- drivers/net/ixgbe/ixgbe_rxtx.c | 87 ------ drivers/net/ixgbe/ixgbe_rxtx_vec.c | 111 -------- drivers/net/mlx4/mlx4.c | 29 -- drivers/net/vmxnet3/vmxnet3_rxtx.c | 8 - examples/ip_fragmentation/main.c | 10 - examples/ip_reassembly/main.c | 10 - examples/l3fwd-acl/main.c | 27 -- examples/l3fwd-power/main.c | 9 - examples/l3fwd/main.c | 114 -------- examples/tep_termination/vxlan.c | 5 - .../linuxapp/eal/include/exec-env/rte_kni_common.h | 6 - lib/librte_mbuf/Makefile | 2 +- lib/librte_mbuf/rte_mbuf.c | 10 - lib/librte_mbuf/rte_mbuf.h | 28 +- 25 files changed, 6 insertions(+), 897 deletions(-) diff --git a/app/test-pipeline/pipeline_hash.c b/app/test-pipeline/pipeline_hash.c index aa3f9e5..548615f 100644 --- a/app/test-pipeline/pipeline_hash.c +++ b/app/test-pipeline/pipeline_hash.c @@ -459,33 +459,21 @@ app_main_loop_rx_metadata(void) { signature = RTE_MBUF_METADATA_UINT32_PTR(m, 0); key = RTE_MBUF_METADATA_UINT8_PTR(m, 32); -#ifdef RTE_NEXT_ABI if (RTE_ETH_IS_IPV4_HDR(m->packet_type)) { -#else - if (m->ol_flags & PKT_RX_IPV4_HDR) { -#endif ip_hdr = (struct ipv4_hdr *) &m_data[sizeof(struct ether_hdr)]; ip_dst = ip_hdr->dst_addr; k32 = (uint32_t *) key; k32[0] = ip_dst & 0xFFFFFF00; -#ifdef RTE_NEXT_ABI } else if (RTE_ETH_IS_IPV6_HDR(m->packet_type)) { -#else - } else { -#endif ipv6_hdr = (struct ipv6_hdr *) &m_data[sizeof(struct ether_hdr)]; ipv6_dst = ipv6_hdr->dst_addr; memcpy(key, ipv6_dst, 16); -#ifdef RTE_NEXT_ABI } else continue; -#else - } -#endif *signature = test_hash(key, 0, 0); } diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c index 1bf3485..e561dde 100644 --- a/app/test-pmd/csumonly.c +++ b/app/test-pmd/csumonly.c @@ -202,14 +202,9 @@ parse_ethernet(struct ether_hdr *eth_hdr, struct testpmd_offload_info *info) /* Parse a vxlan header */ static void -#ifdef RTE_NEXT_ABI parse_vxlan(struct udp_hdr *udp_hdr, struct testpmd_offload_info *info, uint32_t pkt_type) -#else -parse_vxlan(struct udp_hdr *udp_hdr, struct testpmd_offload_info *info, - uint64_t mbuf_olflags) -#endif { struct ether_hdr *eth_hdr; @@ -217,12 +212,7 @@ parse_vxlan(struct udp_hdr *udp_hdr, struct testpmd_offload_info *info, * (rfc7348) or that the rx offload flag is set (i40e only * currently) */ if (udp_hdr->dst_port != _htons(4789) && -#ifdef RTE_NEXT_ABI RTE_ETH_IS_TUNNEL_PKT(pkt_type) == 0) -#else - (mbuf_olflags & (PKT_RX_TUNNEL_IPV4_HDR | - PKT_RX_TUNNEL_IPV6_HDR)) == 0) -#endif return; info->is_tunnel = 1; @@ -559,11 +549,7 @@ pkt_burst_checksum_forward(struct fwd_stream *fs) struct udp_hdr *udp_hdr; udp_hdr = (struct udp_hdr *)((char *)l3_hdr + info.l3_len); -#ifdef RTE_NEXT_ABI parse_vxlan(udp_hdr, &info, m->packet_type); -#else - parse_vxlan(udp_hdr, &info, m->ol_flags); -#endif } else if (info.l4_proto == IPPROTO_GRE) { struct simple_gre_hdr *gre_hdr; gre_hdr = (struct simple_gre_hdr *) diff --git a/app/test-pmd/rxonly.c b/app/test-pmd/rxonly.c index ee7fd8d..14555ab 100644 --- a/app/test-pmd/rxonly.c +++ b/app/test-pmd/rxonly.c @@ -91,11 +91,7 @@ pkt_burst_receive(struct fwd_stream *fs) uint64_t ol_flags; uint16_t nb_rx; uint16_t i, packet_type; -#ifdef RTE_NEXT_ABI uint16_t is_encapsulation; -#else - uint64_t is_encapsulation; -#endif #ifdef RTE_TEST_PMD_RECORD_CORE_CYCLES uint64_t start_tsc; @@ -138,13 +134,7 @@ pkt_burst_receive(struct fwd_stream *fs) eth_type = RTE_BE_TO_CPU_16(eth_hdr->ether_type); ol_flags = mb->ol_flags; packet_type = mb->packet_type; - -#ifdef RTE_NEXT_ABI is_encapsulation = RTE_ETH_IS_TUNNEL_PKT(packet_type); -#else - is_encapsulation = ol_flags & (PKT_RX_TUNNEL_IPV4_HDR | - PKT_RX_TUNNEL_IPV6_HDR); -#endif print_ether_addr(" src=", ð_hdr->s_addr); print_ether_addr(" - dst=", ð_hdr->d_addr); @@ -171,7 +161,6 @@ pkt_burst_receive(struct fwd_stream *fs) if (ol_flags & PKT_RX_QINQ_PKT) printf(" - QinQ VLAN tci=0x%x, VLAN tci outer=0x%x", mb->vlan_tci, mb->vlan_tci_outer); -#ifdef RTE_NEXT_ABI if (mb->packet_type) { uint32_t ptype; @@ -341,7 +330,6 @@ pkt_burst_receive(struct fwd_stream *fs) printf("\n"); } else printf("Unknown packet type\n"); -#endif /* RTE_NEXT_ABI */ if (is_encapsulation) { struct ipv4_hdr *ipv4_hdr; struct ipv6_hdr *ipv6_hdr; @@ -355,11 +343,7 @@ pkt_burst_receive(struct fwd_stream *fs) l2_len = sizeof(struct ether_hdr); /* Do not support ipv4 option field */ -#ifdef RTE_NEXT_ABI if (RTE_ETH_IS_IPV4_HDR(packet_type)) { -#else - if (ol_flags & PKT_RX_TUNNEL_IPV4_HDR) { -#endif l3_len = sizeof(struct ipv4_hdr); ipv4_hdr = rte_pktmbuf_mtod_offset(mb, struct ipv4_hdr *, diff --git a/app/test/packet_burst_generator.c b/app/test/packet_burst_generator.c index d9d808b..a93c3b5 100644 --- a/app/test/packet_burst_generator.c +++ b/app/test/packet_burst_generator.c @@ -273,21 +273,9 @@ nomore_mbuf: if (ipv4) { pkt->vlan_tci = ETHER_TYPE_IPv4; pkt->l3_len = sizeof(struct ipv4_hdr); -#ifndef RTE_NEXT_ABI - if (vlan_enabled) - pkt->ol_flags = PKT_RX_IPV4_HDR | PKT_RX_VLAN_PKT; - else - pkt->ol_flags = PKT_RX_IPV4_HDR; -#endif } else { pkt->vlan_tci = ETHER_TYPE_IPv6; pkt->l3_len = sizeof(struct ipv6_hdr); -#ifndef RTE_NEXT_ABI - if (vlan_enabled) - pkt->ol_flags = PKT_RX_IPV6_HDR | PKT_RX_VLAN_PKT; - else - pkt->ol_flags = PKT_RX_IPV6_HDR; -#endif } pkts_burst[nb_pkt] = pkt; diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 991a777..639ab18 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -24,11 +24,6 @@ Deprecation Notices * The field mem_location of the rte_lpm structure is deprecated and should be removed as well as the macros RTE_LPM_HEAP and RTE_LPM_MEMZONE. -* Significant ABI changes are planned for struct rte_mbuf, struct rte_kni_mbuf, - and several ``PKT_RX_`` flags will be removed, to support unified packet type - from release 2.1. Those changes may be enabled in the upcoming release 2.1 - with CONFIG_RTE_NEXT_ABI. - * librte_malloc library has been integrated into librte_eal. The 2.1 release creates a dummy/empty malloc library to fulfill binaries with dynamic linking dependencies on librte_malloc.so. Such dummy library will not be created from diff --git a/doc/guides/rel_notes/release_2_2.rst b/doc/guides/rel_notes/release_2_2.rst index 388d2e3..3a6d2cc 100644 --- a/doc/guides/rel_notes/release_2_2.rst +++ b/doc/guides/rel_notes/release_2_2.rst @@ -23,6 +23,9 @@ ABI Changes * The EAL and ethdev structures rte_intr_handle and rte_eth_conf were changed to support Rx interrupt. It was already done in 2.1 for CONFIG_RTE_NEXT_ABI. +* The mbuf structure was changed to support unified packet type. + It was already done in 2.1 for CONFIG_RTE_NEXT_ABI. + Shared Library Versions ----------------------- @@ -45,7 +48,7 @@ The libraries prepended with a plus sign were incremented in this version. librte_kvargs.so.1 librte_lpm.so.1 librte_malloc.so.1 - librte_mbuf.so.1 + + librte_mbuf.so.2 librte_mempool.so.1 librte_meter.so.1 librte_pipeline.so.1 diff --git a/drivers/net/cxgbe/sge.c b/drivers/net/cxgbe/sge.c index d570d33..6eb1244 100644 --- a/drivers/net/cxgbe/sge.c +++ b/drivers/net/cxgbe/sge.c @@ -1299,22 +1299,14 @@ int t4_ethrx_handler(struct sge_rspq *q, const __be64 *rsp, mbuf->port = pkt->iff; if (pkt->l2info & htonl(F_RXF_IP)) { -#ifdef RTE_NEXT_ABI mbuf->packet_type = RTE_PTYPE_L3_IPV4; -#else - mbuf->ol_flags |= PKT_RX_IPV4_HDR; -#endif if (unlikely(!csum_ok)) mbuf->ol_flags |= PKT_RX_IP_CKSUM_BAD; if ((pkt->l2info & htonl(F_RXF_UDP | F_RXF_TCP)) && !csum_ok) mbuf->ol_flags |= PKT_RX_L4_CKSUM_BAD; } else if (pkt->l2info & htonl(F_RXF_IP6)) { -#ifdef RTE_NEXT_ABI mbuf->packet_type = RTE_PTYPE_L3_IPV6; -#else - mbuf->ol_flags |= PKT_RX_IPV6_HDR; -#endif } mbuf->port = pkt->iff; @@ -1419,11 +1411,7 @@ static int process_responses(struct sge_rspq *q, int budget, unmap_rx_buf(&rxq->fl); if (cpl->l2info & htonl(F_RXF_IP)) { -#ifdef RTE_NEXT_ABI pkt->packet_type = RTE_PTYPE_L3_IPV4; -#else - pkt->ol_flags |= PKT_RX_IPV4_HDR; -#endif if (unlikely(!csum_ok)) pkt->ol_flags |= PKT_RX_IP_CKSUM_BAD; @@ -1431,11 +1419,7 @@ static int process_responses(struct sge_rspq *q, int budget, htonl(F_RXF_UDP | F_RXF_TCP)) && !csum_ok) pkt->ol_flags |= PKT_RX_L4_CKSUM_BAD; } else if (cpl->l2info & htonl(F_RXF_IP6)) { -#ifdef RTE_NEXT_ABI pkt->packet_type = RTE_PTYPE_L3_IPV6; -#else - pkt->ol_flags |= PKT_RX_IPV6_HDR; -#endif } if (!rss_hdr->filter_tid && rss_hdr->hash_type) { diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c index b13930e..19905fd 100644 --- a/drivers/net/e1000/igb_rxtx.c +++ b/drivers/net/e1000/igb_rxtx.c @@ -590,7 +590,6 @@ eth_igb_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, * RX functions * **********************************************************************/ -#ifdef RTE_NEXT_ABI #define IGB_PACKET_TYPE_IPV4 0X01 #define IGB_PACKET_TYPE_IPV4_TCP 0X11 #define IGB_PACKET_TYPE_IPV4_UDP 0X21 @@ -684,35 +683,6 @@ rx_desc_hlen_type_rss_to_pkt_flags(uint32_t hl_tp_rs) return pkt_flags; } -#else /* RTE_NEXT_ABI */ -static inline uint64_t -rx_desc_hlen_type_rss_to_pkt_flags(uint32_t hl_tp_rs) -{ - uint64_t pkt_flags; - - static uint64_t ip_pkt_types_map[16] = { - 0, PKT_RX_IPV4_HDR, PKT_RX_IPV4_HDR_EXT, PKT_RX_IPV4_HDR_EXT, - PKT_RX_IPV6_HDR, 0, 0, 0, - PKT_RX_IPV6_HDR_EXT, 0, 0, 0, - PKT_RX_IPV6_HDR_EXT, 0, 0, 0, - }; - -#if defined(RTE_LIBRTE_IEEE1588) - static uint32_t ip_pkt_etqf_map[8] = { - 0, 0, 0, PKT_RX_IEEE1588_PTP, - 0, 0, 0, 0, - }; - - pkt_flags = (hl_tp_rs & E1000_RXDADV_PKTTYPE_ETQF) ? - ip_pkt_etqf_map[(hl_tp_rs >> 4) & 0x07] : - ip_pkt_types_map[(hl_tp_rs >> 4) & 0x0F]; -#else - pkt_flags = (hl_tp_rs & E1000_RXDADV_PKTTYPE_ETQF) ? 0 : - ip_pkt_types_map[(hl_tp_rs >> 4) & 0x0F]; -#endif - return pkt_flags | (((hl_tp_rs & 0x0F) == 0) ? 0 : PKT_RX_RSS_HASH); -} -#endif /* RTE_NEXT_ABI */ static inline uint64_t rx_desc_status_to_pkt_flags(uint32_t rx_status) @@ -886,10 +856,8 @@ eth_igb_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, pkt_flags = pkt_flags | rx_desc_status_to_pkt_flags(staterr); pkt_flags = pkt_flags | rx_desc_error_to_pkt_flags(staterr); rxm->ol_flags = pkt_flags; -#ifdef RTE_NEXT_ABI rxm->packet_type = igb_rxd_pkt_info_to_pkt_type(rxd.wb.lower. lo_dword.hs_rss.pkt_info); -#endif /* * Store the mbuf address into the next entry of the array @@ -1124,10 +1092,8 @@ eth_igb_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, pkt_flags = pkt_flags | rx_desc_status_to_pkt_flags(staterr); pkt_flags = pkt_flags | rx_desc_error_to_pkt_flags(staterr); first_seg->ol_flags = pkt_flags; -#ifdef RTE_NEXT_ABI first_seg->packet_type = igb_rxd_pkt_info_to_pkt_type(rxd.wb. lower.lo_dword.hs_rss.pkt_info); -#endif /* Prefetch data of first segment, if configured to do so. */ rte_packet_prefetch((char *)first_seg->buf_addr + diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c index f47e96c..3b8719f 100644 --- a/drivers/net/enic/enic_main.c +++ b/drivers/net/enic/enic_main.c @@ -423,11 +423,7 @@ static int enic_rq_indicate_buf(struct vnic_rq *rq, rx_pkt->pkt_len = bytes_written; if (ipv4) { -#ifdef RTE_NEXT_ABI rx_pkt->packet_type = RTE_PTYPE_L3_IPV4; -#else - rx_pkt->ol_flags |= PKT_RX_IPV4_HDR; -#endif if (!csum_not_calc) { if (unlikely(!ipv4_csum_ok)) rx_pkt->ol_flags |= PKT_RX_IP_CKSUM_BAD; @@ -436,11 +432,7 @@ static int enic_rq_indicate_buf(struct vnic_rq *rq, rx_pkt->ol_flags |= PKT_RX_L4_CKSUM_BAD; } } else if (ipv6) -#ifdef RTE_NEXT_ABI rx_pkt->packet_type = RTE_PTYPE_L3_IPV6; -#else - rx_pkt->ol_flags |= PKT_RX_IPV6_HDR; -#endif } else { /* Header split */ if (sop && !eop) { @@ -453,11 +445,7 @@ static int enic_rq_indicate_buf(struct vnic_rq *rq, *rx_pkt_bucket = rx_pkt; rx_pkt->pkt_len = bytes_written; if (ipv4) { -#ifdef RTE_NEXT_ABI rx_pkt->packet_type = RTE_PTYPE_L3_IPV4; -#else - rx_pkt->ol_flags |= PKT_RX_IPV4_HDR; -#endif if (!csum_not_calc) { if (unlikely(!ipv4_csum_ok)) rx_pkt->ol_flags |= @@ -469,22 +457,14 @@ static int enic_rq_indicate_buf(struct vnic_rq *rq, PKT_RX_L4_CKSUM_BAD; } } else if (ipv6) -#ifdef RTE_NEXT_ABI rx_pkt->packet_type = RTE_PTYPE_L3_IPV6; -#else - rx_pkt->ol_flags |= PKT_RX_IPV6_HDR; -#endif } else { /* Payload */ hdr_rx_pkt = *rx_pkt_bucket; hdr_rx_pkt->pkt_len += bytes_written; if (ipv4) { -#ifdef RTE_NEXT_ABI hdr_rx_pkt->packet_type = RTE_PTYPE_L3_IPV4; -#else - hdr_rx_pkt->ol_flags |= PKT_RX_IPV4_HDR; -#endif if (!csum_not_calc) { if (unlikely(!ipv4_csum_ok)) hdr_rx_pkt->ol_flags |= @@ -496,13 +476,8 @@ static int enic_rq_indicate_buf(struct vnic_rq *rq, PKT_RX_L4_CKSUM_BAD; } } else if (ipv6) -#ifdef RTE_NEXT_ABI hdr_rx_pkt->packet_type = RTE_PTYPE_L3_IPV6; -#else - hdr_rx_pkt->ol_flags |= PKT_RX_IPV6_HDR; -#endif - } } } diff --git a/drivers/net/fm10k/fm10k_rxtx.c b/drivers/net/fm10k/fm10k_rxtx.c index b5fa2e6..d3f7b89 100644 --- a/drivers/net/fm10k/fm10k_rxtx.c +++ b/drivers/net/fm10k/fm10k_rxtx.c @@ -68,7 +68,6 @@ static inline void dump_rxd(union fm10k_rx_desc *rxd) static inline void rx_desc_to_ol_flags(struct rte_mbuf *m, const union fm10k_rx_desc *d) { -#ifdef RTE_NEXT_ABI static const uint32_t ptype_table[FM10K_RXD_PKTTYPE_MASK >> FM10K_RXD_PKTTYPE_SHIFT] __rte_cache_aligned = { @@ -91,14 +90,6 @@ rx_desc_to_ol_flags(struct rte_mbuf *m, const union fm10k_rx_desc *d) m->packet_type = ptype_table[(d->w.pkt_info & FM10K_RXD_PKTTYPE_MASK) >> FM10K_RXD_PKTTYPE_SHIFT]; -#else /* RTE_NEXT_ABI */ - uint16_t ptype; - static const uint16_t pt_lut[] = { 0, - PKT_RX_IPV4_HDR, PKT_RX_IPV4_HDR_EXT, - PKT_RX_IPV6_HDR, PKT_RX_IPV6_HDR_EXT, - 0, 0, 0 - }; -#endif /* RTE_NEXT_ABI */ if (d->w.pkt_info & FM10K_RXD_RSSTYPE_MASK) m->ol_flags |= PKT_RX_RSS_HASH; @@ -121,12 +112,6 @@ rx_desc_to_ol_flags(struct rte_mbuf *m, const union fm10k_rx_desc *d) if (unlikely(d->d.staterr & FM10K_RXD_STATUS_RXE)) m->ol_flags |= PKT_RX_RECIP_ERR; - -#ifndef RTE_NEXT_ABI - ptype = (d->d.data & FM10K_RXD_PKTTYPE_MASK_L3) >> - FM10K_RXD_PKTTYPE_SHIFT; - m->ol_flags |= pt_lut[(uint8_t)ptype]; -#endif } uint16_t diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c index eae4ab0..fd656d5 100644 --- a/drivers/net/i40e/i40e_rxtx.c +++ b/drivers/net/i40e/i40e_rxtx.c @@ -188,11 +188,9 @@ i40e_get_iee15888_flags(struct rte_mbuf *mb, uint64_t qword) | I40E_RXD_QW1_STATUS_TSYNINDX_MASK)) >> I40E_RX_DESC_STATUS_TSYNINDX_SHIFT; -#ifdef RTE_NEXT_ABI if ((mb->packet_type & RTE_PTYPE_L2_MASK) == RTE_PTYPE_L2_ETHER_TIMESYNC) pkt_flags = PKT_RX_IEEE1588_PTP; -#endif if (tsyn & 0x04) { pkt_flags |= PKT_RX_IEEE1588_TMST; mb->timesync = tsyn & 0x03; @@ -202,7 +200,6 @@ i40e_get_iee15888_flags(struct rte_mbuf *mb, uint64_t qword) } #endif -#ifdef RTE_NEXT_ABI /* For each value it means, datasheet of hardware can tell more details */ static inline uint32_t i40e_rxd_pkt_type_mapping(uint8_t ptype) @@ -735,275 +732,6 @@ i40e_rxd_pkt_type_mapping(uint8_t ptype) return ptype_table[ptype]; } -#else /* RTE_NEXT_ABI */ -/* Translate pkt types to pkt flags */ -static inline uint64_t -i40e_rxd_ptype_to_pkt_flags(uint64_t qword) -{ - uint8_t ptype = (uint8_t)((qword & I40E_RXD_QW1_PTYPE_MASK) >> - I40E_RXD_QW1_PTYPE_SHIFT); - static const uint64_t ip_ptype_map[I40E_MAX_PKT_TYPE] = { - 0, /* PTYPE 0 */ - 0, /* PTYPE 1 */ - PKT_RX_IEEE1588_PTP, /* PTYPE 2 */ - 0, /* PTYPE 3 */ - 0, /* PTYPE 4 */ - 0, /* PTYPE 5 */ - 0, /* PTYPE 6 */ - 0, /* PTYPE 7 */ - 0, /* PTYPE 8 */ - 0, /* PTYPE 9 */ - 0, /* PTYPE 10 */ - 0, /* PTYPE 11 */ - 0, /* PTYPE 12 */ - 0, /* PTYPE 13 */ - 0, /* PTYPE 14 */ - 0, /* PTYPE 15 */ - 0, /* PTYPE 16 */ - 0, /* PTYPE 17 */ - 0, /* PTYPE 18 */ - 0, /* PTYPE 19 */ - 0, /* PTYPE 20 */ - 0, /* PTYPE 21 */ - PKT_RX_IPV4_HDR, /* PTYPE 22 */ - PKT_RX_IPV4_HDR, /* PTYPE 23 */ - PKT_RX_IPV4_HDR, /* PTYPE 24 */ - 0, /* PTYPE 25 */ - PKT_RX_IPV4_HDR, /* PTYPE 26 */ - PKT_RX_IPV4_HDR, /* PTYPE 27 */ - PKT_RX_IPV4_HDR, /* PTYPE 28 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 29 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 30 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 31 */ - 0, /* PTYPE 32 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 33 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 34 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 35 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 36 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 37 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 38 */ - 0, /* PTYPE 39 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 40 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 41 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 42 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 43 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 44 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 45 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 46 */ - 0, /* PTYPE 47 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 48 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 49 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 50 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 51 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 52 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 53 */ - 0, /* PTYPE 54 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 55 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 56 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 57 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 58 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 59 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 60 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 61 */ - 0, /* PTYPE 62 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 63 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 64 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 65 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 66 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 67 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 68 */ - 0, /* PTYPE 69 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 70 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 71 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 72 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 73 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 74 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 75 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 76 */ - 0, /* PTYPE 77 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 78 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 79 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 80 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 81 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 82 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 83 */ - 0, /* PTYPE 84 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 85 */ - PKT_RX_TUNNEL_IPV4_HDR, /* PTYPE 86 */ - PKT_RX_IPV4_HDR_EXT, /* PTYPE 87 */ - PKT_RX_IPV6_HDR, /* PTYPE 88 */ - PKT_RX_IPV6_HDR, /* PTYPE 89 */ - PKT_RX_IPV6_HDR, /* PTYPE 90 */ - 0, /* PTYPE 91 */ - PKT_RX_IPV6_HDR, /* PTYPE 92 */ - PKT_RX_IPV6_HDR, /* PTYPE 93 */ - PKT_RX_IPV6_HDR, /* PTYPE 94 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 95 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 96 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 97 */ - 0, /* PTYPE 98 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 99 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 100 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 101 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 102 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 103 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 104 */ - 0, /* PTYPE 105 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 106 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 107 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 108 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 109 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 110 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 111 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 112 */ - 0, /* PTYPE 113 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 114 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 115 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 116 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 117 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 118 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 119 */ - 0, /* PTYPE 120 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 121 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 122 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 123 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 124 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 125 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 126 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 127 */ - 0, /* PTYPE 128 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 129 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 130 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 131 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 132 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 133 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 134 */ - 0, /* PTYPE 135 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 136 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 137 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 138 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 139 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 140 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 141 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 142 */ - 0, /* PTYPE 143 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 144 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 145 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 146 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 147 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 148 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 149 */ - 0, /* PTYPE 150 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 151 */ - PKT_RX_TUNNEL_IPV6_HDR, /* PTYPE 152 */ - PKT_RX_IPV6_HDR_EXT, /* PTYPE 153 */ - 0, /* PTYPE 154 */ - 0, /* PTYPE 155 */ - 0, /* PTYPE 156 */ - 0, /* PTYPE 157 */ - 0, /* PTYPE 158 */ - 0, /* PTYPE 159 */ - 0, /* PTYPE 160 */ - 0, /* PTYPE 161 */ - 0, /* PTYPE 162 */ - 0, /* PTYPE 163 */ - 0, /* PTYPE 164 */ - 0, /* PTYPE 165 */ - 0, /* PTYPE 166 */ - 0, /* PTYPE 167 */ - 0, /* PTYPE 168 */ - 0, /* PTYPE 169 */ - 0, /* PTYPE 170 */ - 0, /* PTYPE 171 */ - 0, /* PTYPE 172 */ - 0, /* PTYPE 173 */ - 0, /* PTYPE 174 */ - 0, /* PTYPE 175 */ - 0, /* PTYPE 176 */ - 0, /* PTYPE 177 */ - 0, /* PTYPE 178 */ - 0, /* PTYPE 179 */ - 0, /* PTYPE 180 */ - 0, /* PTYPE 181 */ - 0, /* PTYPE 182 */ - 0, /* PTYPE 183 */ - 0, /* PTYPE 184 */ - 0, /* PTYPE 185 */ - 0, /* PTYPE 186 */ - 0, /* PTYPE 187 */ - 0, /* PTYPE 188 */ - 0, /* PTYPE 189 */ - 0, /* PTYPE 190 */ - 0, /* PTYPE 191 */ - 0, /* PTYPE 192 */ - 0, /* PTYPE 193 */ - 0, /* PTYPE 194 */ - 0, /* PTYPE 195 */ - 0, /* PTYPE 196 */ - 0, /* PTYPE 197 */ - 0, /* PTYPE 198 */ - 0, /* PTYPE 199 */ - 0, /* PTYPE 200 */ - 0, /* PTYPE 201 */ - 0, /* PTYPE 202 */ - 0, /* PTYPE 203 */ - 0, /* PTYPE 204 */ - 0, /* PTYPE 205 */ - 0, /* PTYPE 206 */ - 0, /* PTYPE 207 */ - 0, /* PTYPE 208 */ - 0, /* PTYPE 209 */ - 0, /* PTYPE 210 */ - 0, /* PTYPE 211 */ - 0, /* PTYPE 212 */ - 0, /* PTYPE 213 */ - 0, /* PTYPE 214 */ - 0, /* PTYPE 215 */ - 0, /* PTYPE 216 */ - 0, /* PTYPE 217 */ - 0, /* PTYPE 218 */ - 0, /* PTYPE 219 */ - 0, /* PTYPE 220 */ - 0, /* PTYPE 221 */ - 0, /* PTYPE 222 */ - 0, /* PTYPE 223 */ - 0, /* PTYPE 224 */ - 0, /* PTYPE 225 */ - 0, /* PTYPE 226 */ - 0, /* PTYPE 227 */ - 0, /* PTYPE 228 */ - 0, /* PTYPE 229 */ - 0, /* PTYPE 230 */ - 0, /* PTYPE 231 */ - 0, /* PTYPE 232 */ - 0, /* PTYPE 233 */ - 0, /* PTYPE 234 */ - 0, /* PTYPE 235 */ - 0, /* PTYPE 236 */ - 0, /* PTYPE 237 */ - 0, /* PTYPE 238 */ - 0, /* PTYPE 239 */ - 0, /* PTYPE 240 */ - 0, /* PTYPE 241 */ - 0, /* PTYPE 242 */ - 0, /* PTYPE 243 */ - 0, /* PTYPE 244 */ - 0, /* PTYPE 245 */ - 0, /* PTYPE 246 */ - 0, /* PTYPE 247 */ - 0, /* PTYPE 248 */ - 0, /* PTYPE 249 */ - 0, /* PTYPE 250 */ - 0, /* PTYPE 251 */ - 0, /* PTYPE 252 */ - 0, /* PTYPE 253 */ - 0, /* PTYPE 254 */ - 0, /* PTYPE 255 */ - }; - - return ip_ptype_map[ptype]; -} -#endif /* RTE_NEXT_ABI */ #define I40E_RX_DESC_EXT_STATUS_FLEXBH_MASK 0x03 #define I40E_RX_DESC_EXT_STATUS_FLEXBH_FD_ID 0x01 @@ -1292,18 +1020,10 @@ i40e_rx_scan_hw_ring(struct i40e_rx_queue *rxq) i40e_rxd_to_vlan_tci(mb, &rxdp[j]); pkt_flags = i40e_rxd_status_to_pkt_flags(qword1); pkt_flags |= i40e_rxd_error_to_pkt_flags(qword1); -#ifdef RTE_NEXT_ABI mb->packet_type = i40e_rxd_pkt_type_mapping((uint8_t)((qword1 & I40E_RXD_QW1_PTYPE_MASK) >> I40E_RXD_QW1_PTYPE_SHIFT)); -#else - pkt_flags |= i40e_rxd_ptype_to_pkt_flags(qword1); - - mb->packet_type = (uint16_t)((qword1 & - I40E_RXD_QW1_PTYPE_MASK) >> - I40E_RXD_QW1_PTYPE_SHIFT); -#endif /* RTE_NEXT_ABI */ if (pkt_flags & PKT_RX_RSS_HASH) mb->hash.rss = rte_le_to_cpu_32(\ rxdp[j].wb.qword0.hi_dword.rss); @@ -1549,15 +1269,9 @@ i40e_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) i40e_rxd_to_vlan_tci(rxm, &rxd); pkt_flags = i40e_rxd_status_to_pkt_flags(qword1); pkt_flags |= i40e_rxd_error_to_pkt_flags(qword1); -#ifdef RTE_NEXT_ABI rxm->packet_type = i40e_rxd_pkt_type_mapping((uint8_t)((qword1 & I40E_RXD_QW1_PTYPE_MASK) >> I40E_RXD_QW1_PTYPE_SHIFT)); -#else - pkt_flags |= i40e_rxd_ptype_to_pkt_flags(qword1); - rxm->packet_type = (uint16_t)((qword1 & I40E_RXD_QW1_PTYPE_MASK) >> - I40E_RXD_QW1_PTYPE_SHIFT); -#endif /* RTE_NEXT_ABI */ if (pkt_flags & PKT_RX_RSS_HASH) rxm->hash.rss = rte_le_to_cpu_32(rxd.wb.qword0.hi_dword.rss); @@ -1717,16 +1431,9 @@ i40e_recv_scattered_pkts(void *rx_queue, i40e_rxd_to_vlan_tci(first_seg, &rxd); pkt_flags = i40e_rxd_status_to_pkt_flags(qword1); pkt_flags |= i40e_rxd_error_to_pkt_flags(qword1); -#ifdef RTE_NEXT_ABI first_seg->packet_type = i40e_rxd_pkt_type_mapping((uint8_t)((qword1 & I40E_RXD_QW1_PTYPE_MASK) >> I40E_RXD_QW1_PTYPE_SHIFT)); -#else - pkt_flags |= i40e_rxd_ptype_to_pkt_flags(qword1); - first_seg->packet_type = (uint16_t)((qword1 & - I40E_RXD_QW1_PTYPE_MASK) >> - I40E_RXD_QW1_PTYPE_SHIFT); -#endif /* RTE_NEXT_ABI */ if (pkt_flags & PKT_RX_RSS_HASH) rxm->hash.rss = rte_le_to_cpu_32(rxd.wb.qword0.hi_dword.rss); diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c index 91023b9..a710102 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx.c +++ b/drivers/net/ixgbe/ixgbe_rxtx.c @@ -864,7 +864,6 @@ end_of_tx: * RX functions * **********************************************************************/ -#ifdef RTE_NEXT_ABI #define IXGBE_PACKET_TYPE_IPV4 0X01 #define IXGBE_PACKET_TYPE_IPV4_TCP 0X11 #define IXGBE_PACKET_TYPE_IPV4_UDP 0X21 @@ -967,43 +966,6 @@ ixgbe_rxd_pkt_info_to_pkt_flags(uint16_t pkt_info) return ip_rss_types_map[pkt_info & 0XF]; #endif } -#else /* RTE_NEXT_ABI */ -static inline uint64_t -rx_desc_hlen_type_rss_to_pkt_flags(uint32_t hl_tp_rs) -{ - uint64_t pkt_flags; - - static const uint64_t ip_pkt_types_map[16] = { - 0, PKT_RX_IPV4_HDR, PKT_RX_IPV4_HDR_EXT, PKT_RX_IPV4_HDR_EXT, - PKT_RX_IPV6_HDR, 0, 0, 0, - PKT_RX_IPV6_HDR_EXT, 0, 0, 0, - PKT_RX_IPV6_HDR_EXT, 0, 0, 0, - }; - - static const uint64_t ip_rss_types_map[16] = { - 0, PKT_RX_RSS_HASH, PKT_RX_RSS_HASH, PKT_RX_RSS_HASH, - 0, PKT_RX_RSS_HASH, 0, PKT_RX_RSS_HASH, - PKT_RX_RSS_HASH, 0, 0, 0, - 0, 0, 0, PKT_RX_FDIR, - }; - -#ifdef RTE_LIBRTE_IEEE1588 - static uint64_t ip_pkt_etqf_map[8] = { - 0, 0, 0, PKT_RX_IEEE1588_PTP, - 0, 0, 0, 0, - }; - - pkt_flags = (hl_tp_rs & IXGBE_RXDADV_PKTTYPE_ETQF) ? - ip_pkt_etqf_map[(hl_tp_rs >> 4) & 0x07] : - ip_pkt_types_map[(hl_tp_rs >> 4) & 0x0F]; -#else - pkt_flags = (hl_tp_rs & IXGBE_RXDADV_PKTTYPE_ETQF) ? 0 : - ip_pkt_types_map[(hl_tp_rs >> 4) & 0x0F]; - -#endif - return pkt_flags | ip_rss_types_map[hl_tp_rs & 0xF]; -} -#endif /* RTE_NEXT_ABI */ static inline uint64_t rx_desc_status_to_pkt_flags(uint32_t rx_status) @@ -1058,13 +1020,9 @@ ixgbe_rx_scan_hw_ring(struct ixgbe_rx_queue *rxq) struct rte_mbuf *mb; uint16_t pkt_len; uint64_t pkt_flags; -#ifdef RTE_NEXT_ABI int nb_dd; uint32_t s[LOOK_AHEAD]; uint16_t pkt_info[LOOK_AHEAD]; -#else - int s[LOOK_AHEAD], nb_dd; -#endif /* RTE_NEXT_ABI */ int i, j, nb_rx = 0; uint32_t status; @@ -1088,11 +1046,9 @@ ixgbe_rx_scan_hw_ring(struct ixgbe_rx_queue *rxq) for (j = LOOK_AHEAD-1; j >= 0; --j) s[j] = rte_le_to_cpu_32(rxdp[j].wb.upper.status_error); -#ifdef RTE_NEXT_ABI for (j = LOOK_AHEAD - 1; j >= 0; --j) pkt_info[j] = rxdp[j].wb.lower.lo_dword. hs_rss.pkt_info; -#endif /* RTE_NEXT_ABI */ /* Compute how many status bits were set */ nb_dd = 0; @@ -1111,7 +1067,6 @@ ixgbe_rx_scan_hw_ring(struct ixgbe_rx_queue *rxq) mb->vlan_tci = rte_le_to_cpu_16(rxdp[j].wb.upper.vlan); /* convert descriptor fields to rte mbuf flags */ -#ifdef RTE_NEXT_ABI pkt_flags = rx_desc_status_to_pkt_flags(s[j]); pkt_flags |= rx_desc_error_to_pkt_flags(s[j]); pkt_flags |= @@ -1119,15 +1074,6 @@ ixgbe_rx_scan_hw_ring(struct ixgbe_rx_queue *rxq) mb->ol_flags = pkt_flags; mb->packet_type = ixgbe_rxd_pkt_info_to_pkt_type(pkt_info[j]); -#else /* RTE_NEXT_ABI */ - pkt_flags = rx_desc_hlen_type_rss_to_pkt_flags( - rte_le_to_cpu_32( - rxdp[j].wb.lower.lo_dword.data)); - /* reuse status field from scan list */ - pkt_flags |= rx_desc_status_to_pkt_flags(s[j]); - pkt_flags |= rx_desc_error_to_pkt_flags(s[j]); - mb->ol_flags = pkt_flags; -#endif /* RTE_NEXT_ABI */ if (likely(pkt_flags & PKT_RX_RSS_HASH)) mb->hash.rss = rte_le_to_cpu_32( @@ -1328,11 +1274,7 @@ ixgbe_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, union ixgbe_adv_rx_desc rxd; uint64_t dma_addr; uint32_t staterr; -#ifdef RTE_NEXT_ABI uint32_t pkt_info; -#else - uint32_t hlen_type_rss; -#endif uint16_t pkt_len; uint16_t rx_id; uint16_t nb_rx; @@ -1450,7 +1392,6 @@ ixgbe_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, rxm->data_len = pkt_len; rxm->port = rxq->port_id; -#ifdef RTE_NEXT_ABI pkt_info = rte_le_to_cpu_32(rxd.wb.lower.lo_dword.hs_rss. pkt_info); /* Only valid if PKT_RX_VLAN_PKT set in pkt_flags */ @@ -1462,16 +1403,6 @@ ixgbe_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, ixgbe_rxd_pkt_info_to_pkt_flags(pkt_info); rxm->ol_flags = pkt_flags; rxm->packet_type = ixgbe_rxd_pkt_info_to_pkt_type(pkt_info); -#else /* RTE_NEXT_ABI */ - hlen_type_rss = rte_le_to_cpu_32(rxd.wb.lower.lo_dword.data); - /* Only valid if PKT_RX_VLAN_PKT set in pkt_flags */ - rxm->vlan_tci = rte_le_to_cpu_16(rxd.wb.upper.vlan); - - pkt_flags = rx_desc_hlen_type_rss_to_pkt_flags(hlen_type_rss); - pkt_flags = pkt_flags | rx_desc_status_to_pkt_flags(staterr); - pkt_flags = pkt_flags | rx_desc_error_to_pkt_flags(staterr); - rxm->ol_flags = pkt_flags; -#endif /* RTE_NEXT_ABI */ if (likely(pkt_flags & PKT_RX_RSS_HASH)) rxm->hash.rss = rte_le_to_cpu_32( @@ -1547,7 +1478,6 @@ ixgbe_fill_cluster_head_buf( uint8_t port_id, uint32_t staterr) { -#ifdef RTE_NEXT_ABI uint16_t pkt_info; uint64_t pkt_flags; @@ -1563,23 +1493,6 @@ ixgbe_fill_cluster_head_buf( pkt_flags |= ixgbe_rxd_pkt_info_to_pkt_flags(pkt_info); head->ol_flags = pkt_flags; head->packet_type = ixgbe_rxd_pkt_info_to_pkt_type(pkt_info); -#else /* RTE_NEXT_ABI */ - uint32_t hlen_type_rss; - uint64_t pkt_flags; - - head->port = port_id; - - /* - * The vlan_tci field is only valid when PKT_RX_VLAN_PKT is - * set in the pkt_flags field. - */ - head->vlan_tci = rte_le_to_cpu_16(desc->wb.upper.vlan); - hlen_type_rss = rte_le_to_cpu_32(desc->wb.lower.lo_dword.data); - pkt_flags = rx_desc_hlen_type_rss_to_pkt_flags(hlen_type_rss); - pkt_flags |= rx_desc_status_to_pkt_flags(staterr); - pkt_flags |= rx_desc_error_to_pkt_flags(staterr); - head->ol_flags = pkt_flags; -#endif /* RTE_NEXT_ABI */ if (likely(pkt_flags & PKT_RX_RSS_HASH)) head->hash.rss = rte_le_to_cpu_32(desc->wb.lower.hi_dword.rss); diff --git a/drivers/net/ixgbe/ixgbe_rxtx_vec.c b/drivers/net/ixgbe/ixgbe_rxtx_vec.c index cf25a53..6979b1e 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx_vec.c +++ b/drivers/net/ixgbe/ixgbe_rxtx_vec.c @@ -140,19 +140,11 @@ ixgbe_rxq_rearm(struct ixgbe_rx_queue *rxq) */ #ifdef RTE_IXGBE_RX_OLFLAGS_ENABLE -#ifndef RTE_NEXT_ABI -#define OLFLAGS_MASK ((uint16_t)(PKT_RX_VLAN_PKT | PKT_RX_IPV4_HDR |\ - PKT_RX_IPV4_HDR_EXT | PKT_RX_IPV6_HDR |\ - PKT_RX_IPV6_HDR_EXT)) -#define PTYPE_SHIFT (1) -#endif /* RTE_NEXT_ABI */ - #define VTAG_SHIFT (3) static inline void desc_to_olflags_v(__m128i descs[4], struct rte_mbuf **rx_pkts) { -#ifdef RTE_NEXT_ABI __m128i ptype0, ptype1, vtag0, vtag1; union { uint16_t e[4]; @@ -190,50 +182,6 @@ desc_to_olflags_v(__m128i descs[4], struct rte_mbuf **rx_pkts) vtag1 = _mm_or_si128(ptype0, vtag1); vol.dword = _mm_cvtsi128_si64(vtag1); -#else - __m128i ptype0, ptype1, vtag0, vtag1; - union { - uint16_t e[4]; - uint64_t dword; - } vol; - - /* pkt type + vlan olflags mask */ - const __m128i pkttype_msk = _mm_set_epi16( - 0x0000, 0x0000, 0x0000, 0x0000, - OLFLAGS_MASK, OLFLAGS_MASK, OLFLAGS_MASK, OLFLAGS_MASK); - - /* mask everything except rss type */ - const __m128i rsstype_msk = _mm_set_epi16( - 0x0000, 0x0000, 0x0000, 0x0000, - 0x000F, 0x000F, 0x000F, 0x000F); - - /* rss type to PKT_RX_RSS_HASH translation */ - const __m128i rss_flags = _mm_set_epi8(PKT_RX_FDIR, 0, 0, 0, - 0, 0, 0, PKT_RX_RSS_HASH, - PKT_RX_RSS_HASH, 0, PKT_RX_RSS_HASH, 0, - PKT_RX_RSS_HASH, PKT_RX_RSS_HASH, PKT_RX_RSS_HASH, 0); - - ptype0 = _mm_unpacklo_epi16(descs[0], descs[1]); - ptype1 = _mm_unpacklo_epi16(descs[2], descs[3]); - vtag0 = _mm_unpackhi_epi16(descs[0], descs[1]); - vtag1 = _mm_unpackhi_epi16(descs[2], descs[3]); - - ptype1 = _mm_unpacklo_epi32(ptype0, ptype1); - vtag1 = _mm_unpacklo_epi32(vtag0, vtag1); - - ptype0 = _mm_and_si128(ptype1, rsstype_msk); - ptype0 = _mm_shuffle_epi8(rss_flags, ptype0); - - ptype1 = _mm_slli_epi16(ptype1, PTYPE_SHIFT); - vtag1 = _mm_srli_epi16(vtag1, VTAG_SHIFT); - - ptype1 = _mm_or_si128(ptype1, vtag1); - ptype1 = _mm_and_si128(ptype1, pkttype_msk); - - ptype0 = _mm_or_si128(ptype0, ptype1); - - vol.dword = _mm_cvtsi128_si64(ptype0); -#endif /* RTE_NEXT_ABI */ rx_pkts[0]->ol_flags = vol.e[0]; rx_pkts[1]->ol_flags = vol.e[1]; @@ -264,7 +212,6 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts, int pos; uint64_t var; __m128i shuf_msk; -#ifdef RTE_NEXT_ABI __m128i crc_adjust = _mm_set_epi16( 0, 0, 0, /* ignore non-length fields */ -rxq->crc_len, /* sub crc on data_len */ @@ -275,16 +222,6 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts, __m128i dd_check, eop_check; __m128i desc_mask = _mm_set_epi32(0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFF07F0); -#else - __m128i crc_adjust = _mm_set_epi16( - 0, 0, 0, 0, /* ignore non-length fields */ - 0, /* ignore high-16bits of pkt_len */ - -rxq->crc_len, /* sub crc on pkt_len */ - -rxq->crc_len, /* sub crc on data_len */ - 0 /* ignore pkt_type field */ - ); - __m128i dd_check, eop_check; -#endif /* RTE_NEXT_ABI */ if (unlikely(nb_pkts < RTE_IXGBE_VPMD_RX_BURST)) return 0; @@ -313,7 +250,6 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts, eop_check = _mm_set_epi64x(0x0000000200000002LL, 0x0000000200000002LL); /* mask to shuffle from desc. to mbuf */ -#ifdef RTE_NEXT_ABI shuf_msk = _mm_set_epi8( 7, 6, 5, 4, /* octet 4~7, 32bits rss */ 15, 14, /* octet 14~15, low 16 bits vlan_macip */ @@ -324,23 +260,11 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts, 1, /* octet 1, 8 bits pkt_type field */ 0 /* octet 0, 4 bits offset 4 pkt_type field */ ); -#else - shuf_msk = _mm_set_epi8( - 7, 6, 5, 4, /* octet 4~7, 32bits rss */ - 0xFF, 0xFF, /* skip high 16 bits vlan_macip, zero out */ - 15, 14, /* octet 14~15, low 16 bits vlan_macip */ - 0xFF, 0xFF, /* skip high 16 bits pkt_len, zero out */ - 13, 12, /* octet 12~13, low 16 bits pkt_len */ - 13, 12, /* octet 12~13, 16 bits data_len */ - 0xFF, 0xFF /* skip pkt_type field */ - ); -#endif /* RTE_NEXT_ABI */ /* Cache is empty -> need to scan the buffer rings, but first move * the next 'n' mbufs into the cache */ sw_ring = &rxq->sw_ring[rxq->rx_tail]; -#ifdef RTE_NEXT_ABI /* A. load 4 packet in one loop * [A*. mask out 4 unused dirty field in desc] * B. copy 4 mbuf point from swring to rx_pkts @@ -348,20 +272,10 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts, * [C*. extract the end-of-packet bit, if requested] * D. fill info. from desc to mbuf */ -#else - /* A. load 4 packet in one loop - * B. copy 4 mbuf point from swring to rx_pkts - * C. calc the number of DD bits among the 4 packets - * [C*. extract the end-of-packet bit, if requested] - * D. fill info. from desc to mbuf - */ -#endif /* RTE_NEXT_ABI */ for (pos = 0, nb_pkts_recd = 0; pos < RTE_IXGBE_VPMD_RX_BURST; pos += RTE_IXGBE_DESCS_PER_LOOP, rxdp += RTE_IXGBE_DESCS_PER_LOOP) { -#ifdef RTE_NEXT_ABI __m128i descs0[RTE_IXGBE_DESCS_PER_LOOP]; -#endif /* RTE_NEXT_ABI */ __m128i descs[RTE_IXGBE_DESCS_PER_LOOP]; __m128i pkt_mb1, pkt_mb2, pkt_mb3, pkt_mb4; __m128i zero, staterr, sterr_tmp1, sterr_tmp2; @@ -377,7 +291,6 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts, /* B.1 load 1 mbuf point */ mbp1 = _mm_loadu_si128((__m128i *)&sw_ring[pos]); -#ifdef RTE_NEXT_ABI /* Read desc statuses backwards to avoid race condition */ /* A.1 load 4 pkts desc */ descs0[3] = _mm_loadu_si128((__m128i *)(rxdp + 3)); @@ -403,25 +316,6 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts, /* A* mask out 0~3 bits RSS type */ descs[1] = _mm_and_si128(descs0[1], desc_mask); descs[0] = _mm_and_si128(descs0[0], desc_mask); -#else - /* Read desc statuses backwards to avoid race condition */ - /* A.1 load 4 pkts desc */ - descs[3] = _mm_loadu_si128((__m128i *)(rxdp + 3)); - - /* B.2 copy 2 mbuf point into rx_pkts */ - _mm_storeu_si128((__m128i *)&rx_pkts[pos], mbp1); - - /* B.1 load 1 mbuf point */ - mbp2 = _mm_loadu_si128((__m128i *)&sw_ring[pos + 2]); - - descs[2] = _mm_loadu_si128((__m128i *)(rxdp + 2)); - /* B.1 load 2 mbuf point */ - descs[1] = _mm_loadu_si128((__m128i *)(rxdp + 1)); - descs[0] = _mm_loadu_si128((__m128i *)(rxdp)); - - /* B.2 copy 2 mbuf point into rx_pkts */ - _mm_storeu_si128((__m128i *)&rx_pkts[pos + 2], mbp2); -#endif /* RTE_NEXT_ABI */ /* avoid compiler reorder optimization */ rte_compiler_barrier(); @@ -435,13 +329,8 @@ _recv_raw_pkts_vec(struct ixgbe_rx_queue *rxq, struct rte_mbuf **rx_pkts, /* C.1 4=>2 filter staterr info only */ sterr_tmp1 = _mm_unpackhi_epi32(descs[1], descs[0]); -#ifdef RTE_NEXT_ABI /* set ol_flags with vlan packet type */ desc_to_olflags_v(descs0, &rx_pkts[pos]); -#else - /* set ol_flags with packet type and vlan tag */ - desc_to_olflags_v(descs, &rx_pkts[pos]); -#endif /* RTE_NEXT_ABI */ /* D.2 pkt 3,4 set in_port/nb_seg and remove crc */ pkt_mb4 = _mm_add_epi16(pkt_mb4, crc_adjust); diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index fa3cb7e..6c6342f 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -1264,16 +1264,7 @@ mlx4_tx_burst(void *dpdk_txq, struct rte_mbuf **pkts, uint16_t pkts_n) * offsets but automatically recognizes the packet * type. For inner L3/L4 checksums, only VXLAN (UDP) * tunnels are currently supported. */ -#ifdef RTE_NEXT_ABI if (RTE_ETH_IS_TUNNEL_PKT(buf->packet_type)) -#else - /* FIXME: since PKT_TX_UDP_TUNNEL_PKT has been removed, - * the outer packet type is unknown. All we know is - * that the L2 header is of unusual length (not - * ETHER_HDR_LEN with or without 802.1Q header). */ - if ((buf->l2_len != ETHER_HDR_LEN) && - (buf->l2_len != (ETHER_HDR_LEN + 4))) -#endif send_flags |= IBV_EXP_QP_BURST_TUNNEL; } if (likely(segs == 1)) { @@ -2488,7 +2479,6 @@ rxq_cleanup(struct rxq *rxq) memset(rxq, 0, sizeof(*rxq)); } -#ifdef RTE_NEXT_ABI /** * Translate RX completion flags to packet type. * @@ -2521,7 +2511,6 @@ rxq_cq_to_pkt_type(uint32_t flags) IBV_EXP_CQ_RX_IPV6_PACKET, RTE_PTYPE_L3_IPV6); return pkt_type; } -#endif /* RTE_NEXT_ABI */ /** * Translate RX completion flags to offload flags. @@ -2539,11 +2528,6 @@ rxq_cq_to_ol_flags(const struct rxq *rxq, uint32_t flags) { uint32_t ol_flags = 0; -#ifndef RTE_NEXT_ABI - ol_flags = - TRANSPOSE(flags, IBV_EXP_CQ_RX_IPV4_PACKET, PKT_RX_IPV4_HDR) | - TRANSPOSE(flags, IBV_EXP_CQ_RX_IPV6_PACKET, PKT_RX_IPV6_HDR); -#endif if (rxq->csum) ol_flags |= TRANSPOSE(~flags, @@ -2559,14 +2543,6 @@ rxq_cq_to_ol_flags(const struct rxq *rxq, uint32_t flags) */ if ((flags & IBV_EXP_CQ_RX_TUNNEL_PACKET) && (rxq->csum_l2tun)) ol_flags |= -#ifndef RTE_NEXT_ABI - TRANSPOSE(flags, - IBV_EXP_CQ_RX_OUTER_IPV4_PACKET, - PKT_RX_TUNNEL_IPV4_HDR) | - TRANSPOSE(flags, - IBV_EXP_CQ_RX_OUTER_IPV6_PACKET, - PKT_RX_TUNNEL_IPV6_HDR) | -#endif TRANSPOSE(~flags, IBV_EXP_CQ_RX_OUTER_IP_CSUM_OK, PKT_RX_IP_CKSUM_BAD) | @@ -2758,10 +2734,7 @@ mlx4_rx_burst_sp(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n) NB_SEGS(pkt_buf) = j; PORT(pkt_buf) = rxq->port_id; PKT_LEN(pkt_buf) = pkt_buf_len; -#ifdef RTE_NEXT_ABI pkt_buf->packet_type = rxq_cq_to_pkt_type(flags); -#endif - pkt_buf->ol_flags = rxq_cq_to_ol_flags(rxq, flags); /* Return packet. */ *(pkts++) = pkt_buf; @@ -2921,9 +2894,7 @@ mlx4_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n) NEXT(seg) = NULL; PKT_LEN(seg) = len; DATA_LEN(seg) = len; -#ifdef RTE_NEXT_ABI seg->packet_type = rxq_cq_to_pkt_type(flags); -#endif seg->ol_flags = rxq_cq_to_ol_flags(rxq, flags); /* Return packet. */ diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c index 39ad6ef..4de5d89 100644 --- a/drivers/net/vmxnet3/vmxnet3_rxtx.c +++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c @@ -520,17 +520,9 @@ vmxnet3_rx_offload(const Vmxnet3_RxCompDesc *rcd, struct rte_mbuf *rxm) struct ipv4_hdr *ip = (struct ipv4_hdr *)(eth + 1); if (((ip->version_ihl & 0xf) << 2) > (int)sizeof(struct ipv4_hdr)) -#ifdef RTE_NEXT_ABI rxm->packet_type = RTE_PTYPE_L3_IPV4_EXT; -#else - rxm->ol_flags |= PKT_RX_IPV4_HDR_EXT; -#endif else -#ifdef RTE_NEXT_ABI rxm->packet_type = RTE_PTYPE_L3_IPV4; -#else - rxm->ol_flags |= PKT_RX_IPV4_HDR; -#endif if (!rcd->cnc) { if (!rcd->ipc) diff --git a/examples/ip_fragmentation/main.c b/examples/ip_fragmentation/main.c index b71d05f..fbc0b8d 100644 --- a/examples/ip_fragmentation/main.c +++ b/examples/ip_fragmentation/main.c @@ -283,11 +283,7 @@ l3fwd_simple_forward(struct rte_mbuf *m, struct lcore_queue_conf *qconf, len = qconf->tx_mbufs[port_out].len; /* if this is an IPv4 packet */ -#ifdef RTE_NEXT_ABI if (RTE_ETH_IS_IPV4_HDR(m->packet_type)) { -#else - if (m->ol_flags & PKT_RX_IPV4_HDR) { -#endif struct ipv4_hdr *ip_hdr; uint32_t ip_dst; /* Read the lookup key (i.e. ip_dst) from the input packet */ @@ -321,14 +317,8 @@ l3fwd_simple_forward(struct rte_mbuf *m, struct lcore_queue_conf *qconf, if (unlikely (len2 < 0)) return; } -#ifdef RTE_NEXT_ABI } else if (RTE_ETH_IS_IPV6_HDR(m->packet_type)) { /* if this is an IPv6 packet */ -#else - } - /* if this is an IPv6 packet */ - else if (m->ol_flags & PKT_RX_IPV6_HDR) { -#endif struct ipv6_hdr *ip_hdr; ipv6 = 1; diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c index f1c47ad..741c398 100644 --- a/examples/ip_reassembly/main.c +++ b/examples/ip_reassembly/main.c @@ -356,11 +356,7 @@ reassemble(struct rte_mbuf *m, uint8_t portid, uint32_t queue, dst_port = portid; /* if packet is IPv4 */ -#ifdef RTE_NEXT_ABI if (RTE_ETH_IS_IPV4_HDR(m->packet_type)) { -#else - if (m->ol_flags & (PKT_RX_IPV4_HDR)) { -#endif struct ipv4_hdr *ip_hdr; uint32_t ip_dst; @@ -400,14 +396,8 @@ reassemble(struct rte_mbuf *m, uint8_t portid, uint32_t queue, } eth_hdr->ether_type = rte_be_to_cpu_16(ETHER_TYPE_IPv4); -#ifdef RTE_NEXT_ABI } else if (RTE_ETH_IS_IPV6_HDR(m->packet_type)) { /* if packet is IPv6 */ -#else - } - /* if packet is IPv6 */ - else if (m->ol_flags & (PKT_RX_IPV6_HDR | PKT_RX_IPV6_HDR_EXT)) { -#endif struct ipv6_extension_fragment *frag_hdr; struct ipv6_hdr *ip_hdr; diff --git a/examples/l3fwd-acl/main.c b/examples/l3fwd-acl/main.c index b2bdf2f..f612671 100644 --- a/examples/l3fwd-acl/main.c +++ b/examples/l3fwd-acl/main.c @@ -645,13 +645,7 @@ prepare_one_packet(struct rte_mbuf **pkts_in, struct acl_search_t *acl, struct ipv4_hdr *ipv4_hdr; struct rte_mbuf *pkt = pkts_in[index]; -#ifdef RTE_NEXT_ABI if (RTE_ETH_IS_IPV4_HDR(pkt->packet_type)) { -#else - int type = pkt->ol_flags & (PKT_RX_IPV4_HDR | PKT_RX_IPV6_HDR); - - if (type == PKT_RX_IPV4_HDR) { -#endif ipv4_hdr = rte_pktmbuf_mtod_offset(pkt, struct ipv4_hdr *, sizeof(struct ether_hdr)); @@ -670,11 +664,7 @@ prepare_one_packet(struct rte_mbuf **pkts_in, struct acl_search_t *acl, /* Not a valid IPv4 packet */ rte_pktmbuf_free(pkt); } -#ifdef RTE_NEXT_ABI } else if (RTE_ETH_IS_IPV6_HDR(pkt->packet_type)) { -#else - } else if (type == PKT_RX_IPV6_HDR) { -#endif /* Fill acl structure */ acl->data_ipv6[acl->num_ipv6] = MBUF_IPV6_2PROTO(pkt); acl->m_ipv6[(acl->num_ipv6)++] = pkt; @@ -692,22 +682,12 @@ prepare_one_packet(struct rte_mbuf **pkts_in, struct acl_search_t *acl, { struct rte_mbuf *pkt = pkts_in[index]; -#ifdef RTE_NEXT_ABI if (RTE_ETH_IS_IPV4_HDR(pkt->packet_type)) { -#else - int type = pkt->ol_flags & (PKT_RX_IPV4_HDR | PKT_RX_IPV6_HDR); - - if (type == PKT_RX_IPV4_HDR) { -#endif /* Fill acl structure */ acl->data_ipv4[acl->num_ipv4] = MBUF_IPV4_2PROTO(pkt); acl->m_ipv4[(acl->num_ipv4)++] = pkt; -#ifdef RTE_NEXT_ABI } else if (RTE_ETH_IS_IPV6_HDR(pkt->packet_type)) { -#else - } else if (type == PKT_RX_IPV6_HDR) { -#endif /* Fill acl structure */ acl->data_ipv6[acl->num_ipv6] = MBUF_IPV6_2PROTO(pkt); acl->m_ipv6[(acl->num_ipv6)++] = pkt; @@ -755,17 +735,10 @@ send_one_packet(struct rte_mbuf *m, uint32_t res) /* in the ACL list, drop it */ #ifdef L3FWDACL_DEBUG if ((res & ACL_DENY_SIGNATURE) != 0) { -#ifdef RTE_NEXT_ABI if (RTE_ETH_IS_IPV4_HDR(m->packet_type)) dump_acl4_rule(m, res); else if (RTE_ETH_IS_IPV6_HDR(m->packet_type)) dump_acl6_rule(m, res); -#else - if (m->ol_flags & PKT_RX_IPV4_HDR) - dump_acl4_rule(m, res); - else - dump_acl6_rule(m, res); -#endif /* RTE_NEXT_ABI */ } #endif rte_pktmbuf_free(m); diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c index 086f29b..8bb88ce 100644 --- a/examples/l3fwd-power/main.c +++ b/examples/l3fwd-power/main.c @@ -650,11 +650,7 @@ l3fwd_simple_forward(struct rte_mbuf *m, uint8_t portid, eth_hdr = rte_pktmbuf_mtod(m, struct ether_hdr *); -#ifdef RTE_NEXT_ABI if (RTE_ETH_IS_IPV4_HDR(m->packet_type)) { -#else - if (m->ol_flags & PKT_RX_IPV4_HDR) { -#endif /* Handle IPv4 headers.*/ ipv4_hdr = rte_pktmbuf_mtod_offset(m, struct ipv4_hdr *, @@ -689,12 +685,7 @@ l3fwd_simple_forward(struct rte_mbuf *m, uint8_t portid, ether_addr_copy(&ports_eth_addr[dst_port], ð_hdr->s_addr); send_single_packet(m, dst_port); -#ifdef RTE_NEXT_ABI } else if (RTE_ETH_IS_IPV6_HDR(m->packet_type)) { -#else - } - else { -#endif /* Handle IPv6 headers.*/ #if (APP_LOOKUP_METHOD == APP_LOOKUP_EXACT_MATCH) struct ipv6_hdr *ipv6_hdr; diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c index fe5a257..1f3e5c6 100644 --- a/examples/l3fwd/main.c +++ b/examples/l3fwd/main.c @@ -1073,11 +1073,7 @@ l3fwd_simple_forward(struct rte_mbuf *m, uint8_t portid, struct lcore_conf *qcon eth_hdr = rte_pktmbuf_mtod(m, struct ether_hdr *); -#ifdef RTE_NEXT_ABI if (RTE_ETH_IS_IPV4_HDR(m->packet_type)) { -#else - if (m->ol_flags & PKT_RX_IPV4_HDR) { -#endif /* Handle IPv4 headers.*/ ipv4_hdr = rte_pktmbuf_mtod_offset(m, struct ipv4_hdr *, sizeof(struct ether_hdr)); @@ -1108,11 +1104,7 @@ l3fwd_simple_forward(struct rte_mbuf *m, uint8_t portid, struct lcore_conf *qcon ether_addr_copy(&ports_eth_addr[dst_port], ð_hdr->s_addr); send_single_packet(m, dst_port); -#ifdef RTE_NEXT_ABI } else if (RTE_ETH_IS_IPV6_HDR(m->packet_type)) { -#else - } else { -#endif /* Handle IPv6 headers.*/ struct ipv6_hdr *ipv6_hdr; @@ -1131,13 +1123,9 @@ l3fwd_simple_forward(struct rte_mbuf *m, uint8_t portid, struct lcore_conf *qcon ether_addr_copy(&ports_eth_addr[dst_port], ð_hdr->s_addr); send_single_packet(m, dst_port); -#ifdef RTE_NEXT_ABI } else /* Free the mbuf that contains non-IPV4/IPV6 packet */ rte_pktmbuf_free(m); -#else - } -#endif } #if ((APP_LOOKUP_METHOD == APP_LOOKUP_LPM) && \ @@ -1163,19 +1151,11 @@ l3fwd_simple_forward(struct rte_mbuf *m, uint8_t portid, struct lcore_conf *qcon * to BAD_PORT value. */ static inline __attribute__((always_inline)) void -#ifdef RTE_NEXT_ABI rfc1812_process(struct ipv4_hdr *ipv4_hdr, uint16_t *dp, uint32_t ptype) -#else -rfc1812_process(struct ipv4_hdr *ipv4_hdr, uint16_t *dp, uint32_t flags) -#endif { uint8_t ihl; -#ifdef RTE_NEXT_ABI if (RTE_ETH_IS_IPV4_HDR(ptype)) { -#else - if ((flags & PKT_RX_IPV4_HDR) != 0) { -#endif ihl = ipv4_hdr->version_ihl - IPV4_MIN_VER_IHL; ipv4_hdr->time_to_live--; @@ -1206,19 +1186,11 @@ get_dst_port(const struct lcore_conf *qconf, struct rte_mbuf *pkt, struct ipv6_hdr *ipv6_hdr; struct ether_hdr *eth_hdr; -#ifdef RTE_NEXT_ABI if (RTE_ETH_IS_IPV4_HDR(pkt->packet_type)) { -#else - if (pkt->ol_flags & PKT_RX_IPV4_HDR) { -#endif if (rte_lpm_lookup(qconf->ipv4_lookup_struct, dst_ipv4, &next_hop) != 0) next_hop = portid; -#ifdef RTE_NEXT_ABI } else if (RTE_ETH_IS_IPV6_HDR(pkt->packet_type)) { -#else - } else if (pkt->ol_flags & PKT_RX_IPV6_HDR) { -#endif eth_hdr = rte_pktmbuf_mtod(pkt, struct ether_hdr *); ipv6_hdr = (struct ipv6_hdr *)(eth_hdr + 1); if (rte_lpm6_lookup(qconf->ipv6_lookup_struct, @@ -1252,17 +1224,12 @@ process_packet(struct lcore_conf *qconf, struct rte_mbuf *pkt, ve = val_eth[dp]; dst_port[0] = dp; -#ifdef RTE_NEXT_ABI rfc1812_process(ipv4_hdr, dst_port, pkt->packet_type); -#else - rfc1812_process(ipv4_hdr, dst_port, pkt->ol_flags); -#endif te = _mm_blend_epi16(te, ve, MASK_ETH); _mm_store_si128((__m128i *)eth_hdr, te); } -#ifdef RTE_NEXT_ABI /* * Read packet_type and destination IPV4 addresses from 4 mbufs. */ @@ -1297,57 +1264,18 @@ processx4_step1(struct rte_mbuf *pkt[FWDSTEP], dip[0] = _mm_set_epi32(x3, x2, x1, x0); } -#else /* RTE_NEXT_ABI */ -/* - * Read ol_flags and destination IPV4 addresses from 4 mbufs. - */ -static inline void -processx4_step1(struct rte_mbuf *pkt[FWDSTEP], __m128i *dip, uint32_t *flag) -{ - struct ipv4_hdr *ipv4_hdr; - struct ether_hdr *eth_hdr; - uint32_t x0, x1, x2, x3; - - eth_hdr = rte_pktmbuf_mtod(pkt[0], struct ether_hdr *); - ipv4_hdr = (struct ipv4_hdr *)(eth_hdr + 1); - x0 = ipv4_hdr->dst_addr; - flag[0] = pkt[0]->ol_flags & PKT_RX_IPV4_HDR; - - eth_hdr = rte_pktmbuf_mtod(pkt[1], struct ether_hdr *); - ipv4_hdr = (struct ipv4_hdr *)(eth_hdr + 1); - x1 = ipv4_hdr->dst_addr; - flag[0] &= pkt[1]->ol_flags; - - eth_hdr = rte_pktmbuf_mtod(pkt[2], struct ether_hdr *); - ipv4_hdr = (struct ipv4_hdr *)(eth_hdr + 1); - x2 = ipv4_hdr->dst_addr; - flag[0] &= pkt[2]->ol_flags; - - eth_hdr = rte_pktmbuf_mtod(pkt[3], struct ether_hdr *); - ipv4_hdr = (struct ipv4_hdr *)(eth_hdr + 1); - x3 = ipv4_hdr->dst_addr; - flag[0] &= pkt[3]->ol_flags; - - dip[0] = _mm_set_epi32(x3, x2, x1, x0); -} -#endif /* RTE_NEXT_ABI */ /* * Lookup into LPM for destination port. * If lookup fails, use incoming port (portid) as destination port. */ static inline void -#ifdef RTE_NEXT_ABI processx4_step2(const struct lcore_conf *qconf, __m128i dip, uint32_t ipv4_flag, uint8_t portid, struct rte_mbuf *pkt[FWDSTEP], uint16_t dprt[FWDSTEP]) -#else -processx4_step2(const struct lcore_conf *qconf, __m128i dip, uint32_t flag, - uint8_t portid, struct rte_mbuf *pkt[FWDSTEP], uint16_t dprt[FWDSTEP]) -#endif /* RTE_NEXT_ABI */ { rte_xmm_t dst; const __m128i bswap_mask = _mm_set_epi8(12, 13, 14, 15, 8, 9, 10, 11, @@ -1357,11 +1285,7 @@ processx4_step2(const struct lcore_conf *qconf, __m128i dip, uint32_t flag, dip = _mm_shuffle_epi8(dip, bswap_mask); /* if all 4 packets are IPV4. */ -#ifdef RTE_NEXT_ABI if (likely(ipv4_flag)) { -#else - if (likely(flag != 0)) { -#endif rte_lpm_lookupx4(qconf->ipv4_lookup_struct, dip, dprt, portid); } else { dst.x = dip; @@ -1411,7 +1335,6 @@ processx4_step3(struct rte_mbuf *pkt[FWDSTEP], uint16_t dst_port[FWDSTEP]) _mm_store_si128(p[2], te[2]); _mm_store_si128(p[3], te[3]); -#ifdef RTE_NEXT_ABI rfc1812_process((struct ipv4_hdr *)((struct ether_hdr *)p[0] + 1), &dst_port[0], pkt[0]->packet_type); rfc1812_process((struct ipv4_hdr *)((struct ether_hdr *)p[1] + 1), @@ -1420,16 +1343,6 @@ processx4_step3(struct rte_mbuf *pkt[FWDSTEP], uint16_t dst_port[FWDSTEP]) &dst_port[2], pkt[2]->packet_type); rfc1812_process((struct ipv4_hdr *)((struct ether_hdr *)p[3] + 1), &dst_port[3], pkt[3]->packet_type); -#else /* RTE_NEXT_ABI */ - rfc1812_process((struct ipv4_hdr *)((struct ether_hdr *)p[0] + 1), - &dst_port[0], pkt[0]->ol_flags); - rfc1812_process((struct ipv4_hdr *)((struct ether_hdr *)p[1] + 1), - &dst_port[1], pkt[1]->ol_flags); - rfc1812_process((struct ipv4_hdr *)((struct ether_hdr *)p[2] + 1), - &dst_port[2], pkt[2]->ol_flags); - rfc1812_process((struct ipv4_hdr *)((struct ether_hdr *)p[3] + 1), - &dst_port[3], pkt[3]->ol_flags); -#endif /* RTE_NEXT_ABI */ } /* @@ -1616,11 +1529,7 @@ main_loop(__attribute__((unused)) void *dummy) uint16_t *lp; uint16_t dst_port[MAX_PKT_BURST]; __m128i dip[MAX_PKT_BURST / FWDSTEP]; -#ifdef RTE_NEXT_ABI uint32_t ipv4_flag[MAX_PKT_BURST / FWDSTEP]; -#else - uint32_t flag[MAX_PKT_BURST / FWDSTEP]; -#endif uint16_t pnum[MAX_PKT_BURST + 1]; #endif @@ -1690,7 +1599,6 @@ main_loop(__attribute__((unused)) void *dummy) */ int32_t n = RTE_ALIGN_FLOOR(nb_rx, 8); for (j = 0; j < n; j += 8) { -#ifdef RTE_NEXT_ABI uint32_t pkt_type = pkts_burst[j]->packet_type & pkts_burst[j+1]->packet_type & @@ -1705,20 +1613,6 @@ main_loop(__attribute__((unused)) void *dummy) &pkts_burst[j], portid, qconf); } else if (pkt_type & RTE_PTYPE_L3_IPV6) { -#else /* RTE_NEXT_ABI */ - uint32_t ol_flag = pkts_burst[j]->ol_flags - & pkts_burst[j+1]->ol_flags - & pkts_burst[j+2]->ol_flags - & pkts_burst[j+3]->ol_flags - & pkts_burst[j+4]->ol_flags - & pkts_burst[j+5]->ol_flags - & pkts_burst[j+6]->ol_flags - & pkts_burst[j+7]->ol_flags; - if (ol_flag & PKT_RX_IPV4_HDR ) { - simple_ipv4_fwd_8pkts(&pkts_burst[j], - portid, qconf); - } else if (ol_flag & PKT_RX_IPV6_HDR) { -#endif /* RTE_NEXT_ABI */ simple_ipv6_fwd_8pkts(&pkts_burst[j], portid, qconf); } else { @@ -1751,21 +1645,13 @@ main_loop(__attribute__((unused)) void *dummy) for (j = 0; j != k; j += FWDSTEP) { processx4_step1(&pkts_burst[j], &dip[j / FWDSTEP], -#ifdef RTE_NEXT_ABI &ipv4_flag[j / FWDSTEP]); -#else - &flag[j / FWDSTEP]); -#endif } k = RTE_ALIGN_FLOOR(nb_rx, FWDSTEP); for (j = 0; j != k; j += FWDSTEP) { processx4_step2(qconf, dip[j / FWDSTEP], -#ifdef RTE_NEXT_ABI ipv4_flag[j / FWDSTEP], portid, -#else - flag[j / FWDSTEP], portid, -#endif &pkts_burst[j], &dst_port[j]); } diff --git a/examples/tep_termination/vxlan.c b/examples/tep_termination/vxlan.c index e98a29f..5ee1f95 100644 --- a/examples/tep_termination/vxlan.c +++ b/examples/tep_termination/vxlan.c @@ -180,12 +180,7 @@ decapsulation(struct rte_mbuf *pkt) * (rfc7348) or that the rx offload flag is set (i40e only * currently)*/ if (udp_hdr->dst_port != rte_cpu_to_be_16(DEFAULT_VXLAN_PORT) && -#ifdef RTE_NEXT_ABI (pkt->packet_type & RTE_PTYPE_TUNNEL_MASK) == 0) -#else - (pkt->ol_flags & (PKT_RX_TUNNEL_IPV4_HDR | - PKT_RX_TUNNEL_IPV6_HDR)) == 0) -#endif return -1; outer_header_len = info.outer_l2_len + info.outer_l3_len + sizeof(struct udp_hdr) + sizeof(struct vxlan_hdr); diff --git a/lib/librte_eal/linuxapp/eal/include/exec-env/rte_kni_common.h b/lib/librte_eal/linuxapp/eal/include/exec-env/rte_kni_common.h index e9f38bd..bd1cc09 100644 --- a/lib/librte_eal/linuxapp/eal/include/exec-env/rte_kni_common.h +++ b/lib/librte_eal/linuxapp/eal/include/exec-env/rte_kni_common.h @@ -117,15 +117,9 @@ struct rte_kni_mbuf { uint16_t data_off; /**< Start address of data in segment buffer. */ char pad1[4]; uint64_t ol_flags; /**< Offload features. */ -#ifdef RTE_NEXT_ABI char pad2[4]; uint32_t pkt_len; /**< Total pkt len: sum of all segment data_len. */ uint16_t data_len; /**< Amount of data in segment buffer. */ -#else - char pad2[2]; - uint16_t data_len; /**< Amount of data in segment buffer. */ - uint32_t pkt_len; /**< Total pkt len: sum of all segment data_len. */ -#endif /* fields on second cache line */ char pad3[8] __attribute__((__aligned__(RTE_CACHE_LINE_SIZE))); diff --git a/lib/librte_mbuf/Makefile b/lib/librte_mbuf/Makefile index 080f3cf..8d62b0d 100644 --- a/lib/librte_mbuf/Makefile +++ b/lib/librte_mbuf/Makefile @@ -38,7 +38,7 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 EXPORT_MAP := rte_mbuf_version.map -LIBABIVER := 1 +LIBABIVER := 2 # all source are stored in SRCS-y SRCS-$(CONFIG_RTE_LIBRTE_MBUF) := rte_mbuf.c diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c index e416312..c18b438 100644 --- a/lib/librte_mbuf/rte_mbuf.c +++ b/lib/librte_mbuf/rte_mbuf.c @@ -258,18 +258,8 @@ const char *rte_get_rx_ol_flag_name(uint64_t mask) /* case PKT_RX_HBUF_OVERFLOW: return "PKT_RX_HBUF_OVERFLOW"; */ /* case PKT_RX_RECIP_ERR: return "PKT_RX_RECIP_ERR"; */ /* case PKT_RX_MAC_ERR: return "PKT_RX_MAC_ERR"; */ -#ifndef RTE_NEXT_ABI - case PKT_RX_IPV4_HDR: return "PKT_RX_IPV4_HDR"; - case PKT_RX_IPV4_HDR_EXT: return "PKT_RX_IPV4_HDR_EXT"; - case PKT_RX_IPV6_HDR: return "PKT_RX_IPV6_HDR"; - case PKT_RX_IPV6_HDR_EXT: return "PKT_RX_IPV6_HDR_EXT"; -#endif /* RTE_NEXT_ABI */ case PKT_RX_IEEE1588_PTP: return "PKT_RX_IEEE1588_PTP"; case PKT_RX_IEEE1588_TMST: return "PKT_RX_IEEE1588_TMST"; -#ifndef RTE_NEXT_ABI - case PKT_RX_TUNNEL_IPV4_HDR: return "PKT_RX_TUNNEL_IPV4_HDR"; - case PKT_RX_TUNNEL_IPV6_HDR: return "PKT_RX_TUNNEL_IPV6_HDR"; -#endif /* RTE_NEXT_ABI */ default: return NULL; } } diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index 8c2db1b..d7c9030 100644 --- a/lib/librte_mbuf/rte_mbuf.h +++ b/lib/librte_mbuf/rte_mbuf.h @@ -93,18 +93,8 @@ extern "C" { #define PKT_RX_HBUF_OVERFLOW (0ULL << 0) /**< Header buffer overflow. */ #define PKT_RX_RECIP_ERR (0ULL << 0) /**< Hardware processing error. */ #define PKT_RX_MAC_ERR (0ULL << 0) /**< MAC error. */ -#ifndef RTE_NEXT_ABI -#define PKT_RX_IPV4_HDR (1ULL << 5) /**< RX packet with IPv4 header. */ -#define PKT_RX_IPV4_HDR_EXT (1ULL << 6) /**< RX packet with extended IPv4 header. */ -#define PKT_RX_IPV6_HDR (1ULL << 7) /**< RX packet with IPv6 header. */ -#define PKT_RX_IPV6_HDR_EXT (1ULL << 8) /**< RX packet with extended IPv6 header. */ -#endif /* RTE_NEXT_ABI */ #define PKT_RX_IEEE1588_PTP (1ULL << 9) /**< RX IEEE1588 L2 Ethernet PT Packet. */ #define PKT_RX_IEEE1588_TMST (1ULL << 10) /**< RX IEEE1588 L2/L4 timestamped packet.*/ -#ifndef RTE_NEXT_ABI -#define PKT_RX_TUNNEL_IPV4_HDR (1ULL << 11) /**< RX tunnel packet with IPv4 header.*/ -#define PKT_RX_TUNNEL_IPV6_HDR (1ULL << 12) /**< RX tunnel packet with IPv6 header. */ -#endif /* RTE_NEXT_ABI */ #define PKT_RX_FDIR_ID (1ULL << 13) /**< FD id reported if FDIR match. */ #define PKT_RX_FDIR_FLX (1ULL << 14) /**< Flexible bytes reported if FDIR match. */ #define PKT_RX_QINQ_PKT (1ULL << 15) /**< RX packet with double VLAN stripped. */ @@ -209,7 +199,6 @@ extern "C" { /* Use final bit of flags to indicate a control mbuf */ #define CTRL_MBUF_FLAG (1ULL << 63) /**< Mbuf contains control data */ -#ifdef RTE_NEXT_ABI /* * 32 bits are divided into several fields to mark packet types. Note that * each field is indexical. @@ -696,7 +685,6 @@ extern "C" { RTE_PTYPE_INNER_L2_MASK | \ RTE_PTYPE_INNER_L3_MASK | \ RTE_PTYPE_INNER_L4_MASK)) -#endif /* RTE_NEXT_ABI */ /** Alignment constraint of mbuf private area. */ #define RTE_MBUF_PRIV_ALIGN 8 @@ -775,7 +763,6 @@ struct rte_mbuf { /* remaining bytes are set on RX when pulling packet from descriptor */ MARKER rx_descriptor_fields1; -#ifdef RTE_NEXT_ABI /* * The packet type, which is the combination of outer/inner L2, L3, L4 * and tunnel types. @@ -796,19 +783,7 @@ struct rte_mbuf { uint32_t pkt_len; /**< Total pkt len: sum of all segments. */ uint16_t data_len; /**< Amount of data in segment buffer. */ uint16_t vlan_tci; /**< VLAN Tag Control Identifier (CPU order) */ -#else /* RTE_NEXT_ABI */ - /** - * The packet type, which is used to indicate ordinary packet and also - * tunneled packet format, i.e. each number is represented a type of - * packet. - */ - uint16_t packet_type; - uint16_t data_len; /**< Amount of data in segment buffer. */ - uint32_t pkt_len; /**< Total pkt len: sum of all segments. */ - uint16_t vlan_tci; /**< VLAN Tag Control Identifier (CPU order) */ - uint16_t vlan_tci_outer; /**< Outer VLAN Tag Control Identifier (CPU order) */ -#endif /* RTE_NEXT_ABI */ union { uint32_t rss; /**< RSS hash result if RSS enabled */ struct { @@ -829,9 +804,8 @@ struct rte_mbuf { } hash; /**< hash information */ uint32_t seqn; /**< Sequence number. See also rte_reorder_insert() */ -#ifdef RTE_NEXT_ABI + uint16_t vlan_tci_outer; /**< Outer VLAN Tag Control Identifier (CPU order) */ -#endif /* RTE_NEXT_ABI */ /* second cache line - fields only used in slow path or on TX */ MARKER cacheline1 __rte_cache_aligned; -- 2.5.1 ^ permalink raw reply [flat|nested] 29+ messages in thread
* [dpdk-dev] [PATCH v2 04/10] ethdev: remove SCTP flow entries switch 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 00/10] " Thomas Monjalon ` (2 preceding siblings ...) 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 03/10] mbuf: remove packet type from offload flags Thomas Monjalon @ 2015-09-02 13:16 ` Thomas Monjalon 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 05/10] eal: remove deprecated function Thomas Monjalon ` (6 subsequent siblings) 10 siblings, 0 replies; 29+ messages in thread From: Thomas Monjalon @ 2015-09-02 13:16 UTC (permalink / raw) To: dev The extended SCTP flow entries are now part of the standard API. Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Neil Horman <nhorman@tuxdriver.com> --- app/test-pmd/cmdline.c | 4 ---- doc/guides/rel_notes/deprecation.rst | 3 --- doc/guides/rel_notes/release_2_2.rst | 3 +++ drivers/net/i40e/i40e_fdir.c | 4 ---- lib/librte_ether/rte_eth_ctrl.h | 4 ---- 5 files changed, 3 insertions(+), 15 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 5799c9c..0f8f48f 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -7888,12 +7888,10 @@ cmd_flow_director_filter_parsed(void *parsed_result, IPV4_ADDR_TO_UINT(res->ip_src, entry.input.flow.sctp4_flow.ip.src_ip); /* need convert to big endian. */ -#ifdef RTE_NEXT_ABI entry.input.flow.sctp4_flow.dst_port = rte_cpu_to_be_16(res->port_dst); entry.input.flow.sctp4_flow.src_port = rte_cpu_to_be_16(res->port_src); -#endif entry.input.flow.sctp4_flow.verify_tag = rte_cpu_to_be_32(res->verify_tag_value); break; @@ -7917,12 +7915,10 @@ cmd_flow_director_filter_parsed(void *parsed_result, IPV6_ADDR_TO_ARRAY(res->ip_src, entry.input.flow.sctp6_flow.ip.src_ip); /* need convert to big endian. */ -#ifdef RTE_NEXT_ABI entry.input.flow.sctp6_flow.dst_port = rte_cpu_to_be_16(res->port_dst); entry.input.flow.sctp6_flow.src_port = rte_cpu_to_be_16(res->port_src); -#endif entry.input.flow.sctp6_flow.verify_tag = rte_cpu_to_be_32(res->verify_tag_value); break; diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 639ab18..cf5cd17 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -44,9 +44,6 @@ Deprecation Notices flow director filtering in VF. The release 2.1 does not contain these ABI changes, but release 2.2 will, and no backwards compatibility is planned. -* ABI change is planned to extend the SCTP flow's key input from release 2.1. - The change may be enabled in the release 2.1 with CONFIG_RTE_NEXT_ABI. - * ABI changes are planned for struct rte_eth_fdir_filter and rte_eth_fdir_masks in order to support new flow director modes, MAC VLAN and Cloud, on x550. The MAC VLAN mode means the MAC and diff --git a/doc/guides/rel_notes/release_2_2.rst b/doc/guides/rel_notes/release_2_2.rst index 3a6d2cc..825c612 100644 --- a/doc/guides/rel_notes/release_2_2.rst +++ b/doc/guides/rel_notes/release_2_2.rst @@ -23,6 +23,9 @@ ABI Changes * The EAL and ethdev structures rte_intr_handle and rte_eth_conf were changed to support Rx interrupt. It was already done in 2.1 for CONFIG_RTE_NEXT_ABI. +* The ethdev flow director entries for SCTP were changed. + It was already done in 2.1 for CONFIG_RTE_NEXT_ABI. + * The mbuf structure was changed to support unified packet type. It was already done in 2.1 for CONFIG_RTE_NEXT_ABI. diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c index 8208273..c9ce98f 100644 --- a/drivers/net/i40e/i40e_fdir.c +++ b/drivers/net/i40e/i40e_fdir.c @@ -822,7 +822,6 @@ i40e_fdir_construct_pkt(struct i40e_pf *pf, sctp = (struct sctp_hdr *)(raw_pkt + sizeof(struct ether_hdr) + sizeof(struct ipv4_hdr)); payload = (unsigned char *)sctp + sizeof(struct sctp_hdr); -#ifdef RTE_NEXT_ABI /* * The source and destination fields in the transmitted packet * need to be presented in a reversed order with respect @@ -830,7 +829,6 @@ i40e_fdir_construct_pkt(struct i40e_pf *pf, */ sctp->src_port = fdir_input->flow.sctp4_flow.dst_port; sctp->dst_port = fdir_input->flow.sctp4_flow.src_port; -#endif sctp->tag = fdir_input->flow.sctp4_flow.verify_tag; break; @@ -873,7 +871,6 @@ i40e_fdir_construct_pkt(struct i40e_pf *pf, sctp = (struct sctp_hdr *)(raw_pkt + sizeof(struct ether_hdr) + sizeof(struct ipv6_hdr)); payload = (unsigned char *)sctp + sizeof(struct sctp_hdr); -#ifdef RTE_NEXT_ABI /* * The source and destination fields in the transmitted packet * need to be presented in a reversed order with respect @@ -881,7 +878,6 @@ i40e_fdir_construct_pkt(struct i40e_pf *pf, */ sctp->src_port = fdir_input->flow.sctp6_flow.dst_port; sctp->dst_port = fdir_input->flow.sctp6_flow.src_port; -#endif sctp->tag = fdir_input->flow.sctp6_flow.verify_tag; break; diff --git a/lib/librte_ether/rte_eth_ctrl.h b/lib/librte_ether/rte_eth_ctrl.h index 4beb981..26b7b33 100644 --- a/lib/librte_ether/rte_eth_ctrl.h +++ b/lib/librte_ether/rte_eth_ctrl.h @@ -335,10 +335,8 @@ struct rte_eth_tcpv4_flow { */ struct rte_eth_sctpv4_flow { struct rte_eth_ipv4_flow ip; /**< IPv4 fields to match. */ -#ifdef RTE_NEXT_ABI uint16_t src_port; /**< SCTP source port to match. */ uint16_t dst_port; /**< SCTP destination port to match. */ -#endif uint32_t verify_tag; /**< Verify tag to match */ }; @@ -373,10 +371,8 @@ struct rte_eth_tcpv6_flow { */ struct rte_eth_sctpv6_flow { struct rte_eth_ipv6_flow ip; /**< IPv6 fields to match. */ -#ifdef RTE_NEXT_ABI uint16_t src_port; /**< SCTP source port to match. */ uint16_t dst_port; /**< SCTP destination port to match. */ -#endif uint32_t verify_tag; /**< Verify tag to match */ }; -- 2.5.1 ^ permalink raw reply [flat|nested] 29+ messages in thread
* [dpdk-dev] [PATCH v2 05/10] eal: remove deprecated function 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 00/10] " Thomas Monjalon ` (3 preceding siblings ...) 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 04/10] ethdev: remove SCTP flow entries switch Thomas Monjalon @ 2015-09-02 13:16 ` Thomas Monjalon 2015-09-03 14:29 ` David Marchand 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 06/10] mem: remove dummy malloc library Thomas Monjalon ` (5 subsequent siblings) 10 siblings, 1 reply; 29+ messages in thread From: Thomas Monjalon @ 2015-09-02 13:16 UTC (permalink / raw) To: dev The function rte_eal_pci_close_one() was renamed rte_eal_pci_detach(). Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Neil Horman <nhorman@tuxdriver.com> --- doc/guides/rel_notes/deprecation.rst | 3 --- doc/guides/rel_notes/release_2_2.rst | 3 +++ lib/librte_eal/bsdapp/eal/rte_eal_version.map | 1 - lib/librte_eal/common/eal_common_pci.c | 6 ------ lib/librte_eal/common/include/rte_pci.h | 2 -- lib/librte_eal/linuxapp/eal/rte_eal_version.map | 1 - 6 files changed, 3 insertions(+), 13 deletions(-) diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index cf5cd17..604a899 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -13,9 +13,6 @@ Deprecation Notices There is no backward compatibility planned from release 2.2. All binaries will need to be rebuilt from release 2.2. -* The EAL function rte_eal_pci_close_one is deprecated because renamed to - rte_eal_pci_detach. - * The Macros RTE_HASH_BUCKET_ENTRIES_MAX and RTE_HASH_KEY_LENGTH_MAX are deprecated and will be removed with version 2.2. diff --git a/doc/guides/rel_notes/release_2_2.rst b/doc/guides/rel_notes/release_2_2.rst index 825c612..8a5b29a 100644 --- a/doc/guides/rel_notes/release_2_2.rst +++ b/doc/guides/rel_notes/release_2_2.rst @@ -16,6 +16,9 @@ Known Issues API Changes ----------- +* The function rte_eal_pci_close_one() is removed. + It was replaced by rte_eal_pci_detach(). + ABI Changes ----------- diff --git a/lib/librte_eal/bsdapp/eal/rte_eal_version.map b/lib/librte_eal/bsdapp/eal/rte_eal_version.map index 2758848..64fdfb1 100644 --- a/lib/librte_eal/bsdapp/eal/rte_eal_version.map +++ b/lib/librte_eal/bsdapp/eal/rte_eal_version.map @@ -40,7 +40,6 @@ DPDK_2.0 { rte_eal_mp_remote_launch; rte_eal_mp_wait_lcore; rte_eal_parse_devargs_str; - rte_eal_pci_close_one; rte_eal_pci_dump; rte_eal_pci_probe; rte_eal_pci_probe_one; diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c index 16e8629..dcfe947 100644 --- a/lib/librte_eal/common/eal_common_pci.c +++ b/lib/librte_eal/common/eal_common_pci.c @@ -348,12 +348,6 @@ err_return: return -1; } -int __attribute__ ((deprecated)) -rte_eal_pci_close_one(const struct rte_pci_addr *addr) -{ - return rte_eal_pci_detach(addr); -} - /* * Detach device specified by its pci address. */ diff --git a/lib/librte_eal/common/include/rte_pci.h b/lib/librte_eal/common/include/rte_pci.h index 3fb2d3a..83e3c28 100644 --- a/lib/librte_eal/common/include/rte_pci.h +++ b/lib/librte_eal/common/include/rte_pci.h @@ -426,8 +426,6 @@ int rte_eal_pci_probe_one(const struct rte_pci_addr *addr); * - Negative on error. */ int rte_eal_pci_detach(const struct rte_pci_addr *addr); -int __attribute__ ((deprecated)) -rte_eal_pci_close_one(const struct rte_pci_addr *addr); /** * Dump the content of the PCI bus. diff --git a/lib/librte_eal/linuxapp/eal/rte_eal_version.map b/lib/librte_eal/linuxapp/eal/rte_eal_version.map index 59b1717..dbb8fa1 100644 --- a/lib/librte_eal/linuxapp/eal/rte_eal_version.map +++ b/lib/librte_eal/linuxapp/eal/rte_eal_version.map @@ -40,7 +40,6 @@ DPDK_2.0 { rte_eal_mp_remote_launch; rte_eal_mp_wait_lcore; rte_eal_parse_devargs_str; - rte_eal_pci_close_one; rte_eal_pci_dump; rte_eal_pci_probe; rte_eal_pci_probe_one; -- 2.5.1 ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [dpdk-dev] [PATCH v2 05/10] eal: remove deprecated function 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 05/10] eal: remove deprecated function Thomas Monjalon @ 2015-09-03 14:29 ` David Marchand 0 siblings, 0 replies; 29+ messages in thread From: David Marchand @ 2015-09-03 14:29 UTC (permalink / raw) To: Thomas Monjalon; +Cc: dev On Wed, Sep 2, 2015 at 3:16 PM, Thomas Monjalon <thomas.monjalon@6wind.com> wrote: > The function rte_eal_pci_close_one() was renamed rte_eal_pci_detach(). > > Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> > Acked-by: Stephen Hemminger <stephen@networkplumber.org> > Acked-by: Neil Horman <nhorman@tuxdriver.com> > Acked-by: David Marchand <david.marchand@6wind.com> -- David Marchand ^ permalink raw reply [flat|nested] 29+ messages in thread
* [dpdk-dev] [PATCH v2 06/10] mem: remove dummy malloc library 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 00/10] " Thomas Monjalon ` (4 preceding siblings ...) 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 05/10] eal: remove deprecated function Thomas Monjalon @ 2015-09-02 13:16 ` Thomas Monjalon 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 07/10] lpm: remove deprecated field Thomas Monjalon ` (4 subsequent siblings) 10 siblings, 0 replies; 29+ messages in thread From: Thomas Monjalon @ 2015-09-02 13:16 UTC (permalink / raw) To: dev The malloc library is now part of the EAL. Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Neil Horman <nhorman@tuxdriver.com> --- MAINTAINERS | 1 - doc/guides/prog_guide/dev_kit_build_system.rst | 2 +- doc/guides/prog_guide/env_abstraction_layer.rst | 2 +- doc/guides/prog_guide/source_org.rst | 1 - .../thread_safety_intel_dpdk_functions.rst | 2 +- doc/guides/rel_notes/deprecation.rst | 5 --- doc/guides/rel_notes/release_2_2.rst | 3 +- lib/Makefile | 1 - lib/librte_malloc/Makefile | 48 ---------------------- lib/librte_malloc/rte_malloc_empty.c | 34 --------------- lib/librte_malloc/rte_malloc_version.map | 3 -- mk/rte.app.mk | 1 - 12 files changed, 5 insertions(+), 98 deletions(-) delete mode 100644 lib/librte_malloc/Makefile delete mode 100644 lib/librte_malloc/rte_malloc_empty.c delete mode 100644 lib/librte_malloc/rte_malloc_version.map diff --git a/MAINTAINERS b/MAINTAINERS index 17d4265..080a8e8 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -102,7 +102,6 @@ F: lib/librte_eal/common/include/rte_malloc.h F: lib/librte_eal/common/*malloc* F: lib/librte_eal/common/eal_common_mem* F: lib/librte_eal/common/eal_hugepages.h -F: lib/librte_malloc/ F: doc/guides/prog_guide/env_abstraction_layer.rst F: app/test/test_func_reentrancy.c F: app/test/test_malloc.c diff --git a/doc/guides/prog_guide/dev_kit_build_system.rst b/doc/guides/prog_guide/dev_kit_build_system.rst index 7dc2de6..dd3e3d0 100644 --- a/doc/guides/prog_guide/dev_kit_build_system.rst +++ b/doc/guides/prog_guide/dev_kit_build_system.rst @@ -85,7 +85,7 @@ Each build directory contains include files, libraries, and applications: librte_cmdline.a librte_lpm.a librte_mempool.a librte_ring.a - librte_eal.a librte_malloc.a librte_pmd_e1000.a librte_timer.a + librte_eal.a librte_pmd_e1000.a librte_timer.a ~/DEV/DPDK$ ls i686-native-linuxapp-gcc/include/ diff --git a/doc/guides/prog_guide/env_abstraction_layer.rst b/doc/guides/prog_guide/env_abstraction_layer.rst index f1b3ff1..a03e40d 100644 --- a/doc/guides/prog_guide/env_abstraction_layer.rst +++ b/doc/guides/prog_guide/env_abstraction_layer.rst @@ -115,7 +115,7 @@ The physical address of the reserved memory for that memory zone is also returne .. note:: - Memory reservations done using the APIs provided by the rte_malloc library are also backed by pages from the hugetlbfs filesystem. + Memory reservations done using the APIs provided by rte_malloc are also backed by pages from the hugetlbfs filesystem. Xen Dom0 support without hugetbls ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/doc/guides/prog_guide/source_org.rst b/doc/guides/prog_guide/source_org.rst index b81e965..ae11b3b 100644 --- a/doc/guides/prog_guide/source_org.rst +++ b/doc/guides/prog_guide/source_org.rst @@ -74,7 +74,6 @@ The lib directory contains:: +-- librte_kni # Kernel NIC interface +-- librte_kvargs # Argument parsing library +-- librte_lpm # Longest prefix match library - +-- librte_malloc # Malloc-like functions +-- librte_mbuf # Packet and control mbuf manipulation +-- librte_mempool # Memory pool manager (fixed sized objects) +-- librte_meter # QoS metering library diff --git a/doc/guides/prog_guide/thread_safety_intel_dpdk_functions.rst b/doc/guides/prog_guide/thread_safety_intel_dpdk_functions.rst index 0034bf4..403e5fc 100644 --- a/doc/guides/prog_guide/thread_safety_intel_dpdk_functions.rst +++ b/doc/guides/prog_guide/thread_safety_intel_dpdk_functions.rst @@ -73,7 +73,7 @@ Performance Insensitive API Outside of the performance sensitive areas described in Section 25.1, the DPDK provides a thread-safe API for most other libraries. -For example, malloc(librte_malloc) and memzone functions are safe for use in multi-threaded and multi-process environments. +For example, malloc and memzone functions are safe for use in multi-threaded and multi-process environments. The setup and configuration of the PMD is not performance sensitive, but is not thread safe either. It is possible that the multiple read/writes during PMD setup and configuration could be corrupted in a multi-thread environment. diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 604a899..3fa4c90 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -21,11 +21,6 @@ Deprecation Notices * The field mem_location of the rte_lpm structure is deprecated and should be removed as well as the macros RTE_LPM_HEAP and RTE_LPM_MEMZONE. -* librte_malloc library has been integrated into librte_eal. The 2.1 release - creates a dummy/empty malloc library to fulfill binaries with dynamic linking - dependencies on librte_malloc.so. Such dummy library will not be created from - release 2.2 so binaries will need to be rebuilt. - * The following fields have been deprecated in rte_eth_stats: imissed, ibadcrc, ibadlen, imcasts, fdirmatch, fdirmiss, tx_pause_xon, rx_pause_xon, tx_pause_xoff, rx_pause_xoff diff --git a/doc/guides/rel_notes/release_2_2.rst b/doc/guides/rel_notes/release_2_2.rst index 8a5b29a..f0f67da 100644 --- a/doc/guides/rel_notes/release_2_2.rst +++ b/doc/guides/rel_notes/release_2_2.rst @@ -32,6 +32,8 @@ ABI Changes * The mbuf structure was changed to support unified packet type. It was already done in 2.1 for CONFIG_RTE_NEXT_ABI. +* The dummy malloc library is removed. The content was moved into EAL in 2.1. + Shared Library Versions ----------------------- @@ -53,7 +55,6 @@ The libraries prepended with a plus sign were incremented in this version. librte_kni.so.1 librte_kvargs.so.1 librte_lpm.so.1 - librte_malloc.so.1 + librte_mbuf.so.2 librte_mempool.so.1 librte_meter.so.1 diff --git a/lib/Makefile b/lib/Makefile index 2055539..9727b83 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -33,7 +33,6 @@ include $(RTE_SDK)/mk/rte.vars.mk DIRS-y += librte_compat DIRS-$(CONFIG_RTE_LIBRTE_EAL) += librte_eal -DIRS-$(CONFIG_RTE_LIBRTE_EAL) += librte_malloc DIRS-$(CONFIG_RTE_LIBRTE_RING) += librte_ring DIRS-$(CONFIG_RTE_LIBRTE_MEMPOOL) += librte_mempool DIRS-$(CONFIG_RTE_LIBRTE_MBUF) += librte_mbuf diff --git a/lib/librte_malloc/Makefile b/lib/librte_malloc/Makefile deleted file mode 100644 index 9558f3d..0000000 --- a/lib/librte_malloc/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# BSD LICENSE -# -# Copyright(c) 2010-2014 Intel Corporation. All rights reserved. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Intel Corporation nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -include $(RTE_SDK)/mk/rte.vars.mk - -# library name -LIB = librte_malloc.a - -LIBABIVER := 1 - -CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 - -EXPORT_MAP := rte_malloc_version.map - -# all source are stored in SRCS-y -SRCS-$(CONFIG_RTE_LIBRTE_EAL) := rte_malloc_empty.c - -# this lib needs eal -DEPDIRS-$(CONFIG_RTE_LIBRTE_EAL) += lib/librte_eal - -include $(RTE_SDK)/mk/rte.lib.mk diff --git a/lib/librte_malloc/rte_malloc_empty.c b/lib/librte_malloc/rte_malloc_empty.c deleted file mode 100644 index 4892a61..0000000 --- a/lib/librte_malloc/rte_malloc_empty.c +++ /dev/null @@ -1,34 +0,0 @@ -/*- - * BSD LICENSE - * - * Copyright(c) 2010-2015 Intel Corporation. All rights reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Intel Corporation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* Empty file to be able to create a dummy library for deprecation policy */ diff --git a/lib/librte_malloc/rte_malloc_version.map b/lib/librte_malloc/rte_malloc_version.map deleted file mode 100644 index 63cb5fc..0000000 --- a/lib/librte_malloc/rte_malloc_version.map +++ /dev/null @@ -1,3 +0,0 @@ -DPDK_2.0 { - local: *; -}; diff --git a/mk/rte.app.mk b/mk/rte.app.mk index 3871205..9e1909e 100644 --- a/mk/rte.app.mk +++ b/mk/rte.app.mk @@ -114,7 +114,6 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_KVARGS) += -lrte_kvargs _LDLIBS-$(CONFIG_RTE_LIBRTE_MBUF) += -lrte_mbuf _LDLIBS-$(CONFIG_RTE_LIBRTE_IP_FRAG) += -lrte_ip_frag _LDLIBS-$(CONFIG_RTE_LIBRTE_ETHER) += -lethdev -_LDLIBS-$(CONFIG_RTE_LIBRTE_MALLOC) += -lrte_malloc _LDLIBS-$(CONFIG_RTE_LIBRTE_MEMPOOL) += -lrte_mempool _LDLIBS-$(CONFIG_RTE_LIBRTE_RING) += -lrte_ring _LDLIBS-$(CONFIG_RTE_LIBRTE_EAL) += -lrte_eal -- 2.5.1 ^ permalink raw reply [flat|nested] 29+ messages in thread
* [dpdk-dev] [PATCH v2 07/10] lpm: remove deprecated field 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 00/10] " Thomas Monjalon ` (5 preceding siblings ...) 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 06/10] mem: remove dummy malloc library Thomas Monjalon @ 2015-09-02 13:16 ` Thomas Monjalon 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 08/10] acl: remove old API Thomas Monjalon ` (3 subsequent siblings) 10 siblings, 0 replies; 29+ messages in thread From: Thomas Monjalon @ 2015-09-02 13:16 UTC (permalink / raw) To: dev The library version is incremented. Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Neil Horman <nhorman@tuxdriver.com> --- app/test/test_func_reentrancy.c | 4 ++-- app/test/test_lpm.c | 4 ++-- doc/guides/rel_notes/deprecation.rst | 3 --- doc/guides/rel_notes/release_2_2.rst | 4 +++- lib/librte_lpm/Makefile | 2 +- lib/librte_lpm/rte_lpm.h | 11 ----------- 6 files changed, 8 insertions(+), 20 deletions(-) diff --git a/app/test/test_func_reentrancy.c b/app/test/test_func_reentrancy.c index be61773..dbecc52 100644 --- a/app/test/test_func_reentrancy.c +++ b/app/test/test_func_reentrancy.c @@ -366,7 +366,7 @@ lpm_create_free(__attribute__((unused)) void *arg) /* create the same lpm simultaneously on all threads */ for (i = 0; i < MAX_ITER_TIMES; i++) { - lpm = rte_lpm_create("fr_test_once", SOCKET_ID_ANY, 4, RTE_LPM_HEAP); + lpm = rte_lpm_create("fr_test_once", SOCKET_ID_ANY, 4, 0); if ((NULL == lpm) && (rte_lpm_find_existing("fr_test_once") == NULL)) return -1; } @@ -374,7 +374,7 @@ lpm_create_free(__attribute__((unused)) void *arg) /* create mutiple fbk tables simultaneously */ for (i = 0; i < MAX_LPM_ITER_TIMES; i++) { snprintf(lpm_name, sizeof(lpm_name), "fr_test_%d_%d", lcore_self, i); - lpm = rte_lpm_create(lpm_name, SOCKET_ID_ANY, 4, RTE_LPM_HEAP); + lpm = rte_lpm_create(lpm_name, SOCKET_ID_ANY, 4, 0); if (NULL == lpm) return -1; diff --git a/app/test/test_lpm.c b/app/test/test_lpm.c index 6d8823e..8b4ded9 100644 --- a/app/test/test_lpm.c +++ b/app/test/test_lpm.c @@ -165,7 +165,7 @@ test2(void) { struct rte_lpm *lpm = NULL; - lpm = rte_lpm_create(__func__, SOCKET_ID_ANY, MAX_RULES, RTE_LPM_HEAP); + lpm = rte_lpm_create(__func__, SOCKET_ID_ANY, MAX_RULES, 0); TEST_LPM_ASSERT(lpm != NULL); rte_lpm_free(lpm); @@ -607,7 +607,7 @@ test10(void) /* Add rule that covers a TBL24 range previously invalid & lookup * (& delete & lookup) */ - lpm = rte_lpm_create(__func__, SOCKET_ID_ANY, MAX_RULES, RTE_LPM_HEAP); + lpm = rte_lpm_create(__func__, SOCKET_ID_ANY, MAX_RULES, 0); TEST_LPM_ASSERT(lpm != NULL); ip = IPv4(128, 0, 0, 0); diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 3fa4c90..c40764a 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -18,9 +18,6 @@ Deprecation Notices * The function rte_jhash2 is deprecated and should be removed. -* The field mem_location of the rte_lpm structure is deprecated and should be - removed as well as the macros RTE_LPM_HEAP and RTE_LPM_MEMZONE. - * The following fields have been deprecated in rte_eth_stats: imissed, ibadcrc, ibadlen, imcasts, fdirmatch, fdirmiss, tx_pause_xon, rx_pause_xon, tx_pause_xoff, rx_pause_xoff diff --git a/doc/guides/rel_notes/release_2_2.rst b/doc/guides/rel_notes/release_2_2.rst index f0f67da..2a238c5 100644 --- a/doc/guides/rel_notes/release_2_2.rst +++ b/doc/guides/rel_notes/release_2_2.rst @@ -34,6 +34,8 @@ ABI Changes * The dummy malloc library is removed. The content was moved into EAL in 2.1. +* The LPM structure is changed. The deprecated field mem_location is removed. + Shared Library Versions ----------------------- @@ -54,7 +56,7 @@ The libraries prepended with a plus sign were incremented in this version. librte_jobstats.so.1 librte_kni.so.1 librte_kvargs.so.1 - librte_lpm.so.1 + + librte_lpm.so.2 + librte_mbuf.so.2 librte_mempool.so.1 librte_meter.so.1 diff --git a/lib/librte_lpm/Makefile b/lib/librte_lpm/Makefile index 0a7a888..688cfc9 100644 --- a/lib/librte_lpm/Makefile +++ b/lib/librte_lpm/Makefile @@ -39,7 +39,7 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) EXPORT_MAP := rte_lpm_version.map -LIBABIVER := 1 +LIBABIVER := 2 # all source are stored in SRCS-y SRCS-$(CONFIG_RTE_LIBRTE_LPM) := rte_lpm.c rte_lpm6.c diff --git a/lib/librte_lpm/rte_lpm.h b/lib/librte_lpm/rte_lpm.h index 11f0c04..c299ce2 100644 --- a/lib/librte_lpm/rte_lpm.h +++ b/lib/librte_lpm/rte_lpm.h @@ -56,16 +56,6 @@ extern "C" { /** Max number of characters in LPM name. */ #define RTE_LPM_NAMESIZE 32 -/** @deprecated Possible location to allocate memory. This was for last - * parameter of rte_lpm_create(), but is now redundant. The LPM table is always - * allocated in memory using librte_malloc which uses a memzone. */ -#define RTE_LPM_HEAP 0 - -/** @deprecated Possible location to allocate memory. This was for last - * parameter of rte_lpm_create(), but is now redundant. The LPM table is always - * allocated in memory using librte_malloc which uses a memzone. */ -#define RTE_LPM_MEMZONE 1 - /** Maximum depth value possible for IPv4 LPM. */ #define RTE_LPM_MAX_DEPTH 32 @@ -154,7 +144,6 @@ struct rte_lpm_rule_info { struct rte_lpm { /* LPM metadata. */ char name[RTE_LPM_NAMESIZE]; /**< Name of the lpm. */ - int mem_location; /**< @deprecated @see RTE_LPM_HEAP and RTE_LPM_MEMZONE. */ uint32_t max_rules; /**< Max. balanced rules per lpm. */ struct rte_lpm_rule_info rule_info[RTE_LPM_MAX_DEPTH]; /**< Rule info table. */ -- 2.5.1 ^ permalink raw reply [flat|nested] 29+ messages in thread
* [dpdk-dev] [PATCH v2 08/10] acl: remove old API 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 00/10] " Thomas Monjalon ` (6 preceding siblings ...) 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 07/10] lpm: remove deprecated field Thomas Monjalon @ 2015-09-02 13:16 ` Thomas Monjalon 2015-09-02 15:59 ` Ananyev, Konstantin 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 09/10] kni: remove deprecated functions Thomas Monjalon ` (2 subsequent siblings) 10 siblings, 1 reply; 29+ messages in thread From: Thomas Monjalon @ 2015-09-02 13:16 UTC (permalink / raw) To: dev The functions and structures are moved to app/test in order to keep existing unit tests. Some minor changes were done in these functions because of library scope restrictions. An enum is also copied in two other applications to keep existing code. The library version is incremented. Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Neil Horman <nhorman@tuxdriver.com> --- app/test-acl/main.c | 17 +++ app/test/test_acl.c | 194 +++++++++++++++++++++++++++++++++++ app/test/test_acl.h | 59 +++++++++++ doc/guides/rel_notes/deprecation.rst | 4 - doc/guides/rel_notes/release_2_2.rst | 4 +- examples/l3fwd-acl/main.c | 17 +++ lib/librte_acl/Makefile | 2 +- lib/librte_acl/rte_acl.c | 170 ------------------------------ lib/librte_acl/rte_acl.h | 104 ------------------- lib/librte_acl/rte_acl_version.map | 2 - 10 files changed, 291 insertions(+), 282 deletions(-) diff --git a/app/test-acl/main.c b/app/test-acl/main.c index be3d773..72ce83c 100644 --- a/app/test-acl/main.c +++ b/app/test-acl/main.c @@ -162,6 +162,23 @@ enum { NUM_FIELDS_IPV4 }; +/* + * That effectively defines order of IPV4VLAN classifications: + * - PROTO + * - VLAN (TAG and DOMAIN) + * - SRC IP ADDRESS + * - DST IP ADDRESS + * - PORTS (SRC and DST) + */ +enum { + RTE_ACL_IPV4VLAN_PROTO, + RTE_ACL_IPV4VLAN_VLAN, + RTE_ACL_IPV4VLAN_SRC, + RTE_ACL_IPV4VLAN_DST, + RTE_ACL_IPV4VLAN_PORTS, + RTE_ACL_IPV4VLAN_NUM +}; + struct rte_acl_field_def ipv4_defs[NUM_FIELDS_IPV4] = { { .type = RTE_ACL_FIELD_TYPE_BITMASK, diff --git a/app/test/test_acl.c b/app/test/test_acl.c index b4a107d..2b82790 100644 --- a/app/test/test_acl.c +++ b/app/test/test_acl.c @@ -45,6 +45,8 @@ #include "test_acl.h" +#define BIT_SIZEOF(x) (sizeof(x) * CHAR_BIT) + #define LEN RTE_ACL_MAX_CATEGORIES RTE_ACL_RULE_DEF(acl_ipv4vlan_rule, RTE_ACL_IPV4VLAN_NUM_FIELDS); @@ -100,6 +102,198 @@ bswap_test_data(struct ipv4_7tuple *data, int len, int to_be) } } +static int +acl_ipv4vlan_check_rule(const struct rte_acl_ipv4vlan_rule *rule) +{ + if (rule->src_port_low > rule->src_port_high || + rule->dst_port_low > rule->dst_port_high || + rule->src_mask_len > BIT_SIZEOF(rule->src_addr) || + rule->dst_mask_len > BIT_SIZEOF(rule->dst_addr)) + return -EINVAL; + return 0; +} + +static void +acl_ipv4vlan_convert_rule(const struct rte_acl_ipv4vlan_rule *ri, + struct acl_ipv4vlan_rule *ro) +{ + ro->data = ri->data; + + ro->field[RTE_ACL_IPV4VLAN_PROTO_FIELD].value.u8 = ri->proto; + ro->field[RTE_ACL_IPV4VLAN_VLAN1_FIELD].value.u16 = ri->vlan; + ro->field[RTE_ACL_IPV4VLAN_VLAN2_FIELD].value.u16 = ri->domain; + ro->field[RTE_ACL_IPV4VLAN_SRC_FIELD].value.u32 = ri->src_addr; + ro->field[RTE_ACL_IPV4VLAN_DST_FIELD].value.u32 = ri->dst_addr; + ro->field[RTE_ACL_IPV4VLAN_SRCP_FIELD].value.u16 = ri->src_port_low; + ro->field[RTE_ACL_IPV4VLAN_DSTP_FIELD].value.u16 = ri->dst_port_low; + + ro->field[RTE_ACL_IPV4VLAN_PROTO_FIELD].mask_range.u8 = ri->proto_mask; + ro->field[RTE_ACL_IPV4VLAN_VLAN1_FIELD].mask_range.u16 = ri->vlan_mask; + ro->field[RTE_ACL_IPV4VLAN_VLAN2_FIELD].mask_range.u16 = + ri->domain_mask; + ro->field[RTE_ACL_IPV4VLAN_SRC_FIELD].mask_range.u32 = + ri->src_mask_len; + ro->field[RTE_ACL_IPV4VLAN_DST_FIELD].mask_range.u32 = ri->dst_mask_len; + ro->field[RTE_ACL_IPV4VLAN_SRCP_FIELD].mask_range.u16 = + ri->src_port_high; + ro->field[RTE_ACL_IPV4VLAN_DSTP_FIELD].mask_range.u16 = + ri->dst_port_high; +} + +/* + * Add ipv4vlan rules to an existing ACL context. + * This function is not multi-thread safe. + * + * @param ctx + * ACL context to add patterns to. + * @param rules + * Array of rules to add to the ACL context. + * Note that all fields in rte_acl_ipv4vlan_rule structures are expected + * to be in host byte order. + * @param num + * Number of elements in the input array of rules. + * @return + * - -ENOMEM if there is no space in the ACL context for these rules. + * - -EINVAL if the parameters are invalid. + * - Zero if operation completed successfully. + */ +static int +rte_acl_ipv4vlan_add_rules(struct rte_acl_ctx *ctx, + const struct rte_acl_ipv4vlan_rule *rules, + uint32_t num) +{ + int32_t rc; + uint32_t i; + struct acl_ipv4vlan_rule rv; + + if (ctx == NULL || rules == NULL) + return -EINVAL; + + /* check input rules. */ + for (i = 0; i != num; i++) { + rc = acl_ipv4vlan_check_rule(rules + i); + if (rc != 0) { + RTE_LOG(ERR, ACL, "%s: rule #%u is invalid\n", + __func__, i + 1); + return rc; + } + } + + /* perform conversion to the internal format and add to the context. */ + for (i = 0, rc = 0; i != num && rc == 0; i++) { + acl_ipv4vlan_convert_rule(rules + i, &rv); + rc = rte_acl_add_rules(ctx, (struct rte_acl_rule *)&rv, 1); + } + + return rc; +} + +static void +acl_ipv4vlan_config(struct rte_acl_config *cfg, + const uint32_t layout[RTE_ACL_IPV4VLAN_NUM], + uint32_t num_categories) +{ + static const struct rte_acl_field_def + ipv4_defs[RTE_ACL_IPV4VLAN_NUM_FIELDS] = { + { + .type = RTE_ACL_FIELD_TYPE_BITMASK, + .size = sizeof(uint8_t), + .field_index = RTE_ACL_IPV4VLAN_PROTO_FIELD, + .input_index = RTE_ACL_IPV4VLAN_PROTO, + }, + { + .type = RTE_ACL_FIELD_TYPE_BITMASK, + .size = sizeof(uint16_t), + .field_index = RTE_ACL_IPV4VLAN_VLAN1_FIELD, + .input_index = RTE_ACL_IPV4VLAN_VLAN, + }, + { + .type = RTE_ACL_FIELD_TYPE_BITMASK, + .size = sizeof(uint16_t), + .field_index = RTE_ACL_IPV4VLAN_VLAN2_FIELD, + .input_index = RTE_ACL_IPV4VLAN_VLAN, + }, + { + .type = RTE_ACL_FIELD_TYPE_MASK, + .size = sizeof(uint32_t), + .field_index = RTE_ACL_IPV4VLAN_SRC_FIELD, + .input_index = RTE_ACL_IPV4VLAN_SRC, + }, + { + .type = RTE_ACL_FIELD_TYPE_MASK, + .size = sizeof(uint32_t), + .field_index = RTE_ACL_IPV4VLAN_DST_FIELD, + .input_index = RTE_ACL_IPV4VLAN_DST, + }, + { + .type = RTE_ACL_FIELD_TYPE_RANGE, + .size = sizeof(uint16_t), + .field_index = RTE_ACL_IPV4VLAN_SRCP_FIELD, + .input_index = RTE_ACL_IPV4VLAN_PORTS, + }, + { + .type = RTE_ACL_FIELD_TYPE_RANGE, + .size = sizeof(uint16_t), + .field_index = RTE_ACL_IPV4VLAN_DSTP_FIELD, + .input_index = RTE_ACL_IPV4VLAN_PORTS, + }, + }; + + memcpy(&cfg->defs, ipv4_defs, sizeof(ipv4_defs)); + cfg->num_fields = RTE_DIM(ipv4_defs); + + cfg->defs[RTE_ACL_IPV4VLAN_PROTO_FIELD].offset = + layout[RTE_ACL_IPV4VLAN_PROTO]; + cfg->defs[RTE_ACL_IPV4VLAN_VLAN1_FIELD].offset = + layout[RTE_ACL_IPV4VLAN_VLAN]; + cfg->defs[RTE_ACL_IPV4VLAN_VLAN2_FIELD].offset = + layout[RTE_ACL_IPV4VLAN_VLAN] + + cfg->defs[RTE_ACL_IPV4VLAN_VLAN1_FIELD].size; + cfg->defs[RTE_ACL_IPV4VLAN_SRC_FIELD].offset = + layout[RTE_ACL_IPV4VLAN_SRC]; + cfg->defs[RTE_ACL_IPV4VLAN_DST_FIELD].offset = + layout[RTE_ACL_IPV4VLAN_DST]; + cfg->defs[RTE_ACL_IPV4VLAN_SRCP_FIELD].offset = + layout[RTE_ACL_IPV4VLAN_PORTS]; + cfg->defs[RTE_ACL_IPV4VLAN_DSTP_FIELD].offset = + layout[RTE_ACL_IPV4VLAN_PORTS] + + cfg->defs[RTE_ACL_IPV4VLAN_SRCP_FIELD].size; + + cfg->num_categories = num_categories; +} + +/* + * Analyze set of ipv4vlan rules and build required internal + * run-time structures. + * This function is not multi-thread safe. + * + * @param ctx + * ACL context to build. + * @param layout + * Layout of input data to search through. + * @param num_categories + * Maximum number of categories to use in that build. + * @return + * - -ENOMEM if couldn't allocate enough memory. + * - -EINVAL if the parameters are invalid. + * - Negative error code if operation failed. + * - Zero if operation completed successfully. + */ +static int +rte_acl_ipv4vlan_build(struct rte_acl_ctx *ctx, + const uint32_t layout[RTE_ACL_IPV4VLAN_NUM], + uint32_t num_categories) +{ + struct rte_acl_config cfg; + + if (ctx == NULL || layout == NULL) + return -EINVAL; + + memset(&cfg, 0, sizeof(cfg)); + acl_ipv4vlan_config(&cfg, layout, num_categories); + return rte_acl_build(ctx, &cfg); +} + /* * Test scalar and SSE ACL lookup. */ diff --git a/app/test/test_acl.h b/app/test/test_acl.h index 9813569..421f310 100644 --- a/app/test/test_acl.h +++ b/app/test/test_acl.h @@ -46,6 +46,65 @@ struct ipv4_7tuple { uint32_t deny; }; +/** + * Legacy support for 7-tuple IPv4 and VLAN rule. + * This structure and corresponding API is deprecated. + */ +struct rte_acl_ipv4vlan_rule { + struct rte_acl_rule_data data; /**< Miscellaneous data for the rule. */ + uint8_t proto; /**< IPv4 protocol ID. */ + uint8_t proto_mask; /**< IPv4 protocol ID mask. */ + uint16_t vlan; /**< VLAN ID. */ + uint16_t vlan_mask; /**< VLAN ID mask. */ + uint16_t domain; /**< VLAN domain. */ + uint16_t domain_mask; /**< VLAN domain mask. */ + uint32_t src_addr; /**< IPv4 source address. */ + uint32_t src_mask_len; /**< IPv4 source address mask. */ + uint32_t dst_addr; /**< IPv4 destination address. */ + uint32_t dst_mask_len; /**< IPv4 destination address mask. */ + uint16_t src_port_low; /**< L4 source port low. */ + uint16_t src_port_high; /**< L4 source port high. */ + uint16_t dst_port_low; /**< L4 destination port low. */ + uint16_t dst_port_high; /**< L4 destination port high. */ +}; + +/** + * Specifies fields layout inside rte_acl_rule for rte_acl_ipv4vlan_rule. + */ +enum { + RTE_ACL_IPV4VLAN_PROTO_FIELD, + RTE_ACL_IPV4VLAN_VLAN1_FIELD, + RTE_ACL_IPV4VLAN_VLAN2_FIELD, + RTE_ACL_IPV4VLAN_SRC_FIELD, + RTE_ACL_IPV4VLAN_DST_FIELD, + RTE_ACL_IPV4VLAN_SRCP_FIELD, + RTE_ACL_IPV4VLAN_DSTP_FIELD, + RTE_ACL_IPV4VLAN_NUM_FIELDS +}; + +/** + * Macro to define rule size for rte_acl_ipv4vlan_rule. + */ +#define RTE_ACL_IPV4VLAN_RULE_SZ \ + RTE_ACL_RULE_SZ(RTE_ACL_IPV4VLAN_NUM_FIELDS) + +/* + * That effectively defines order of IPV4VLAN classifications: + * - PROTO + * - VLAN (TAG and DOMAIN) + * - SRC IP ADDRESS + * - DST IP ADDRESS + * - PORTS (SRC and DST) + */ +enum { + RTE_ACL_IPV4VLAN_PROTO, + RTE_ACL_IPV4VLAN_VLAN, + RTE_ACL_IPV4VLAN_SRC, + RTE_ACL_IPV4VLAN_DST, + RTE_ACL_IPV4VLAN_PORTS, + RTE_ACL_IPV4VLAN_NUM +}; + /* rules for invalid layout test */ struct rte_acl_ipv4vlan_rule invalid_layout_rules[] = { /* test src and dst address */ diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index c40764a..e7e213c 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -59,10 +59,6 @@ Deprecation Notices * The scheduler statistics structure will change to allow keeping track of RED actions. -* librte_acl: The structure rte_acl_ipv4vlan_rule is deprecated and should - be removed as well as the associated functions rte_acl_ipv4vlan_add_rules - and rte_acl_ipv4vlan_build. - * librte_cfgfile: In order to allow for longer names and values, the value of macros CFG_NAME_LEN and CFG_NAME_VAL will be increased. Most likely, the new values will be 64 and 256, respectively. diff --git a/doc/guides/rel_notes/release_2_2.rst b/doc/guides/rel_notes/release_2_2.rst index 2a238c5..6e73092 100644 --- a/doc/guides/rel_notes/release_2_2.rst +++ b/doc/guides/rel_notes/release_2_2.rst @@ -19,6 +19,8 @@ API Changes * The function rte_eal_pci_close_one() is removed. It was replaced by rte_eal_pci_detach(). +* The deprecated ACL API ipv4vlan is removed. + ABI Changes ----------- @@ -45,7 +47,7 @@ The libraries prepended with a plus sign were incremented in this version. .. code-block:: diff + libethdev.so.2 - librte_acl.so.1 + + librte_acl.so.2 librte_cfgfile.so.1 librte_cmdline.so.1 librte_distributor.so.1 diff --git a/examples/l3fwd-acl/main.c b/examples/l3fwd-acl/main.c index f612671..f676d14 100644 --- a/examples/l3fwd-acl/main.c +++ b/examples/l3fwd-acl/main.c @@ -261,6 +261,23 @@ enum { NUM_FIELDS_IPV4 }; +/* + * That effectively defines order of IPV4VLAN classifications: + * - PROTO + * - VLAN (TAG and DOMAIN) + * - SRC IP ADDRESS + * - DST IP ADDRESS + * - PORTS (SRC and DST) + */ +enum { + RTE_ACL_IPV4VLAN_PROTO, + RTE_ACL_IPV4VLAN_VLAN, + RTE_ACL_IPV4VLAN_SRC, + RTE_ACL_IPV4VLAN_DST, + RTE_ACL_IPV4VLAN_PORTS, + RTE_ACL_IPV4VLAN_NUM +}; + struct rte_acl_field_def ipv4_defs[NUM_FIELDS_IPV4] = { { .type = RTE_ACL_FIELD_TYPE_BITMASK, diff --git a/lib/librte_acl/Makefile b/lib/librte_acl/Makefile index 46acc2b..7a1cf8a 100644 --- a/lib/librte_acl/Makefile +++ b/lib/librte_acl/Makefile @@ -39,7 +39,7 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) EXPORT_MAP := rte_acl_version.map -LIBABIVER := 1 +LIBABIVER := 2 # all source are stored in SRCS-y SRCS-$(CONFIG_RTE_LIBRTE_ACL) += tb_mem.c diff --git a/lib/librte_acl/rte_acl.c b/lib/librte_acl/rte_acl.c index a54d531..d60219f 100644 --- a/lib/librte_acl/rte_acl.c +++ b/lib/librte_acl/rte_acl.c @@ -34,8 +34,6 @@ #include <rte_acl.h> #include "acl.h" -#define BIT_SIZEOF(x) (sizeof(x) * CHAR_BIT) - TAILQ_HEAD(rte_acl_list, rte_tailq_entry); static struct rte_tailq_elem rte_acl_tailq = { @@ -365,171 +363,3 @@ rte_acl_list_dump(void) } rte_rwlock_read_unlock(RTE_EAL_TAILQ_RWLOCK); } - -/* - * Support for legacy ipv4vlan rules. - */ - -RTE_ACL_RULE_DEF(acl_ipv4vlan_rule, RTE_ACL_IPV4VLAN_NUM_FIELDS); - -static int -acl_ipv4vlan_check_rule(const struct rte_acl_ipv4vlan_rule *rule) -{ - if (rule->src_port_low > rule->src_port_high || - rule->dst_port_low > rule->dst_port_high || - rule->src_mask_len > BIT_SIZEOF(rule->src_addr) || - rule->dst_mask_len > BIT_SIZEOF(rule->dst_addr)) - return -EINVAL; - - return acl_check_rule(&rule->data); -} - -static void -acl_ipv4vlan_convert_rule(const struct rte_acl_ipv4vlan_rule *ri, - struct acl_ipv4vlan_rule *ro) -{ - ro->data = ri->data; - - ro->field[RTE_ACL_IPV4VLAN_PROTO_FIELD].value.u8 = ri->proto; - ro->field[RTE_ACL_IPV4VLAN_VLAN1_FIELD].value.u16 = ri->vlan; - ro->field[RTE_ACL_IPV4VLAN_VLAN2_FIELD].value.u16 = ri->domain; - ro->field[RTE_ACL_IPV4VLAN_SRC_FIELD].value.u32 = ri->src_addr; - ro->field[RTE_ACL_IPV4VLAN_DST_FIELD].value.u32 = ri->dst_addr; - ro->field[RTE_ACL_IPV4VLAN_SRCP_FIELD].value.u16 = ri->src_port_low; - ro->field[RTE_ACL_IPV4VLAN_DSTP_FIELD].value.u16 = ri->dst_port_low; - - ro->field[RTE_ACL_IPV4VLAN_PROTO_FIELD].mask_range.u8 = ri->proto_mask; - ro->field[RTE_ACL_IPV4VLAN_VLAN1_FIELD].mask_range.u16 = ri->vlan_mask; - ro->field[RTE_ACL_IPV4VLAN_VLAN2_FIELD].mask_range.u16 = - ri->domain_mask; - ro->field[RTE_ACL_IPV4VLAN_SRC_FIELD].mask_range.u32 = - ri->src_mask_len; - ro->field[RTE_ACL_IPV4VLAN_DST_FIELD].mask_range.u32 = ri->dst_mask_len; - ro->field[RTE_ACL_IPV4VLAN_SRCP_FIELD].mask_range.u16 = - ri->src_port_high; - ro->field[RTE_ACL_IPV4VLAN_DSTP_FIELD].mask_range.u16 = - ri->dst_port_high; -} - -int -rte_acl_ipv4vlan_add_rules(struct rte_acl_ctx *ctx, - const struct rte_acl_ipv4vlan_rule *rules, - uint32_t num) -{ - int32_t rc; - uint32_t i; - struct acl_ipv4vlan_rule rv; - - if (ctx == NULL || rules == NULL || ctx->rule_sz != sizeof(rv)) - return -EINVAL; - - /* check input rules. */ - for (i = 0; i != num; i++) { - rc = acl_ipv4vlan_check_rule(rules + i); - if (rc != 0) { - RTE_LOG(ERR, ACL, "%s(%s): rule #%u is invalid\n", - __func__, ctx->name, i + 1); - return rc; - } - } - - if (num + ctx->num_rules > ctx->max_rules) - return -ENOMEM; - - /* perform conversion to the internal format and add to the context. */ - for (i = 0, rc = 0; i != num && rc == 0; i++) { - acl_ipv4vlan_convert_rule(rules + i, &rv); - rc = acl_add_rules(ctx, &rv, 1); - } - - return rc; -} - -static void -acl_ipv4vlan_config(struct rte_acl_config *cfg, - const uint32_t layout[RTE_ACL_IPV4VLAN_NUM], - uint32_t num_categories) -{ - static const struct rte_acl_field_def - ipv4_defs[RTE_ACL_IPV4VLAN_NUM_FIELDS] = { - { - .type = RTE_ACL_FIELD_TYPE_BITMASK, - .size = sizeof(uint8_t), - .field_index = RTE_ACL_IPV4VLAN_PROTO_FIELD, - .input_index = RTE_ACL_IPV4VLAN_PROTO, - }, - { - .type = RTE_ACL_FIELD_TYPE_BITMASK, - .size = sizeof(uint16_t), - .field_index = RTE_ACL_IPV4VLAN_VLAN1_FIELD, - .input_index = RTE_ACL_IPV4VLAN_VLAN, - }, - { - .type = RTE_ACL_FIELD_TYPE_BITMASK, - .size = sizeof(uint16_t), - .field_index = RTE_ACL_IPV4VLAN_VLAN2_FIELD, - .input_index = RTE_ACL_IPV4VLAN_VLAN, - }, - { - .type = RTE_ACL_FIELD_TYPE_MASK, - .size = sizeof(uint32_t), - .field_index = RTE_ACL_IPV4VLAN_SRC_FIELD, - .input_index = RTE_ACL_IPV4VLAN_SRC, - }, - { - .type = RTE_ACL_FIELD_TYPE_MASK, - .size = sizeof(uint32_t), - .field_index = RTE_ACL_IPV4VLAN_DST_FIELD, - .input_index = RTE_ACL_IPV4VLAN_DST, - }, - { - .type = RTE_ACL_FIELD_TYPE_RANGE, - .size = sizeof(uint16_t), - .field_index = RTE_ACL_IPV4VLAN_SRCP_FIELD, - .input_index = RTE_ACL_IPV4VLAN_PORTS, - }, - { - .type = RTE_ACL_FIELD_TYPE_RANGE, - .size = sizeof(uint16_t), - .field_index = RTE_ACL_IPV4VLAN_DSTP_FIELD, - .input_index = RTE_ACL_IPV4VLAN_PORTS, - }, - }; - - memcpy(&cfg->defs, ipv4_defs, sizeof(ipv4_defs)); - cfg->num_fields = RTE_DIM(ipv4_defs); - - cfg->defs[RTE_ACL_IPV4VLAN_PROTO_FIELD].offset = - layout[RTE_ACL_IPV4VLAN_PROTO]; - cfg->defs[RTE_ACL_IPV4VLAN_VLAN1_FIELD].offset = - layout[RTE_ACL_IPV4VLAN_VLAN]; - cfg->defs[RTE_ACL_IPV4VLAN_VLAN2_FIELD].offset = - layout[RTE_ACL_IPV4VLAN_VLAN] + - cfg->defs[RTE_ACL_IPV4VLAN_VLAN1_FIELD].size; - cfg->defs[RTE_ACL_IPV4VLAN_SRC_FIELD].offset = - layout[RTE_ACL_IPV4VLAN_SRC]; - cfg->defs[RTE_ACL_IPV4VLAN_DST_FIELD].offset = - layout[RTE_ACL_IPV4VLAN_DST]; - cfg->defs[RTE_ACL_IPV4VLAN_SRCP_FIELD].offset = - layout[RTE_ACL_IPV4VLAN_PORTS]; - cfg->defs[RTE_ACL_IPV4VLAN_DSTP_FIELD].offset = - layout[RTE_ACL_IPV4VLAN_PORTS] + - cfg->defs[RTE_ACL_IPV4VLAN_SRCP_FIELD].size; - - cfg->num_categories = num_categories; -} - -int -rte_acl_ipv4vlan_build(struct rte_acl_ctx *ctx, - const uint32_t layout[RTE_ACL_IPV4VLAN_NUM], - uint32_t num_categories) -{ - struct rte_acl_config cfg; - - if (ctx == NULL || layout == NULL) - return -EINVAL; - - memset(&cfg, 0, sizeof(cfg)); - acl_ipv4vlan_config(&cfg, layout, num_categories); - return rte_acl_build(ctx, &cfg); -} diff --git a/lib/librte_acl/rte_acl.h b/lib/librte_acl/rte_acl.h index bd8f892..98ef2fc 100644 --- a/lib/librte_acl/rte_acl.h +++ b/lib/librte_acl/rte_acl.h @@ -380,110 +380,6 @@ rte_acl_dump(const struct rte_acl_ctx *ctx); void rte_acl_list_dump(void); -/** - * Legacy support for 7-tuple IPv4 and VLAN rule. - * This structure and corresponding API is deprecated. - */ -struct rte_acl_ipv4vlan_rule { - struct rte_acl_rule_data data; /**< Miscellaneous data for the rule. */ - uint8_t proto; /**< IPv4 protocol ID. */ - uint8_t proto_mask; /**< IPv4 protocol ID mask. */ - uint16_t vlan; /**< VLAN ID. */ - uint16_t vlan_mask; /**< VLAN ID mask. */ - uint16_t domain; /**< VLAN domain. */ - uint16_t domain_mask; /**< VLAN domain mask. */ - uint32_t src_addr; /**< IPv4 source address. */ - uint32_t src_mask_len; /**< IPv4 source address mask. */ - uint32_t dst_addr; /**< IPv4 destination address. */ - uint32_t dst_mask_len; /**< IPv4 destination address mask. */ - uint16_t src_port_low; /**< L4 source port low. */ - uint16_t src_port_high; /**< L4 source port high. */ - uint16_t dst_port_low; /**< L4 destination port low. */ - uint16_t dst_port_high; /**< L4 destination port high. */ -}; - -/** - * Specifies fields layout inside rte_acl_rule for rte_acl_ipv4vlan_rule. - */ -enum { - RTE_ACL_IPV4VLAN_PROTO_FIELD, - RTE_ACL_IPV4VLAN_VLAN1_FIELD, - RTE_ACL_IPV4VLAN_VLAN2_FIELD, - RTE_ACL_IPV4VLAN_SRC_FIELD, - RTE_ACL_IPV4VLAN_DST_FIELD, - RTE_ACL_IPV4VLAN_SRCP_FIELD, - RTE_ACL_IPV4VLAN_DSTP_FIELD, - RTE_ACL_IPV4VLAN_NUM_FIELDS -}; - -/** - * Macro to define rule size for rte_acl_ipv4vlan_rule. - */ -#define RTE_ACL_IPV4VLAN_RULE_SZ \ - RTE_ACL_RULE_SZ(RTE_ACL_IPV4VLAN_NUM_FIELDS) - -/* - * That effectively defines order of IPV4VLAN classifications: - * - PROTO - * - VLAN (TAG and DOMAIN) - * - SRC IP ADDRESS - * - DST IP ADDRESS - * - PORTS (SRC and DST) - */ -enum { - RTE_ACL_IPV4VLAN_PROTO, - RTE_ACL_IPV4VLAN_VLAN, - RTE_ACL_IPV4VLAN_SRC, - RTE_ACL_IPV4VLAN_DST, - RTE_ACL_IPV4VLAN_PORTS, - RTE_ACL_IPV4VLAN_NUM -}; - -/** - * Add ipv4vlan rules to an existing ACL context. - * This function is not multi-thread safe. - * - * @param ctx - * ACL context to add patterns to. - * @param rules - * Array of rules to add to the ACL context. - * Note that all fields in rte_acl_ipv4vlan_rule structures are expected - * to be in host byte order. - * @param num - * Number of elements in the input array of rules. - * @return - * - -ENOMEM if there is no space in the ACL context for these rules. - * - -EINVAL if the parameters are invalid. - * - Zero if operation completed successfully. - */ -int -rte_acl_ipv4vlan_add_rules(struct rte_acl_ctx *ctx, - const struct rte_acl_ipv4vlan_rule *rules, - uint32_t num); - -/** - * Analyze set of ipv4vlan rules and build required internal - * run-time structures. - * This function is not multi-thread safe. - * - * @param ctx - * ACL context to build. - * @param layout - * Layout of input data to search through. - * @param num_categories - * Maximum number of categories to use in that build. - * @return - * - -ENOMEM if couldn't allocate enough memory. - * - -EINVAL if the parameters are invalid. - * - Negative error code if operation failed. - * - Zero if operation completed successfully. - */ -int -rte_acl_ipv4vlan_build(struct rte_acl_ctx *ctx, - const uint32_t layout[RTE_ACL_IPV4VLAN_NUM], - uint32_t num_categories); - - #ifdef __cplusplus } #endif diff --git a/lib/librte_acl/rte_acl_version.map b/lib/librte_acl/rte_acl_version.map index 3f9c810..b09370a 100644 --- a/lib/librte_acl/rte_acl_version.map +++ b/lib/librte_acl/rte_acl_version.map @@ -10,8 +10,6 @@ DPDK_2.0 { rte_acl_dump; rte_acl_find_existing; rte_acl_free; - rte_acl_ipv4vlan_add_rules; - rte_acl_ipv4vlan_build; rte_acl_list_dump; rte_acl_reset; rte_acl_reset_rules; -- 2.5.1 ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [dpdk-dev] [PATCH v2 08/10] acl: remove old API 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 08/10] acl: remove old API Thomas Monjalon @ 2015-09-02 15:59 ` Ananyev, Konstantin 0 siblings, 0 replies; 29+ messages in thread From: Ananyev, Konstantin @ 2015-09-02 15:59 UTC (permalink / raw) To: Thomas Monjalon, dev > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon > Sent: Wednesday, September 02, 2015 2:17 PM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH v2 08/10] acl: remove old API > > The functions and structures are moved to app/test in order to keep > existing unit tests. Some minor changes were done in these functions > because of library scope restrictions. > An enum is also copied in two other applications to keep existing code. > The library version is incremented. > > Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> > Acked-by: Stephen Hemminger <stephen@networkplumber.org> > Acked-by: Neil Horman <nhorman@tuxdriver.com> > --- Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com> > app/test-acl/main.c | 17 +++ > app/test/test_acl.c | 194 +++++++++++++++++++++++++++++++++++ > app/test/test_acl.h | 59 +++++++++++ > doc/guides/rel_notes/deprecation.rst | 4 - > doc/guides/rel_notes/release_2_2.rst | 4 +- > examples/l3fwd-acl/main.c | 17 +++ > lib/librte_acl/Makefile | 2 +- > lib/librte_acl/rte_acl.c | 170 ------------------------------ > lib/librte_acl/rte_acl.h | 104 ------------------- > lib/librte_acl/rte_acl_version.map | 2 - > 10 files changed, 291 insertions(+), 282 deletions(-) > ^ permalink raw reply [flat|nested] 29+ messages in thread
* [dpdk-dev] [PATCH v2 09/10] kni: remove deprecated functions 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 00/10] " Thomas Monjalon ` (7 preceding siblings ...) 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 08/10] acl: remove old API Thomas Monjalon @ 2015-09-02 13:16 ` Thomas Monjalon 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 10/10] ring: " Thomas Monjalon 2015-09-04 7:50 ` [dpdk-dev] [PATCH v2 00/10] clean deprecated code Thomas Monjalon 10 siblings, 0 replies; 29+ messages in thread From: Thomas Monjalon @ 2015-09-02 13:16 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger From: Stephen Hemminger <shemming@brocade.com> These functions were tagged as deprecated in 2.0 so they can be removed in 2.2. The library version is incremented. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Helin Zhang <helin.zhang@intel.com> [Thomas: update doc and version] Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> --- app/test/Makefile | 6 --- app/test/test_kni.c | 36 --------------- doc/guides/prog_guide/kernel_nic_interface.rst | 2 - doc/guides/rel_notes/deprecation.rst | 3 -- doc/guides/rel_notes/release_2_2.rst | 5 ++- doc/guides/sample_app_ug/kernel_nic_interface.rst | 9 ---- lib/librte_kni/Makefile | 2 +- lib/librte_kni/rte_kni.c | 51 --------------------- lib/librte_kni/rte_kni.h | 54 ----------------------- lib/librte_kni/rte_kni_version.map | 3 -- 10 files changed, 5 insertions(+), 166 deletions(-) diff --git a/app/test/Makefile b/app/test/Makefile index e7f148f..7778e1c 100644 --- a/app/test/Makefile +++ b/app/test/Makefile @@ -146,12 +146,6 @@ SRCS-$(CONFIG_RTE_LIBRTE_KVARGS) += test_kvargs.c CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) -# Disable warnings of deprecated-declarations in test_kni.c -ifeq ($(CC), icc) -CFLAGS_test_kni.o += -wd1478 -else -CFLAGS_test_kni.o += -Wno-deprecated-declarations -endif CFLAGS += -D_GNU_SOURCE # Disable VTA for memcpy test diff --git a/app/test/test_kni.c b/app/test/test_kni.c index 506b543..9dad988 100644 --- a/app/test/test_kni.c +++ b/app/test/test_kni.c @@ -398,17 +398,6 @@ test_kni_processing(uint8_t port_id, struct rte_mempool *mp) printf("fail to create kni\n"); return -1; } - if (rte_kni_get_port_id(kni) != port_id) { - printf("fail to get port id\n"); - ret = -1; - goto fail_kni; - } - - if (rte_kni_info_get(RTE_MAX_ETHPORTS)) { - printf("Unexpectedly get a KNI successfully\n"); - ret = -1; - goto fail_kni; - } test_kni_ctx = kni; test_kni_processing_flag = 0; @@ -591,14 +580,6 @@ test_kni(void) goto fail; } - /* test of getting port id according to NULL kni context */ - if (rte_kni_get_port_id(NULL) < RTE_MAX_ETHPORTS) { - ret = -1; - printf("unexpectedly get port id successfully by NULL kni " - "pointer\n"); - goto fail; - } - /* test of releasing NULL kni context */ ret = rte_kni_release(NULL); if (ret == 0) { @@ -645,23 +626,6 @@ test_kni(void) goto fail; } - /* test the interface of creating a KNI, for backward compatibility */ - memset(&ops, 0, sizeof(ops)); - ops = kni_ops; - kni = rte_kni_create(port_id, MAX_PACKET_SZ, mp, &ops); - if (!kni) { - ret = -1; - printf("Fail to create a KNI device for port %d\n", port_id); - goto fail; - } - - ret = rte_kni_release(kni); - if (ret < 0) { - printf("Fail to release a KNI device\n"); - goto fail; - } - - ret = 0; fail: rte_eth_dev_stop(port_id); diff --git a/doc/guides/prog_guide/kernel_nic_interface.rst b/doc/guides/prog_guide/kernel_nic_interface.rst index 713d30b..0d91476 100644 --- a/doc/guides/prog_guide/kernel_nic_interface.rst +++ b/doc/guides/prog_guide/kernel_nic_interface.rst @@ -100,8 +100,6 @@ Refer to rte_kni_common.h in the DPDK source code for more details. The physical addresses will be re-mapped into the kernel address space and stored in separate KNI contexts. -Once KNI interfaces are created, the KNI context information can be queried by calling the rte_kni_info_get() function. - The KNI interfaces can be deleted by a DPDK application dynamically after being created. Furthermore, all those KNI interfaces not deleted will be deleted on the release operation of the miscellaneous device (when the DPDK application is closed). diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index e7e213c..04819fa 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -40,9 +40,6 @@ Deprecation Notices the tunnel type, TNI/VNI, inner MAC and inner VLAN are monitored. The release 2.2 will contain these changes without backwards compatibility. -* librte_kni: Functions based on port id are deprecated for a long time and - should be removed (rte_kni_create, rte_kni_get_port_id and rte_kni_info_get). - * librte_pmd_ring: The deprecated functions rte_eth_ring_pair_create and rte_eth_ring_pair_attach should be removed. diff --git a/doc/guides/rel_notes/release_2_2.rst b/doc/guides/rel_notes/release_2_2.rst index 6e73092..6dcfe88 100644 --- a/doc/guides/rel_notes/release_2_2.rst +++ b/doc/guides/rel_notes/release_2_2.rst @@ -21,6 +21,9 @@ API Changes * The deprecated ACL API ipv4vlan is removed. +* The deprecated KNI functions are removed: + rte_kni_create(), rte_kni_get_port_id() and rte_kni_info_get(). + ABI Changes ----------- @@ -56,7 +59,7 @@ The libraries prepended with a plus sign were incremented in this version. librte_ip_frag.so.1 librte_ivshmem.so.1 librte_jobstats.so.1 - librte_kni.so.1 + + librte_kni.so.2 librte_kvargs.so.1 + librte_lpm.so.2 + librte_mbuf.so.2 diff --git a/doc/guides/sample_app_ug/kernel_nic_interface.rst b/doc/guides/sample_app_ug/kernel_nic_interface.rst index 02dde59..f1deca9 100644 --- a/doc/guides/sample_app_ug/kernel_nic_interface.rst +++ b/doc/guides/sample_app_ug/kernel_nic_interface.rst @@ -242,15 +242,6 @@ Setup of mbuf pool, driver and queues is similar to the setup done in the L2 For In addition, one or more kernel NIC interfaces are allocated for each of the configured ports according to the command line parameters. -The code for creating the kernel NIC interface for a specific port is as follows: - -.. code-block:: c - - kni = rte_kni_create(port, MAX_PACKET_SZ, pktmbuf_pool, &kni_ops); - if (kni == NULL) - rte_exit(EXIT_FAILURE, "Fail to create kni dev " - "for port: %d\n", port); - The code for allocating the kernel NIC interfaces for a specific port is as follows: .. code-block:: c diff --git a/lib/librte_kni/Makefile b/lib/librte_kni/Makefile index 7107832..1398164 100644 --- a/lib/librte_kni/Makefile +++ b/lib/librte_kni/Makefile @@ -38,7 +38,7 @@ CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3 -fno-strict-aliasing EXPORT_MAP := rte_kni_version.map -LIBABIVER := 1 +LIBABIVER := 2 # all source are stored in SRCS-y SRCS-$(CONFIG_RTE_LIBRTE_KNI) := rte_kni.c diff --git a/lib/librte_kni/rte_kni.c b/lib/librte_kni/rte_kni.c index 08155db..ea9baf4 100644 --- a/lib/librte_kni/rte_kni.c +++ b/lib/librte_kni/rte_kni.c @@ -311,31 +311,6 @@ kni_fail: max_kni_ifaces); } -/* It is deprecated and just for backward compatibility */ -struct rte_kni * -rte_kni_create(uint8_t port_id, - unsigned mbuf_size, - struct rte_mempool *pktmbuf_pool, - struct rte_kni_ops *ops) -{ - struct rte_kni_conf conf; - struct rte_eth_dev_info info; - - memset(&info, 0, sizeof(info)); - memset(&conf, 0, sizeof(conf)); - rte_eth_dev_info_get(port_id, &info); - - snprintf(conf.name, sizeof(conf.name), "vEth%u", port_id); - conf.addr = info.pci_dev->addr; - conf.id = info.pci_dev->id; - conf.group_id = (uint16_t)port_id; - conf.mbuf_size = mbuf_size; - - /* Save the port id for request handling */ - ops->port_id = port_id; - - return rte_kni_alloc(pktmbuf_pool, &conf, ops); -} struct rte_kni * rte_kni_alloc(struct rte_mempool *pktmbuf_pool, @@ -650,16 +625,6 @@ kni_allocate_mbufs(struct rte_kni *kni) } } -/* It is deprecated and just for backward compatibility */ -uint8_t -rte_kni_get_port_id(struct rte_kni *kni) -{ - if (!kni) - return ~0x0; - - return kni->ops.port_id; -} - struct rte_kni * rte_kni_get(const char *name) { @@ -686,22 +651,6 @@ rte_kni_get_name(const struct rte_kni *kni) return kni->name; } -/* - * It is deprecated and just for backward compatibility. - */ -struct rte_kni * -rte_kni_info_get(uint8_t port_id) -{ - char name[RTE_MEMZONE_NAMESIZE]; - - if (port_id >= RTE_MAX_ETHPORTS) - return NULL; - - snprintf(name, RTE_MEMZONE_NAMESIZE, "vEth%u", port_id); - - return rte_kni_get(name); -} - static enum kni_ops_status kni_check_request_register(struct rte_kni_ops *ops) { diff --git a/lib/librte_kni/rte_kni.h b/lib/librte_kni/rte_kni.h index 52ffdb7..ef9faa9 100644 --- a/lib/librte_kni/rte_kni.h +++ b/lib/librte_kni/rte_kni.h @@ -129,30 +129,6 @@ extern struct rte_kni *rte_kni_alloc(struct rte_mempool *pktmbuf_pool, struct rte_kni_ops *ops); /** - * It create a KNI device for specific port. - * - * Note: It is deprecated and just for backward compatibility. - * - * @param port_id - * Port ID. - * @param mbuf_size - * mbuf size. - * @param pktmbuf_pool - * The mempool for allocting mbufs for packets. - * @param ops - * The pointer to the callbacks for the KNI kernel requests. - * - * @return - * - The pointer to the context of a KNI interface. - * - NULL indicate error. - */ -extern struct rte_kni *rte_kni_create(uint8_t port_id, - unsigned mbuf_size, - struct rte_mempool *pktmbuf_pool, - struct rte_kni_ops *ops) \ - __attribute__ ((deprecated)); - -/** * Release KNI interface according to the context. It will also release the * paired KNI interface in kernel space. All processing on the specific KNI * context need to be stopped before calling this interface. @@ -221,21 +197,6 @@ extern unsigned rte_kni_tx_burst(struct rte_kni *kni, struct rte_mbuf **mbufs, unsigned num); /** - * Get the port id from KNI interface. - * - * Note: It is deprecated and just for backward compatibility. - * - * @param kni - * The KNI interface context. - * - * @return - * On success: The port id. - * On failure: ~0x0 - */ -extern uint8_t rte_kni_get_port_id(struct rte_kni *kni) \ - __attribute__ ((deprecated)); - -/** * Get the KNI context of its name. * * @param name @@ -258,21 +219,6 @@ extern struct rte_kni *rte_kni_get(const char *name); extern const char *rte_kni_get_name(const struct rte_kni *kni); /** - * Get the KNI context of the specific port. - * - * Note: It is deprecated and just for backward compatibility. - * - * @param port_id - * the port id. - * - * @return - * On success: Pointer to KNI interface. - * On failure: NULL - */ -extern struct rte_kni *rte_kni_info_get(uint8_t port_id) \ - __attribute__ ((deprecated)); - -/** * Register KNI request handling for a specified port,and it can * be called by master process or slave process. * diff --git a/lib/librte_kni/rte_kni_version.map b/lib/librte_kni/rte_kni_version.map index a987d31..acd515e 100644 --- a/lib/librte_kni/rte_kni_version.map +++ b/lib/librte_kni/rte_kni_version.map @@ -3,12 +3,9 @@ DPDK_2.0 { rte_kni_alloc; rte_kni_close; - rte_kni_create; rte_kni_get; rte_kni_get_name; - rte_kni_get_port_id; rte_kni_handle_request; - rte_kni_info_get; rte_kni_init; rte_kni_register_handlers; rte_kni_release; -- 2.5.1 ^ permalink raw reply [flat|nested] 29+ messages in thread
* [dpdk-dev] [PATCH v2 10/10] ring: remove deprecated functions 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 00/10] " Thomas Monjalon ` (8 preceding siblings ...) 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 09/10] kni: remove deprecated functions Thomas Monjalon @ 2015-09-02 13:16 ` Thomas Monjalon 2015-09-04 7:50 ` [dpdk-dev] [PATCH v2 00/10] clean deprecated code Thomas Monjalon 10 siblings, 0 replies; 29+ messages in thread From: Thomas Monjalon @ 2015-09-02 13:16 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger From: Stephen Hemminger <shemming@brocade.com> These were deprecated in 2.0 so remove them from 2.2. The library version is incremented. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> --- doc/guides/rel_notes/deprecation.rst | 3 -- doc/guides/rel_notes/release_2_2.rst | 5 ++- drivers/net/ring/Makefile | 2 +- drivers/net/ring/rte_eth_ring.c | 56 ------------------------------- drivers/net/ring/rte_eth_ring.h | 3 -- drivers/net/ring/rte_eth_ring_version.map | 2 -- 6 files changed, 5 insertions(+), 66 deletions(-) diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 04819fa..5f6079b 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -40,9 +40,6 @@ Deprecation Notices the tunnel type, TNI/VNI, inner MAC and inner VLAN are monitored. The release 2.2 will contain these changes without backwards compatibility. -* librte_pmd_ring: The deprecated functions rte_eth_ring_pair_create and - rte_eth_ring_pair_attach should be removed. - * ABI changes are planned for struct virtio_net in order to support vhost-user multiple queues feature. It should be integrated in release 2.2 without backward compatibility. diff --git a/doc/guides/rel_notes/release_2_2.rst b/doc/guides/rel_notes/release_2_2.rst index 6dcfe88..abe57b4 100644 --- a/doc/guides/rel_notes/release_2_2.rst +++ b/doc/guides/rel_notes/release_2_2.rst @@ -24,6 +24,9 @@ API Changes * The deprecated KNI functions are removed: rte_kni_create(), rte_kni_get_port_id() and rte_kni_info_get(). +* The deprecated ring PMD functions are removed: + rte_eth_ring_pair_create() and rte_eth_ring_pair_attach(). + ABI Changes ----------- @@ -67,7 +70,7 @@ The libraries prepended with a plus sign were incremented in this version. librte_meter.so.1 librte_pipeline.so.1 librte_pmd_bond.so.1 - librte_pmd_ring.so.1 + + librte_pmd_ring.so.2 librte_port.so.1 librte_power.so.1 librte_reorder.so.1 diff --git a/drivers/net/ring/Makefile b/drivers/net/ring/Makefile index e442d0b..ae83505 100644 --- a/drivers/net/ring/Makefile +++ b/drivers/net/ring/Makefile @@ -41,7 +41,7 @@ CFLAGS += $(WERROR_FLAGS) EXPORT_MAP := rte_eth_ring_version.map -LIBABIVER := 1 +LIBABIVER := 2 # # all source are stored in SRCS-y diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c index 6fd3d0a..0ba36d5 100644 --- a/drivers/net/ring/rte_eth_ring.c +++ b/drivers/net/ring/rte_eth_ring.c @@ -391,62 +391,6 @@ eth_dev_ring_create(const char *name, const unsigned numa_node, return 0; } - -static int -eth_dev_ring_pair_create(const char *name, const unsigned numa_node, - enum dev_action action) -{ - /* rx and tx are so-called from point of view of first port. - * They are inverted from the point of view of second port - */ - struct rte_ring *rx[RTE_PMD_RING_MAX_RX_RINGS]; - struct rte_ring *tx[RTE_PMD_RING_MAX_TX_RINGS]; - unsigned i; - char rx_rng_name[RTE_RING_NAMESIZE]; - char tx_rng_name[RTE_RING_NAMESIZE]; - unsigned num_rings = RTE_MIN(RTE_PMD_RING_MAX_RX_RINGS, - RTE_PMD_RING_MAX_TX_RINGS); - - for (i = 0; i < num_rings; i++) { - snprintf(rx_rng_name, sizeof(rx_rng_name), "ETH_RX%u_%s", i, name); - rx[i] = (action == DEV_CREATE) ? - rte_ring_create(rx_rng_name, 1024, numa_node, - RING_F_SP_ENQ|RING_F_SC_DEQ) : - rte_ring_lookup(rx_rng_name); - if (rx[i] == NULL) - return -1; - snprintf(tx_rng_name, sizeof(tx_rng_name), "ETH_TX%u_%s", i, name); - tx[i] = (action == DEV_CREATE) ? - rte_ring_create(tx_rng_name, 1024, numa_node, - RING_F_SP_ENQ|RING_F_SC_DEQ): - rte_ring_lookup(tx_rng_name); - if (tx[i] == NULL) - return -1; - } - - if (rte_eth_from_rings(rx_rng_name, rx, num_rings, tx, num_rings, - numa_node) < 0 || - rte_eth_from_rings(tx_rng_name, tx, num_rings, rx, - num_rings, numa_node) < 0) - return -1; - - return 0; -} - -int -rte_eth_ring_pair_create(const char *name, const unsigned numa_node) -{ - RTE_LOG(WARNING, PMD, "rte_eth_ring_pair_create is deprecated\n"); - return eth_dev_ring_pair_create(name, numa_node, DEV_CREATE); -} - -int -rte_eth_ring_pair_attach(const char *name, const unsigned numa_node) -{ - RTE_LOG(WARNING, PMD, "rte_eth_ring_pair_attach is deprecated\n"); - return eth_dev_ring_pair_create(name, numa_node, DEV_ATTACH); -} - struct node_action_pair { char name[PATH_MAX]; unsigned node; diff --git a/drivers/net/ring/rte_eth_ring.h b/drivers/net/ring/rte_eth_ring.h index 2262249..5a69bff 100644 --- a/drivers/net/ring/rte_eth_ring.h +++ b/drivers/net/ring/rte_eth_ring.h @@ -65,9 +65,6 @@ int rte_eth_from_rings(const char *name, const unsigned nb_tx_queues, const unsigned numa_node); -int rte_eth_ring_pair_create(const char *name, const unsigned numa_node); -int rte_eth_ring_pair_attach(const char *name, const unsigned numa_node); - #ifdef __cplusplus } #endif diff --git a/drivers/net/ring/rte_eth_ring_version.map b/drivers/net/ring/rte_eth_ring_version.map index 8ad107d..0875e25 100644 --- a/drivers/net/ring/rte_eth_ring_version.map +++ b/drivers/net/ring/rte_eth_ring_version.map @@ -2,8 +2,6 @@ DPDK_2.0 { global: rte_eth_from_rings; - rte_eth_ring_pair_attach; - rte_eth_ring_pair_create; local: *; }; -- 2.5.1 ^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: [dpdk-dev] [PATCH v2 00/10] clean deprecated code 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 00/10] " Thomas Monjalon ` (9 preceding siblings ...) 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 10/10] ring: " Thomas Monjalon @ 2015-09-04 7:50 ` Thomas Monjalon 10 siblings, 0 replies; 29+ messages in thread From: Thomas Monjalon @ 2015-09-04 7:50 UTC (permalink / raw) To: dev 2015-09-02 15:16, Thomas Monjalon: > Before starting a new integration cycle (2.2.0-rc0), > the deprecated code is removed. > > The hash library is not cleaned in this patchset and would be > better done by its maintainers. Bruce, Pablo, please check the > file doc/guides/rel_notes/deprecation.rst. > > Changes in v2: > - increment KNI and ring PMD versions > - list library versions in release notes > - list API/ABI changes in release notes > > Stephen Hemminger (2): > kni: remove deprecated functions > ring: remove deprecated functions > > Thomas Monjalon (8): > doc: init next release notes > ethdev: remove Rx interrupt switch > mbuf: remove packet type from offload flags > ethdev: remove SCTP flow entries switch > eal: remove deprecated function > mem: remove dummy malloc library > lpm: remove deprecated field > acl: remove old API Applied ^ permalink raw reply [flat|nested] 29+ messages in thread
end of thread, other threads:[~2015-09-04 7:52 UTC | newest] Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2015-09-01 20:18 [dpdk-dev] [PATCH 0/9] clean deprecated code Thomas Monjalon 2015-09-01 21:30 ` [dpdk-dev] [PATCH 1/9] ethdev: remove Rx interrupt switch Thomas Monjalon 2015-09-01 21:30 ` [dpdk-dev] [PATCH 2/9] mbuf: remove packet type from offload flags Thomas Monjalon 2015-09-01 21:30 ` [dpdk-dev] [PATCH 3/9] ethdev: remove SCTP flow entries switch Thomas Monjalon 2015-09-01 21:30 ` [dpdk-dev] [PATCH 4/9] eal: remove deprecated function Thomas Monjalon 2015-09-01 21:30 ` [dpdk-dev] [PATCH 5/9] mem: remove dummy malloc library Thomas Monjalon 2015-09-01 21:30 ` [dpdk-dev] [PATCH 6/9] lpm: remove deprecated field Thomas Monjalon 2015-09-01 21:31 ` [dpdk-dev] [PATCH 7/9] acl: remove old API Thomas Monjalon 2015-09-01 21:31 ` [dpdk-dev] [PATCH 8/9] kni: remove deprecated functions Thomas Monjalon 2015-09-01 21:31 ` [dpdk-dev] [PATCH 9/9] ring: " Thomas Monjalon 2015-09-01 22:10 ` [dpdk-dev] [PATCH 0/9] clean deprecated code Stephen Hemminger 2015-09-02 10:30 ` Neil Horman 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 00/10] " Thomas Monjalon 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 01/10] doc: init next release notes Thomas Monjalon 2015-09-03 15:39 ` Mcnamara, John 2015-09-03 15:44 ` Mcnamara, John 2015-09-04 7:50 ` Thomas Monjalon 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 02/10] ethdev: remove Rx interrupt switch Thomas Monjalon 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 03/10] mbuf: remove packet type from offload flags Thomas Monjalon 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 04/10] ethdev: remove SCTP flow entries switch Thomas Monjalon 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 05/10] eal: remove deprecated function Thomas Monjalon 2015-09-03 14:29 ` David Marchand 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 06/10] mem: remove dummy malloc library Thomas Monjalon 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 07/10] lpm: remove deprecated field Thomas Monjalon 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 08/10] acl: remove old API Thomas Monjalon 2015-09-02 15:59 ` Ananyev, Konstantin 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 09/10] kni: remove deprecated functions Thomas Monjalon 2015-09-02 13:16 ` [dpdk-dev] [PATCH v2 10/10] ring: " Thomas Monjalon 2015-09-04 7:50 ` [dpdk-dev] [PATCH v2 00/10] clean deprecated code Thomas Monjalon
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).