* [dpdk-dev] [RFC PATCH] ethdev: remove old flow director API
@ 2015-04-20 14:11 Thomas Monjalon
2015-04-20 14:32 ` Wu, Jingjing
2015-04-20 16:33 ` Neil Horman
0 siblings, 2 replies; 7+ messages in thread
From: Thomas Monjalon @ 2015-04-20 14:11 UTC (permalink / raw)
To: Jingjing Wu; +Cc: dev
It's time to remove this old API.
It seems some work is still needed to rely only on eth_ctrl API.
At least ixgbe, i40e and testpmd must be fixed.
Jingjing, do you think it's possible to remove all these structures
from rte_ethdev.h?
Thanks
---
lib/librte_ether/rte_ethdev.c | 260 -------------------------
lib/librte_ether/rte_ethdev.h | 399 --------------------------------------
lib/librte_pmd_enic/enic_ethdev.c | 1 -
lib/librte_pmd_mlx4/mlx4.c | 7 -
4 files changed, 667 deletions(-)
diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index e20cca5..65173e7 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -2098,266 +2098,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;
-
- if (!rte_eth_dev_is_valid_port(port_id)) {
- PMD_DEBUG_TRACE("Invalid port_id=%d\n", port_id);
- return (-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;
-
- if (!rte_eth_dev_is_valid_port(port_id)) {
- PMD_DEBUG_TRACE("Invalid port_id=%d\n", port_id);
- return (-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;
-
- if (!rte_eth_dev_is_valid_port(port_id)) {
- PMD_DEBUG_TRACE("Invalid port_id=%d\n", port_id);
- return (-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;
-
- if (!rte_eth_dev_is_valid_port(port_id)) {
- PMD_DEBUG_TRACE("Invalid port_id=%d\n", port_id);
- return (-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;
-
- if (!rte_eth_dev_is_valid_port(port_id)) {
- PMD_DEBUG_TRACE("Invalid port_id=%d\n", port_id);
- return (-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;
-
- if (!rte_eth_dev_is_valid_port(port_id)) {
- PMD_DEBUG_TRACE("Invalid port_id=%d\n", port_id);
- return (-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;
-
- if (!rte_eth_dev_is_valid_port(port_id)) {
- PMD_DEBUG_TRACE("Invalid port_id=%d\n", port_id);
- return (-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;
-
- if (!rte_eth_dev_is_valid_port(port_id)) {
- PMD_DEBUG_TRACE("Invalid port_id=%d\n", port_id);
- return (-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 4648290..041aa32 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether/rte_ethdev.h
@@ -672,42 +672,6 @@ struct rte_eth_pfc_conf {
};
/**
- * Memory space that can be configured to store Flow Director filters
- * in the board memory.
- */
-enum rte_fdir_pballoc_type {
- RTE_FDIR_PBALLOC_64K = 0, /**< 64k. */
- RTE_FDIR_PBALLOC_128K, /**< 128k. */
- RTE_FDIR_PBALLOC_256K, /**< 256k. */
-};
-
-/**
- * Select report mode of FDIR hash information in RX descriptors.
- */
-enum rte_fdir_status_mode {
- RTE_FDIR_NO_REPORT_STATUS = 0, /**< Never report FDIR hash. */
- RTE_FDIR_REPORT_STATUS, /**< Only report FDIR hash for matching pkts. */
- RTE_FDIR_REPORT_STATUS_ALWAYS, /**< Always report FDIR hash. */
-};
-
-/**
- * A structure used to configure the Flow Director (FDIR) feature
- * of an Ethernet port.
- *
- * If mode is RTE_FDIR_DISABLE, the pballoc value is ignored.
- */
-struct rte_fdir_conf {
- enum rte_fdir_mode mode; /**< Flow Director mode. */
- enum rte_fdir_pballoc_type pballoc; /**< Space for FDIR filters. */
- enum rte_fdir_status_mode status; /**< How to report FDIR hash. */
- /** RX queue of packets matching a "drop" filter in perfect mode. */
- uint8_t drop_queue;
- struct rte_eth_fdir_masks mask;
- struct rte_eth_fdir_flex_conf flex_conf;
- /**< Flex payload configuration. */
-};
-
-/**
* UDP tunneling configuration.
*/
struct rte_eth_udp_tunnel {
@@ -734,96 +698,6 @@ enum rte_iptype {
};
/**
- * 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 {
@@ -868,7 +742,6 @@ struct rte_eth_conf {
/** Currently,Priority Flow Control(PFC) are supported,if DCB with PFC
is needed,and the variable must be set ETH_DCB_PFC_SUPPORT. */
uint32_t dcb_capability_en;
- struct rte_fdir_conf fdir_conf; /**< FDIR configuration. */
struct rte_intr_conf intr_conf; /**< Interrupt mode configuration. */
};
@@ -1079,45 +952,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 */
@@ -1346,23 +1180,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. */
@@ -2579,222 +2396,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 {
diff --git a/lib/librte_pmd_enic/enic_ethdev.c b/lib/librte_pmd_enic/enic_ethdev.c
index 63a594d..bdb6801 100644
--- a/lib/librte_pmd_enic/enic_ethdev.c
+++ b/lib/librte_pmd_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_pmd_mlx4/mlx4.c b/lib/librte_pmd_mlx4/mlx4.c
index 024282a..6ba5a6b 100644
--- a/lib/librte_pmd_mlx4/mlx4.c
+++ b/lib/librte_pmd_mlx4/mlx4.c
@@ -4192,13 +4192,6 @@ static const struct eth_dev_ops mlx4_dev_ops = {
.mac_addr_remove = mlx4_mac_addr_remove,
.mac_addr_add = mlx4_mac_addr_add,
.mtu_set = mlx4_dev_set_mtu,
- .fdir_add_signature_filter = NULL,
- .fdir_update_signature_filter = NULL,
- .fdir_remove_signature_filter = NULL,
- .fdir_add_perfect_filter = NULL,
- .fdir_update_perfect_filter = NULL,
- .fdir_remove_perfect_filter = NULL,
- .fdir_set_masks = NULL
};
/**
--
2.2.2
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [RFC PATCH] ethdev: remove old flow director API
2015-04-20 14:11 [dpdk-dev] [RFC PATCH] ethdev: remove old flow director API Thomas Monjalon
@ 2015-04-20 14:32 ` Wu, Jingjing
2015-04-20 14:59 ` Thomas Monjalon
2015-04-20 16:33 ` Neil Horman
1 sibling, 1 reply; 7+ messages in thread
From: Wu, Jingjing @ 2015-04-20 14:32 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev
> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Monday, April 20, 2015 10:12 PM
> To: Wu, Jingjing
> Cc: dev@dpdk.org
> Subject: [RFC PATCH] ethdev: remove old flow director API
>
> It's time to remove this old API.
> It seems some work is still needed to rely only on eth_ctrl API.
> At least ixgbe, i40e and testpmd must be fixed.
> Jingjing, do you think it's possible to remove all these structures
> from rte_ethdev.h?
>
[Wu, Jingjing] Yes, I agree.
But few comments list below.
Beside the following change, some commands also need to be removed in testpmd. For the ixgbe, code to the old APIs are already fixed.
> Thanks
>
> ---
> lib/librte_ether/rte_ethdev.c | 260 -------------------------
> lib/librte_ether/rte_ethdev.h | 399 --------------------------------------
> lib/librte_pmd_enic/enic_ethdev.c | 1 -
> lib/librte_pmd_mlx4/mlx4.c | 7 -
> 4 files changed, 667 deletions(-)
>
> diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
> index e20cca5..65173e7 100644
> --- a/lib/librte_ether/rte_ethdev.c
> +++ b/lib/librte_ether/rte_ethdev.c
> @@ -2098,266 +2098,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;
> -
> - if (!rte_eth_dev_is_valid_port(port_id)) {
> - PMD_DEBUG_TRACE("Invalid port_id=%d\n", port_id);
> - return (-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;
> -
> - if (!rte_eth_dev_is_valid_port(port_id)) {
> - PMD_DEBUG_TRACE("Invalid port_id=%d\n", port_id);
> - return (-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;
> -
> - if (!rte_eth_dev_is_valid_port(port_id)) {
> - PMD_DEBUG_TRACE("Invalid port_id=%d\n", port_id);
> - return (-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;
> -
> - if (!rte_eth_dev_is_valid_port(port_id)) {
> - PMD_DEBUG_TRACE("Invalid port_id=%d\n", port_id);
> - return (-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;
> -
> - if (!rte_eth_dev_is_valid_port(port_id)) {
> - PMD_DEBUG_TRACE("Invalid port_id=%d\n", port_id);
> - return (-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;
> -
> - if (!rte_eth_dev_is_valid_port(port_id)) {
> - PMD_DEBUG_TRACE("Invalid port_id=%d\n", port_id);
> - return (-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;
> -
> - if (!rte_eth_dev_is_valid_port(port_id)) {
> - PMD_DEBUG_TRACE("Invalid port_id=%d\n", port_id);
> - return (-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;
> -
> - if (!rte_eth_dev_is_valid_port(port_id)) {
> - PMD_DEBUG_TRACE("Invalid port_id=%d\n", port_id);
> - return (-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 4648290..041aa32 100644
> --- a/lib/librte_ether/rte_ethdev.h
> +++ b/lib/librte_ether/rte_ethdev.h
> @@ -672,42 +672,6 @@ struct rte_eth_pfc_conf {
> };
>
> /**
> - * Memory space that can be configured to store Flow Director filters
> - * in the board memory.
> - */
> -enum rte_fdir_pballoc_type {
> - RTE_FDIR_PBALLOC_64K = 0, /**< 64k. */
> - RTE_FDIR_PBALLOC_128K, /**< 128k. */
> - RTE_FDIR_PBALLOC_256K, /**< 256k. */
> -};
> -
> -/**
> - * Select report mode of FDIR hash information in RX descriptors.
> - */
> -enum rte_fdir_status_mode {
> - RTE_FDIR_NO_REPORT_STATUS = 0, /**< Never report FDIR hash. */
> - RTE_FDIR_REPORT_STATUS, /**< Only report FDIR hash for matching pkts. */
> - RTE_FDIR_REPORT_STATUS_ALWAYS, /**< Always report FDIR hash. */
> -};
> -
> -/**
> - * A structure used to configure the Flow Director (FDIR) feature
> - * of an Ethernet port.
> - *
> - * If mode is RTE_FDIR_DISABLE, the pballoc value is ignored.
> - */
> -struct rte_fdir_conf {
> - enum rte_fdir_mode mode; /**< Flow Director mode. */
> - enum rte_fdir_pballoc_type pballoc; /**< Space for FDIR filters. */
> - enum rte_fdir_status_mode status; /**< How to report FDIR hash. */
> - /** RX queue of packets matching a "drop" filter in perfect mode. */
> - uint8_t drop_queue;
> - struct rte_eth_fdir_masks mask;
> - struct rte_eth_fdir_flex_conf flex_conf;
> - /**< Flex payload configuration. */
> -};
> -
[Wu, Jingjing] This structures and above types are useful about global configuration. They can't be removed.
> -/**
> * UDP tunneling configuration.
> */
> struct rte_eth_udp_tunnel {
> @@ -734,96 +698,6 @@ enum rte_iptype {
> };
>
> /**
> - * 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 {
> @@ -868,7 +742,6 @@ struct rte_eth_conf {
> /** Currently,Priority Flow Control(PFC) are supported,if DCB with PFC
> is needed,and the variable must be set ETH_DCB_PFC_SUPPORT. */
> uint32_t dcb_capability_en;
> - struct rte_fdir_conf fdir_conf; /**< FDIR configuration. */
[Wu, Jingjing] It can't be removed, because it is for FDIR global configuration.
> struct rte_intr_conf intr_conf; /**< Interrupt mode configuration. */
> };
>
> @@ -1079,45 +952,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 */
> @@ -1346,23 +1180,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. */
> @@ -2579,222 +2396,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 {
> diff --git a/lib/librte_pmd_enic/enic_ethdev.c b/lib/librte_pmd_enic/enic_ethdev.c
> index 63a594d..bdb6801 100644
> --- a/lib/librte_pmd_enic/enic_ethdev.c
> +++ b/lib/librte_pmd_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_pmd_mlx4/mlx4.c b/lib/librte_pmd_mlx4/mlx4.c
> index 024282a..6ba5a6b 100644
> --- a/lib/librte_pmd_mlx4/mlx4.c
> +++ b/lib/librte_pmd_mlx4/mlx4.c
> @@ -4192,13 +4192,6 @@ static const struct eth_dev_ops mlx4_dev_ops = {
> .mac_addr_remove = mlx4_mac_addr_remove,
> .mac_addr_add = mlx4_mac_addr_add,
> .mtu_set = mlx4_dev_set_mtu,
> - .fdir_add_signature_filter = NULL,
> - .fdir_update_signature_filter = NULL,
> - .fdir_remove_signature_filter = NULL,
> - .fdir_add_perfect_filter = NULL,
> - .fdir_update_perfect_filter = NULL,
> - .fdir_remove_perfect_filter = NULL,
> - .fdir_set_masks = NULL
> };
>
> /**
> --
> 2.2.2
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [RFC PATCH] ethdev: remove old flow director API
2015-04-20 14:32 ` Wu, Jingjing
@ 2015-04-20 14:59 ` Thomas Monjalon
2015-04-22 8:26 ` Wu, Jingjing
0 siblings, 1 reply; 7+ messages in thread
From: Thomas Monjalon @ 2015-04-20 14:59 UTC (permalink / raw)
To: Wu, Jingjing; +Cc: dev
2015-04-20 14:32, Wu, Jingjing:
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> > It's time to remove this old API.
> > It seems some work is still needed to rely only on eth_ctrl API.
> > At least ixgbe, i40e and testpmd must be fixed.
> > Jingjing, do you think it's possible to remove all these structures
> > from rte_ethdev.h?
> >
> [Wu, Jingjing] Yes, I agree.
> But few comments list below.
> Beside the following change, some commands also need to be removed in testpmd. For the ixgbe, code to the old APIs are already fixed.
> > --- a/lib/librte_ether/rte_ethdev.h
> > +++ b/lib/librte_ether/rte_ethdev.h
> > @@ -672,42 +672,6 @@ struct rte_eth_pfc_conf {
> > };
> >
> > /**
> > - * Memory space that can be configured to store Flow Director filters
> > - * in the board memory.
> > - */
> > -enum rte_fdir_pballoc_type {
> > - RTE_FDIR_PBALLOC_64K = 0, /**< 64k. */
> > - RTE_FDIR_PBALLOC_128K, /**< 128k. */
> > - RTE_FDIR_PBALLOC_256K, /**< 256k. */
> > -};
This is hardware-related. Why should it be part of the API?
> > -
> > -/**
> > - * Select report mode of FDIR hash information in RX descriptors.
> > - */
> > -enum rte_fdir_status_mode {
> > - RTE_FDIR_NO_REPORT_STATUS = 0, /**< Never report FDIR hash. */
> > - RTE_FDIR_REPORT_STATUS, /**< Only report FDIR hash for matching pkts. */
> > - RTE_FDIR_REPORT_STATUS_ALWAYS, /**< Always report FDIR hash. */
> > -};
> > -
> > -/**
> > - * A structure used to configure the Flow Director (FDIR) feature
> > - * of an Ethernet port.
> > - *
> > - * If mode is RTE_FDIR_DISABLE, the pballoc value is ignored.
> > - */
> > -struct rte_fdir_conf {
> > - enum rte_fdir_mode mode; /**< Flow Director mode. */
> > - enum rte_fdir_pballoc_type pballoc; /**< Space for FDIR filters. */
> > - enum rte_fdir_status_mode status; /**< How to report FDIR hash. */
> > - /** RX queue of packets matching a "drop" filter in perfect mode. */
> > - uint8_t drop_queue;
> > - struct rte_eth_fdir_masks mask;
> > - struct rte_eth_fdir_flex_conf flex_conf;
> > - /**< Flex payload configuration. */
> > -};
> > -
> [Wu, Jingjing] This structures and above types are useful about global configuration. They can't be removed.
Why? I thought eth_ctrl API would be enough.
It seems strange to have a part of the flow director API in rte_eth_ctrl.h and
another part in rte_ethdev.h. Other filters have no impact on rte_ethdev.h.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [RFC PATCH] ethdev: remove old flow director API
2015-04-20 14:59 ` Thomas Monjalon
@ 2015-04-22 8:26 ` Wu, Jingjing
0 siblings, 0 replies; 7+ messages in thread
From: Wu, Jingjing @ 2015-04-22 8:26 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev
> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Monday, April 20, 2015 11:00 PM
> To: Wu, Jingjing
> Cc: dev@dpdk.org
> Subject: Re: [RFC PATCH] ethdev: remove old flow director API
>
> 2015-04-20 14:32, Wu, Jingjing:
> > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> > > It's time to remove this old API.
> > > It seems some work is still needed to rely only on eth_ctrl API.
> > > At least ixgbe, i40e and testpmd must be fixed.
> > > Jingjing, do you think it's possible to remove all these structures
> > > from rte_ethdev.h?
> > >
> > [Wu, Jingjing] Yes, I agree.
> > But few comments list below.
> > Beside the following change, some commands also need to be removed in testpmd. For the
> ixgbe, code to the old APIs are already fixed.
>
> > > --- a/lib/librte_ether/rte_ethdev.h
> > > +++ b/lib/librte_ether/rte_ethdev.h
> > > @@ -672,42 +672,6 @@ struct rte_eth_pfc_conf {
> > > };
> > >
> > > /**
> > > - * Memory space that can be configured to store Flow Director filters
> > > - * in the board memory.
> > > - */
> > > -enum rte_fdir_pballoc_type {
> > > - RTE_FDIR_PBALLOC_64K = 0, /**< 64k. */
> > > - RTE_FDIR_PBALLOC_128K, /**< 128k. */
> > > - RTE_FDIR_PBALLOC_256K, /**< 256k. */
> > > -};
>
> This is hardware-related. Why should it be part of the API?
>
> > > -
> > > -/**
> > > - * Select report mode of FDIR hash information in RX descriptors.
> > > - */
> > > -enum rte_fdir_status_mode {
> > > - RTE_FDIR_NO_REPORT_STATUS = 0, /**< Never report FDIR hash. */
> > > - RTE_FDIR_REPORT_STATUS, /**< Only report FDIR hash for matching pkts. */
> > > - RTE_FDIR_REPORT_STATUS_ALWAYS, /**< Always report FDIR hash. */
> > > -};
> > > -
> > > -/**
> > > - * A structure used to configure the Flow Director (FDIR) feature
> > > - * of an Ethernet port.
> > > - *
> > > - * If mode is RTE_FDIR_DISABLE, the pballoc value is ignored.
> > > - */
> > > -struct rte_fdir_conf {
> > > - enum rte_fdir_mode mode; /**< Flow Director mode. */
> > > - enum rte_fdir_pballoc_type pballoc; /**< Space for FDIR filters. */
> > > - enum rte_fdir_status_mode status; /**< How to report FDIR hash. */
> > > - /** RX queue of packets matching a "drop" filter in perfect mode. */
> > > - uint8_t drop_queue;
> > > - struct rte_eth_fdir_masks mask;
> > > - struct rte_eth_fdir_flex_conf flex_conf;
> > > - /**< Flex payload configuration. */
> > > -};
> > > -
> > [Wu, Jingjing] This structures and above types are useful about global configuration. They
> can't be removed.
>
> Why? I thought eth_ctrl API would be enough.
> It seems strange to have a part of the flow director API in rte_eth_ctrl.h and
> another part in rte_ethdev.h. Other filters have no impact on rte_ethdev.h.
rte_fdir_conf in rte_eth_conf is used when rte_eth_dev_configure to set initialization parameters which cann't be changed at running time.
For example, if we disable the flow director, we can set the mode in it to RTR_FDIR_DISABLE, then the resource will not be allocated for flow director.
The way is the same as rss_conf in rte_eth_conf. While the filter_ctrl can provide interface to configure parameters or add/delete rules at device running time.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [RFC PATCH] ethdev: remove old flow director API
2015-04-20 14:11 [dpdk-dev] [RFC PATCH] ethdev: remove old flow director API Thomas Monjalon
2015-04-20 14:32 ` Wu, Jingjing
@ 2015-04-20 16:33 ` Neil Horman
2015-04-20 16:45 ` Venky Venkatesan
1 sibling, 1 reply; 7+ messages in thread
From: Neil Horman @ 2015-04-20 16:33 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev
On Mon, Apr 20, 2015 at 04:11:43PM +0200, Thomas Monjalon wrote:
> It's time to remove this old API.
> It seems some work is still needed to rely only on eth_ctrl API.
> At least ixgbe, i40e and testpmd must be fixed.
> Jingjing, do you think it's possible to remove all these structures
> from rte_ethdev.h?
>
> Thanks
>
NAK.
I'm certainly not opposed to removing the API's if they are truly no longer
needed. But they have been codified as part of the ABI, so the deprecation
schedule needs to be followed. Given what you've said above, it seems like that
might be worthwhile anyway, as it will provide the needed runway to allow users
to convert to the new API.
Neil
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [RFC PATCH] ethdev: remove old flow director API
2015-04-20 16:33 ` Neil Horman
@ 2015-04-20 16:45 ` Venky Venkatesan
2015-04-27 16:08 ` Thomas Monjalon
0 siblings, 1 reply; 7+ messages in thread
From: Venky Venkatesan @ 2015-04-20 16:45 UTC (permalink / raw)
To: dev
On 04/20/2015 09:33 AM, Neil Horman wrote:
> On Mon, Apr 20, 2015 at 04:11:43PM +0200, Thomas Monjalon wrote:
>> It's time to remove this old API.
>> It seems some work is still needed to rely only on eth_ctrl API.
>> At least ixgbe, i40e and testpmd must be fixed.
>> Jingjing, do you think it's possible to remove all these structures
>> from rte_ethdev.h?
>>
>> Thanks
>>
> NAK.
>
> I'm certainly not opposed to removing the API's if they are truly no longer
> needed. But they have been codified as part of the ABI, so the deprecation
> schedule needs to be followed. Given what you've said above, it seems like that
> might be worthwhile anyway, as it will provide the needed runway to allow users
> to convert to the new API.
>
> Neil
+1 NAK. Agree with Neil.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [dpdk-dev] [RFC PATCH] ethdev: remove old flow director API
2015-04-20 16:45 ` Venky Venkatesan
@ 2015-04-27 16:08 ` Thomas Monjalon
0 siblings, 0 replies; 7+ messages in thread
From: Thomas Monjalon @ 2015-04-27 16:08 UTC (permalink / raw)
To: Venky Venkatesan, Neil Horman; +Cc: dev
2015-04-20 09:45, Venky Venkatesan:
> On 04/20/2015 09:33 AM, Neil Horman wrote:
> > On Mon, Apr 20, 2015 at 04:11:43PM +0200, Thomas Monjalon wrote:
> >> It's time to remove this old API.
> >> It seems some work is still needed to rely only on eth_ctrl API.
> >> At least ixgbe, i40e and testpmd must be fixed.
> >> Jingjing, do you think it's possible to remove all these structures
> >> from rte_ethdev.h?
> >>
> >> Thanks
> >>
> > NAK.
> >
> > I'm certainly not opposed to removing the API's if they are truly no longer
> > needed. But they have been codified as part of the ABI, so the deprecation
> > schedule needs to be followed. Given what you've said above, it seems like that
> > might be worthwhile anyway, as it will provide the needed runway to allow users
> > to convert to the new API.
> >
> > Neil
> +1 NAK. Agree with Neil.
+1 Agree with you :)
The goal of this RFC proposal is to see how to progress on API cleanup.
There are actually 2 parts:
1/ The flow director functions of rte_ethdev.h were only used for enic in
DPDK 2.0. We could set a deprecation notice to remove them in DPDK 2.2.
2/ Some associated structures are also used for rte_eth_conf.
My question was to check how it would be relevant to remove this rte_fdir_conf.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-04-27 16:09 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-20 14:11 [dpdk-dev] [RFC PATCH] ethdev: remove old flow director API Thomas Monjalon
2015-04-20 14:32 ` Wu, Jingjing
2015-04-20 14:59 ` Thomas Monjalon
2015-04-22 8:26 ` Wu, Jingjing
2015-04-20 16:33 ` Neil Horman
2015-04-20 16:45 ` Venky Venkatesan
2015-04-27 16:08 ` 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).