DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] ethdev: remove old flow director APIs
@ 2015-09-21  7:34 Jingjing Wu
  2015-09-21  8:05 ` Lu, Wenzhuo
  0 siblings, 1 reply; 3+ messages in thread
From: Jingjing Wu @ 2015-09-21  7:34 UTC (permalink / raw)
  To: dev

Old flow director APIs have been replaced by rte_eth_dev_filter_ctrl
since release 2.0. And no drivers in current code support these APIs.
All the removed APIs are list below:
  - rte_eth_dev_fdir_add_perfect_filter;
  - rte_eth_dev_fdir_add_signature_filter;
  - rte_eth_dev_fdir_get_infos;
  - rte_eth_dev_fdir_remove_perfect_filter;
  - rte_eth_dev_fdir_remove_signature_filter;
  - rte_eth_dev_fdir_set_masks;
  - rte_eth_dev_fdir_update_perfect_filter;
  - rte_eth_dev_fdir_update_signature_filter;

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
 drivers/net/enic/enic_ethdev.c |   1 -
 lib/librte_ether/rte_ethdev.c  | 228 -------------------------
 lib/librte_ether/rte_ethdev.h  | 380 -----------------------------------------
 3 files changed, 609 deletions(-)

diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
index 8280cea..02d288f 100644
--- a/drivers/net/enic/enic_ethdev.c
+++ b/drivers/net/enic/enic_ethdev.c
@@ -576,7 +576,6 @@ static const struct eth_dev_ops enicpmd_eth_dev_ops = {
 	.priority_flow_ctrl_set = NULL,
 	.mac_addr_add         = enicpmd_add_mac_addr,
 	.mac_addr_remove      = enicpmd_remove_mac_addr,
-	.fdir_set_masks               = NULL,
 	.filter_ctrl          = enicpmd_dev_filter_ctrl,
 };
 
diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index b309309..f593f6e 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -1970,234 +1970,6 @@ rte_eth_dev_set_vlan_pvid(uint8_t port_id, uint16_t pvid, int on)
 }
 
 int
-rte_eth_dev_fdir_add_signature_filter(uint8_t port_id,
-				      struct rte_fdir_filter *fdir_filter,
-				      uint8_t queue)
-{
-	struct rte_eth_dev *dev;
-
-	VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
-	dev = &rte_eth_devices[port_id];
-
-	if (dev->data->dev_conf.fdir_conf.mode != RTE_FDIR_MODE_SIGNATURE) {
-		PMD_DEBUG_TRACE("port %d: invalid FDIR mode=%u\n",
-				port_id, dev->data->dev_conf.fdir_conf.mode);
-		return -ENOSYS;
-	}
-
-	if ((fdir_filter->l4type == RTE_FDIR_L4TYPE_SCTP
-	     || fdir_filter->l4type == RTE_FDIR_L4TYPE_NONE)
-	    && (fdir_filter->port_src || fdir_filter->port_dst)) {
-		PMD_DEBUG_TRACE(" Port are meaningless for SCTP and "
-				"None l4type, source & destinations ports "
-				"should be null!\n");
-		return -EINVAL;
-	}
-
-	FUNC_PTR_OR_ERR_RET(*dev->dev_ops->fdir_add_signature_filter, -ENOTSUP);
-	return (*dev->dev_ops->fdir_add_signature_filter)(dev, fdir_filter,
-								queue);
-}
-
-int
-rte_eth_dev_fdir_update_signature_filter(uint8_t port_id,
-					 struct rte_fdir_filter *fdir_filter,
-					 uint8_t queue)
-{
-	struct rte_eth_dev *dev;
-
-	VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
-	dev = &rte_eth_devices[port_id];
-
-	if (dev->data->dev_conf.fdir_conf.mode != RTE_FDIR_MODE_SIGNATURE) {
-		PMD_DEBUG_TRACE("port %d: invalid FDIR mode=%u\n",
-				port_id, dev->data->dev_conf.fdir_conf.mode);
-		return -ENOSYS;
-	}
-
-	if ((fdir_filter->l4type == RTE_FDIR_L4TYPE_SCTP
-	     || fdir_filter->l4type == RTE_FDIR_L4TYPE_NONE)
-	    && (fdir_filter->port_src || fdir_filter->port_dst)) {
-		PMD_DEBUG_TRACE(" Port are meaningless for SCTP and "
-				"None l4type, source & destinations ports "
-				"should be null!\n");
-		return -EINVAL;
-	}
-
-	FUNC_PTR_OR_ERR_RET(*dev->dev_ops->fdir_update_signature_filter, -ENOTSUP);
-	return (*dev->dev_ops->fdir_update_signature_filter)(dev, fdir_filter,
-								queue);
-
-}
-
-int
-rte_eth_dev_fdir_remove_signature_filter(uint8_t port_id,
-					 struct rte_fdir_filter *fdir_filter)
-{
-	struct rte_eth_dev *dev;
-
-	VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
-	dev = &rte_eth_devices[port_id];
-
-	if (dev->data->dev_conf.fdir_conf.mode != RTE_FDIR_MODE_SIGNATURE) {
-		PMD_DEBUG_TRACE("port %d: invalid FDIR mode=%u\n",
-				port_id, dev->data->dev_conf.fdir_conf.mode);
-		return -ENOSYS;
-	}
-
-	if ((fdir_filter->l4type == RTE_FDIR_L4TYPE_SCTP
-	     || fdir_filter->l4type == RTE_FDIR_L4TYPE_NONE)
-	    && (fdir_filter->port_src || fdir_filter->port_dst)) {
-		PMD_DEBUG_TRACE(" Port are meaningless for SCTP and "
-				"None l4type source & destinations ports "
-				"should be null!\n");
-		return -EINVAL;
-	}
-
-	FUNC_PTR_OR_ERR_RET(*dev->dev_ops->fdir_remove_signature_filter, -ENOTSUP);
-	return (*dev->dev_ops->fdir_remove_signature_filter)(dev, fdir_filter);
-}
-
-int
-rte_eth_dev_fdir_get_infos(uint8_t port_id, struct rte_eth_fdir *fdir)
-{
-	struct rte_eth_dev *dev;
-
-	VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
-	dev = &rte_eth_devices[port_id];
-	if (!(dev->data->dev_conf.fdir_conf.mode)) {
-		PMD_DEBUG_TRACE("port %d: pkt-filter disabled\n", port_id);
-		return -ENOSYS;
-	}
-
-	FUNC_PTR_OR_ERR_RET(*dev->dev_ops->fdir_infos_get, -ENOTSUP);
-
-	(*dev->dev_ops->fdir_infos_get)(dev, fdir);
-	return 0;
-}
-
-int
-rte_eth_dev_fdir_add_perfect_filter(uint8_t port_id,
-				    struct rte_fdir_filter *fdir_filter,
-				    uint16_t soft_id, uint8_t queue,
-				    uint8_t drop)
-{
-	struct rte_eth_dev *dev;
-
-	VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
-	dev = &rte_eth_devices[port_id];
-
-	if (dev->data->dev_conf.fdir_conf.mode != RTE_FDIR_MODE_PERFECT) {
-		PMD_DEBUG_TRACE("port %d: invalid FDIR mode=%u\n",
-				port_id, dev->data->dev_conf.fdir_conf.mode);
-		return -ENOSYS;
-	}
-
-	if ((fdir_filter->l4type == RTE_FDIR_L4TYPE_SCTP
-	     || fdir_filter->l4type == RTE_FDIR_L4TYPE_NONE)
-	    && (fdir_filter->port_src || fdir_filter->port_dst)) {
-		PMD_DEBUG_TRACE(" Port are meaningless for SCTP and "
-				"None l4type, source & destinations ports "
-				"should be null!\n");
-		return -EINVAL;
-	}
-
-	/* For now IPv6 is not supported with perfect filter */
-	if (fdir_filter->iptype == RTE_FDIR_IPTYPE_IPV6)
-		return -ENOTSUP;
-
-	FUNC_PTR_OR_ERR_RET(*dev->dev_ops->fdir_add_perfect_filter, -ENOTSUP);
-	return (*dev->dev_ops->fdir_add_perfect_filter)(dev, fdir_filter,
-								soft_id, queue,
-								drop);
-}
-
-int
-rte_eth_dev_fdir_update_perfect_filter(uint8_t port_id,
-				       struct rte_fdir_filter *fdir_filter,
-				       uint16_t soft_id, uint8_t queue,
-				       uint8_t drop)
-{
-	struct rte_eth_dev *dev;
-
-	VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
-	dev = &rte_eth_devices[port_id];
-
-	if (dev->data->dev_conf.fdir_conf.mode != RTE_FDIR_MODE_PERFECT) {
-		PMD_DEBUG_TRACE("port %d: invalid FDIR mode=%u\n",
-				port_id, dev->data->dev_conf.fdir_conf.mode);
-		return -ENOSYS;
-	}
-
-	if ((fdir_filter->l4type == RTE_FDIR_L4TYPE_SCTP
-	     || fdir_filter->l4type == RTE_FDIR_L4TYPE_NONE)
-	    && (fdir_filter->port_src || fdir_filter->port_dst)) {
-		PMD_DEBUG_TRACE(" Port are meaningless for SCTP and "
-				"None l4type, source & destinations ports "
-				"should be null!\n");
-		return -EINVAL;
-	}
-
-	/* For now IPv6 is not supported with perfect filter */
-	if (fdir_filter->iptype == RTE_FDIR_IPTYPE_IPV6)
-		return -ENOTSUP;
-
-	FUNC_PTR_OR_ERR_RET(*dev->dev_ops->fdir_update_perfect_filter, -ENOTSUP);
-	return (*dev->dev_ops->fdir_update_perfect_filter)(dev, fdir_filter,
-							soft_id, queue, drop);
-}
-
-int
-rte_eth_dev_fdir_remove_perfect_filter(uint8_t port_id,
-				       struct rte_fdir_filter *fdir_filter,
-				       uint16_t soft_id)
-{
-	struct rte_eth_dev *dev;
-
-	VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
-	dev = &rte_eth_devices[port_id];
-
-	if (dev->data->dev_conf.fdir_conf.mode != RTE_FDIR_MODE_PERFECT) {
-		PMD_DEBUG_TRACE("port %d: invalid FDIR mode=%u\n",
-				port_id, dev->data->dev_conf.fdir_conf.mode);
-		return -ENOSYS;
-	}
-
-	if ((fdir_filter->l4type == RTE_FDIR_L4TYPE_SCTP
-	     || fdir_filter->l4type == RTE_FDIR_L4TYPE_NONE)
-	    && (fdir_filter->port_src || fdir_filter->port_dst)) {
-		PMD_DEBUG_TRACE(" Port are meaningless for SCTP and "
-				"None l4type, source & destinations ports "
-				"should be null!\n");
-		return -EINVAL;
-	}
-
-	/* For now IPv6 is not supported with perfect filter */
-	if (fdir_filter->iptype == RTE_FDIR_IPTYPE_IPV6)
-		return -ENOTSUP;
-
-	FUNC_PTR_OR_ERR_RET(*dev->dev_ops->fdir_remove_perfect_filter, -ENOTSUP);
-	return (*dev->dev_ops->fdir_remove_perfect_filter)(dev, fdir_filter,
-								soft_id);
-}
-
-int
-rte_eth_dev_fdir_set_masks(uint8_t port_id, struct rte_fdir_masks *fdir_mask)
-{
-	struct rte_eth_dev *dev;
-
-	VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
-	dev = &rte_eth_devices[port_id];
-	if (!(dev->data->dev_conf.fdir_conf.mode)) {
-		PMD_DEBUG_TRACE("port %d: pkt-filter disabled\n", port_id);
-		return -ENOSYS;
-	}
-
-	FUNC_PTR_OR_ERR_RET(*dev->dev_ops->fdir_set_masks, -ENOTSUP);
-	return (*dev->dev_ops->fdir_set_masks)(dev, fdir_mask);
-}
-
-int
 rte_eth_dev_flow_ctrl_get(uint8_t port_id, struct rte_eth_fc_conf *fc_conf)
 {
 	struct rte_eth_dev *dev;
diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index fa06554..8a8c82b 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether/rte_ethdev.h
@@ -732,114 +732,6 @@ struct rte_eth_udp_tunnel {
 };
 
 /**
- *  Possible l4type of FDIR filters.
- */
-enum rte_l4type {
-	RTE_FDIR_L4TYPE_NONE = 0,       /**< None. */
-	RTE_FDIR_L4TYPE_UDP,            /**< UDP. */
-	RTE_FDIR_L4TYPE_TCP,            /**< TCP. */
-	RTE_FDIR_L4TYPE_SCTP,           /**< SCTP. */
-};
-
-/**
- *  Select IPv4 or IPv6 FDIR filters.
- */
-enum rte_iptype {
-	RTE_FDIR_IPTYPE_IPV4 = 0,     /**< IPv4. */
-	RTE_FDIR_IPTYPE_IPV6 ,        /**< IPv6. */
-};
-
-/**
- *  A structure used to define a FDIR packet filter.
- */
-struct rte_fdir_filter {
-	uint16_t flex_bytes; /**< Flex bytes value to match. */
-	uint16_t vlan_id; /**< VLAN ID value to match, 0 otherwise. */
-	uint16_t port_src; /**< Source port to match, 0 otherwise. */
-	uint16_t port_dst; /**< Destination port to match, 0 otherwise. */
-	union {
-		uint32_t ipv4_addr; /**< IPv4 source address to match. */
-		uint32_t ipv6_addr[4]; /**< IPv6 source address to match. */
-	} ip_src; /**< IPv4/IPv6 source address to match (union of above). */
-	union {
-		uint32_t ipv4_addr; /**< IPv4 destination address to match. */
-		uint32_t ipv6_addr[4]; /**< IPv6 destination address to match */
-	} ip_dst; /**< IPv4/IPv6 destination address to match (union of above). */
-	enum rte_l4type l4type; /**< l4type to match: NONE/UDP/TCP/SCTP. */
-	enum rte_iptype iptype; /**< IP packet type to match: IPv4 or IPv6. */
-};
-
-/**
- *  A structure used to configure FDIR masks that are used by the device
- *  to match the various fields of RX packet headers.
- *  @note The only_ip_flow field has the opposite meaning compared to other
- *  masks!
- */
-struct rte_fdir_masks {
-	/** When set to 1, packet l4type is \b NOT relevant in filters, and
-	   source and destination port masks must be set to zero. */
-	uint8_t only_ip_flow;
-	/** If set to 1, vlan_id is relevant in filters. */
-	uint8_t vlan_id;
-	/** If set to 1, vlan_prio is relevant in filters. */
-	uint8_t vlan_prio;
-	/** If set to 1, flexbytes is relevant in filters. */
-	uint8_t flexbytes;
-	/** If set to 1, set the IPv6 masks. Otherwise set the IPv4 masks. */
-	uint8_t set_ipv6_mask;
-	/** When set to 1, comparison of destination IPv6 address with IP6AT
-	    registers is meaningful. */
-	uint8_t comp_ipv6_dst;
-	/** Mask of Destination IPv4 Address. All bits set to 1 define the
-	    relevant bits to use in the destination address of an IPv4 packet
-	    when matching it against FDIR filters. */
-	uint32_t dst_ipv4_mask;
-	/** Mask of Source IPv4 Address. All bits set to 1 define
-	    the relevant bits to use in the source address of an IPv4 packet
-	    when matching it against FDIR filters. */
-	uint32_t src_ipv4_mask;
-	/** Mask of Source IPv6 Address. All bits set to 1 define the
-	    relevant BYTES to use in the source address of an IPv6 packet
-	    when matching it against FDIR filters. */
-	uint16_t dst_ipv6_mask;
-	/** Mask of Destination IPv6 Address. All bits set to 1 define the
-	    relevant BYTES to use in the destination address of an IPv6 packet
-	    when matching it against FDIR filters. */
-	uint16_t src_ipv6_mask;
-	/** Mask of Source Port. All bits set to 1 define the relevant
-	    bits to use in the source port of an IP packets when matching it
-	    against FDIR filters. */
-	uint16_t src_port_mask;
-	/** Mask of Destination Port. All bits set to 1 define the relevant
-	    bits to use in the destination port of an IP packet when matching it
-	    against FDIR filters. */
-	uint16_t dst_port_mask;
-};
-
-/**
- *  A structure used to report the status of the flow director filters in use.
- */
-struct rte_eth_fdir {
-	/** Number of filters with collision indication. */
-	uint16_t collision;
-	/** Number of free (non programmed) filters. */
-	uint16_t free;
-	/** The Lookup hash value of the added filter that updated the value
-	   of the MAXLEN field */
-	uint16_t maxhash;
-	/** Longest linked list of filters in the table. */
-	uint8_t maxlen;
-	/** Number of added filters. */
-	uint64_t add;
-	/** Number of removed filters. */
-	uint64_t remove;
-	/** Number of failed added filters (no more space in device). */
-	uint64_t f_add;
-	/** Number of failed removed filters. */
-	uint64_t f_remove;
-};
-
-/**
  * A structure used to enable/disable specific device interrupts.
  */
 struct rte_intr_conf {
@@ -1108,45 +1000,6 @@ typedef uint16_t (*eth_tx_burst_t)(void *txq,
 				   uint16_t nb_pkts);
 /**< @internal Send output packets on a transmit queue of an Ethernet device. */
 
-typedef int (*fdir_add_signature_filter_t)(struct rte_eth_dev *dev,
-					   struct rte_fdir_filter *fdir_ftr,
-					   uint8_t rx_queue);
-/**< @internal Setup a new signature filter rule on an Ethernet device */
-
-typedef int (*fdir_update_signature_filter_t)(struct rte_eth_dev *dev,
-					      struct rte_fdir_filter *fdir_ftr,
-					      uint8_t rx_queue);
-/**< @internal Update a signature filter rule on an Ethernet device */
-
-typedef int (*fdir_remove_signature_filter_t)(struct rte_eth_dev *dev,
-					      struct rte_fdir_filter *fdir_ftr);
-/**< @internal Remove a  signature filter rule on an Ethernet device */
-
-typedef void (*fdir_infos_get_t)(struct rte_eth_dev *dev,
-				 struct rte_eth_fdir *fdir);
-/**< @internal Get information about fdir status */
-
-typedef int (*fdir_add_perfect_filter_t)(struct rte_eth_dev *dev,
-					 struct rte_fdir_filter *fdir_ftr,
-					 uint16_t soft_id, uint8_t rx_queue,
-					 uint8_t drop);
-/**< @internal Setup a new perfect filter rule on an Ethernet device */
-
-typedef int (*fdir_update_perfect_filter_t)(struct rte_eth_dev *dev,
-					    struct rte_fdir_filter *fdir_ftr,
-					    uint16_t soft_id, uint8_t rx_queue,
-					    uint8_t drop);
-/**< @internal Update a perfect filter rule on an Ethernet device */
-
-typedef int (*fdir_remove_perfect_filter_t)(struct rte_eth_dev *dev,
-					    struct rte_fdir_filter *fdir_ftr,
-					    uint16_t soft_id);
-/**< @internal Remove a perfect filter rule on an Ethernet device */
-
-typedef int (*fdir_set_masks_t)(struct rte_eth_dev *dev,
-				struct rte_fdir_masks *fdir_masks);
-/**< @internal Setup flow director masks on an Ethernet device */
-
 typedef int (*flow_ctrl_get_t)(struct rte_eth_dev *dev,
 			       struct rte_eth_fc_conf *fc_conf);
 /**< @internal Get current flow control parameter on an Ethernet device */
@@ -1416,23 +1269,6 @@ struct eth_dev_ops {
 	eth_udp_tunnel_del_t       udp_tunnel_del;
 	eth_set_queue_rate_limit_t set_queue_rate_limit;   /**< Set queue rate limit */
 	eth_set_vf_rate_limit_t    set_vf_rate_limit;   /**< Set VF rate limit */
-
-	/** Add a signature filter. */
-	fdir_add_signature_filter_t fdir_add_signature_filter;
-	/** Update a signature filter. */
-	fdir_update_signature_filter_t fdir_update_signature_filter;
-	/** Remove a signature filter. */
-	fdir_remove_signature_filter_t fdir_remove_signature_filter;
-	/** Get information about FDIR status. */
-	fdir_infos_get_t fdir_infos_get;
-	/** Add a perfect filter. */
-	fdir_add_perfect_filter_t fdir_add_perfect_filter;
-	/** Update a perfect filter. */
-	fdir_update_perfect_filter_t fdir_update_perfect_filter;
-	/** Remove a perfect filter. */
-	fdir_remove_perfect_filter_t fdir_remove_perfect_filter;
-	/** Setup masks for FDIR filtering. */
-	fdir_set_masks_t fdir_set_masks;
 	/** Update redirection table. */
 	reta_update_t reta_update;
 	/** Query redirection table. */
@@ -2683,222 +2519,6 @@ rte_eth_tx_burst(uint8_t port_id, uint16_t queue_id,
 #endif
 
 /**
- * Setup a new signature filter rule on an Ethernet device
- *
- * @param port_id
- *   The port identifier of the Ethernet device.
- * @param fdir_filter
- *   The pointer to the fdir filter structure describing the signature filter
- *   rule.
- *   The *rte_fdir_filter* structure includes the values of the different fields
- *   to match: source and destination IP addresses, vlan id, flexbytes, source
- *   and destination ports, and so on.
- * @param rx_queue
- *   The index of the RX queue where to store RX packets matching the added
- *   signature filter defined in fdir_filter.
- * @return
- *   - (0) if successful.
- *   - (-ENOTSUP) if hardware doesn't support flow director mode.
- *   - (-ENODEV) if *port_id* invalid.
- *   - (-ENOSYS) if the FDIR mode is not configured in signature mode
- *               on *port_id*.
- *   - (-EINVAL) if the fdir_filter information is not correct.
- */
-int rte_eth_dev_fdir_add_signature_filter(uint8_t port_id,
-					  struct rte_fdir_filter *fdir_filter,
-					  uint8_t rx_queue);
-
-/**
- * Update a signature filter rule on an Ethernet device.
- * If the rule doesn't exits, it is created.
- *
- * @param port_id
- *   The port identifier of the Ethernet device.
- * @param fdir_ftr
- *   The pointer to the structure describing the signature filter rule.
- *   The *rte_fdir_filter* structure includes the values of the different fields
- *   to match: source and destination IP addresses, vlan id, flexbytes, source
- *   and destination ports, and so on.
- * @param rx_queue
- *   The index of the RX queue where to store RX packets matching the added
- *   signature filter defined in fdir_ftr.
- * @return
- *   - (0) if successful.
- *   - (-ENOTSUP) if hardware doesn't support flow director mode.
- *   - (-ENODEV) if *port_id* invalid.
- *   - (-ENOSYS) if the flow director mode is not configured in signature mode
- *     on *port_id*.
- *   - (-EINVAL) if the fdir_filter information is not correct.
- */
-int rte_eth_dev_fdir_update_signature_filter(uint8_t port_id,
-					     struct rte_fdir_filter *fdir_ftr,
-					     uint8_t rx_queue);
-
-/**
- * Remove a signature filter rule on an Ethernet device.
- *
- * @param port_id
- *   The port identifier of the Ethernet device.
- * @param fdir_ftr
- *   The pointer to the structure describing the signature filter rule.
- *   The *rte_fdir_filter* structure includes the values of the different fields
- *   to match: source and destination IP addresses, vlan id, flexbytes, source
- *   and destination ports, and so on.
- * @return
- *   - (0) if successful.
- *   - (-ENOTSUP) if hardware doesn't support flow director mode.
- *   - (-ENODEV) if *port_id* invalid.
- *   - (-ENOSYS) if the flow director mode is not configured in signature mode
- *     on *port_id*.
- *   - (-EINVAL) if the fdir_filter information is not correct.
- */
-int rte_eth_dev_fdir_remove_signature_filter(uint8_t port_id,
-					     struct rte_fdir_filter *fdir_ftr);
-
-/**
- * Retrieve the flow director information of an Ethernet device.
- *
- * @param port_id
- *   The port identifier of the Ethernet device.
- * @param fdir
- *   A pointer to a structure of type *rte_eth_dev_fdir* to be filled with
- *   the flow director information of the Ethernet device.
- * @return
- *   - (0) if successful.
- *   - (-ENOTSUP) if hardware doesn't support flow director mode.
- *   - (-ENODEV) if *port_id* invalid.
- *   - (-ENOSYS) if the flow director mode is not configured on *port_id*.
- */
-int rte_eth_dev_fdir_get_infos(uint8_t port_id, struct rte_eth_fdir *fdir);
-
-/**
- * Add a new perfect filter rule on an Ethernet device.
- *
- * @param port_id
- *   The port identifier of the Ethernet device.
- * @param fdir_filter
- *   The pointer to the structure describing the perfect filter rule.
- *   The *rte_fdir_filter* structure includes the values of the different fields
- *   to match: source and destination IP addresses, vlan id, flexbytes, source
- *   and destination ports, and so on.
- *   IPv6 are not supported.
- * @param soft_id
- *    The 16-bit value supplied in the field hash.fdir.id of mbuf for RX
- *    packets matching the perfect filter.
- * @param rx_queue
- *   The index of the RX queue where to store RX packets matching the added
- *   perfect filter defined in fdir_filter.
- * @param drop
- *    If drop is set to 1, matching RX packets are stored into the RX drop
- *    queue defined in the rte_fdir_conf.
- * @return
- *   - (0) if successful.
- *   - (-ENOTSUP) if hardware doesn't support flow director mode.
- *   - (-ENODEV) if *port_id* invalid.
- *   - (-ENOSYS) if the flow director mode is not configured in perfect mode
- *               on *port_id*.
- *   - (-EINVAL) if the fdir_filter information is not correct.
- */
-int rte_eth_dev_fdir_add_perfect_filter(uint8_t port_id,
-					struct rte_fdir_filter *fdir_filter,
-					uint16_t soft_id, uint8_t rx_queue,
-					uint8_t drop);
-
-/**
- * Update a perfect filter rule on an Ethernet device.
- * If the rule doesn't exits, it is created.
- *
- * @param port_id
- *   The port identifier of the Ethernet device.
- * @param fdir_filter
- *   The pointer to the structure describing the perfect filter rule.
- *   The *rte_fdir_filter* structure includes the values of the different fields
- *   to match: source and destination IP addresses, vlan id, flexbytes, source
- *   and destination ports, and so on.
- *   IPv6 are not supported.
- * @param soft_id
- *    The 16-bit value supplied in the field hash.fdir.id of mbuf for RX
- *    packets matching the perfect filter.
- * @param rx_queue
- *   The index of the RX queue where to store RX packets matching the added
- *   perfect filter defined in fdir_filter.
- * @param drop
- *    If drop is set to 1, matching RX packets are stored into the RX drop
- *    queue defined in the rte_fdir_conf.
- * @return
- *   - (0) if successful.
- *   - (-ENOTSUP) if hardware doesn't support flow director mode.
- *   - (-ENODEV) if *port_id* invalid.
- *   - (-ENOSYS) if the flow director mode is not configured in perfect mode
- *      on *port_id*.
- *   - (-EINVAL) if the fdir_filter information is not correct.
- */
-int rte_eth_dev_fdir_update_perfect_filter(uint8_t port_id,
-					   struct rte_fdir_filter *fdir_filter,
-					   uint16_t soft_id, uint8_t rx_queue,
-					   uint8_t drop);
-
-/**
- * Remove a perfect filter rule on an Ethernet device.
- *
- * @param port_id
- *   The port identifier of the Ethernet device.
- * @param fdir_filter
- *   The pointer to the structure describing the perfect filter rule.
- *   The *rte_fdir_filter* structure includes the values of the different fields
- *   to match: source and destination IP addresses, vlan id, flexbytes, source
- *   and destination ports, and so on.
- *   IPv6 are not supported.
- * @param soft_id
- *    The soft_id value provided when adding/updating the removed filter.
- * @return
- *   - (0) if successful.
- *   - (-ENOTSUP) if hardware doesn't support flow director mode.
- *   - (-ENODEV) if *port_id* invalid.
- *   - (-ENOSYS) if the flow director mode is not configured in perfect mode
- *      on *port_id*.
- *   - (-EINVAL) if the fdir_filter information is not correct.
- */
-int rte_eth_dev_fdir_remove_perfect_filter(uint8_t port_id,
-					   struct rte_fdir_filter *fdir_filter,
-					   uint16_t soft_id);
-/**
- * Configure globally the masks for flow director mode for an Ethernet device.
- * For example, the device can match packets with only the first 24 bits of
- * the IPv4 source address.
- *
- * The following fields can be masked: IPv4 addresses and L4 port numbers.
- * The following fields can be either enabled or disabled completely for the
- * matching functionality: VLAN ID tag; VLAN Priority + CFI bit; Flexible 2-byte
- * tuple.
- * IPv6 masks are not supported.
- *
- * All filters must comply with the masks previously configured.
- * For example, with a mask equal to 255.255.255.0 for the source IPv4 address,
- * all IPv4 filters must be created with a source IPv4 address that fits the
- * "X.X.X.0" format.
- *
- * This function flushes all filters that have been previously added in
- * the device.
- *
- * @param port_id
- *   The port identifier of the Ethernet device.
- * @param fdir_mask
- *   The pointer to the fdir mask structure describing relevant headers fields
- *   and relevant bits to use when matching packets addresses and ports.
- *   IPv6 masks are not supported.
- * @return
- *   - (0) if successful.
- *   - (-ENOTSUP) if hardware doesn't support flow director mode.
- *   - (-ENODEV) if *port_id* invalid.
- *   - (-ENOSYS) if the flow director mode is not configured in perfect
- *      mode on *port_id*.
- *   - (-EINVAL) if the fdir_filter information is not correct
- */
-int rte_eth_dev_fdir_set_masks(uint8_t port_id,
-			       struct rte_fdir_masks *fdir_mask);
-
-/**
  * The eth device event type for interrupt, and maybe others in the future.
  */
 enum rte_eth_event_type {
-- 
2.4.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] ethdev: remove old flow director APIs
  2015-09-21  7:34 [dpdk-dev] [PATCH] ethdev: remove old flow director APIs Jingjing Wu
@ 2015-09-21  8:05 ` Lu, Wenzhuo
  2015-09-29 16:49   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Lu, Wenzhuo @ 2015-09-21  8:05 UTC (permalink / raw)
  To: Wu, Jingjing, dev

