From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 39B572C7A for ; Wed, 11 Feb 2015 08:52:14 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP; 10 Feb 2015 23:52:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,557,1418112000"; d="scan'208";a="664711253" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga001.fm.intel.com with ESMTP; 10 Feb 2015 23:52:08 -0800 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id t1B7q6wg015313; Wed, 11 Feb 2015 15:52:06 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t1B7q3vm000728; Wed, 11 Feb 2015 15:52:05 +0800 Received: (from wujingji@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t1B7q3bb000724; Wed, 11 Feb 2015 15:52:03 +0800 From: Jingjing Wu To: dev@dpdk.org Date: Wed, 11 Feb 2015 15:51:49 +0800 Message-Id: <1423641110-658-6-git-send-email-jingjing.wu@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1423641110-658-1-git-send-email-jingjing.wu@intel.com> References: <1420681358-24809-1-git-send-email-zhida.zang@intel.com> <1423641110-658-1-git-send-email-jingjing.wu@intel.com> Subject: [dpdk-dev] [PATCH v2 5/6] ethdev: remove old APIs and structures of syn filter X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 07:52:14 -0000 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 --- lib/librte_ether/rte_ethdev.c | 50 -------------------------------- lib/librte_ether/rte_ethdev.h | 67 ------------------------------------------- 2 files changed, 117 deletions(-) diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index ea3a1fb..709ba90 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -3006,56 +3006,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 1200c1c..2ab7453 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -972,14 +972,6 @@ TAILQ_HEAD(rte_eth_dev_cb_list, rte_eth_dev_callback); #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. */ struct rte_2tuple_filter { @@ -1352,17 +1344,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); @@ -1506,9 +1487,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. */ @@ -3401,51 +3379,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. -- 1.9.3