DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	Anatoly Burakov <anatoly.burakov@intel.com>,
	Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Subject: [PATCH v4 03/23] net/ixgbe: remove experimental FDIR API
Date: Wed,  5 Aug 2026 22:08:57 -0700	[thread overview]
Message-ID: <20260806051004.166778-4-stephen@networkplumber.org> (raw)
In-Reply-To: <20260806051004.166778-1-stephen@networkplumber.org>

Remove the PMD specific flow director API from ixgbe.
These APIs are experimental, therefore they can be removed
without additional warnings.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/intel/ixgbe/ixgbe_ethdev.h  |   5 -
 drivers/net/intel/ixgbe/ixgbe_fdir.c    | 117 ------------------------
 drivers/net/intel/ixgbe/rte_pmd_ixgbe.c |  34 -------
 drivers/net/intel/ixgbe/rte_pmd_ixgbe.h |  32 -------
 4 files changed, 188 deletions(-)

diff --git a/drivers/net/intel/ixgbe/ixgbe_ethdev.h b/drivers/net/intel/ixgbe/ixgbe_ethdev.h
index 5d3243cb4d..c290f04611 100644
--- a/drivers/net/intel/ixgbe/ixgbe_ethdev.h
+++ b/drivers/net/intel/ixgbe/ixgbe_ethdev.h
@@ -717,11 +717,6 @@ int ixgbe_fdir_filter_program(struct ixgbe_adapter *adapter,
 		struct rte_eth_fdir_conf *fdir_conf,
 		struct ixgbe_fdir_rule *rule,
 		bool del, bool update);
-void ixgbe_fdir_info_get(struct rte_eth_dev *dev,
-			 struct rte_eth_fdir_info *fdir_info);
-void ixgbe_fdir_stats_get(struct rte_eth_dev *dev,
-			  struct rte_eth_fdir_stats *fdir_stats);
-
 void ixgbe_configure_dcb(struct rte_eth_dev *dev);
 
 int
diff --git a/drivers/net/intel/ixgbe/ixgbe_fdir.c b/drivers/net/intel/ixgbe/ixgbe_fdir.c
index b32dc54287..20cc72ffcd 100644
--- a/drivers/net/intel/ixgbe/ixgbe_fdir.c
+++ b/drivers/net/intel/ixgbe/ixgbe_fdir.c
@@ -1202,123 +1202,6 @@ ixgbe_fdir_flush(struct rte_eth_dev *dev)
 	return ret;
 }
 
