From 222928b3dd896186af7ea16ca8023e7153a78fb2 Mon Sep 17 00:00:00 2001 From: Jingjing Wu Date: Wed, 11 Feb 2015 15:51:49 +0800 Subject: [PATCH] ethdev: remove old syn filter API Structure rte_syn_filter is removed. Following APIs are removed: - rte_eth_dev_add_syn_filter - rte_eth_dev_remove_syn_filter - rte_eth_dev_get_syn_filter Signed-off-by: Jingjing Wu [Thomas: remove also from version map] --- lib/librte_ether/rte_ethdev.c | 50 ------------------- lib/librte_ether/rte_ethdev.h | 67 -------------------------- lib/librte_ether/rte_ether_version.map | 3 -- 3 files changed, 120 deletions(-) diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index ccff0ef704..b3946331fb 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -3010,56 +3010,6 @@ rte_eth_dev_bypass_wd_reset(uint8_t port_id) } #endif -int -rte_eth_dev_add_syn_filter(uint8_t port_id, - struct rte_syn_filter *filter, uint16_t rx_queue) -{ - struct rte_eth_dev *dev; - - if (port_id >= nb_ports) { - PMD_DEBUG_TRACE("Invalid port_id=%d\n", port_id); - return -ENODEV; - } - - dev = &rte_eth_devices[port_id]; - FUNC_PTR_OR_ERR_RET(*dev->dev_ops->add_syn_filter, -ENOTSUP); - return (*dev->dev_ops->add_syn_filter)(dev, filter, rx_queue); -} - -int -rte_eth_dev_remove_syn_filter(uint8_t port_id) -{ - struct rte_eth_dev *dev; - - if (port_id >= nb_ports) { - PMD_DEBUG_TRACE("Invalid port_id=%d\n", port_id); - return -ENODEV; - } - - dev = &rte_eth_devices[port_id]; - FUNC_PTR_OR_ERR_RET(*dev->dev_ops->remove_syn_filter, -ENOTSUP); - return (*dev->dev_ops->remove_syn_filter)(dev); -} - -int -rte_eth_dev_get_syn_filter(uint8_t port_id, - struct rte_syn_filter *filter, uint16_t *rx_queue) -{ - struct rte_eth_dev *dev; - - if (filter == NULL || rx_queue == NULL) - return -EINVAL; - - if (port_id >= nb_ports) { - PMD_DEBUG_TRACE("Invalid port_id=%d\n", port_id); - return -ENODEV; - } - - dev = &rte_eth_devices[port_id]; - FUNC_PTR_OR_ERR_RET(*dev->dev_ops->get_syn_filter, -ENOTSUP); - return (*dev->dev_ops->get_syn_filter)(dev, filter, rx_queue); -} - int rte_eth_dev_add_2tuple_filter(uint8_t port_id, uint16_t index, struct rte_2tuple_filter *filter, uint16_t rx_queue) diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h index eeffeeea09..feb2e421c8 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -974,14 +974,6 @@ TAILQ_HEAD(rte_eth_dev_cb_list, rte_eth_dev_callback); #define TCP_FIN_FLAG 0x01 #define TCP_FLAG_ALL 0x3F -/** - * A structure used to define an syn filter. - */ -struct rte_syn_filter { - uint8_t hig_pri; /**< 1 means higher pri than 2tuple, 5tupe, - and flex filter, 0 means lower pri. */ -}; - /** * A structure used to define a 2tuple filter. */ @@ -1348,17 +1340,6 @@ typedef int32_t (*bypass_ver_show_t)(struct rte_eth_dev *dev, uint32_t *ver); typedef int32_t (*bypass_wd_reset_t)(struct rte_eth_dev *dev); #endif -typedef int (*eth_add_syn_filter_t)(struct rte_eth_dev *dev, - struct rte_syn_filter *filter, uint16_t rx_queue); -/**< @internal add syn filter rule on an Ethernet device */ - -typedef int (*eth_remove_syn_filter_t)(struct rte_eth_dev *dev); -/**< @internal remove syn filter rule on an Ethernet device */ - -typedef int (*eth_get_syn_filter_t)(struct rte_eth_dev *dev, - struct rte_syn_filter *filter, uint16_t *rx_queue); -/**< @internal Get syn filter rule on an Ethernet device */ - typedef int (*eth_add_2tuple_filter_t)(struct rte_eth_dev *dev, uint16_t index, struct rte_2tuple_filter *filter, uint16_t rx_queue); @@ -1489,9 +1470,6 @@ struct eth_dev_ops { rss_hash_update_t rss_hash_update; /** Get current RSS hash configuration. */ rss_hash_conf_get_t rss_hash_conf_get; - eth_add_syn_filter_t add_syn_filter; /**< add syn filter. */ - eth_remove_syn_filter_t remove_syn_filter; /**< remove syn filter. */ - eth_get_syn_filter_t get_syn_filter; /**< get syn filter. */ eth_add_2tuple_filter_t add_2tuple_filter; /**< add 2tuple filter. */ eth_remove_2tuple_filter_t remove_2tuple_filter; /**< remove 2tuple filter. */ eth_get_2tuple_filter_t get_2tuple_filter; /**< get 2tuple filter. */ @@ -3383,51 +3361,6 @@ int rte_eth_dev_udp_tunnel_delete(uint8_t port_id, struct rte_eth_udp_tunnel *tunnel_udp); -/** - * add syn filter - * - * @param port_id - * The port identifier of the Ethernet device. - * @param rx_queue - * The index of RX queue where to store RX packets matching the syn filter. - * @param filter - * The pointer to the structure describing the syn filter rule. - * @return - * - (0) if successful. - * - (-ENOTSUP) if hardware doesn't support. - * - (-EINVAL) if bad parameter. - */ -int rte_eth_dev_add_syn_filter(uint8_t port_id, - struct rte_syn_filter *filter, uint16_t rx_queue); - -/** - * remove syn filter - * - * @param port_id - * The port identifier of the Ethernet device. - * @return - * - (0) if successful. - * - (-ENOTSUP) if hardware doesn't support. - * - (-EINVAL) if bad parameter. - */ -int rte_eth_dev_remove_syn_filter(uint8_t port_id); - -/** - * get syn filter - * - * @param port_id - * The port identifier of the Ethernet device. - * @param filter - * The pointer to the structure describing the syn filter. - * @param rx_queue - * A pointer to get the queue index of syn filter. - * @return - * - (0) if successful. - * - (-ENOTSUP) if hardware doesn't support. - * - (-EINVAL) if bad parameter. - */ -int rte_eth_dev_get_syn_filter(uint8_t port_id, - struct rte_syn_filter *filter, uint16_t *rx_queue); /** * Add a new 2tuple filter rule on an Ethernet device. diff --git a/lib/librte_ether/rte_ether_version.map b/lib/librte_ether/rte_ether_version.map index 75883b461b..fa81f26259 100644 --- a/lib/librte_ether/rte_ether_version.map +++ b/lib/librte_ether/rte_ether_version.map @@ -8,7 +8,6 @@ DPDK_2.0 { rte_eth_dev_add_2tuple_filter; rte_eth_dev_add_5tuple_filter; rte_eth_dev_add_ethertype_filter; - rte_eth_dev_add_syn_filter; rte_eth_dev_allocate; rte_eth_dev_bypass_event_show; rte_eth_dev_bypass_event_store; @@ -40,7 +39,6 @@ DPDK_2.0 { rte_eth_dev_get_5tuple_filter; rte_eth_dev_get_ethertype_filter; rte_eth_dev_get_mtu; - rte_eth_dev_get_syn_filter; rte_eth_dev_get_vlan_offload; rte_eth_dev_info_get; rte_eth_dev_mac_addr_add; @@ -49,7 +47,6 @@ DPDK_2.0 { rte_eth_dev_remove_2tuple_filter; rte_eth_dev_remove_5tuple_filter; rte_eth_dev_remove_ethertype_filter; - rte_eth_dev_remove_syn_filter; rte_eth_dev_rss_hash_conf_get; rte_eth_dev_rss_hash_update; rte_eth_dev_rss_reta_query; -- 2.20.1