Hi,

> -----Original Message-----
> From: Wu, Jingjing
> Sent: Monday, September 21, 2015 3:34 PM
> To: dev@dpdk.org
> Cc: Wu, Jingjing; Zhang, Helin; Lu, Wenzhuo
> Subject: [PATCH] ethdev: remove old flow director APIs
> 
> Old flow director APIs have been replaced by rte_eth_dev_filter_ctrl since
> release 2.0. And no drivers in current code support these APIs.
> All the removed APIs are list below:
>   - rte_eth_dev_fdir_add_perfect_filter;
>   - rte_eth_dev_fdir_add_signature_filter;
>   - rte_eth_dev_fdir_get_infos;
>   - rte_eth_dev_fdir_remove_perfect_filter;
>   - rte_eth_dev_fdir_remove_signature_filter;
>   - rte_eth_dev_fdir_set_masks;
>   - rte_eth_dev_fdir_update_perfect_filter;
>   - rte_eth_dev_fdir_update_signature_filter;
> 
> Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] ethdev: remove old flow director APIs
  2015-09-21  8:05 ` Lu, Wenzhuo
@ 2015-09-29 16:49   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2015-09-29 16:49 UTC (permalink / raw)
  To: Wu, Jingjing; +Cc: dev

2015-09-21 08:05, Lu, Wenzhuo:
> From: Wu, Jingjing
> > Old flow director APIs have been replaced by rte_eth_dev_filter_ctrl since
> > release 2.0. And no drivers in current code support these APIs.
> > All the removed APIs are list below:
> >   - rte_eth_dev_fdir_add_perfect_filter;
> >   - rte_eth_dev_fdir_add_signature_filter;
> >   - rte_eth_dev_fdir_get_infos;
> >   - rte_eth_dev_fdir_remove_perfect_filter;
> >   - rte_eth_dev_fdir_remove_signature_filter;
> >   - rte_eth_dev_fdir_set_masks;
> >   - rte_eth_dev_fdir_update_perfect_filter;
> >   - rte_eth_dev_fdir_update_signature_filter;
> > 
> > Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
> Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>

The mlx4 driver does not build.
And you forgot to update the release notes (deprecation and API changes).

This time, I fixed and applied it.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-09-29 23:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-21  7:34 [dpdk-dev] [PATCH] ethdev: remove old flow director APIs Jingjing Wu
2015-09-21  8:05 ` Lu, Wenzhuo
2015-09-29 16:49   ` 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).