return 0;
}
-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)
{
uint8_t prot_type;
};
-/**
- * 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.
*/
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 */
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. */
}
#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.
*/