DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jingjing Wu <jingjing.wu@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v2 4/5] ethdev: remove old APIs and structures of flex filter
Date: Sun, 15 Feb 2015 12:07:33 +0800	[thread overview]
Message-ID: <1423973254-605-5-git-send-email-jingjing.wu@intel.com> (raw)
In-Reply-To: <1423973254-605-1-git-send-email-jingjing.wu@intel.com>

Structure rte_flex_filter is removed.
Following APIs are removed:
  - rte_eth_dev_add_flex_filter
  - rte_eth_dev_remove_flex_filter
  - rte_eth_dev_get_flex_filter

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
 lib/librte_ether/rte_ethdev.c | 51 -------------------------
 lib/librte_ether/rte_ethdev.h | 89 -------------------------------------------
 2 files changed, 140 deletions(-)

diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index ea3a1fb..f8b1e8a 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -3172,57 +3172,6 @@ rte_eth_dev_get_5tuple_filter(uint8_t port_id, uint16_t index,
 }
 
 int
-rte_eth_dev_add_flex_filter(uint8_t port_id, uint16_t index,
-			struct rte_flex_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_flex_filter, -ENOTSUP);
-	return (*dev->dev_ops->add_flex_filter)(dev, index, filter, rx_queue);
-}
-
-int
-rte_eth_dev_remove_flex_filter(uint8_t port_id, uint16_t index)
-{
-	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_flex_filter, -ENOTSUP);
-	return (*dev->dev_ops->remove_flex_filter)(dev, index);
-}
-
-int
-rte_eth_dev_get_flex_filter(uint8_t port_id, uint16_t index,
-			struct rte_flex_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_flex_filter, -ENOTSUP);
-	return (*dev->dev_ops->get_flex_filter)(dev, index, filter,
-						rx_queue);
-}
-
-int
 rte_eth_dev_filter_supported(uint8_t port_id, enum rte_filter_type filter_type)
 {
 	struct rte_eth_dev *dev;
diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index 1200c1c..7d455b5 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether/rte_ethdev.h
@@ -992,17 +992,6 @@ struct rte_2tuple_filter {
 };
 
 /**
- *  A structure used to define a flex filter.
- */
-struct rte_flex_filter {
-	uint16_t len;
-	uint32_t dwords[32];  /**< flex bytes in big endian. */
-	uint8_t mask[16];     /**< if mask bit is 1b, do not compare
-				   corresponding byte in dwords. */
-	uint8_t priority;
-};
-
-/**
  *  A structure used to define a 5tuple filter.
  */
 struct rte_5tuple_filter {
@@ -1391,20 +1380,6 @@ typedef int (*eth_get_5tuple_filter_t)(struct rte_eth_dev *dev,
 			uint16_t *rx_queue);
 /**< @internal Get a 5tuple filter rule on an Ethernet device */
 
-typedef int (*eth_add_flex_filter_t)(struct rte_eth_dev *dev,
-			uint16_t index, struct rte_flex_filter *filter,
-			uint16_t rx_queue);
-/**< @internal Setup a new flex filter rule on an Ethernet device */
-
-typedef int (*eth_remove_flex_filter_t)(struct rte_eth_dev *dev,
-			uint16_t index);
-/**< @internal Remove a flex filter rule on an Ethernet device */
-
-typedef int (*eth_get_flex_filter_t)(struct rte_eth_dev *dev,
-			uint16_t index, struct rte_flex_filter *filter,
-			uint16_t *rx_queue);
-/**< @internal Get a flex filter rule on an Ethernet device */
-
 typedef int (*eth_filter_ctrl_t)(struct rte_eth_dev *dev,
 				 enum rte_filter_type filter_type,
 				 enum rte_filter_op filter_op,
@@ -1515,9 +1490,6 @@ struct eth_dev_ops {
 	eth_add_5tuple_filter_t        add_5tuple_filter;    /**< add 5tuple filter. */
 	eth_remove_5tuple_filter_t     remove_5tuple_filter; /**< remove 5tuple filter. */
 	eth_get_5tuple_filter_t        get_5tuple_filter;    /**< get 5tuple filter. */
-	eth_add_flex_filter_t          add_flex_filter;      /**< add flex filter. */
-	eth_remove_flex_filter_t       remove_flex_filter;   /**< remove flex filter. */
-	eth_get_flex_filter_t          get_flex_filter;      /**< get flex filter. */
 	eth_filter_ctrl_t              filter_ctrl;          /**< common filter control*/
 };
 
@@ -3568,67 +3540,6 @@ int rte_eth_dev_get_5tuple_filter(uint8_t port_id, uint16_t index,
 			struct rte_5tuple_filter *filter, uint16_t *rx_queue);
 
 /**
- * Add a new flex filter rule on an Ethernet device.
- *
- * @param port_id
- *   The port identifier of the Ethernet device.
- * @param index
- *   The identifier of flex filter.
- * @param filter
- *   The pointer to the structure describing the flex filter rule.
- *   The *rte_flex_filter* structure includes the values of the different fields
- *   to match: the dwords (first len bytes of packet ) and relative masks.
- * @param rx_queue
- *   The index of the RX queue where to store RX packets matching the added
- *   flex filter.
- * @return
- *   - (0) if successful.
- *   - (-ENOTSUP) if hardware doesn't support flex filter.
- *   - (-ENODEV) if *port_id* invalid.
- *   - (-EINVAL) if the filter information is not correct.
- *   - (-ENOENT) if no enabled filter in this index.
- */
-int rte_eth_dev_add_flex_filter(uint8_t port_id, uint16_t index,
-			struct rte_flex_filter *filter, uint16_t rx_queue);
-
-/**
- * remove a flex filter rule on an Ethernet device.
- *
- * @param port_id
- *   The port identifier of the Ethernet device.
- * @param index
- *   The identifier of flex filter.
- * @return
- *   - (0) if successful.
- *   - (-ENOTSUP) if hardware doesn't support flex filter.
- *   - (-ENODEV) if *port_id* invalid.
- *   - (-EINVAL) if the filter information is not correct.
- */
-int rte_eth_dev_remove_flex_filter(uint8_t port_id, uint16_t index);
-
-/**
- * Get an flex filter rule on an Ethernet device.
- *
- * @param port_id
- *   The port identifier of the Ethernet device.
- * @param index
- *   The identifier of flex filter.
- * @param filter
- *   A pointer to a structure of type *rte_flex_filter* to be filled with
- *   the information of the flex filter.
- * @param rx_queue
- *   A pointer to get the queue index.
- * @return
- *   - (0) if successful.
- *   - (-ENOTSUP) if hardware doesn't support flex filter.
- *   - (-ENODEV) if *port_id* invalid.
- *   - (-EINVAL) if the filter information is not correct.
- *   - (-ENOENT) if no enabled filter in this index.
- */
-int rte_eth_dev_get_flex_filter(uint8_t port_id, uint16_t index,
-			struct rte_flex_filter *filter, uint16_t *rx_queue);
-
-/**
  * Check whether the filter type is supported on an Ethernet device.
  * All the supported filter types are defined in 'rte_eth_ctrl.h'.
  *
-- 
1.9.3

  parent reply	other threads:[~2015-02-15  4:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <igbv1>
2015-01-30  4:48 ` [dpdk-dev] [PATCH] igb: integrate flex filter to new API zhida zang
2015-02-15  4:07   ` [dpdk-dev] [PATCH v2 0/5] Integrate flex filter in igb driver " Jingjing Wu
2015-02-15  4:07     ` [dpdk-dev] [PATCH v2 1/5] ethdev: define flex filter type and its structure Jingjing Wu
2015-02-15  4:07     ` [dpdk-dev] [PATCH v2 2/5] e1000: new functions replace old ones for flex filter Jingjing Wu
2015-02-15  4:07     ` [dpdk-dev] [PATCH v2 3/5] testpmd: new commands " Jingjing Wu
2015-02-15  4:07     ` Jingjing Wu [this message]
2015-02-15  4:07     ` [dpdk-dev] [PATCH v2 5/5] doc: commands changed in testpmd_funcs " Jingjing Wu
2015-02-21  1:53     ` [dpdk-dev] [PATCH v3 0/5] Integrate flex filter in igb driver to new API Pablo de Lara
2015-02-21  1:53       ` [dpdk-dev] [PATCH v3 1/5] ethdev: define flex filter type and its structure Pablo de Lara
2015-02-21  1:53       ` [dpdk-dev] [PATCH v3 2/5] e1000: new functions replace old ones for flex filter Pablo de Lara
2015-02-21  1:53       ` [dpdk-dev] [PATCH v3 3/5] testpmd: new commands " Pablo de Lara
2015-02-21  1:53       ` [dpdk-dev] [PATCH v3 4/5] ethdev: remove old APIs and structures of " Pablo de Lara
2015-02-21  1:53       ` [dpdk-dev] [PATCH v3 5/5] doc: commands changed in testpmd_funcs for " Pablo de Lara
2015-02-22  1:29       ` [dpdk-dev] [PATCH v3 0/5] Integrate flex filter in igb driver to new API Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1423973254-605-5-git-send-email-jingjing.wu@intel.com \
    --to=jingjing.wu@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).