-#define FDIRENTRIES_NUM_SHIFT 10
-void
-ixgbe_fdir_info_get(struct rte_eth_dev *dev, struct rte_eth_fdir_info *fdir_info)
-{
-	struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
-	struct rte_eth_fdir_conf *fdir_conf = IXGBE_DEV_FDIR_CONF(dev);
-	struct ixgbe_hw_fdir_info *info =
-			IXGBE_DEV_PRIVATE_TO_FDIR_INFO(dev->data->dev_private);
-	uint32_t fdirctrl, max_num;
-	uint8_t offset;
-
-	fdirctrl = IXGBE_READ_REG(hw, IXGBE_FDIRCTRL);
-	offset = ((fdirctrl & IXGBE_FDIRCTRL_FLEX_MASK) >>
-			IXGBE_FDIRCTRL_FLEX_SHIFT) * sizeof(uint16_t);
-
-	fdir_info->mode = fdir_conf->mode;
-	max_num = (1 << (FDIRENTRIES_NUM_SHIFT +
-			(fdirctrl & FDIRCTRL_PBALLOC_MASK)));
-	if (fdir_info->mode >= RTE_FDIR_MODE_PERFECT &&
-	    fdir_info->mode <= RTE_FDIR_MODE_PERFECT_TUNNEL)
-		fdir_info->guarant_spc = max_num;
-	else if (fdir_info->mode == RTE_FDIR_MODE_SIGNATURE)
-		fdir_info->guarant_spc = max_num * 4;
-
-	fdir_info->mask.vlan_tci_mask = info->mask.vlan_tci_mask;
-	fdir_info->mask.ipv4_mask.src_ip = info->mask.src_ipv4_mask;
-	fdir_info->mask.ipv4_mask.dst_ip = info->mask.dst_ipv4_mask;
-	IPV6_MASK_TO_ADDR(info->mask.src_ipv6_mask,
-			fdir_info->mask.ipv6_mask.src_ip);
-	IPV6_MASK_TO_ADDR(info->mask.dst_ipv6_mask,
-			fdir_info->mask.ipv6_mask.dst_ip);
-	fdir_info->mask.src_port_mask = info->mask.src_port_mask;
-	fdir_info->mask.dst_port_mask = info->mask.dst_port_mask;
-	fdir_info->mask.mac_addr_byte_mask = info->mask.mac_addr_byte_mask;
-	fdir_info->mask.tunnel_id_mask = info->mask.tunnel_id_mask;
-	fdir_info->mask.tunnel_type_mask = info->mask.tunnel_type_mask;
-	fdir_info->max_flexpayload = IXGBE_FDIR_MAX_FLEX_LEN;
-
-	if (fdir_info->mode == RTE_FDIR_MODE_PERFECT_MAC_VLAN ||
-	    fdir_info->mode == RTE_FDIR_MODE_PERFECT_TUNNEL)
-		fdir_info->flow_types_mask[0] = 0ULL;
-	else
-		fdir_info->flow_types_mask[0] = IXGBE_FDIR_FLOW_TYPES;
-	for (uint32_t i = 1; i < RTE_FLOW_MASK_ARRAY_SIZE; i++)
-		fdir_info->flow_types_mask[i] = 0ULL;
-
-	fdir_info->flex_payload_unit = sizeof(uint16_t);
-	fdir_info->max_flex_payload_segment_num = 1;
-	fdir_info->flex_payload_limit = IXGBE_MAX_FLX_SOURCE_OFF;
-	fdir_info->flex_conf.nb_payloads = 1;
-	fdir_info->flex_conf.flex_set[0].type = RTE_ETH_RAW_PAYLOAD;
-	fdir_info->flex_conf.flex_set[0].src_offset[0] = offset;
-	fdir_info->flex_conf.flex_set[0].src_offset[1] = offset + 1;
-	fdir_info->flex_conf.nb_flexmasks = 1;
-	fdir_info->flex_conf.flex_mask[0].flow_type = RTE_ETH_FLOW_UNKNOWN;
-	fdir_info->flex_conf.flex_mask[0].mask[0] =
-			(uint8_t)(info->mask.flex_bytes_mask & 0x00FF);
-	fdir_info->flex_conf.flex_mask[0].mask[1] =
-			(uint8_t)((info->mask.flex_bytes_mask & 0xFF00) >> 8);
-}
-
-void
-ixgbe_fdir_stats_get(struct rte_eth_dev *dev, struct rte_eth_fdir_stats *fdir_stats)
-{
-	struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
-	struct rte_eth_fdir_conf *fdir_conf = IXGBE_DEV_FDIR_CONF(dev);
-	struct ixgbe_hw_fdir_info *info =
-		IXGBE_DEV_PRIVATE_TO_FDIR_INFO(dev->data->dev_private);
-	uint32_t reg, max_num;
-	enum rte_fdir_mode fdir_mode = fdir_conf->mode;
-
-	/* Get the information from registers */
-	reg = IXGBE_READ_REG(hw, IXGBE_FDIRFREE);
-	info->collision = (uint16_t)((reg & IXGBE_FDIRFREE_COLL_MASK) >>
-				     IXGBE_FDIRFREE_COLL_SHIFT);
-	info->free = (uint16_t)((reg & IXGBE_FDIRFREE_FREE_MASK) >>
-				IXGBE_FDIRFREE_FREE_SHIFT);
-
-	reg = IXGBE_READ_REG(hw, IXGBE_FDIRLEN);
-	info->maxhash = (uint16_t)((reg & IXGBE_FDIRLEN_MAXHASH_MASK) >>
-				   IXGBE_FDIRLEN_MAXHASH_SHIFT);
-	info->maxlen  = (uint8_t)((reg & IXGBE_FDIRLEN_MAXLEN_MASK) >>
-				  IXGBE_FDIRLEN_MAXLEN_SHIFT);
-
-	reg = IXGBE_READ_REG(hw, IXGBE_FDIRUSTAT);
-	info->remove += (reg & IXGBE_FDIRUSTAT_REMOVE_MASK) >>
-		IXGBE_FDIRUSTAT_REMOVE_SHIFT;
-	info->add += (reg & IXGBE_FDIRUSTAT_ADD_MASK) >>
-		IXGBE_FDIRUSTAT_ADD_SHIFT;
-
-	reg = IXGBE_READ_REG(hw, IXGBE_FDIRFSTAT) & 0xFFFF;
-	info->f_remove += (reg & IXGBE_FDIRFSTAT_FREMOVE_MASK) >>
-		IXGBE_FDIRFSTAT_FREMOVE_SHIFT;
-	info->f_add += (reg & IXGBE_FDIRFSTAT_FADD_MASK) >>
-		IXGBE_FDIRFSTAT_FADD_SHIFT;
-
-	/*  Copy the new information in the fdir parameter */
-	fdir_stats->collision = info->collision;
-	fdir_stats->free = info->free;
-	fdir_stats->maxhash = info->maxhash;
-	fdir_stats->maxlen = info->maxlen;
-	fdir_stats->remove = info->remove;
-	fdir_stats->add = info->add;
-	fdir_stats->f_remove = info->f_remove;
-	fdir_stats->f_add = info->f_add;
-
-	reg = IXGBE_READ_REG(hw, IXGBE_FDIRCTRL);
-	max_num = (1 << (FDIRENTRIES_NUM_SHIFT +
-			 (reg & FDIRCTRL_PBALLOC_MASK)));
-	if (fdir_mode >= RTE_FDIR_MODE_PERFECT &&
-	    fdir_mode <= RTE_FDIR_MODE_PERFECT_TUNNEL)
-		fdir_stats->guarant_cnt = max_num - fdir_stats->free;
-	else if (fdir_mode == RTE_FDIR_MODE_SIGNATURE)
-		fdir_stats->guarant_cnt = max_num * 4 - fdir_stats->free;
-
-}
-
 /* restore flow director filter */
 void
 ixgbe_fdir_filter_restore(struct rte_eth_dev *dev)
diff --git a/drivers/net/intel/ixgbe/rte_pmd_ixgbe.c b/drivers/net/intel/ixgbe/rte_pmd_ixgbe.c
index f816fa3173..e0dff9cd73 100644
--- a/drivers/net/intel/ixgbe/rte_pmd_ixgbe.c
+++ b/drivers/net/intel/ixgbe/rte_pmd_ixgbe.c
@@ -1176,37 +1176,3 @@ rte_pmd_ixgbe_mdio_unlocked_write(uint16_t port, uint32_t reg_addr,
 	return 0;
 }
 
-RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_pmd_ixgbe_get_fdir_info, 20.08)
-int
-rte_pmd_ixgbe_get_fdir_info(uint16_t port, struct rte_eth_fdir_info *fdir_info)
-{
-	struct rte_eth_dev *dev;
-
-	RTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV);
-
-	dev = &rte_eth_devices[port];
-	if (!is_ixgbe_supported(dev))
-		return -ENOTSUP;
-
-	ixgbe_fdir_info_get(dev, fdir_info);
-
-	return 0;
-}
-
-RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_pmd_ixgbe_get_fdir_stats, 20.08)
-int
-rte_pmd_ixgbe_get_fdir_stats(uint16_t port,
-			     struct rte_eth_fdir_stats *fdir_stats)
-{
-	struct rte_eth_dev *dev;
-
-	RTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV);
-
-	dev = &rte_eth_devices[port];
-	if (!is_ixgbe_supported(dev))
-		return -ENOTSUP;
-
-	ixgbe_fdir_stats_get(dev, fdir_stats);
-
-	return 0;
-}
diff --git a/drivers/net/intel/ixgbe/rte_pmd_ixgbe.h b/drivers/net/intel/ixgbe/rte_pmd_ixgbe.h
index 7ca1126cfb..74bb5aa140 100644
--- a/drivers/net/intel/ixgbe/rte_pmd_ixgbe.h
+++ b/drivers/net/intel/ixgbe/rte_pmd_ixgbe.h
@@ -724,36 +724,4 @@ enum {
 int
 rte_pmd_ixgbe_upd_fctrl_sbp(uint16_t port, int enable);
 
-/**
- * Get port fdir info
- *
- * @param port
- *   The port identifier of the Ethernet device.
- * @param fdir_info
- *   The fdir info of the port
- * @return
- *   - (0) if successful.
- *   - (-ENODEV) if *port* invalid.
- *   - (-ENOTSUP) if operation not supported.
- */
-__rte_experimental
-int
-rte_pmd_ixgbe_get_fdir_info(uint16_t port, struct rte_eth_fdir_info *fdir_info);
-
-/**
- * Get port fdir status
- *
- * @param port
- *   The port identifier of the Ethernet device.
- * @param fdir_stats
- *   The fdir status of the port
- * @return
- *   - (0) if successful.
- *   - (-ENODEV) if *port* invalid.
- *   - (-ENOTSUP) if operation not supported.
- */
-__rte_experimental
-int
-rte_pmd_ixgbe_get_fdir_stats(uint16_t port,
-			     struct rte_eth_fdir_stats *fdir_stats);
 #endif /* _PMD_IXGBE_H_ */
-- 
2.53.0


  parent reply	other threads:[~2026-08-06  5:10 UTC|newest]

Thread overview: 76+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-03 16:51 [PATCH v2 00/22] ethdev: clean up legacy flow director Stephen Hemminger
2026-08-03 16:51 ` [PATCH v2 01/22] drivers/net: remove unused include in dpaa Stephen Hemminger
2026-08-03 16:51 ` [PATCH v2 02/22] ethdev: use DPDK byte order conversion Stephen Hemminger
2026-08-03 16:51 ` [PATCH v2 03/22] net/ixgbe: remove experimental FDIR API Stephen Hemminger
2026-08-03 16:51 ` [PATCH v2 04/22] net/i40e: " Stephen Hemminger
2026-08-03 16:51 ` [PATCH v2 05/22] app/testpmd: remove support for flow director Stephen Hemminger
2026-08-03 16:51 ` [PATCH v2 06/22] net/gve: include IP, UDP and TCP headers Stephen Hemminger
2026-08-03 18:04   ` Joshua Washington
2026-08-03 16:51 ` [PATCH v2 07/22] crypto/dpaa_sec: include UDP header Stephen Hemminger
2026-08-03 16:51 ` [PATCH v2 08/22] net/nfp: break implicit dependency on rte_eth_ctrl.h Stephen Hemminger
2026-08-03 16:51 ` [PATCH v2 09/22] net/mana: include used network headers Stephen Hemminger
2026-08-03 17:09   ` [EXTERNAL] " Long Li
2026-08-03 16:51 ` [PATCH v2 10/22] gro: include headers directly Stephen Hemminger
2026-08-03 16:51 ` [PATCH v2 11/22] app/test: " Stephen Hemminger
2026-08-03 16:51 ` [PATCH v2 12/22] node: get UDP header Stephen Hemminger
2026-08-03 16:51 ` [PATCH v2 13/22] net/rnp: include network headers Stephen Hemminger
2026-08-03 16:52 ` [PATCH v2 14/22] net/r8169: get " Stephen Hemminger
2026-08-03 16:52 ` [PATCH v2 15/22] net/ngbe: include network protocol headers Stephen Hemminger
2026-08-03 16:52 ` [PATCH v2 16/22] examples: include network headers Stephen Hemminger
2026-08-03 16:52 ` [PATCH v2 17/22] net/mlx5: include rte_flow as needed Stephen Hemminger
2026-08-03 16:52 ` [PATCH v2 18/22] net/sfc: include rte_flow Stephen Hemminger
2026-08-03 16:52 ` [PATCH v2 19/22] net/intel/common: include network headers Stephen Hemminger
2026-08-03 16:52 ` [PATCH v2 20/22] net/enetfec: add missing sys/types.h include Stephen Hemminger
2026-08-03 16:52 ` [PATCH v2 21/22] ethdev, drivers: isolate flow director Stephen Hemminger
2026-08-03 16:52 ` [PATCH v2 22/22] doc: add release note about rte_ethdev changes Stephen Hemminger
2026-08-04 15:44 ` [PATCH v3 00/23] ethdev: isolate legacy flow director Stephen Hemminger
2026-08-04 15:44   ` [PATCH v3 01/23] drivers/net: remove unused include in dpaa Stephen Hemminger
2026-08-04 15:44   ` [PATCH v3 02/23] ethdev: use DPDK byte order conversion Stephen Hemminger
2026-08-04 15:44   ` [PATCH v3 03/23] net/ixgbe: remove experimental FDIR API Stephen Hemminger
2026-08-04 15:44   ` [PATCH v3 04/23] net/i40e: " Stephen Hemminger
2026-08-04 15:44   ` [PATCH v3 05/23] app/testpmd: remove support for flow director Stephen Hemminger
2026-08-04 15:44   ` [PATCH v3 06/23] app/testpmd: move str_to_flowtype to i40e Stephen Hemminger
2026-08-04 15:44   ` [PATCH v3 07/23] app/test: include headers directly Stephen Hemminger
2026-08-04 15:53     ` Marat Khalili
2026-08-04 15:44   ` [PATCH v3 08/23] gro: " Stephen Hemminger
2026-08-04 15:44   ` [PATCH v3 09/23] crypto/dpaa_sec: include UDP header Stephen Hemminger
2026-08-04 15:44   ` [PATCH v3 10/23] net/gve: include UDP, SCTP and TCP headers Stephen Hemminger
2026-08-04 15:44   ` [PATCH v3 11/23] net/nfp: break implicit dependency on rte_eth_ctrl.h Stephen Hemminger
2026-08-04 15:45   ` [PATCH v3 12/23] net/mana: include used network headers Stephen Hemminger
2026-08-04 15:45   ` [PATCH v3 13/23] node: get UDP header Stephen Hemminger
2026-08-04 15:45   ` [PATCH v3 14/23] net/rnp: include network headers Stephen Hemminger
2026-08-04 15:45   ` [PATCH v3 15/23] net/r8169: get " Stephen Hemminger
2026-08-04 15:45   ` [PATCH v3 16/23] net/ngbe: include network protocol headers Stephen Hemminger
2026-08-04 15:45   ` [PATCH v3 17/23] examples: include network headers Stephen Hemminger
2026-08-04 15:45   ` [PATCH v3 18/23] net/mlx5: include rte_flow as needed Stephen Hemminger
2026-08-04 15:45   ` [PATCH v3 19/23] net/sfc: include rte_flow Stephen Hemminger
2026-08-04 15:45   ` [PATCH v3 20/23] net/intel/common: include network headers Stephen Hemminger
2026-08-04 15:45   ` [PATCH v3 21/23] net/enetfec: add missing sys/types.h include Stephen Hemminger
2026-08-04 15:45   ` [PATCH v3 22/23] ethdev, drivers: isolate flow director Stephen Hemminger
2026-08-04 15:45   ` [PATCH v3 23/23] doc: add release note about rte_ethdev changes Stephen Hemminger
2026-08-06  5:08 ` [PATCH v4 00/23] ethdev: refactor remaining uses of flow director Stephen Hemminger
2026-08-06  5:08   ` [PATCH v4 01/23] drivers/net: remove unused include in dpaa and dpaa2 Stephen Hemminger
2026-08-06  6:13     ` Hemant Agrawal
2026-08-06  5:08   ` [PATCH v4 02/23] ethdev: use DPDK byte order conversion Stephen Hemminger
2026-08-06  5:08   ` Stephen Hemminger [this message]
2026-08-06  5:08   ` [PATCH v4 04/23] net/i40e: remove experimental FDIR API Stephen Hemminger
2026-08-06  5:08   ` [PATCH v4 05/23] app/testpmd: remove support for flow director Stephen Hemminger
2026-08-06  5:09   ` [PATCH v4 06/23] app/testpmd: move str_to_flowtype to i40e Stephen Hemminger
2026-08-06  5:09   ` [PATCH v4 07/23] app/test: include headers directly Stephen Hemminger
2026-08-06  5:09   ` [PATCH v4 08/23] gro: " Stephen Hemminger
2026-08-06  5:09   ` [PATCH v4 09/23] crypto/dpaa_sec: include UDP header Stephen Hemminger
2026-08-06  6:12     ` Hemant Agrawal
2026-08-06  5:09   ` [PATCH v4 10/23] net/gve: include UDP, SCTP and TCP headers Stephen Hemminger
2026-08-06  5:09   ` [PATCH v4 11/23] net/nfp: break implicit dependency on rte_eth_ctrl.h Stephen Hemminger
2026-08-06  5:09   ` [PATCH v4 12/23] net/mana: include used network headers Stephen Hemminger
2026-08-06  5:09   ` [PATCH v4 13/23] node: get UDP header Stephen Hemminger
2026-08-06  5:09   ` [PATCH v4 14/23] net/rnp: include network headers Stephen Hemminger
2026-08-06  5:09   ` [PATCH v4 15/23] net/r8169: get " Stephen Hemminger
2026-08-06  5:09   ` [PATCH v4 16/23] net/ngbe: include network protocol headers Stephen Hemminger
2026-08-06  5:09   ` [PATCH v4 17/23] examples: include network headers Stephen Hemminger
2026-08-06  5:09   ` [PATCH v4 18/23] net/mlx5: include rte_flow as needed Stephen Hemminger
2026-08-06  5:09   ` [PATCH v4 19/23] net/sfc: include rte_flow Stephen Hemminger
2026-08-06  5:09   ` [PATCH v4 20/23] net/intel/common: include network headers Stephen Hemminger
2026-08-06  5:09   ` [PATCH v4 21/23] net/enetfec: add missing sys/types.h include Stephen Hemminger
2026-08-06  5:09   ` [PATCH v4 22/23] ethdev, drivers: isolate flow director Stephen Hemminger
2026-08-06  5:09   ` [PATCH v4 23/23] doc: add release note about rte_ethdev changes Stephen Hemminger

Reply instructions:

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

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

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

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

  git send-email \
    --in-reply-to=20260806051004.166778-4-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=vladimir.medvedkin@intel.com \
    /path/to/YOUR_REPLY

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

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox