* [PATCH v2 00/22] ethdev: clean up legacy flow director
@ 2026-08-03 16:51 Stephen Hemminger
2026-08-03 16:51 ` [PATCH v2 01/22] drivers/net: remove unused include in dpaa Stephen Hemminger
` (23 more replies)
0 siblings, 24 replies; 76+ messages in thread
From: Stephen Hemminger @ 2026-08-03 16:51 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
The original flow support in DPDK was Intel-specific and built around
the flow director feature. It was superseded by the generic rte_flow
API introduced in the 17.02 release. The direct API calls to flow
director were removed in 20.11, but the data structures were never
removed and drivers still use them. Some Intel drivers also carry
driver-specific APIs related to flow director.
These vestiges mean applications can still see flow director data
structures, since rte_ethdev.h pulls in rte_eth_ctrl.h. It also means
several drivers and libraries have come to depend on network header
definitions arriving indirectly.
Since drivers still need these definitions, rte_eth_ctrl.h is renamed
to ethdev_fdir.h and the remaining bits in ethdev_driver.h are folded
into it. This is a driver SDK header, not public API, and exists only
so that drivers still carrying legacy flow director state have
somewhere to get these definitions. New drivers should not use it.
Applications relying on the indirect includes will need to add explicit
ones; this is a source level change only, with no ABI impact. The fdir
option of the testpmd "show port" and "clear port" commands is also
removed.
There is more to do here, but with no Intel hardware and no standalone
tests for this code, I have kept to mechanical refactoring.
v2:
- fix enetfec driver not built on x86
- reword commit messages based on AI review
Stephen Hemminger (22):
drivers/net: remove unused include in dpaa
ethdev: use DPDK byte order conversion
net/ixgbe: remove experimental FDIR API
net/i40e: remove experimental FDIR API
app/testpmd: remove support for flow director
net/gve: include IP, UDP and TCP headers
crypto/dpaa_sec: include UDP header
net/nfp: break implicit dependency on rte_eth_ctrl.h
net/mana: include used network headers
gro: include headers directly
app/test: include headers directly
node: get UDP header
net/rnp: include network headers
net/r8169: get network headers
net/ngbe: include network protocol headers
examples: include network headers
net/mlx5: include rte_flow as needed
net/sfc: include rte_flow
net/intel/common: include network headers
net/enetfec: add missing sys/types.h include
ethdev, drivers: isolate flow director
doc: add release note about rte_ethdev changes
app/test-eventdev/test_pipeline_common.h | 1 +
app/test-pmd/cmdline.c | 21 +--
app/test-pmd/config.c | 163 ------------------
app/test-pmd/testpmd.h | 3 -
app/test/test_bpf.c | 18 +-
app/test/test_security_inline_macsec.c | 2 +
app/test/test_security_inline_proto.c | 1 +
doc/api/doxy-api-index.md | 1 -
doc/guides/rel_notes/release_26_11.rst | 19 ++
doc/guides/testpmd_app_ug/testpmd_funcs.rst | 36 ----
drivers/crypto/dpaa_sec/dpaa_sec.h | 2 +
drivers/net/dpaa/dpaa_ptp.c | 1 -
drivers/net/dpaa2/dpaa2_ptp.c | 1 -
drivers/net/enetfec/enet_regs.h | 2 +
drivers/net/gve/gve_ethdev.h | 3 +
drivers/net/hinic/hinic_pmd_ethdev.h | 2 +
drivers/net/hinic3/hinic3_ethdev.h | 1 +
drivers/net/intel/common/tx_scalar.h | 3 +
drivers/net/intel/cpfl/cpfl_flow_engine_fxp.c | 2 +-
drivers/net/intel/e1000/e1000_ethdev.h | 1 +
drivers/net/intel/e1000/igc_filter.h | 2 +-
drivers/net/intel/i40e/i40e_ethdev.c | 4 +-
drivers/net/intel/i40e/i40e_ethdev.h | 5 +-
drivers/net/intel/i40e/i40e_fdir.c | 140 ---------------
drivers/net/intel/i40e/i40e_flow.c | 3 +-
drivers/net/intel/i40e/rte_pmd_i40e.c | 34 ----
drivers/net/intel/i40e/rte_pmd_i40e.h | 33 ----
drivers/net/intel/iavf/iavf_fsub.c | 2 +-
drivers/net/intel/iavf/iavf_hash.c | 2 +-
drivers/net/intel/ice/ice_acl_filter.c | 2 +-
drivers/net/intel/ice/ice_ethdev.h | 2 +
drivers/net/intel/ice/ice_generic_flow.c | 1 +
drivers/net/intel/ice/ice_hash.c | 2 +-
drivers/net/intel/ice/ice_switch_filter.c | 2 +-
drivers/net/intel/ipn3ke/ipn3ke_flow.c | 2 +-
drivers/net/intel/ixgbe/ixgbe_ethdev.h | 6 +-
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 ----
drivers/net/mana/mana.c | 2 +
drivers/net/mana/tx.c | 3 +
drivers/net/mlx5/mlx5_ethdev.c | 1 +
drivers/net/mlx5/mlx5_flow.h | 1 +
drivers/net/mlx5/mlx5_txq.c | 1 +
drivers/net/mlx5/mlx5_utils.c | 1 +
drivers/net/mlx5/mlx5_utils.h | 1 +
drivers/net/nbl/nbl_include/nbl_include.h | 1 +
drivers/net/nfp/nfp_ethdev.c | 6 +-
drivers/net/nfp/nfp_net_common.h | 1 +
drivers/net/ngbe/ngbe_rxtx.c | 4 +
drivers/net/r8169/r8169_rxtx.c | 3 +
drivers/net/rnp/rnp_rxtx.c | 6 +
drivers/net/sfc/sfc_dp.c | 1 +
drivers/net/txgbe/txgbe_ethdev.h | 1 +
examples/l2fwd-macsec/main.c | 2 +
examples/l3fwd-graph/main.c | 1 +
examples/l3fwd/l3fwd.h | 2 +
lib/ethdev/ethdev_driver.h | 36 ----
lib/ethdev/{rte_eth_ctrl.h => ethdev_fdir.h} | 58 +++++--
lib/ethdev/meson.build | 2 +-
lib/ethdev/rte_ethdev.h | 13 +-
lib/ethdev/sff_8472.c | 3 +-
lib/gro/gro_tcp4.c | 1 +
lib/gro/gro_vxlan_tcp4.c | 4 +-
lib/gro/gro_vxlan_udp4.c | 1 +
lib/gro/rte_gro.c | 1 +
lib/node/udp4_input.c | 1 +
67 files changed, 165 insertions(+), 701 deletions(-)
rename lib/ethdev/{rte_eth_ctrl.h => ethdev_fdir.h} (91%)
--
2.53.0
^ permalink raw reply [flat|nested] 76+ messages in thread* [PATCH v2 01/22] drivers/net: remove unused include in dpaa 2026-08-03 16:51 [PATCH v2 00/22] ethdev: clean up legacy flow director Stephen Hemminger @ 2026-08-03 16:51 ` Stephen Hemminger 2026-08-03 16:51 ` [PATCH v2 02/22] ethdev: use DPDK byte order conversion Stephen Hemminger ` (22 subsequent siblings) 23 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-03 16:51 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Hemant Agrawal, Sachin Saxena rte_eth_ctrl.h is deprecated and its contents are not used here. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- drivers/net/dpaa/dpaa_ptp.c | 1 - drivers/net/dpaa2/dpaa2_ptp.c | 1 - 2 files changed, 2 deletions(-) diff --git a/drivers/net/dpaa/dpaa_ptp.c b/drivers/net/dpaa/dpaa_ptp.c index e9b332c571..f91d3f9ce3 100644 --- a/drivers/net/dpaa/dpaa_ptp.c +++ b/drivers/net/dpaa/dpaa_ptp.c @@ -9,7 +9,6 @@ #include <rte_ethdev.h> #include <rte_log.h> -#include <rte_eth_ctrl.h> #include <rte_malloc.h> #include <rte_time.h> diff --git a/drivers/net/dpaa2/dpaa2_ptp.c b/drivers/net/dpaa2/dpaa2_ptp.c index 751e558c73..77d5d82b44 100644 --- a/drivers/net/dpaa2/dpaa2_ptp.c +++ b/drivers/net/dpaa2/dpaa2_ptp.c @@ -12,7 +12,6 @@ #include <ethdev_driver.h> #include <rte_log.h> -#include <rte_eth_ctrl.h> #include <rte_malloc.h> #include <rte_time.h> -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v2 02/22] ethdev: use DPDK byte order conversion 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 ` Stephen Hemminger 2026-08-03 16:51 ` [PATCH v2 03/22] net/ixgbe: remove experimental FDIR API Stephen Hemminger ` (21 subsequent siblings) 23 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-03 16:51 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Thomas Monjalon, Andrew Rybchenko DPDK has its own byte order macros which are preferred over the POSIX/libc ones in arpa/inet.h This resolves issue where this code was inheriting the inclusion of arpa/inet.h from rte_ethdev.h -> rte_eth_ctrl.h. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- lib/ethdev/sff_8472.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ethdev/sff_8472.c b/lib/ethdev/sff_8472.c index 97f231854c..acbbcee210 100644 --- a/lib/ethdev/sff_8472.c +++ b/lib/ethdev/sff_8472.c @@ -4,6 +4,7 @@ */ #include <stdio.h> +#include <rte_byteorder.h> #include "sff_common.h" @@ -176,7 +177,7 @@ static float befloattoh(const uint32_t *source) float dst; } converter; - converter.src = ntohl(*source); + converter.src = rte_be_to_cpu_32(*source); return converter.dst; } -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v2 03/22] net/ixgbe: remove experimental FDIR API 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 ` Stephen Hemminger 2026-08-03 16:51 ` [PATCH v2 04/22] net/i40e: " Stephen Hemminger ` (20 subsequent siblings) 23 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-03 16:51 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Anatoly Burakov, Vladimir Medvedkin 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 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v2 04/22] net/i40e: remove experimental FDIR API 2026-08-03 16:51 [PATCH v2 00/22] ethdev: clean up legacy flow director Stephen Hemminger ` (2 preceding siblings ...) 2026-08-03 16:51 ` [PATCH v2 03/22] net/ixgbe: remove experimental FDIR API Stephen Hemminger @ 2026-08-03 16:51 ` Stephen Hemminger 2026-08-03 16:51 ` [PATCH v2 05/22] app/testpmd: remove support for flow director Stephen Hemminger ` (19 subsequent siblings) 23 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-03 16:51 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Bruce Richardson Remove the flow director related private APIs in i40e. These APIs are experimental, therefore they can be removed without additional warnings. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- drivers/net/intel/i40e/i40e_ethdev.c | 4 +- drivers/net/intel/i40e/i40e_ethdev.h | 4 - drivers/net/intel/i40e/i40e_fdir.c | 140 -------------------------- drivers/net/intel/i40e/i40e_flow.c | 3 +- drivers/net/intel/i40e/rte_pmd_i40e.c | 34 ------- drivers/net/intel/i40e/rte_pmd_i40e.h | 33 ------ 6 files changed, 3 insertions(+), 215 deletions(-) diff --git a/drivers/net/intel/i40e/i40e_ethdev.c b/drivers/net/intel/i40e/i40e_ethdev.c index b6b2d291ee..5cbdfe9db2 100644 --- a/drivers/net/intel/i40e/i40e_ethdev.c +++ b/drivers/net/intel/i40e/i40e_ethdev.c @@ -9335,8 +9335,8 @@ i40e_get_valid_input_set(enum i40e_filter_pctype pctype, }; /** - * Flow director supports only fields defined in - * union rte_eth_fdir_flow. + * Flow director supports only fields reachable through + * rte_flow item patterns. */ static const uint64_t valid_fdir_inset_table[] = { [I40E_FILTER_PCTYPE_FRAG_IPV4] = diff --git a/drivers/net/intel/i40e/i40e_ethdev.h b/drivers/net/intel/i40e/i40e_ethdev.h index 9d9bde6aeb..3968bfd267 100644 --- a/drivers/net/intel/i40e/i40e_ethdev.h +++ b/drivers/net/intel/i40e/i40e_ethdev.h @@ -1369,10 +1369,6 @@ enum i40e_filter_pctype uint16_t i40e_pctype_to_flowtype(const struct i40e_adapter *adapter, enum i40e_filter_pctype pctype); int i40e_dev_set_gre_key_len(struct i40e_hw *hw, uint8_t len); -void i40e_fdir_info_get(struct rte_eth_dev *dev, - struct rte_eth_fdir_info *fdir); -void i40e_fdir_stats_get(struct rte_eth_dev *dev, - struct rte_eth_fdir_stats *stat); int i40e_select_filter_input_set(struct i40e_hw *hw, struct rte_eth_input_set_conf *conf, enum rte_filter_type filter); diff --git a/drivers/net/intel/i40e/i40e_fdir.c b/drivers/net/intel/i40e/i40e_fdir.c index 8a233f8a97..f36eceab3a 100644 --- a/drivers/net/intel/i40e/i40e_fdir.c +++ b/drivers/net/intel/i40e/i40e_fdir.c @@ -1800,146 +1800,6 @@ i40e_fdir_flush(struct rte_eth_dev *dev) return 0; } -static inline void -i40e_fdir_info_get_flex_set(struct i40e_pf *pf, - struct rte_eth_flex_payload_cfg *flex_set, - uint16_t *num) -{ - struct i40e_fdir_flex_pit *flex_pit; - struct rte_eth_flex_payload_cfg *ptr = flex_set; - uint16_t src, dst, size, j, k; - uint8_t i, layer_idx; - - for (layer_idx = I40E_FLXPLD_L2_IDX; - layer_idx <= I40E_FLXPLD_L4_IDX; - layer_idx++) { - if (layer_idx == I40E_FLXPLD_L2_IDX) - ptr->type = RTE_ETH_L2_PAYLOAD; - else if (layer_idx == I40E_FLXPLD_L3_IDX) - ptr->type = RTE_ETH_L3_PAYLOAD; - else if (layer_idx == I40E_FLXPLD_L4_IDX) - ptr->type = RTE_ETH_L4_PAYLOAD; - - for (i = 0; i < I40E_MAX_FLXPLD_FIED; i++) { - flex_pit = &pf->fdir.flex_set[layer_idx * - I40E_MAX_FLXPLD_FIED + i]; - if (flex_pit->size == 0) - continue; - src = flex_pit->src_offset * sizeof(uint16_t); - dst = flex_pit->dst_offset * sizeof(uint16_t); - size = flex_pit->size * sizeof(uint16_t); - for (j = src, k = dst; j < src + size; j++, k++) - ptr->src_offset[k] = j; - } - (*num)++; - ptr++; - } -} - -static inline void -i40e_fdir_info_get_flex_mask(struct i40e_pf *pf, - struct rte_eth_fdir_flex_mask *flex_mask, - uint16_t *num) -{ - struct i40e_fdir_flex_mask *mask; - struct rte_eth_fdir_flex_mask *ptr = flex_mask; - uint16_t flow_type; - uint8_t i, j; - uint16_t off_bytes, mask_tmp; - - for (i = I40E_FILTER_PCTYPE_NONF_IPV4_UDP; - i <= I40E_FILTER_PCTYPE_L2_PAYLOAD; - i++) { - mask = &pf->fdir.flex_mask[i]; - flow_type = i40e_pctype_to_flowtype(pf->adapter, - (enum i40e_filter_pctype)i); - if (flow_type == RTE_ETH_FLOW_UNKNOWN) - continue; - - for (j = 0; j < I40E_FDIR_MAX_FLEXWORD_NUM; j++) { - if (mask->word_mask & I40E_FLEX_WORD_MASK(j)) { - ptr->mask[j * sizeof(uint16_t)] = UINT8_MAX; - ptr->mask[j * sizeof(uint16_t) + 1] = UINT8_MAX; - } else { - ptr->mask[j * sizeof(uint16_t)] = 0x0; - ptr->mask[j * sizeof(uint16_t) + 1] = 0x0; - } - } - for (j = 0; j < I40E_FDIR_BITMASK_NUM_WORD; j++) { - off_bytes = mask->bitmask[j].offset * sizeof(uint16_t); - mask_tmp = ~mask->bitmask[j].mask; - ptr->mask[off_bytes] &= I40E_HI_BYTE(mask_tmp); - ptr->mask[off_bytes + 1] &= I40E_LO_BYTE(mask_tmp); - } - ptr->flow_type = flow_type; - ptr++; - (*num)++; - } -} - -/* - * i40e_fdir_info_get - get information of Flow Director - * @pf: ethernet device to get info from - * @fdir: a pointer to a structure of type *rte_eth_fdir_info* to be filled with - * the flow director information. - */ -void -i40e_fdir_info_get(struct rte_eth_dev *dev, struct rte_eth_fdir_info *fdir) -{ - struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private); - struct i40e_hw *hw = I40E_PF_TO_HW(pf); - uint16_t num_flex_set = 0; - uint16_t num_flex_mask = 0; - uint16_t i; - - fdir->mode = RTE_FDIR_MODE_NONE; - - fdir->guarant_spc = - (uint32_t)hw->func_caps.fd_filters_guaranteed; - fdir->best_spc = - (uint32_t)hw->func_caps.fd_filters_best_effort; - fdir->max_flexpayload = I40E_FDIR_MAX_FLEX_LEN; - fdir->flow_types_mask[0] = I40E_FDIR_FLOWS; - for (i = 1; i < RTE_FLOW_MASK_ARRAY_SIZE; i++) - fdir->flow_types_mask[i] = 0ULL; - fdir->flex_payload_unit = sizeof(uint16_t); - fdir->flex_bitmask_unit = sizeof(uint16_t); - fdir->max_flex_payload_segment_num = I40E_MAX_FLXPLD_FIED; - fdir->flex_payload_limit = I40E_MAX_FLX_SOURCE_OFF; - fdir->max_flex_bitmask_num = I40E_FDIR_BITMASK_NUM_WORD; - - i40e_fdir_info_get_flex_set(pf, - fdir->flex_conf.flex_set, - &num_flex_set); - i40e_fdir_info_get_flex_mask(pf, - fdir->flex_conf.flex_mask, - &num_flex_mask); - - fdir->flex_conf.nb_payloads = num_flex_set; - fdir->flex_conf.nb_flexmasks = num_flex_mask; -} - -/* - * i40e_fdir_stat_get - get statistics of Flow Director - * @pf: ethernet device to get info from - * @stat: a pointer to a structure of type *rte_eth_fdir_stats* to be filled with - * the flow director statistics. - */ -void -i40e_fdir_stats_get(struct rte_eth_dev *dev, struct rte_eth_fdir_stats *stat) -{ - struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private); - struct i40e_hw *hw = I40E_PF_TO_HW(pf); - uint32_t fdstat; - - fdstat = I40E_READ_REG(hw, I40E_PFQF_FDSTAT); - stat->guarant_cnt = - (uint32_t)((fdstat & I40E_PFQF_FDSTAT_GUARANT_CNT_MASK) >> - I40E_PFQF_FDSTAT_GUARANT_CNT_SHIFT); - stat->best_cnt = - (uint32_t)((fdstat & I40E_PFQF_FDSTAT_BEST_CNT_MASK) >> - I40E_PFQF_FDSTAT_BEST_CNT_SHIFT); -} /* Restore flow director filter */ void diff --git a/drivers/net/intel/i40e/i40e_flow.c b/drivers/net/intel/i40e/i40e_flow.c index 6eb85a7d0d..e9993db6dd 100644 --- a/drivers/net/intel/i40e/i40e_flow.c +++ b/drivers/net/intel/i40e/i40e_flow.c @@ -2391,8 +2391,7 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev, for (i = 0; i < raw_spec->length; i++) { j = i + next_dst_off; - if (j >= RTE_ETH_FDIR_MAX_FLEXLEN || - j >= I40E_FDIR_MAX_FLEX_LEN) + if (j >= I40E_FDIR_MAX_FLEX_LEN) break; filter->input.flow_ext.flexbytes[j] = raw_spec->pattern[i]; diff --git a/drivers/net/intel/i40e/rte_pmd_i40e.c b/drivers/net/intel/i40e/rte_pmd_i40e.c index 2e7943ef8b..e47c1aa9d7 100644 --- a/drivers/net/intel/i40e/rte_pmd_i40e.c +++ b/drivers/net/intel/i40e/rte_pmd_i40e.c @@ -3219,40 +3219,6 @@ rte_pmd_i40e_inset_set(uint16_t port, uint8_t pctype, return 0; } -RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_pmd_i40e_get_fdir_info, 20.08) -int -rte_pmd_i40e_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_i40e_supported(dev)) - return -ENOTSUP; - - i40e_fdir_info_get(dev, fdir_info); - - return 0; -} - -RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_pmd_i40e_get_fdir_stats, 20.08) -int -rte_pmd_i40e_get_fdir_stats(uint16_t port, struct rte_eth_fdir_stats *fdir_stat) -{ - struct rte_eth_dev *dev; - - RTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV); - - dev = &rte_eth_devices[port]; - if (!is_i40e_supported(dev)) - return -ENOTSUP; - - i40e_fdir_stats_get(dev, fdir_stat); - - return 0; -} - RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_pmd_i40e_set_gre_key_len, 20.08) int rte_pmd_i40e_set_gre_key_len(uint16_t port, uint8_t len) diff --git a/drivers/net/intel/i40e/rte_pmd_i40e.h b/drivers/net/intel/i40e/rte_pmd_i40e.h index 5af7e2330f..34900f9bec 100644 --- a/drivers/net/intel/i40e/rte_pmd_i40e.h +++ b/drivers/net/intel/i40e/rte_pmd_i40e.h @@ -1067,39 +1067,6 @@ rte_pmd_i40e_inset_field_clear(uint64_t *inset, uint8_t field_idx) return 0; } -/** - * 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_i40e_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_stat - * The fdir status of the port - * @return - * - (0) if successful. - * - (-ENODEV) if *port* invalid. - * - (-ENOTSUP) if operation not supported. - */ -__rte_experimental -int -rte_pmd_i40e_get_fdir_stats(uint16_t port, - struct rte_eth_fdir_stats *fdir_stat); - /** * Set GRE key length * -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v2 05/22] app/testpmd: remove support for flow director 2026-08-03 16:51 [PATCH v2 00/22] ethdev: clean up legacy flow director Stephen Hemminger ` (3 preceding siblings ...) 2026-08-03 16:51 ` [PATCH v2 04/22] net/i40e: " Stephen Hemminger @ 2026-08-03 16:51 ` Stephen Hemminger 2026-08-03 16:51 ` [PATCH v2 06/22] net/gve: include IP, UDP and TCP headers Stephen Hemminger ` (18 subsequent siblings) 23 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-03 16:51 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Aman Singh The legacy flow director API is deprecated and being removed. Drop it from testpmd; the testpmd CLI is not a stable API. Removed commands: show port fdir (port_id|all) clear port fdir (port_id|all) Also drop the documentation for "port config pctype mapping" and "port config input set" which no longer exist. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- app/test-pmd/cmdline.c | 21 +-- app/test-pmd/config.c | 163 -------------------- app/test-pmd/testpmd.h | 3 - doc/guides/testpmd_app_ug/testpmd_funcs.rst | 36 ----- 4 files changed, 6 insertions(+), 217 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 10ee7c5179..c142a8ec50 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -163,7 +163,7 @@ static void cmd_help_long_parsed(void *parsed_result, "Display:\n" "--------\n\n" - "show port (info|stats|summary|xstats|fdir|dcb_tc) (port_id|all)\n" + "show port (info|stats|summary|xstats|dcb_tc) (port_id|all)\n" " Display information for port_id, or all.\n\n" "show port info (port_id) representor\n" @@ -189,7 +189,7 @@ static void cmd_help_long_parsed(void *parsed_result, "show port (port_id) rss-hash [key | algorithm]\n" " Display the RSS hash functions, RSS hash key and RSS hash algorithms of port\n\n" - "clear port (info|stats|xstats|fdir) (port_id|all)\n" + "clear port (info|stats|xstats) (port_id|all)\n" " Clear information for port_id, or all.\n\n" "show (rxq|txq) info (port_id) (queue_id)\n" @@ -7514,11 +7514,6 @@ static void cmd_showportall_parsed(void *parsed_result, else if (!strcmp(res->what, "xstats")) RTE_ETH_FOREACH_DEV(i) nic_xstats_display(i); -#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE) - else if (!strcmp(res->what, "fdir")) - RTE_ETH_FOREACH_DEV(i) - fdir_get_infos(i); -#endif else if (!strcmp(res->what, "dcb_tc")) RTE_ETH_FOREACH_DEV(i) port_dcb_info_display(i); @@ -7531,14 +7526,14 @@ static cmdline_parse_token_string_t cmd_showportall_port = TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, port, "port"); static cmdline_parse_token_string_t cmd_showportall_what = TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, what, - "info#summary#stats#xstats#fdir#dcb_tc"); + "info#summary#stats#xstats#dcb_tc"); static cmdline_parse_token_string_t cmd_showportall_all = TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, all, "all"); static cmdline_parse_inst_t cmd_showportall = { .f = cmd_showportall_parsed, .data = NULL, .help_str = "show|clear port " - "info|summary|stats|xstats|fdir|dcb_tc all", + "info|summary|stats|xstats|dcb_tc all", .tokens = { (void *)&cmd_showportall_show, (void *)&cmd_showportall_port, @@ -7576,10 +7571,6 @@ static void cmd_showport_parsed(void *parsed_result, nic_stats_display(res->portnum); else if (!strcmp(res->what, "xstats")) nic_xstats_display(res->portnum); -#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE) - else if (!strcmp(res->what, "fdir")) - fdir_get_infos(res->portnum); -#endif else if (!strcmp(res->what, "dcb_tc")) port_dcb_info_display(res->portnum); } @@ -7591,7 +7582,7 @@ static cmdline_parse_token_string_t cmd_showport_port = TOKEN_STRING_INITIALIZER(struct cmd_showport_result, port, "port"); static cmdline_parse_token_string_t cmd_showport_what = TOKEN_STRING_INITIALIZER(struct cmd_showport_result, what, - "info#summary#stats#xstats#fdir#dcb_tc"); + "info#summary#stats#xstats#dcb_tc"); static cmdline_parse_token_num_t cmd_showport_portnum = TOKEN_NUM_INITIALIZER(struct cmd_showport_result, portnum, RTE_UINT16); @@ -7599,7 +7590,7 @@ static cmdline_parse_inst_t cmd_showport = { .f = cmd_showport_parsed, .data = NULL, .help_str = "show|clear port " - "info|summary|stats|xstats|fdir|dcb_tc " + "info|summary|stats|xstats|dcb_tc " "<port_id>", .tokens = { (void *)&cmd_showport_show, diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index aa03eb99cc..582e7287be 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -7056,169 +7056,6 @@ flowtype_to_str(uint16_t flow_type) return NULL; } -#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE) - -static inline void -print_fdir_flex_payload(struct rte_eth_fdir_flex_conf *flex_conf, uint32_t num) -{ - struct rte_eth_flex_payload_cfg *cfg; - uint32_t i, j; - - for (i = 0; i < flex_conf->nb_payloads; i++) { - cfg = &flex_conf->flex_set[i]; - if (cfg->type == RTE_ETH_RAW_PAYLOAD) - printf("\n RAW: "); - else if (cfg->type == RTE_ETH_L2_PAYLOAD) - printf("\n L2_PAYLOAD: "); - else if (cfg->type == RTE_ETH_L3_PAYLOAD) - printf("\n L3_PAYLOAD: "); - else if (cfg->type == RTE_ETH_L4_PAYLOAD) - printf("\n L4_PAYLOAD: "); - else - printf("\n UNKNOWN PAYLOAD(%u): ", cfg->type); - for (j = 0; j < num; j++) - printf(" %-5u", cfg->src_offset[j]); - } - printf("\n"); -} - -static inline void -print_fdir_flex_mask(struct rte_eth_fdir_flex_conf *flex_conf, uint32_t num) -{ - struct rte_eth_fdir_flex_mask *mask; - uint32_t i, j; - const char *p; - - for (i = 0; i < flex_conf->nb_flexmasks; i++) { - mask = &flex_conf->flex_mask[i]; - p = flowtype_to_str(mask->flow_type); - printf("\n %s:\t", p ? p : "unknown"); - for (j = 0; j < num; j++) - printf(" %02x", mask->mask[j]); - } - printf("\n"); -} - -static inline void -print_fdir_flow_type(uint32_t flow_types_mask) -{ - int i; - const char *p; - - for (i = RTE_ETH_FLOW_UNKNOWN; i < RTE_ETH_FLOW_MAX; i++) { - if (!(flow_types_mask & (1 << i))) - continue; - p = flowtype_to_str(i); - if (p) - printf(" %s", p); - else - printf(" unknown"); - } - printf("\n"); -} - -static int -get_fdir_info(portid_t port_id, struct rte_eth_fdir_info *fdir_info, - struct rte_eth_fdir_stats *fdir_stat) -{ - int ret = -ENOTSUP; - -#ifdef RTE_NET_I40E - if (ret == -ENOTSUP) { - ret = rte_pmd_i40e_get_fdir_info(port_id, fdir_info); - if (!ret) - ret = rte_pmd_i40e_get_fdir_stats(port_id, fdir_stat); - } -#endif -#ifdef RTE_NET_IXGBE - if (ret == -ENOTSUP) { - ret = rte_pmd_ixgbe_get_fdir_info(port_id, fdir_info); - if (!ret) - ret = rte_pmd_ixgbe_get_fdir_stats(port_id, fdir_stat); - } -#endif - switch (ret) { - case 0: - break; - case -ENOTSUP: - fprintf(stderr, "\n FDIR is not supported on port %-2d\n", - port_id); - break; - default: - fprintf(stderr, "programming error: (%s)\n", strerror(-ret)); - break; - } - return ret; -} - -void -fdir_get_infos(portid_t port_id) -{ - struct rte_eth_fdir_stats fdir_stat; - struct rte_eth_fdir_info fdir_info; - - static const char *fdir_stats_border = "########################"; - - if (port_id_is_invalid(port_id, ENABLED_WARN)) - return; - - memset(&fdir_info, 0, sizeof(fdir_info)); - memset(&fdir_stat, 0, sizeof(fdir_stat)); - if (get_fdir_info(port_id, &fdir_info, &fdir_stat)) - return; - - printf("\n %s FDIR infos for port %-2d %s\n", - fdir_stats_border, port_id, fdir_stats_border); - printf(" MODE: "); - if (fdir_info.mode == RTE_FDIR_MODE_PERFECT) - printf(" PERFECT\n"); - else if (fdir_info.mode == RTE_FDIR_MODE_PERFECT_MAC_VLAN) - printf(" PERFECT-MAC-VLAN\n"); - else if (fdir_info.mode == RTE_FDIR_MODE_PERFECT_TUNNEL) - printf(" PERFECT-TUNNEL\n"); - else if (fdir_info.mode == RTE_FDIR_MODE_SIGNATURE) - printf(" SIGNATURE\n"); - else - printf(" DISABLE\n"); - if (fdir_info.mode != RTE_FDIR_MODE_PERFECT_MAC_VLAN - && fdir_info.mode != RTE_FDIR_MODE_PERFECT_TUNNEL) { - printf(" SUPPORTED FLOW TYPE: "); - print_fdir_flow_type(fdir_info.flow_types_mask[0]); - } - printf(" FLEX PAYLOAD INFO:\n"); - printf(" max_len: %-10"PRIu32" payload_limit: %-10"PRIu32"\n" - " payload_unit: %-10"PRIu32" payload_seg: %-10"PRIu32"\n" - " bitmask_unit: %-10"PRIu32" bitmask_num: %-10"PRIu32"\n", - fdir_info.max_flexpayload, fdir_info.flex_payload_limit, - fdir_info.flex_payload_unit, - fdir_info.max_flex_payload_segment_num, - fdir_info.flex_bitmask_unit, fdir_info.max_flex_bitmask_num); - if (fdir_info.flex_conf.nb_payloads > 0) { - printf(" FLEX PAYLOAD SRC OFFSET:"); - print_fdir_flex_payload(&fdir_info.flex_conf, fdir_info.max_flexpayload); - } - if (fdir_info.flex_conf.nb_flexmasks > 0) { - printf(" FLEX MASK CFG:"); - print_fdir_flex_mask(&fdir_info.flex_conf, fdir_info.max_flexpayload); - } - printf(" guarant_count: %-10"PRIu32" best_count: %"PRIu32"\n", - fdir_stat.guarant_cnt, fdir_stat.best_cnt); - printf(" guarant_space: %-10"PRIu32" best_space: %"PRIu32"\n", - fdir_info.guarant_spc, fdir_info.best_spc); - printf(" collision: %-10"PRIu32" free: %"PRIu32"\n" - " maxhash: %-10"PRIu32" maxlen: %"PRIu32"\n" - " add: %-10"PRIu64" remove: %"PRIu64"\n" - " f_add: %-10"PRIu64" f_remove: %"PRIu64"\n", - fdir_stat.collision, fdir_stat.free, - fdir_stat.maxhash, fdir_stat.maxlen, - fdir_stat.add, fdir_stat.remove, - fdir_stat.f_add, fdir_stat.f_remove); - printf(" %s############################%s\n", - fdir_stats_border, fdir_stats_border); -} - -#endif /* RTE_NET_I40E || RTE_NET_IXGBE */ - void set_vf_traffic(portid_t port_id, uint8_t is_rx, uint16_t vf, uint8_t on) { diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index 083171853c..f7c10ab6b8 100644 --- a/app/test-pmd/testpmd.h +++ b/app/test-pmd/testpmd.h @@ -1212,9 +1212,6 @@ int all_ports_stopped(void); int port_is_stopped(portid_t port_id); int port_is_started(portid_t port_id); void pmd_test_exit(void); -#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE) -void fdir_get_infos(portid_t port_id); -#endif void port_rss_reta_info(portid_t port_id, struct rte_eth_rss_reta_entry64 *reta_conf, uint16_t nb_entries); diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst index e65376df54..f75a8d700c 100644 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst @@ -2288,42 +2288,6 @@ Where the threshold type can be: These threshold options are also available from the command-line. -port config pctype mapping -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Reset pctype mapping table:: - - testpmd> port config (port_id) pctype mapping reset - -Update hardware defined pctype to software defined flow type mapping table:: - - testpmd> port config (port_id) pctype mapping update (pctype_id_0[,pctype_id_1]*) (flow_type_id) - -where: - -* ``pctype_id_x``: hardware pctype id as index of bit in bitmask value of the pctype mapping table. - -* ``flow_type_id``: software flow type id as the index of the pctype mapping table. - -port config input set -~~~~~~~~~~~~~~~~~~~~~ - -Config RSS/FDIR/FDIR flexible payload input set for some pctype:: - - testpmd> port config (port_id) pctype (pctype_id) \ - (hash_inset|fdir_inset|fdir_flx_inset) \ - (get|set|clear) field (field_idx) - -Clear RSS/FDIR/FDIR flexible payload input set for some pctype:: - - testpmd> port config (port_id) pctype (pctype_id) \ - (hash_inset|fdir_inset|fdir_flx_inset) clear all - -where: - -* ``pctype_id``: hardware packet classification types. -* ``field_idx``: hardware field index. - port config udp_tunnel_port ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v2 06/22] net/gve: include IP, UDP and TCP headers 2026-08-03 16:51 [PATCH v2 00/22] ethdev: clean up legacy flow director Stephen Hemminger ` (4 preceding siblings ...) 2026-08-03 16:51 ` [PATCH v2 05/22] app/testpmd: remove support for flow director Stephen Hemminger @ 2026-08-03 16:51 ` 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 ` (17 subsequent siblings) 23 siblings, 1 reply; 76+ messages in thread From: Stephen Hemminger @ 2026-08-03 16:51 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Jeroen de Borst, Joshua Washington This driver was getting rte_ip.h, rte_udp.h and rte_tcp.h implicitly through rte_ethdev.h -> rte_eth_ctrl.h -> rte_flow.h. Since rte_eth_ctrl.h is deprecated, better to not depend on that. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- drivers/net/gve/gve_ethdev.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/gve/gve_ethdev.h b/drivers/net/gve/gve_ethdev.h index c9a176ff17..8087bf98f9 100644 --- a/drivers/net/gve/gve_ethdev.h +++ b/drivers/net/gve/gve_ethdev.h @@ -14,6 +14,9 @@ #include <rte_bitmap.h> #include <rte_memzone.h> #include <rte_thread.h> +#include <rte_udp.h> +#include <rte_tcp.h> +#include <rte_sctp.h> #include "base/gve.h" -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* Re: [PATCH v2 06/22] net/gve: include IP, UDP and TCP headers 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 0 siblings, 0 replies; 76+ messages in thread From: Joshua Washington @ 2026-08-03 18:04 UTC (permalink / raw) To: Stephen Hemminger; +Cc: dev, Jeroen de Borst On Mon, Aug 3, 2026 at 9:53 AM Stephen Hemminger <stephen@networkplumber.org> wrote: > > This driver was getting rte_ip.h, rte_udp.h and rte_tcp.h > implicitly through rte_ethdev.h -> rte_eth_ctrl.h -> rte_flow.h. > Since rte_eth_ctrl.h is deprecated, better to not depend > on that. > > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Reviewed-by: Joshua Washington <joshwash@google.com> > --- > drivers/net/gve/gve_ethdev.h | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/net/gve/gve_ethdev.h b/drivers/net/gve/gve_ethdev.h > index c9a176ff17..8087bf98f9 100644 > --- a/drivers/net/gve/gve_ethdev.h > +++ b/drivers/net/gve/gve_ethdev.h > @@ -14,6 +14,9 @@ > #include <rte_bitmap.h> > #include <rte_memzone.h> > #include <rte_thread.h> > +#include <rte_udp.h> > +#include <rte_tcp.h> > +#include <rte_sctp.h> > > #include "base/gve.h" > > -- > 2.53.0 > ^ permalink raw reply [flat|nested] 76+ messages in thread
* [PATCH v2 07/22] crypto/dpaa_sec: include UDP header 2026-08-03 16:51 [PATCH v2 00/22] ethdev: clean up legacy flow director Stephen Hemminger ` (5 preceding siblings ...) 2026-08-03 16:51 ` [PATCH v2 06/22] net/gve: include IP, UDP and TCP headers Stephen Hemminger @ 2026-08-03 16:51 ` Stephen Hemminger 2026-08-03 16:51 ` [PATCH v2 08/22] net/nfp: break implicit dependency on rte_eth_ctrl.h Stephen Hemminger ` (16 subsequent siblings) 23 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-03 16:51 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Gagandeep Singh, Hemant Agrawal The driver was getting the UDP header definition indirectly via rte_ethdev.h. That will change, so include the header directly. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- drivers/crypto/dpaa_sec/dpaa_sec.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.h b/drivers/crypto/dpaa_sec/dpaa_sec.h index d78cad818a..bce60d9cb8 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.h +++ b/drivers/crypto/dpaa_sec/dpaa_sec.h @@ -7,6 +7,8 @@ #ifndef _DPAA_SEC_H_ #define _DPAA_SEC_H_ +#include <rte_udp.h> + #define CRYPTODEV_NAME_DPAA_SEC_PMD crypto_dpaa_sec /**< NXP DPAA - SEC PMD device name */ -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v2 08/22] net/nfp: break implicit dependency on rte_eth_ctrl.h 2026-08-03 16:51 [PATCH v2 00/22] ethdev: clean up legacy flow director Stephen Hemminger ` (6 preceding siblings ...) 2026-08-03 16:51 ` [PATCH v2 07/22] crypto/dpaa_sec: include UDP header Stephen Hemminger @ 2026-08-03 16:51 ` Stephen Hemminger 2026-08-03 16:51 ` [PATCH v2 09/22] net/mana: include used network headers Stephen Hemminger ` (15 subsequent siblings) 23 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-03 16:51 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Chaoyong He This driver was using UINT64_BIT which was getting defined via deprecated rte_eth_ctrl.h. Replace with local definition. Also include rte_flow.h instead of depending on indirect inclusion from rte_ethdev.h. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- drivers/net/nfp/nfp_ethdev.c | 6 ++++-- drivers/net/nfp/nfp_net_common.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c index d2da18013c..25be1de080 100644 --- a/drivers/net/nfp/nfp_ethdev.c +++ b/drivers/net/nfp/nfp_ethdev.c @@ -6,6 +6,7 @@ */ #include <unistd.h> +#include <limits.h> #include <eal_firmware.h> #include <rte_alarm.h> @@ -32,6 +33,7 @@ /* 64-bit per app capabilities */ #define NFP_NET_APP_CAP_SP_INDIFF RTE_BIT64(0) /* Indifferent to port speed */ +#define NFP_UINT64_BIT (CHAR_BIT * sizeof(uint64_t)) #define NFP_PF_DRIVER_NAME net_nfp_pf #define NFP_PF_FORCE_RELOAD_FW "force_reload_fw" @@ -2060,8 +2062,8 @@ nfp_net_speed_capa_get_real(struct nfp_eth_media_buf *media_buf, for (i = 0; i < RTE_DIM(media_buf->supported_modes); i++) { supported_modes = media_buf->supported_modes[i]; - offset = i * UINT64_BIT; - for (j = 0; j < UINT64_BIT; j++) { + offset = i * NFP_UINT64_BIT; + for (j = 0; j < NFP_UINT64_BIT; j++) { if (supported_modes == 0) break; diff --git a/drivers/net/nfp/nfp_net_common.h b/drivers/net/nfp/nfp_net_common.h index 2bd2d54028..a479a7fbd4 100644 --- a/drivers/net/nfp/nfp_net_common.h +++ b/drivers/net/nfp/nfp_net_common.h @@ -8,6 +8,7 @@ #include <bus_pci_driver.h> #include <ethdev_driver.h> +#include <rte_flow.h> #include <nfp_common.h> #include <nfp_dev.h> #include <rte_spinlock.h> -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v2 09/22] net/mana: include used network headers 2026-08-03 16:51 [PATCH v2 00/22] ethdev: clean up legacy flow director Stephen Hemminger ` (7 preceding siblings ...) 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 ` 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 ` (14 subsequent siblings) 23 siblings, 1 reply; 76+ messages in thread From: Stephen Hemminger @ 2026-08-03 16:51 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Long Li, Wei Hu This driver was getting definition of IP, UDP, and TCP headers implicitly via rte_ethdev.h. That will be changing so instead include the required headers directly. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- drivers/net/mana/mana.c | 2 ++ drivers/net/mana/tx.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/drivers/net/mana/mana.c b/drivers/net/mana/mana.c index 0b72f711a1..3870cb4a52 100644 --- a/drivers/net/mana/mana.c +++ b/drivers/net/mana/mana.c @@ -6,8 +6,10 @@ #include <dirent.h> #include <fcntl.h> #include <sys/mman.h> +#include <sys/socket.h> #include <sys/ioctl.h> #include <net/if.h> +#include <netinet/in.h> #include <ethdev_driver.h> #include <ethdev_pci.h> diff --git a/drivers/net/mana/tx.c b/drivers/net/mana/tx.c index 10f2212b5d..9517b033dc 100644 --- a/drivers/net/mana/tx.c +++ b/drivers/net/mana/tx.c @@ -3,6 +3,9 @@ */ #include <ethdev_driver.h> +#include <rte_ip.h> +#include <rte_udp.h> +#include <rte_tcp.h> #include <infiniband/verbs.h> #include <infiniband/manadv.h> -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* RE: [EXTERNAL] [PATCH v2 09/22] net/mana: include used network headers 2026-08-03 16:51 ` [PATCH v2 09/22] net/mana: include used network headers Stephen Hemminger @ 2026-08-03 17:09 ` Long Li 0 siblings, 0 replies; 76+ messages in thread From: Long Li @ 2026-08-03 17:09 UTC (permalink / raw) To: Stephen Hemminger, dev@dpdk.org; +Cc: Wei Hu > -----Original Message----- > From: Stephen Hemminger <stephen@networkplumber.org> > Sent: Monday, August 3, 2026 9:52 AM > To: dev@dpdk.org > Cc: Stephen Hemminger <stephen@networkplumber.org>; Long Li > <longli@microsoft.com>; Wei Hu <weh@microsoft.com> > Subject: [EXTERNAL] [PATCH v2 09/22] net/mana: include used network headers > > This driver was getting definition of IP, UDP, and TCP headers implicitly via > rte_ethdev.h. That will be changing so instead include the required headers > directly. > > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Reviewed-by: Long Li <longli@microsoft.com> > --- > drivers/net/mana/mana.c | 2 ++ > drivers/net/mana/tx.c | 3 +++ > 2 files changed, 5 insertions(+) > > diff --git a/drivers/net/mana/mana.c b/drivers/net/mana/mana.c index > 0b72f711a1..3870cb4a52 100644 > --- a/drivers/net/mana/mana.c > +++ b/drivers/net/mana/mana.c > @@ -6,8 +6,10 @@ > #include <dirent.h> > #include <fcntl.h> > #include <sys/mman.h> > +#include <sys/socket.h> > #include <sys/ioctl.h> > #include <net/if.h> > +#include <netinet/in.h> > > #include <ethdev_driver.h> > #include <ethdev_pci.h> > diff --git a/drivers/net/mana/tx.c b/drivers/net/mana/tx.c index > 10f2212b5d..9517b033dc 100644 > --- a/drivers/net/mana/tx.c > +++ b/drivers/net/mana/tx.c > @@ -3,6 +3,9 @@ > */ > > #include <ethdev_driver.h> > +#include <rte_ip.h> > +#include <rte_udp.h> > +#include <rte_tcp.h> > > #include <infiniband/verbs.h> > #include <infiniband/manadv.h> > -- > 2.53.0 ^ permalink raw reply [flat|nested] 76+ messages in thread
* [PATCH v2 10/22] gro: include headers directly 2026-08-03 16:51 [PATCH v2 00/22] ethdev: clean up legacy flow director Stephen Hemminger ` (8 preceding siblings ...) 2026-08-03 16:51 ` [PATCH v2 09/22] net/mana: include used network headers Stephen Hemminger @ 2026-08-03 16:51 ` Stephen Hemminger 2026-08-03 16:51 ` [PATCH v2 11/22] app/test: " Stephen Hemminger ` (13 subsequent siblings) 23 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-03 16:51 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Jiayu Hu The gro library was getting headers such as VXLAN implicitly via rte_ethdev.h. This will change, so include the needed headers directly. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- lib/gro/gro_tcp4.c | 1 + lib/gro/gro_vxlan_tcp4.c | 4 +++- lib/gro/gro_vxlan_udp4.c | 1 + lib/gro/rte_gro.c | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/gro/gro_tcp4.c b/lib/gro/gro_tcp4.c index 855cc7a71d..d8f3227c92 100644 --- a/lib/gro/gro_tcp4.c +++ b/lib/gro/gro_tcp4.c @@ -5,6 +5,7 @@ #include <rte_malloc.h> #include <rte_mbuf.h> #include <rte_ethdev.h> +#include <rte_ip.h> #include "gro_tcp4.h" #include "gro_tcp_internal.h" diff --git a/lib/gro/gro_vxlan_tcp4.c b/lib/gro/gro_vxlan_tcp4.c index 29d4a2e13d..653c7ea585 100644 --- a/lib/gro/gro_vxlan_tcp4.c +++ b/lib/gro/gro_vxlan_tcp4.c @@ -5,7 +5,9 @@ #include <rte_malloc.h> #include <rte_mbuf.h> #include <rte_ethdev.h> -#include <rte_udp.h> +#include <rte_vxlan.h> +#include <rte_ip.h> +#include <rte_tcp.h> #include "gro_vxlan_tcp4.h" diff --git a/lib/gro/gro_vxlan_udp4.c b/lib/gro/gro_vxlan_udp4.c index ca8cee270d..47262bcc32 100644 --- a/lib/gro/gro_vxlan_udp4.c +++ b/lib/gro/gro_vxlan_udp4.c @@ -5,6 +5,7 @@ #include <rte_malloc.h> #include <rte_mbuf.h> #include <rte_ethdev.h> +#include <rte_vxlan.h> #include <rte_udp.h> #include "gro_vxlan_udp4.h" diff --git a/lib/gro/rte_gro.c b/lib/gro/rte_gro.c index 578cc9b801..d6b27bf8fb 100644 --- a/lib/gro/rte_gro.c +++ b/lib/gro/rte_gro.c @@ -6,6 +6,7 @@ #include <rte_malloc.h> #include <rte_cycles.h> #include <rte_ethdev.h> +#include <rte_vxlan.h> #include "rte_gro.h" #include "gro_tcp4.h" -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v2 11/22] app/test: include headers directly 2026-08-03 16:51 [PATCH v2 00/22] ethdev: clean up legacy flow director Stephen Hemminger ` (9 preceding siblings ...) 2026-08-03 16:51 ` [PATCH v2 10/22] gro: include headers directly Stephen Hemminger @ 2026-08-03 16:51 ` Stephen Hemminger 2026-08-03 16:51 ` [PATCH v2 12/22] node: get UDP header Stephen Hemminger ` (12 subsequent siblings) 23 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-03 16:51 UTC (permalink / raw) To: dev Cc: Stephen Hemminger, Jerin Jacob, Konstantin Ananyev, Marat Khalili, Akhil Goyal, Anoob Joseph The test code was getting network headers indirectly via inclusion of rte_ethdev.h. This will change in the future, instead get the headers directly. For BPF test, use the tool "iwyu" to get more complete set of headers. Replace use of htons() with equivalent DPDK byteorder macro. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- app/test-eventdev/test_pipeline_common.h | 1 + app/test/test_bpf.c | 18 +++++++++++++----- app/test/test_security_inline_macsec.c | 2 ++ app/test/test_security_inline_proto.c | 1 + 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/app/test-eventdev/test_pipeline_common.h b/app/test-eventdev/test_pipeline_common.h index 61370fb799..e9f20e7f62 100644 --- a/app/test-eventdev/test_pipeline_common.h +++ b/app/test-eventdev/test_pipeline_common.h @@ -12,6 +12,7 @@ #include <rte_cycles.h> #include <rte_ethdev.h> #include <rte_ether.h> +#include <rte_ip.h> #include <rte_event_eth_rx_adapter.h> #include <rte_event_eth_tx_adapter.h> #include <rte_eventdev.h> diff --git a/app/test/test_bpf.c b/app/test/test_bpf.c index 3205afaa63..2fea37396e 100644 --- a/app/test/test_bpf.c +++ b/app/test/test_bpf.c @@ -5,16 +5,26 @@ #include <stdio.h> #include <string.h> #include <stdint.h> +#include <stdlib.h> +#include <stdbool.h> +#include <stddef.h> +#include <stdalign.h> #include <inttypes.h> +#include <errno.h> +#include <limits.h> #include <unistd.h> -#include <rte_memory.h> +#include <rte_bitops.h> #include <rte_debug.h> #include <rte_hexdump.h> #include <rte_malloc.h> +#include <rte_memcpy.h> +#include <rte_mbuf.h> #include <rte_random.h> #include <rte_byteorder.h> #include <rte_errno.h> +#include <rte_ether.h> +#include <rte_ip.h> #include "test.h" @@ -30,8 +40,6 @@ test_bpf(void) #else #include <rte_bpf.h> -#include <rte_ether.h> -#include <rte_ip.h> /* Tests of most simple BPF programs (no instructions, one instruction etc.) */ @@ -1331,7 +1339,7 @@ test_jump2_check(uint64_t rc, const void *arg) uint16_t eth_type; uint64_t v = -1; - if (eth_hdr->ether_type == htons(0x8100)) { + if (eth_hdr->ether_type == rte_cpu_to_be_16(0x8100)) { const struct rte_vlan_hdr *vlan_hdr = (const void *)(eth_hdr + 1); eth_type = vlan_hdr->eth_proto; @@ -1341,7 +1349,7 @@ test_jump2_check(uint64_t rc, const void *arg) next = eth_hdr + 1; } - if (eth_type == htons(0x0800)) { + if (eth_type == rte_cpu_to_be_16(0x0800)) { ipv4_hdr = next; if ((ipv4_hdr->dst_addr & rte_cpu_to_be_32(TEST_NETMASK)) == rte_cpu_to_be_32(TEST_SUBNET)) { diff --git a/app/test/test_security_inline_macsec.c b/app/test/test_security_inline_macsec.c index a929ff5326..43672ef237 100644 --- a/app/test/test_security_inline_macsec.c +++ b/app/test/test_security_inline_macsec.c @@ -8,6 +8,8 @@ #include <rte_ethdev.h> #include <rte_malloc.h> #include <rte_security.h> +#include <rte_flow.h> +#include <rte_macsec.h> #include "test.h" #include "test_security_inline_macsec_vectors.h" diff --git a/app/test/test_security_inline_proto.c b/app/test/test_security_inline_proto.c index 0b1f7fbbab..99111e5432 100644 --- a/app/test/test_security_inline_proto.c +++ b/app/test/test_security_inline_proto.c @@ -7,6 +7,7 @@ #include <inttypes.h> #include <rte_ethdev.h> +#include <rte_flow.h> #include <rte_malloc.h> #include <rte_security.h> -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v2 12/22] node: get UDP header 2026-08-03 16:51 [PATCH v2 00/22] ethdev: clean up legacy flow director Stephen Hemminger ` (10 preceding siblings ...) 2026-08-03 16:51 ` [PATCH v2 11/22] app/test: " Stephen Hemminger @ 2026-08-03 16:51 ` Stephen Hemminger 2026-08-03 16:51 ` [PATCH v2 13/22] net/rnp: include network headers Stephen Hemminger ` (11 subsequent siblings) 23 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-03 16:51 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Nithin Dabilpuram, Pavan Nikhilesh This library was getting UDP header indirectly via rte_ethdev.h Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- lib/node/udp4_input.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/node/udp4_input.c b/lib/node/udp4_input.c index 5a74e28c85..fb62822b76 100644 --- a/lib/node/udp4_input.c +++ b/lib/node/udp4_input.c @@ -11,6 +11,7 @@ #include <rte_graph.h> #include <rte_graph_worker.h> #include <rte_ip.h> +#include <rte_udp.h> #include <rte_lpm.h> #include <rte_hash.h> #include <rte_fbk_hash.h> -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v2 13/22] net/rnp: include network headers 2026-08-03 16:51 [PATCH v2 00/22] ethdev: clean up legacy flow director Stephen Hemminger ` (11 preceding siblings ...) 2026-08-03 16:51 ` [PATCH v2 12/22] node: get UDP header Stephen Hemminger @ 2026-08-03 16:51 ` Stephen Hemminger 2026-08-03 16:52 ` [PATCH v2 14/22] net/r8169: get " Stephen Hemminger ` (10 subsequent siblings) 23 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-03 16:51 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Wenbo Cao The driver was getting definition of standard network protocol headers indirectly from rte_ethdev.h. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- drivers/net/rnp/rnp_rxtx.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/rnp/rnp_rxtx.c b/drivers/net/rnp/rnp_rxtx.c index 81e8c6ba44..93a3372e5a 100644 --- a/drivers/net/rnp/rnp_rxtx.c +++ b/drivers/net/rnp/rnp_rxtx.c @@ -8,6 +8,12 @@ #include <rte_memzone.h> #include <rte_mbuf.h> #include <rte_malloc.h> +#include <rte_vxlan.h> +#include <rte_ip.h> +#include <rte_gre.h> +#include <rte_udp.h> +#include <rte_tcp.h> +#include <rte_sctp.h> #include "base/rnp_bdq_if.h" #include "base/rnp_dma_regs.h" -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v2 14/22] net/r8169: get network headers 2026-08-03 16:51 [PATCH v2 00/22] ethdev: clean up legacy flow director Stephen Hemminger ` (12 preceding siblings ...) 2026-08-03 16:51 ` [PATCH v2 13/22] net/rnp: include network headers Stephen Hemminger @ 2026-08-03 16:52 ` Stephen Hemminger 2026-08-03 16:52 ` [PATCH v2 15/22] net/ngbe: include network protocol headers Stephen Hemminger ` (9 subsequent siblings) 23 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-03 16:52 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Howard Wang, Chunhao Lin, Xing Wang, Javen Xu This driver was getting network protocol headers indirectly via rte_ethdev.h. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- drivers/net/r8169/r8169_rxtx.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/r8169/r8169_rxtx.c b/drivers/net/r8169/r8169_rxtx.c index 00de0471f4..b84d451bb3 100644 --- a/drivers/net/r8169/r8169_rxtx.c +++ b/drivers/net/r8169/r8169_rxtx.c @@ -20,6 +20,9 @@ #include <rte_memory.h> #include <rte_malloc.h> #include <dev_driver.h> +#include <rte_ip.h> +#include <rte_udp.h> +#include <rte_tcp.h> #include "r8169_ethdev.h" #include "r8169_hw.h" -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v2 15/22] net/ngbe: include network protocol headers 2026-08-03 16:51 [PATCH v2 00/22] ethdev: clean up legacy flow director Stephen Hemminger ` (13 preceding siblings ...) 2026-08-03 16:52 ` [PATCH v2 14/22] net/r8169: get " Stephen Hemminger @ 2026-08-03 16:52 ` Stephen Hemminger 2026-08-03 16:52 ` [PATCH v2 16/22] examples: include network headers Stephen Hemminger ` (8 subsequent siblings) 23 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-03 16:52 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Jiawen Wu, Zaiyu Wang Do not depend on network protocol headers getting included via rte_ethdev.h. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- drivers/net/ngbe/ngbe_rxtx.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ngbe/ngbe_rxtx.c b/drivers/net/ngbe/ngbe_rxtx.c index a1389de9c0..fee984c396 100644 --- a/drivers/net/ngbe/ngbe_rxtx.c +++ b/drivers/net/ngbe/ngbe_rxtx.c @@ -11,6 +11,10 @@ #include <rte_malloc.h> #include <rte_net.h> #include <rte_vect.h> +#include <rte_ip.h> +#include <rte_udp.h> +#include <rte_tcp.h> +#include <rte_sctp.h> #include "ngbe_logs.h" #include "base/ngbe.h" -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v2 16/22] examples: include network headers 2026-08-03 16:51 [PATCH v2 00/22] ethdev: clean up legacy flow director Stephen Hemminger ` (14 preceding siblings ...) 2026-08-03 16:52 ` [PATCH v2 15/22] net/ngbe: include network protocol headers Stephen Hemminger @ 2026-08-03 16:52 ` Stephen Hemminger 2026-08-03 16:52 ` [PATCH v2 17/22] net/mlx5: include rte_flow as needed Stephen Hemminger ` (7 subsequent siblings) 23 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-03 16:52 UTC (permalink / raw) To: dev Cc: Stephen Hemminger, Akhil Goyal, Jerin Jacob, Kiran Kumar K, Nithin Dabilpuram, Zhirun Yan Don't depend on network protocol headers getting indirectly included via rte_ethdev.h. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- examples/l2fwd-macsec/main.c | 2 ++ examples/l3fwd-graph/main.c | 1 + examples/l3fwd/l3fwd.h | 2 ++ 3 files changed, 5 insertions(+) diff --git a/examples/l2fwd-macsec/main.c b/examples/l2fwd-macsec/main.c index 059f8a2170..e07769bd57 100644 --- a/examples/l2fwd-macsec/main.c +++ b/examples/l2fwd-macsec/main.c @@ -33,9 +33,11 @@ #include <rte_debug.h> #include <rte_ether.h> #include <rte_ethdev.h> +#include <rte_flow.h> #include <rte_mempool.h> #include <rte_mbuf.h> #include <rte_security.h> +#include <rte_macsec.h> #include <rte_string_fns.h> static volatile bool force_quit; diff --git a/examples/l3fwd-graph/main.c b/examples/l3fwd-graph/main.c index 5f89286dce..79dee4d103 100644 --- a/examples/l3fwd-graph/main.c +++ b/examples/l3fwd-graph/main.c @@ -36,6 +36,7 @@ #include <rte_per_lcore.h> #include <rte_string_fns.h> #include <rte_vect.h> +#include <rte_ip.h> #include <cmdline_parse.h> #include <cmdline_parse_etheraddr.h> diff --git a/examples/l3fwd/l3fwd.h b/examples/l3fwd/l3fwd.h index 349fc37c79..db7b746f59 100644 --- a/examples/l3fwd/l3fwd.h +++ b/examples/l3fwd/l3fwd.h @@ -8,6 +8,8 @@ #include <rte_ethdev.h> #include <rte_vect.h> #include <rte_acl.h> +#include <rte_ip.h> + #define DO_RFC_1812_CHECKS -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v2 17/22] net/mlx5: include rte_flow as needed 2026-08-03 16:51 [PATCH v2 00/22] ethdev: clean up legacy flow director Stephen Hemminger ` (15 preceding siblings ...) 2026-08-03 16:52 ` [PATCH v2 16/22] examples: include network headers Stephen Hemminger @ 2026-08-03 16:52 ` Stephen Hemminger 2026-08-03 16:52 ` [PATCH v2 18/22] net/sfc: include rte_flow Stephen Hemminger ` (6 subsequent siblings) 23 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-03 16:52 UTC (permalink / raw) To: dev Cc: Stephen Hemminger, Dariusz Sosnowski, Viacheslav Ovsiienko, Bing Zhao, Ori Kam, Suanming Mou, Matan Azrad The driver was getting rte_flow.h included indirectly via rte_ethdev.h. This will change in future and driver should include it where needed. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- drivers/net/mlx5/mlx5_ethdev.c | 1 + drivers/net/mlx5/mlx5_flow.h | 1 + drivers/net/mlx5/mlx5_txq.c | 1 + drivers/net/mlx5/mlx5_utils.c | 1 + drivers/net/mlx5/mlx5_utils.h | 1 + 5 files changed, 5 insertions(+) diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c index 8160d10e7e..c3d8e1b04f 100644 --- a/drivers/net/mlx5/mlx5_ethdev.c +++ b/drivers/net/mlx5/mlx5_ethdev.c @@ -19,6 +19,7 @@ #include <rte_string_fns.h> #include <rte_rwlock.h> #include <rte_cycles.h> +#include <rte_flow.h> #include <mlx5_malloc.h> diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h index 3415b4722e..0da50fab85 100644 --- a/drivers/net/mlx5/mlx5_flow.h +++ b/drivers/net/mlx5/mlx5_flow.h @@ -12,6 +12,7 @@ #include <rte_alarm.h> #include <rte_mtr.h> +#include <rte_flow.h> #include <mlx5_glue.h> #include <mlx5_prm.h> diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c index f9b254c6c5..f0b7b2d032 100644 --- a/drivers/net/mlx5/mlx5_txq.c +++ b/drivers/net/mlx5/mlx5_txq.c @@ -18,6 +18,7 @@ #include <rte_common.h> #include <rte_eal_paging.h> #include <rte_bitops.h> +#include <rte_flow.h> #include <mlx5_common.h> #include <mlx5_common_mr.h> diff --git a/drivers/net/mlx5/mlx5_utils.c b/drivers/net/mlx5/mlx5_utils.c index 606743c4b7..12820054ff 100644 --- a/drivers/net/mlx5/mlx5_utils.c +++ b/drivers/net/mlx5/mlx5_utils.c @@ -3,6 +3,7 @@ */ #include <rte_malloc.h> +#include <rte_flow.h> #include <mlx5_malloc.h> diff --git a/drivers/net/mlx5/mlx5_utils.h b/drivers/net/mlx5/mlx5_utils.h index 9ab79c8ad5..19d03145a6 100644 --- a/drivers/net/mlx5/mlx5_utils.h +++ b/drivers/net/mlx5/mlx5_utils.h @@ -16,6 +16,7 @@ #include <rte_rwlock.h> #include <rte_memory.h> #include <rte_bitmap.h> +#include <rte_flow.h> #include <mlx5_common.h> #include <mlx5_common_utils.h> -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v2 18/22] net/sfc: include rte_flow 2026-08-03 16:51 [PATCH v2 00/22] ethdev: clean up legacy flow director Stephen Hemminger ` (16 preceding siblings ...) 2026-08-03 16:52 ` [PATCH v2 17/22] net/mlx5: include rte_flow as needed Stephen Hemminger @ 2026-08-03 16:52 ` Stephen Hemminger 2026-08-03 16:52 ` [PATCH v2 19/22] net/intel/common: include network headers Stephen Hemminger ` (5 subsequent siblings) 23 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-03 16:52 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Andrew Rybchenko This driver was depending on rte_ethdev.h doing inclusion of rte_flow.h. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- drivers/net/sfc/sfc_dp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/sfc/sfc_dp.c b/drivers/net/sfc/sfc_dp.c index 7e2a20e4dc..c867c2c2ff 100644 --- a/drivers/net/sfc/sfc_dp.c +++ b/drivers/net/sfc/sfc_dp.c @@ -15,6 +15,7 @@ #include <rte_ethdev.h> #include <rte_log.h> #include <rte_mbuf_dyn.h> +#include <rte_flow.h> #include "efx.h" -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v2 19/22] net/intel/common: include network headers 2026-08-03 16:51 [PATCH v2 00/22] ethdev: clean up legacy flow director Stephen Hemminger ` (17 preceding siblings ...) 2026-08-03 16:52 ` [PATCH v2 18/22] net/sfc: include rte_flow Stephen Hemminger @ 2026-08-03 16:52 ` Stephen Hemminger 2026-08-03 16:52 ` [PATCH v2 20/22] net/enetfec: add missing sys/types.h include Stephen Hemminger ` (4 subsequent siblings) 23 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-03 16:52 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Bruce Richardson This file was depending on network protocol headers getting included via rte_ethdev.h -> rte_flow.h. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- drivers/net/intel/common/tx_scalar.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/intel/common/tx_scalar.h b/drivers/net/intel/common/tx_scalar.h index 11ab6c08fc..dcb2ea5542 100644 --- a/drivers/net/intel/common/tx_scalar.h +++ b/drivers/net/intel/common/tx_scalar.h @@ -8,6 +8,9 @@ #include <stdint.h> #include <rte_io.h> #include <rte_byteorder.h> +#include <rte_udp.h> +#include <rte_tcp.h> +#include <rte_sctp.h> /* depends on common Tx definitions. */ #include "tx.h" -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v2 20/22] net/enetfec: add missing sys/types.h include 2026-08-03 16:51 [PATCH v2 00/22] ethdev: clean up legacy flow director Stephen Hemminger ` (18 preceding siblings ...) 2026-08-03 16:52 ` [PATCH v2 19/22] net/intel/common: include network headers Stephen Hemminger @ 2026-08-03 16:52 ` Stephen Hemminger 2026-08-03 16:52 ` [PATCH v2 21/22] ethdev, drivers: isolate flow director Stephen Hemminger ` (3 subsequent siblings) 23 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-03 16:52 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Apeksha Gupta, Sachin Saxena The enet_regs.h header uses BSD types 'uint' and 'ushort' which were previously available through indirect inclusion via: rte_ethdev.h -> rte_flow.h -> rte_ip.h -> rte_ip[46].h -> sys/types.h After changes to reduce rte_ethdev.h header dependencies, this indirect inclusion no longer occurs, causing build failures on PowerPC. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- drivers/net/enetfec/enet_regs.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/enetfec/enet_regs.h b/drivers/net/enetfec/enet_regs.h index c9400957f8..a834fa5889 100644 --- a/drivers/net/enetfec/enet_regs.h +++ b/drivers/net/enetfec/enet_regs.h @@ -5,6 +5,8 @@ #ifndef __ENETFEC_REGS_H #define __ENETFEC_REGS_H +#include <sys/types.h> + /* Ethernet receive use control and status of buffer descriptor */ #define RX_BD_TR ((ushort)0x0001) /* Truncated */ -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v2 21/22] ethdev, drivers: isolate flow director 2026-08-03 16:51 [PATCH v2 00/22] ethdev: clean up legacy flow director Stephen Hemminger ` (19 preceding siblings ...) 2026-08-03 16:52 ` [PATCH v2 20/22] net/enetfec: add missing sys/types.h include Stephen Hemminger @ 2026-08-03 16:52 ` Stephen Hemminger 2026-08-03 16:52 ` [PATCH v2 22/22] doc: add release note about rte_ethdev changes Stephen Hemminger ` (2 subsequent siblings) 23 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-03 16:52 UTC (permalink / raw) To: dev Cc: Stephen Hemminger, Xiaoyun Wang, Feifei Wang, Praveen Shetty, Bruce Richardson, Vladimir Medvedkin, Anatoly Burakov, Rosen Xu, Dimon Zhao, Leon Yu, Sam Chen, Jiawen Wu, Zaiyu Wang, Thomas Monjalon, Andrew Rybchenko There are leftover bits of legacy flow director that are still being used by drivers. Move the definitions contained in ethdev_driver.h and rte_eth_ctrl.h into a single file ethdev_fdir.h and only include it in the drivers that require it. Change rte_ethdev.h to include the headers required which it was previously getting from rte_eth_ctrl.h -> rte_flow.h. Since ethdev_fdir.h is internal for driver SDK only it does not have to include as many secondary headers. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- doc/api/doxy-api-index.md | 1 - drivers/net/hinic/hinic_pmd_ethdev.h | 2 + drivers/net/hinic3/hinic3_ethdev.h | 1 + drivers/net/intel/cpfl/cpfl_flow_engine_fxp.c | 2 +- drivers/net/intel/e1000/e1000_ethdev.h | 1 + drivers/net/intel/e1000/igc_filter.h | 2 +- drivers/net/intel/i40e/i40e_ethdev.h | 1 + drivers/net/intel/iavf/iavf_fsub.c | 2 +- drivers/net/intel/iavf/iavf_hash.c | 2 +- drivers/net/intel/ice/ice_acl_filter.c | 2 +- drivers/net/intel/ice/ice_ethdev.h | 2 + drivers/net/intel/ice/ice_generic_flow.c | 1 + drivers/net/intel/ice/ice_hash.c | 2 +- drivers/net/intel/ice/ice_switch_filter.c | 2 +- drivers/net/intel/ipn3ke/ipn3ke_flow.c | 2 +- drivers/net/intel/ixgbe/ixgbe_ethdev.h | 1 + drivers/net/nbl/nbl_include/nbl_include.h | 1 + drivers/net/txgbe/txgbe_ethdev.h | 1 + lib/ethdev/ethdev_driver.h | 36 ------------ lib/ethdev/{rte_eth_ctrl.h => ethdev_fdir.h} | 58 ++++++++++++++----- lib/ethdev/meson.build | 2 +- lib/ethdev/rte_ethdev.h | 13 +---- 22 files changed, 67 insertions(+), 70 deletions(-) rename lib/ethdev/{rte_eth_ctrl.h => ethdev_fdir.h} (91%) diff --git a/doc/api/doxy-api-index.md b/doc/api/doxy-api-index.md index 9296042119..ac8314e908 100644 --- a/doc/api/doxy-api-index.md +++ b/doc/api/doxy-api-index.md @@ -11,7 +11,6 @@ The public API headers are grouped by topics: - **device**: [dev](@ref rte_dev.h), [ethdev](@ref rte_ethdev.h), - [ethctrl](@ref rte_eth_ctrl.h), [rte_flow](@ref rte_flow.h), [rte_tm](@ref rte_tm.h), [rte_mtr](@ref rte_mtr.h), diff --git a/drivers/net/hinic/hinic_pmd_ethdev.h b/drivers/net/hinic/hinic_pmd_ethdev.h index 8e6251f69f..10285ce814 100644 --- a/drivers/net/hinic/hinic_pmd_ethdev.h +++ b/drivers/net/hinic/hinic_pmd_ethdev.h @@ -7,7 +7,9 @@ #include <rte_ethdev.h> #include <rte_ethdev_core.h> +#include <rte_flow.h> #include <ethdev_driver.h> +#include <ethdev_fdir.h> #include "base/hinic_compat.h" #include "base/hinic_pmd_cfg.h" diff --git a/drivers/net/hinic3/hinic3_ethdev.h b/drivers/net/hinic3/hinic3_ethdev.h index 9061e2b217..515ba044a1 100644 --- a/drivers/net/hinic3/hinic3_ethdev.h +++ b/drivers/net/hinic3/hinic3_ethdev.h @@ -7,6 +7,7 @@ #include <rte_ethdev.h> #include <rte_ethdev_core.h> +#include <ethdev_fdir.h> #include "hinic3_fdir.h" diff --git a/drivers/net/intel/cpfl/cpfl_flow_engine_fxp.c b/drivers/net/intel/cpfl/cpfl_flow_engine_fxp.c index f42156e28f..977036bec5 100644 --- a/drivers/net/intel/cpfl/cpfl_flow_engine_fxp.c +++ b/drivers/net/intel/cpfl/cpfl_flow_engine_fxp.c @@ -16,7 +16,7 @@ #include <rte_ether.h> #include <rte_log.h> #include <rte_malloc.h> -#include <rte_eth_ctrl.h> +#include <ethdev_fdir.h> #include <rte_tailq.h> #include <rte_flow_driver.h> #include <rte_flow.h> diff --git a/drivers/net/intel/e1000/e1000_ethdev.h b/drivers/net/intel/e1000/e1000_ethdev.h index 0907c7c259..da4dacc7d4 100644 --- a/drivers/net/intel/e1000/e1000_ethdev.h +++ b/drivers/net/intel/e1000/e1000_ethdev.h @@ -9,6 +9,7 @@ #include <sys/queue.h> #include <rte_flow.h> +#include <ethdev_fdir.h> #include <rte_time.h> #include <rte_pci.h> diff --git a/drivers/net/intel/e1000/igc_filter.h b/drivers/net/intel/e1000/igc_filter.h index 2b7e6b619a..d1e098e5bb 100644 --- a/drivers/net/intel/e1000/igc_filter.h +++ b/drivers/net/intel/e1000/igc_filter.h @@ -8,7 +8,7 @@ #include <rte_ethdev.h> #include <rte_ethdev_core.h> #include <ethdev_driver.h> -#include <rte_eth_ctrl.h> +#include <ethdev_fdir.h> #include "igc_ethdev.h" diff --git a/drivers/net/intel/i40e/i40e_ethdev.h b/drivers/net/intel/i40e/i40e_ethdev.h index 3968bfd267..c03eaab946 100644 --- a/drivers/net/intel/i40e/i40e_ethdev.h +++ b/drivers/net/intel/i40e/i40e_ethdev.h @@ -13,6 +13,7 @@ #include <rte_hash.h> #include <rte_flow.h> #include <rte_flow_driver.h> +#include <ethdev_fdir.h> #include <rte_tm_driver.h> #include "rte_pmd_i40e.h" #include <rte_vect.h> diff --git a/drivers/net/intel/iavf/iavf_fsub.c b/drivers/net/intel/iavf/iavf_fsub.c index 19ae0e2dc2..745089c1e4 100644 --- a/drivers/net/intel/iavf/iavf_fsub.c +++ b/drivers/net/intel/iavf/iavf_fsub.c @@ -14,7 +14,7 @@ #include <rte_ethdev.h> #include <rte_log.h> #include <rte_malloc.h> -#include <rte_eth_ctrl.h> +#include <ethdev_fdir.h> #include <rte_tailq.h> #include <rte_flow_driver.h> #include <rte_flow.h> diff --git a/drivers/net/intel/iavf/iavf_hash.c b/drivers/net/intel/iavf/iavf_hash.c index 9515094402..38526eb7e6 100644 --- a/drivers/net/intel/iavf/iavf_hash.c +++ b/drivers/net/intel/iavf/iavf_hash.c @@ -15,7 +15,7 @@ #include <ethdev_driver.h> #include <rte_log.h> #include <rte_malloc.h> -#include <rte_eth_ctrl.h> +#include <ethdev_fdir.h> #include <rte_tailq.h> #include <rte_flow_driver.h> diff --git a/drivers/net/intel/ice/ice_acl_filter.c b/drivers/net/intel/ice/ice_acl_filter.c index 30ff1254c9..08f44e26cf 100644 --- a/drivers/net/intel/ice/ice_acl_filter.c +++ b/drivers/net/intel/ice/ice_acl_filter.c @@ -13,9 +13,9 @@ #include <rte_debug.h> #include <rte_ether.h> #include <ethdev_driver.h> +#include <ethdev_fdir.h> #include <rte_log.h> #include <rte_malloc.h> -#include <rte_eth_ctrl.h> #include <rte_tailq.h> #include <rte_flow_driver.h> #include <rte_flow.h> diff --git a/drivers/net/intel/ice/ice_ethdev.h b/drivers/net/intel/ice/ice_ethdev.h index 7ee3ea8a70..fe0dc19c98 100644 --- a/drivers/net/intel/ice/ice_ethdev.h +++ b/drivers/net/intel/ice/ice_ethdev.h @@ -8,8 +8,10 @@ #include <rte_compat.h> #include <rte_kvargs.h> #include <rte_time.h> +#include <rte_flow.h> #include <ethdev_driver.h> +#include <ethdev_fdir.h> #include <rte_tm_driver.h> #include <rte_vect.h> diff --git a/drivers/net/intel/ice/ice_generic_flow.c b/drivers/net/intel/ice/ice_generic_flow.c index 76b3800545..9c81c3aea8 100644 --- a/drivers/net/intel/ice/ice_generic_flow.c +++ b/drivers/net/intel/ice/ice_generic_flow.c @@ -13,6 +13,7 @@ #include <rte_ether.h> #include <ethdev_driver.h> +#include <ethdev_fdir.h> #include <rte_hexdump.h> #include <rte_malloc.h> #include <rte_tailq.h> diff --git a/drivers/net/intel/ice/ice_hash.c b/drivers/net/intel/ice/ice_hash.c index 7a9a4f1a04..5158a4f886 100644 --- a/drivers/net/intel/ice/ice_hash.c +++ b/drivers/net/intel/ice/ice_hash.c @@ -16,7 +16,7 @@ #include <ethdev_driver.h> #include <rte_log.h> #include <rte_malloc.h> -#include <rte_eth_ctrl.h> +#include <ethdev_fdir.h> #include <rte_tailq.h> #include <rte_flow_driver.h> diff --git a/drivers/net/intel/ice/ice_switch_filter.c b/drivers/net/intel/ice/ice_switch_filter.c index 6f5af03f6a..cbc3df6d7c 100644 --- a/drivers/net/intel/ice/ice_switch_filter.c +++ b/drivers/net/intel/ice/ice_switch_filter.c @@ -15,7 +15,7 @@ #include <ethdev_driver.h> #include <rte_log.h> #include <rte_malloc.h> -#include <rte_eth_ctrl.h> +#include <ethdev_fdir.h> #include <rte_tailq.h> #include <rte_flow_driver.h> #include <rte_flow.h> diff --git a/drivers/net/intel/ipn3ke/ipn3ke_flow.c b/drivers/net/intel/ipn3ke/ipn3ke_flow.c index 941d2921fb..47f4936bc6 100644 --- a/drivers/net/intel/ipn3ke/ipn3ke_flow.c +++ b/drivers/net/intel/ipn3ke/ipn3ke_flow.c @@ -16,7 +16,7 @@ #include <ethdev_driver.h> #include <rte_log.h> #include <rte_malloc.h> -#include <rte_eth_ctrl.h> +#include <ethdev_fdir.h> #include <rte_tailq.h> #include <rte_rawdev.h> #include <rte_rawdev_pmd.h> diff --git a/drivers/net/intel/ixgbe/ixgbe_ethdev.h b/drivers/net/intel/ixgbe/ixgbe_ethdev.h index c290f04611..68b54ae750 100644 --- a/drivers/net/intel/ixgbe/ixgbe_ethdev.h +++ b/drivers/net/intel/ixgbe/ixgbe_ethdev.h @@ -16,6 +16,7 @@ #include "ixgbe_bypass.h" #include "ixgbe_ipsec.h" #include <rte_flow.h> +#include <ethdev_fdir.h> #include <rte_time.h> #include <rte_hash.h> #include <rte_pci.h> diff --git a/drivers/net/nbl/nbl_include/nbl_include.h b/drivers/net/nbl/nbl_include/nbl_include.h index eeae6a3301..c1383e7b4e 100644 --- a/drivers/net/nbl/nbl_include/nbl_include.h +++ b/drivers/net/nbl/nbl_include/nbl_include.h @@ -27,6 +27,7 @@ #include <rte_alarm.h> #include <rte_ethdev.h> +#include <rte_flow.h> #include <ethdev_driver.h> #include <ethdev_pci.h> #include <bus_pci_driver.h> diff --git a/drivers/net/txgbe/txgbe_ethdev.h b/drivers/net/txgbe/txgbe_ethdev.h index c32c61d8bf..a48d710ab1 100644 --- a/drivers/net/txgbe/txgbe_ethdev.h +++ b/drivers/net/txgbe/txgbe_ethdev.h @@ -18,6 +18,7 @@ #include <rte_time.h> #include <rte_ethdev.h> #include <rte_ethdev_core.h> +#include <ethdev_fdir.h> #include <rte_hash.h> #include <rte_hash_crc.h> #include <bus_pci_driver.h> diff --git a/lib/ethdev/ethdev_driver.h b/lib/ethdev/ethdev_driver.h index 0f336f9567..2dc63cfa18 100644 --- a/lib/ethdev/ethdev_driver.h +++ b/lib/ethdev/ethdev_driver.h @@ -2365,42 +2365,6 @@ struct rte_eth_tunnel_filter_conf { uint16_t queue_id; /**< Queue assigned to if match */ }; -/** - * Memory space that can be configured to store Flow Director filters - * in the board memory. - */ -enum rte_eth_fdir_pballoc_type { - RTE_ETH_FDIR_PBALLOC_64K = 0, /**< 64k. */ - RTE_ETH_FDIR_PBALLOC_128K, /**< 128k. */ - RTE_ETH_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_MODE_NONE, the pballoc value is ignored. - */ -struct rte_eth_fdir_conf { - enum rte_fdir_mode mode; /**< Flow Director mode. */ - enum rte_eth_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; - /** Flex payload configuration. */ - struct rte_eth_fdir_flex_conf flex_conf; -}; - /** * @internal * Fetch from the driver what kind of configuration must be restored by ethdev layer, diff --git a/lib/ethdev/rte_eth_ctrl.h b/lib/ethdev/ethdev_fdir.h similarity index 91% rename from lib/ethdev/rte_eth_ctrl.h rename to lib/ethdev/ethdev_fdir.h index 9ec3f5eff9..ca3f866e69 100644 --- a/lib/ethdev/rte_eth_ctrl.h +++ b/lib/ethdev/ethdev_fdir.h @@ -1,24 +1,19 @@ /* SPDX-License-Identifier: BSD-3-Clause - * Copyright(c) 2010-2015 Intel Corporation + * Copyright(c) 2010-2017 Intel Corporation */ -#ifndef _RTE_ETH_CTRL_H_ -#define _RTE_ETH_CTRL_H_ - -#include <stdint.h> -#include <rte_common.h> -#include <rte_ether.h> -#include "rte_flow.h" -#include "rte_ethdev.h" +#ifndef _ETHDEV_FDIR_H_ +#define _ETHDEV_FDIR_H_ /** - * @deprecated Please use rte_flow API instead of this legacy one. * @file * - * Ethernet device features and related data structures used - * by control APIs should be defined in this file. + * Ethernet device definitions used by devices still dependent on legacy + * flow director definitions. Do not use in new drivers. */ +#include <rte_flow.h> + /** * Define all structures for ntuple Filter type. */ @@ -483,4 +478,41 @@ struct rte_eth_fdir_stats { uint32_t best_cnt; /**< Number of filters in best effort spaces. */ }; -#endif /* _RTE_ETH_CTRL_H_ */ + +/** + * Memory space that can be configured to store Flow Director filters + * in the board memory. + */ +enum rte_eth_fdir_pballoc_type { + RTE_ETH_FDIR_PBALLOC_64K = 0, /**< 64k. */ + RTE_ETH_FDIR_PBALLOC_128K, /**< 128k. */ + RTE_ETH_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_MODE_NONE, the pballoc value is ignored. + */ +struct rte_eth_fdir_conf { + enum rte_fdir_mode mode; /**< Flow Director mode. */ + enum rte_eth_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; + /** Flex payload configuration. */ + struct rte_eth_fdir_flex_conf flex_conf; +}; + +#endif /* _ETHDEV_FDIR_H_ */ diff --git a/lib/ethdev/meson.build b/lib/ethdev/meson.build index 8ba6c708a2..3d556f8b7f 100644 --- a/lib/ethdev/meson.build +++ b/lib/ethdev/meson.build @@ -32,11 +32,11 @@ headers = files( indirect_headers += files( 'rte_ethdev_core.h', - 'rte_eth_ctrl.h', ) driver_sdk_headers += files( 'ethdev_driver.h', + 'ethdev_fdir.h', 'ethdev_pci.h', 'ethdev_vdev.h', 'rte_flow_driver.h', diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h index ee400b386f..7a17b81208 100644 --- a/lib/ethdev/rte_ethdev.h +++ b/lib/ethdev/rte_ethdev.h @@ -164,8 +164,10 @@ #include <rte_devargs.h> #include <rte_bitops.h> #include <rte_errno.h> +#include <rte_ether.h> #include <rte_common.h> #include <rte_config.h> +#include <rte_mbuf_history.h> #include <rte_power_intrinsics.h> #include "rte_ethdev_trace_fp.h" @@ -1505,17 +1507,6 @@ enum rte_eth_tunnel_type { RTE_ETH_TUNNEL_TYPE_MAX, }; -#ifdef __cplusplus -} -#endif - -/* Deprecated API file for rte_eth_dev_filter_* functions */ -#include "rte_eth_ctrl.h" - -#ifdef __cplusplus -extern "C" { -#endif - /** * UDP tunneling configuration. * -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v2 22/22] doc: add release note about rte_ethdev changes 2026-08-03 16:51 [PATCH v2 00/22] ethdev: clean up legacy flow director Stephen Hemminger ` (20 preceding siblings ...) 2026-08-03 16:52 ` [PATCH v2 21/22] ethdev, drivers: isolate flow director Stephen Hemminger @ 2026-08-03 16:52 ` Stephen Hemminger 2026-08-04 15:44 ` [PATCH v3 00/23] ethdev: isolate legacy flow director Stephen Hemminger 2026-08-06 5:08 ` [PATCH v4 00/23] ethdev: refactor remaining uses of flow director Stephen Hemminger 23 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-03 16:52 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger The changes to rte_ethdev are visible to applications, which may need to include some network headers directly. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- doc/guides/rel_notes/release_26_11.rst | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/doc/guides/rel_notes/release_26_11.rst b/doc/guides/rel_notes/release_26_11.rst index c8cc86295d..a5e049ac04 100644 --- a/doc/guides/rel_notes/release_26_11.rst +++ b/doc/guides/rel_notes/release_26_11.rst @@ -77,6 +77,15 @@ Removed Items ``rte_rib6_is_equal`` * table: ``RTE_LPM_IPV6_ADDR_SIZE`` +* Removed the experimental flow director API: + + * ixgbe: ``rte_pmd_ixgbe_get_fdir_info``, ``rte_pmd_ixgbe_get_fdir_stats`` + * i40e: ``rte_pmd_i40e_get_fdir_info``, ``rte_pmd_i40e_get_fdir_stats`` + +* Removed some testpmd commands: + + The ``fdir`` option in ``show port`` and ``clear port`` were removed. + API Changes ----------- @@ -93,6 +102,16 @@ API Changes Also, make sure to start the actual text at the margin. ======================================================= +* **Changed ethdev include files.** + + * Dropped inclusion of ``rte_flow.h`` in ``rte_ethdev.h``. + Applications using flow API should include it directly. + * Network headers ``rte_ip.h``, ``rte_udp.h``, ``rte_tcp.h`` and ``rte_sctp.h`` + are no longer indirectly included by ``rte_ethdev.h``. + Applications should include network headers as needed. + * Legacy flow director definitions are no longer included by ``rte_ethdev.h``. + ``rte_eth_ctrl.h`` is removed. Internal driver definitions were moved to ``ethdev_fdir.h``. + ABI Changes ----------- -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v3 00/23] ethdev: isolate legacy flow director 2026-08-03 16:51 [PATCH v2 00/22] ethdev: clean up legacy flow director Stephen Hemminger ` (21 preceding siblings ...) 2026-08-03 16:52 ` [PATCH v2 22/22] doc: add release note about rte_ethdev changes Stephen Hemminger @ 2026-08-04 15:44 ` Stephen Hemminger 2026-08-04 15:44 ` [PATCH v3 01/23] drivers/net: remove unused include in dpaa Stephen Hemminger ` (22 more replies) 2026-08-06 5:08 ` [PATCH v4 00/23] ethdev: refactor remaining uses of flow director Stephen Hemminger 23 siblings, 23 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-04 15:44 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger The original flow support in DPDK was Intel-specific and built around the flow director feature. It was superseded by the generic rte_flow API introduced in the 17.02 release. The direct API calls to flow director were removed in 20.11, but the data structures were never removed and drivers still use them. Some Intel drivers also carry driver-specific APIs related to flow director. These vestiges mean applications can still see flow director data structures, since rte_ethdev.h pulls in rte_eth_ctrl.h. It also means several drivers and libraries have come to depend on network header definitions arriving indirectly. Since drivers still need these definitions, rte_eth_ctrl.h is renamed to ethdev_fdir.h and the remaining bits in ethdev_driver.h are folded into it. This is a driver SDK header, not public API, and exists only so that drivers still carrying legacy flow director state have somewhere to get these definitions. New drivers should not use it. Applications relying on the indirect includes will need to add explicit ones; this is a source level change only, with no ABI impact. The fdir option of the testpmd "show port" and "clear port" commands is also removed. There is more to do here, but with no Intel hardware and no standalone tests for this code, I have kept to mechanical refactoring. v3: - fix some include issues in test - drop i40e specific flow_director_filter - cleanup unused stuff in testpmd v2: - fix enetfec driver not built on x86 - reword commit messages based on AI review Stephen Hemminger (23): drivers/net: remove unused include in dpaa ethdev: use DPDK byte order conversion net/ixgbe: remove experimental FDIR API net/i40e: remove experimental FDIR API app/testpmd: remove support for flow director app/testpmd: move str_to_flowtype to i40e app/test: include headers directly gro: include headers directly crypto/dpaa_sec: include UDP header net/gve: include UDP, SCTP and TCP headers net/nfp: break implicit dependency on rte_eth_ctrl.h net/mana: include used network headers node: get UDP header net/rnp: include network headers net/r8169: get network headers net/ngbe: include network protocol headers examples: include network headers net/mlx5: include rte_flow as needed net/sfc: include rte_flow net/intel/common: include network headers net/enetfec: add missing sys/types.h include ethdev, drivers: isolate flow director doc: add release note about rte_ethdev changes app/test-eventdev/test_pipeline_common.h | 1 + app/test-pmd/cmdline.c | 21 +- app/test-pmd/config.c | 225 ------------------ app/test-pmd/testpmd.h | 6 - app/test/test_bpf.c | 20 +- app/test/test_security_inline_macsec.c | 2 + app/test/test_security_inline_proto.c | 1 + doc/api/doxy-api-index.md | 1 - doc/guides/nics/i40e.rst | 46 ---- doc/guides/rel_notes/release_26_11.rst | 19 ++ doc/guides/testpmd_app_ug/testpmd_funcs.rst | 54 +---- drivers/crypto/dpaa_sec/dpaa_sec.h | 2 + drivers/net/dpaa/dpaa_ptp.c | 1 - drivers/net/dpaa2/dpaa2_ptp.c | 1 - drivers/net/enetfec/enet_regs.h | 2 + drivers/net/gve/gve_ethdev.h | 13 +- drivers/net/hinic/hinic_pmd_ethdev.h | 2 + drivers/net/hinic3/hinic3_ethdev.h | 1 + drivers/net/intel/common/tx_scalar.h | 3 + drivers/net/intel/cpfl/cpfl_flow_engine_fxp.c | 2 +- drivers/net/intel/e1000/e1000_ethdev.h | 1 + drivers/net/intel/e1000/igc_filter.h | 2 +- drivers/net/intel/i40e/i40e_ethdev.c | 4 +- drivers/net/intel/i40e/i40e_ethdev.h | 5 +- drivers/net/intel/i40e/i40e_fdir.c | 140 ----------- drivers/net/intel/i40e/i40e_flow.c | 3 +- drivers/net/intel/i40e/i40e_testpmd.c | 51 ++++ drivers/net/intel/i40e/rte_pmd_i40e.c | 34 --- drivers/net/intel/i40e/rte_pmd_i40e.h | 33 --- drivers/net/intel/iavf/iavf_fsub.c | 2 +- drivers/net/intel/iavf/iavf_hash.c | 2 +- drivers/net/intel/ice/ice_acl_filter.c | 2 +- drivers/net/intel/ice/ice_ethdev.h | 2 + drivers/net/intel/ice/ice_generic_flow.c | 1 + drivers/net/intel/ice/ice_hash.c | 2 +- drivers/net/intel/ice/ice_switch_filter.c | 2 +- drivers/net/intel/ipn3ke/ipn3ke_flow.c | 2 +- drivers/net/intel/ixgbe/ixgbe_ethdev.h | 6 +- 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 --- drivers/net/mana/mana.c | 26 +- drivers/net/mana/tx.c | 3 + drivers/net/mlx5/mlx5_ethdev.c | 1 + drivers/net/mlx5/mlx5_flow.h | 1 + drivers/net/mlx5/mlx5_txq.c | 1 + drivers/net/mlx5/mlx5_utils.c | 1 + drivers/net/mlx5/mlx5_utils.h | 1 + drivers/net/nbl/nbl_include/nbl_include.h | 1 + drivers/net/nfp/nfp_ethdev.c | 6 +- drivers/net/nfp/nfp_net_common.h | 4 +- drivers/net/ngbe/ngbe_rxtx.c | 4 + drivers/net/r8169/r8169_rxtx.c | 18 +- drivers/net/rnp/rnp_rxtx.c | 6 + drivers/net/sfc/sfc_dp.c | 1 + drivers/net/txgbe/txgbe_ethdev.h | 1 + examples/l2fwd-macsec/main.c | 2 + examples/l3fwd-graph/main.c | 1 + examples/l3fwd/l3fwd.h | 2 + lib/ethdev/ethdev_driver.h | 36 --- lib/ethdev/{rte_eth_ctrl.h => ethdev_fdir.h} | 58 ++++- lib/ethdev/meson.build | 2 +- lib/ethdev/rte_ethdev.h | 13 +- lib/ethdev/sff_8472.c | 3 +- lib/gro/gro_tcp4.c | 9 +- lib/gro/gro_tcp6.c | 9 +- lib/gro/gro_vxlan_tcp4.c | 10 +- lib/gro/gro_vxlan_udp4.c | 9 +- lib/gro/rte_gro.c | 9 +- lib/node/udp4_input.c | 17 +- 70 files changed, 311 insertions(+), 844 deletions(-) rename lib/ethdev/{rte_eth_ctrl.h => ethdev_fdir.h} (91%) -- 2.53.0 ^ permalink raw reply [flat|nested] 76+ messages in thread
* [PATCH v3 01/23] drivers/net: remove unused include in dpaa 2026-08-04 15:44 ` [PATCH v3 00/23] ethdev: isolate legacy flow director Stephen Hemminger @ 2026-08-04 15:44 ` Stephen Hemminger 2026-08-04 15:44 ` [PATCH v3 02/23] ethdev: use DPDK byte order conversion Stephen Hemminger ` (21 subsequent siblings) 22 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-04 15:44 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Hemant Agrawal, Sachin Saxena rte_eth_ctrl.h is deprecated and its contents are not used here. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- drivers/net/dpaa/dpaa_ptp.c | 1 - drivers/net/dpaa2/dpaa2_ptp.c | 1 - 2 files changed, 2 deletions(-) diff --git a/drivers/net/dpaa/dpaa_ptp.c b/drivers/net/dpaa/dpaa_ptp.c index e9b332c571..f91d3f9ce3 100644 --- a/drivers/net/dpaa/dpaa_ptp.c +++ b/drivers/net/dpaa/dpaa_ptp.c @@ -9,7 +9,6 @@ #include <rte_ethdev.h> #include <rte_log.h> -#include <rte_eth_ctrl.h> #include <rte_malloc.h> #include <rte_time.h> diff --git a/drivers/net/dpaa2/dpaa2_ptp.c b/drivers/net/dpaa2/dpaa2_ptp.c index 751e558c73..77d5d82b44 100644 --- a/drivers/net/dpaa2/dpaa2_ptp.c +++ b/drivers/net/dpaa2/dpaa2_ptp.c @@ -12,7 +12,6 @@ #include <ethdev_driver.h> #include <rte_log.h> -#include <rte_eth_ctrl.h> #include <rte_malloc.h> #include <rte_time.h> -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v3 02/23] ethdev: use DPDK byte order conversion 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 ` Stephen Hemminger 2026-08-04 15:44 ` [PATCH v3 03/23] net/ixgbe: remove experimental FDIR API Stephen Hemminger ` (20 subsequent siblings) 22 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-04 15:44 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Thomas Monjalon, Andrew Rybchenko DPDK has its own byte order macros which are preferred over the POSIX/libc ones in arpa/inet.h This resolves issue where this code was inheriting the inclusion of arpa/inet.h from rte_ethdev.h -> rte_eth_ctrl.h. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- lib/ethdev/sff_8472.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ethdev/sff_8472.c b/lib/ethdev/sff_8472.c index 97f231854c..acbbcee210 100644 --- a/lib/ethdev/sff_8472.c +++ b/lib/ethdev/sff_8472.c @@ -4,6 +4,7 @@ */ #include <stdio.h> +#include <rte_byteorder.h> #include "sff_common.h" @@ -176,7 +177,7 @@ static float befloattoh(const uint32_t *source) float dst; } converter; - converter.src = ntohl(*source); + converter.src = rte_be_to_cpu_32(*source); return converter.dst; } -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v3 03/23] net/ixgbe: remove experimental FDIR API 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 ` Stephen Hemminger 2026-08-04 15:44 ` [PATCH v3 04/23] net/i40e: " Stephen Hemminger ` (19 subsequent siblings) 22 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-04 15:44 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Anatoly Burakov, Vladimir Medvedkin 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 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v3 04/23] net/i40e: remove experimental FDIR API 2026-08-04 15:44 ` [PATCH v3 00/23] ethdev: isolate legacy flow director Stephen Hemminger ` (2 preceding siblings ...) 2026-08-04 15:44 ` [PATCH v3 03/23] net/ixgbe: remove experimental FDIR API Stephen Hemminger @ 2026-08-04 15:44 ` Stephen Hemminger 2026-08-04 15:44 ` [PATCH v3 05/23] app/testpmd: remove support for flow director Stephen Hemminger ` (18 subsequent siblings) 22 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-04 15:44 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Bruce Richardson Remove the flow director related private APIs in i40e. These APIs are experimental, therefore they can be removed without additional warnings. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- doc/guides/nics/i40e.rst | 46 --------- drivers/net/intel/i40e/i40e_ethdev.c | 4 +- drivers/net/intel/i40e/i40e_ethdev.h | 4 - drivers/net/intel/i40e/i40e_fdir.c | 140 -------------------------- drivers/net/intel/i40e/i40e_flow.c | 3 +- drivers/net/intel/i40e/rte_pmd_i40e.c | 34 ------- drivers/net/intel/i40e/rte_pmd_i40e.h | 33 ------ 7 files changed, 3 insertions(+), 261 deletions(-) diff --git a/doc/guides/nics/i40e.rst b/doc/guides/nics/i40e.rst index 29234dbf0f..67a3b29024 100644 --- a/doc/guides/nics/i40e.rst +++ b/doc/guides/nics/i40e.rst @@ -397,52 +397,6 @@ Add a rule to direct ``ipv4-udp`` packet whose ``dst_ip=2.2.2.5, src_ip=2.2.2.3, dst is 2.2.2.5 / udp src is 32 dst is 32 / end \ actions mark id 1 / queue index 1 / end -Check the flow director status: - -.. code-block:: console - - testpmd> show port fdir 0 - - ######################## FDIR infos for port 0 #################### - MODE: PERFECT - SUPPORTED FLOW TYPE: ipv4-frag ipv4-tcp ipv4-udp ipv4-sctp ipv4-other - ipv6-frag ipv6-tcp ipv6-udp ipv6-sctp ipv6-other - l2_payload - FLEX PAYLOAD INFO: - max_len: 16 payload_limit: 480 - payload_unit: 2 payload_seg: 3 - bitmask_unit: 2 bitmask_num: 2 - MASK: - vlan_tci: 0x0000, - src_ipv4: 0x00000000, - dst_ipv4: 0x00000000, - src_port: 0x0000, - dst_port: 0x0000 - src_ipv6: 0x00000000,0x00000000,0x00000000,0x00000000, - dst_ipv6: 0x00000000,0x00000000,0x00000000,0x00000000 - FLEX PAYLOAD SRC OFFSET: - L2_PAYLOAD: 0 1 2 3 4 5 6 ... - L3_PAYLOAD: 0 1 2 3 4 5 6 ... - L4_PAYLOAD: 0 1 2 3 4 5 6 ... - FLEX MASK CFG: - ipv4-udp: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - ipv4-tcp: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - ipv4-sctp: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - ipv4-other: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - ipv4-frag: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - ipv6-udp: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - ipv6-tcp: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - ipv6-sctp: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - ipv6-other: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - ipv6-frag: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - l2_payload: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - guarant_count: 1 best_count: 0 - guarant_space: 512 best_space: 7168 - collision: 0 free: 0 - maxhash: 0 maxlen: 0 - add: 0 remove: 0 - f_add: 0 f_remove: 0 - Floating VEB ~~~~~~~~~~~~ diff --git a/drivers/net/intel/i40e/i40e_ethdev.c b/drivers/net/intel/i40e/i40e_ethdev.c index b6b2d291ee..5cbdfe9db2 100644 --- a/drivers/net/intel/i40e/i40e_ethdev.c +++ b/drivers/net/intel/i40e/i40e_ethdev.c @@ -9335,8 +9335,8 @@ i40e_get_valid_input_set(enum i40e_filter_pctype pctype, }; /** - * Flow director supports only fields defined in - * union rte_eth_fdir_flow. + * Flow director supports only fields reachable through + * rte_flow item patterns. */ static const uint64_t valid_fdir_inset_table[] = { [I40E_FILTER_PCTYPE_FRAG_IPV4] = diff --git a/drivers/net/intel/i40e/i40e_ethdev.h b/drivers/net/intel/i40e/i40e_ethdev.h index 9d9bde6aeb..3968bfd267 100644 --- a/drivers/net/intel/i40e/i40e_ethdev.h +++ b/drivers/net/intel/i40e/i40e_ethdev.h @@ -1369,10 +1369,6 @@ enum i40e_filter_pctype uint16_t i40e_pctype_to_flowtype(const struct i40e_adapter *adapter, enum i40e_filter_pctype pctype); int i40e_dev_set_gre_key_len(struct i40e_hw *hw, uint8_t len); -void i40e_fdir_info_get(struct rte_eth_dev *dev, - struct rte_eth_fdir_info *fdir); -void i40e_fdir_stats_get(struct rte_eth_dev *dev, - struct rte_eth_fdir_stats *stat); int i40e_select_filter_input_set(struct i40e_hw *hw, struct rte_eth_input_set_conf *conf, enum rte_filter_type filter); diff --git a/drivers/net/intel/i40e/i40e_fdir.c b/drivers/net/intel/i40e/i40e_fdir.c index 8a233f8a97..f36eceab3a 100644 --- a/drivers/net/intel/i40e/i40e_fdir.c +++ b/drivers/net/intel/i40e/i40e_fdir.c @@ -1800,146 +1800,6 @@ i40e_fdir_flush(struct rte_eth_dev *dev) return 0; } -static inline void -i40e_fdir_info_get_flex_set(struct i40e_pf *pf, - struct rte_eth_flex_payload_cfg *flex_set, - uint16_t *num) -{ - struct i40e_fdir_flex_pit *flex_pit; - struct rte_eth_flex_payload_cfg *ptr = flex_set; - uint16_t src, dst, size, j, k; - uint8_t i, layer_idx; - - for (layer_idx = I40E_FLXPLD_L2_IDX; - layer_idx <= I40E_FLXPLD_L4_IDX; - layer_idx++) { - if (layer_idx == I40E_FLXPLD_L2_IDX) - ptr->type = RTE_ETH_L2_PAYLOAD; - else if (layer_idx == I40E_FLXPLD_L3_IDX) - ptr->type = RTE_ETH_L3_PAYLOAD; - else if (layer_idx == I40E_FLXPLD_L4_IDX) - ptr->type = RTE_ETH_L4_PAYLOAD; - - for (i = 0; i < I40E_MAX_FLXPLD_FIED; i++) { - flex_pit = &pf->fdir.flex_set[layer_idx * - I40E_MAX_FLXPLD_FIED + i]; - if (flex_pit->size == 0) - continue; - src = flex_pit->src_offset * sizeof(uint16_t); - dst = flex_pit->dst_offset * sizeof(uint16_t); - size = flex_pit->size * sizeof(uint16_t); - for (j = src, k = dst; j < src + size; j++, k++) - ptr->src_offset[k] = j; - } - (*num)++; - ptr++; - } -} - -static inline void -i40e_fdir_info_get_flex_mask(struct i40e_pf *pf, - struct rte_eth_fdir_flex_mask *flex_mask, - uint16_t *num) -{ - struct i40e_fdir_flex_mask *mask; - struct rte_eth_fdir_flex_mask *ptr = flex_mask; - uint16_t flow_type; - uint8_t i, j; - uint16_t off_bytes, mask_tmp; - - for (i = I40E_FILTER_PCTYPE_NONF_IPV4_UDP; - i <= I40E_FILTER_PCTYPE_L2_PAYLOAD; - i++) { - mask = &pf->fdir.flex_mask[i]; - flow_type = i40e_pctype_to_flowtype(pf->adapter, - (enum i40e_filter_pctype)i); - if (flow_type == RTE_ETH_FLOW_UNKNOWN) - continue; - - for (j = 0; j < I40E_FDIR_MAX_FLEXWORD_NUM; j++) { - if (mask->word_mask & I40E_FLEX_WORD_MASK(j)) { - ptr->mask[j * sizeof(uint16_t)] = UINT8_MAX; - ptr->mask[j * sizeof(uint16_t) + 1] = UINT8_MAX; - } else { - ptr->mask[j * sizeof(uint16_t)] = 0x0; - ptr->mask[j * sizeof(uint16_t) + 1] = 0x0; - } - } - for (j = 0; j < I40E_FDIR_BITMASK_NUM_WORD; j++) { - off_bytes = mask->bitmask[j].offset * sizeof(uint16_t); - mask_tmp = ~mask->bitmask[j].mask; - ptr->mask[off_bytes] &= I40E_HI_BYTE(mask_tmp); - ptr->mask[off_bytes + 1] &= I40E_LO_BYTE(mask_tmp); - } - ptr->flow_type = flow_type; - ptr++; - (*num)++; - } -} - -/* - * i40e_fdir_info_get - get information of Flow Director - * @pf: ethernet device to get info from - * @fdir: a pointer to a structure of type *rte_eth_fdir_info* to be filled with - * the flow director information. - */ -void -i40e_fdir_info_get(struct rte_eth_dev *dev, struct rte_eth_fdir_info *fdir) -{ - struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private); - struct i40e_hw *hw = I40E_PF_TO_HW(pf); - uint16_t num_flex_set = 0; - uint16_t num_flex_mask = 0; - uint16_t i; - - fdir->mode = RTE_FDIR_MODE_NONE; - - fdir->guarant_spc = - (uint32_t)hw->func_caps.fd_filters_guaranteed; - fdir->best_spc = - (uint32_t)hw->func_caps.fd_filters_best_effort; - fdir->max_flexpayload = I40E_FDIR_MAX_FLEX_LEN; - fdir->flow_types_mask[0] = I40E_FDIR_FLOWS; - for (i = 1; i < RTE_FLOW_MASK_ARRAY_SIZE; i++) - fdir->flow_types_mask[i] = 0ULL; - fdir->flex_payload_unit = sizeof(uint16_t); - fdir->flex_bitmask_unit = sizeof(uint16_t); - fdir->max_flex_payload_segment_num = I40E_MAX_FLXPLD_FIED; - fdir->flex_payload_limit = I40E_MAX_FLX_SOURCE_OFF; - fdir->max_flex_bitmask_num = I40E_FDIR_BITMASK_NUM_WORD; - - i40e_fdir_info_get_flex_set(pf, - fdir->flex_conf.flex_set, - &num_flex_set); - i40e_fdir_info_get_flex_mask(pf, - fdir->flex_conf.flex_mask, - &num_flex_mask); - - fdir->flex_conf.nb_payloads = num_flex_set; - fdir->flex_conf.nb_flexmasks = num_flex_mask; -} - -/* - * i40e_fdir_stat_get - get statistics of Flow Director - * @pf: ethernet device to get info from - * @stat: a pointer to a structure of type *rte_eth_fdir_stats* to be filled with - * the flow director statistics. - */ -void -i40e_fdir_stats_get(struct rte_eth_dev *dev, struct rte_eth_fdir_stats *stat) -{ - struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private); - struct i40e_hw *hw = I40E_PF_TO_HW(pf); - uint32_t fdstat; - - fdstat = I40E_READ_REG(hw, I40E_PFQF_FDSTAT); - stat->guarant_cnt = - (uint32_t)((fdstat & I40E_PFQF_FDSTAT_GUARANT_CNT_MASK) >> - I40E_PFQF_FDSTAT_GUARANT_CNT_SHIFT); - stat->best_cnt = - (uint32_t)((fdstat & I40E_PFQF_FDSTAT_BEST_CNT_MASK) >> - I40E_PFQF_FDSTAT_BEST_CNT_SHIFT); -} /* Restore flow director filter */ void diff --git a/drivers/net/intel/i40e/i40e_flow.c b/drivers/net/intel/i40e/i40e_flow.c index 6eb85a7d0d..e9993db6dd 100644 --- a/drivers/net/intel/i40e/i40e_flow.c +++ b/drivers/net/intel/i40e/i40e_flow.c @@ -2391,8 +2391,7 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev, for (i = 0; i < raw_spec->length; i++) { j = i + next_dst_off; - if (j >= RTE_ETH_FDIR_MAX_FLEXLEN || - j >= I40E_FDIR_MAX_FLEX_LEN) + if (j >= I40E_FDIR_MAX_FLEX_LEN) break; filter->input.flow_ext.flexbytes[j] = raw_spec->pattern[i]; diff --git a/drivers/net/intel/i40e/rte_pmd_i40e.c b/drivers/net/intel/i40e/rte_pmd_i40e.c index 2e7943ef8b..e47c1aa9d7 100644 --- a/drivers/net/intel/i40e/rte_pmd_i40e.c +++ b/drivers/net/intel/i40e/rte_pmd_i40e.c @@ -3219,40 +3219,6 @@ rte_pmd_i40e_inset_set(uint16_t port, uint8_t pctype, return 0; } -RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_pmd_i40e_get_fdir_info, 20.08) -int -rte_pmd_i40e_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_i40e_supported(dev)) - return -ENOTSUP; - - i40e_fdir_info_get(dev, fdir_info); - - return 0; -} - -RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_pmd_i40e_get_fdir_stats, 20.08) -int -rte_pmd_i40e_get_fdir_stats(uint16_t port, struct rte_eth_fdir_stats *fdir_stat) -{ - struct rte_eth_dev *dev; - - RTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV); - - dev = &rte_eth_devices[port]; - if (!is_i40e_supported(dev)) - return -ENOTSUP; - - i40e_fdir_stats_get(dev, fdir_stat); - - return 0; -} - RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_pmd_i40e_set_gre_key_len, 20.08) int rte_pmd_i40e_set_gre_key_len(uint16_t port, uint8_t len) diff --git a/drivers/net/intel/i40e/rte_pmd_i40e.h b/drivers/net/intel/i40e/rte_pmd_i40e.h index 5af7e2330f..34900f9bec 100644 --- a/drivers/net/intel/i40e/rte_pmd_i40e.h +++ b/drivers/net/intel/i40e/rte_pmd_i40e.h @@ -1067,39 +1067,6 @@ rte_pmd_i40e_inset_field_clear(uint64_t *inset, uint8_t field_idx) return 0; } -/** - * 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_i40e_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_stat - * The fdir status of the port - * @return - * - (0) if successful. - * - (-ENODEV) if *port* invalid. - * - (-ENOTSUP) if operation not supported. - */ -__rte_experimental -int -rte_pmd_i40e_get_fdir_stats(uint16_t port, - struct rte_eth_fdir_stats *fdir_stat); - /** * Set GRE key length * -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v3 05/23] app/testpmd: remove support for flow director 2026-08-04 15:44 ` [PATCH v3 00/23] ethdev: isolate legacy flow director Stephen Hemminger ` (3 preceding siblings ...) 2026-08-04 15:44 ` [PATCH v3 04/23] net/i40e: " Stephen Hemminger @ 2026-08-04 15:44 ` Stephen Hemminger 2026-08-04 15:44 ` [PATCH v3 06/23] app/testpmd: move str_to_flowtype to i40e Stephen Hemminger ` (17 subsequent siblings) 22 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-04 15:44 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Aman Singh The legacy flow director API is deprecated and being removed. Drop it from testpmd; the testpmd CLI is not a stable API. Removed commands: show port fdir (port_id|all) clear port fdir (port_id|all) Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- app/test-pmd/cmdline.c | 21 +-- app/test-pmd/config.c | 163 -------------------- app/test-pmd/testpmd.h | 3 - doc/guides/testpmd_app_ug/testpmd_funcs.rst | 54 +------ 4 files changed, 14 insertions(+), 227 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 10ee7c5179..c142a8ec50 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -163,7 +163,7 @@ static void cmd_help_long_parsed(void *parsed_result, "Display:\n" "--------\n\n" - "show port (info|stats|summary|xstats|fdir|dcb_tc) (port_id|all)\n" + "show port (info|stats|summary|xstats|dcb_tc) (port_id|all)\n" " Display information for port_id, or all.\n\n" "show port info (port_id) representor\n" @@ -189,7 +189,7 @@ static void cmd_help_long_parsed(void *parsed_result, "show port (port_id) rss-hash [key | algorithm]\n" " Display the RSS hash functions, RSS hash key and RSS hash algorithms of port\n\n" - "clear port (info|stats|xstats|fdir) (port_id|all)\n" + "clear port (info|stats|xstats) (port_id|all)\n" " Clear information for port_id, or all.\n\n" "show (rxq|txq) info (port_id) (queue_id)\n" @@ -7514,11 +7514,6 @@ static void cmd_showportall_parsed(void *parsed_result, else if (!strcmp(res->what, "xstats")) RTE_ETH_FOREACH_DEV(i) nic_xstats_display(i); -#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE) - else if (!strcmp(res->what, "fdir")) - RTE_ETH_FOREACH_DEV(i) - fdir_get_infos(i); -#endif else if (!strcmp(res->what, "dcb_tc")) RTE_ETH_FOREACH_DEV(i) port_dcb_info_display(i); @@ -7531,14 +7526,14 @@ static cmdline_parse_token_string_t cmd_showportall_port = TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, port, "port"); static cmdline_parse_token_string_t cmd_showportall_what = TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, what, - "info#summary#stats#xstats#fdir#dcb_tc"); + "info#summary#stats#xstats#dcb_tc"); static cmdline_parse_token_string_t cmd_showportall_all = TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, all, "all"); static cmdline_parse_inst_t cmd_showportall = { .f = cmd_showportall_parsed, .data = NULL, .help_str = "show|clear port " - "info|summary|stats|xstats|fdir|dcb_tc all", + "info|summary|stats|xstats|dcb_tc all", .tokens = { (void *)&cmd_showportall_show, (void *)&cmd_showportall_port, @@ -7576,10 +7571,6 @@ static void cmd_showport_parsed(void *parsed_result, nic_stats_display(res->portnum); else if (!strcmp(res->what, "xstats")) nic_xstats_display(res->portnum); -#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE) - else if (!strcmp(res->what, "fdir")) - fdir_get_infos(res->portnum); -#endif else if (!strcmp(res->what, "dcb_tc")) port_dcb_info_display(res->portnum); } @@ -7591,7 +7582,7 @@ static cmdline_parse_token_string_t cmd_showport_port = TOKEN_STRING_INITIALIZER(struct cmd_showport_result, port, "port"); static cmdline_parse_token_string_t cmd_showport_what = TOKEN_STRING_INITIALIZER(struct cmd_showport_result, what, - "info#summary#stats#xstats#fdir#dcb_tc"); + "info#summary#stats#xstats#dcb_tc"); static cmdline_parse_token_num_t cmd_showport_portnum = TOKEN_NUM_INITIALIZER(struct cmd_showport_result, portnum, RTE_UINT16); @@ -7599,7 +7590,7 @@ static cmdline_parse_inst_t cmd_showport = { .f = cmd_showport_parsed, .data = NULL, .help_str = "show|clear port " - "info|summary|stats|xstats|fdir|dcb_tc " + "info|summary|stats|xstats|dcb_tc " "<port_id>", .tokens = { (void *)&cmd_showport_show, diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index aa03eb99cc..582e7287be 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -7056,169 +7056,6 @@ flowtype_to_str(uint16_t flow_type) return NULL; } -#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE) - -static inline void -print_fdir_flex_payload(struct rte_eth_fdir_flex_conf *flex_conf, uint32_t num) -{ - struct rte_eth_flex_payload_cfg *cfg; - uint32_t i, j; - - for (i = 0; i < flex_conf->nb_payloads; i++) { - cfg = &flex_conf->flex_set[i]; - if (cfg->type == RTE_ETH_RAW_PAYLOAD) - printf("\n RAW: "); - else if (cfg->type == RTE_ETH_L2_PAYLOAD) - printf("\n L2_PAYLOAD: "); - else if (cfg->type == RTE_ETH_L3_PAYLOAD) - printf("\n L3_PAYLOAD: "); - else if (cfg->type == RTE_ETH_L4_PAYLOAD) - printf("\n L4_PAYLOAD: "); - else - printf("\n UNKNOWN PAYLOAD(%u): ", cfg->type); - for (j = 0; j < num; j++) - printf(" %-5u", cfg->src_offset[j]); - } - printf("\n"); -} - -static inline void -print_fdir_flex_mask(struct rte_eth_fdir_flex_conf *flex_conf, uint32_t num) -{ - struct rte_eth_fdir_flex_mask *mask; - uint32_t i, j; - const char *p; - - for (i = 0; i < flex_conf->nb_flexmasks; i++) { - mask = &flex_conf->flex_mask[i]; - p = flowtype_to_str(mask->flow_type); - printf("\n %s:\t", p ? p : "unknown"); - for (j = 0; j < num; j++) - printf(" %02x", mask->mask[j]); - } - printf("\n"); -} - -static inline void -print_fdir_flow_type(uint32_t flow_types_mask) -{ - int i; - const char *p; - - for (i = RTE_ETH_FLOW_UNKNOWN; i < RTE_ETH_FLOW_MAX; i++) { - if (!(flow_types_mask & (1 << i))) - continue; - p = flowtype_to_str(i); - if (p) - printf(" %s", p); - else - printf(" unknown"); - } - printf("\n"); -} - -static int -get_fdir_info(portid_t port_id, struct rte_eth_fdir_info *fdir_info, - struct rte_eth_fdir_stats *fdir_stat) -{ - int ret = -ENOTSUP; - -#ifdef RTE_NET_I40E - if (ret == -ENOTSUP) { - ret = rte_pmd_i40e_get_fdir_info(port_id, fdir_info); - if (!ret) - ret = rte_pmd_i40e_get_fdir_stats(port_id, fdir_stat); - } -#endif -#ifdef RTE_NET_IXGBE - if (ret == -ENOTSUP) { - ret = rte_pmd_ixgbe_get_fdir_info(port_id, fdir_info); - if (!ret) - ret = rte_pmd_ixgbe_get_fdir_stats(port_id, fdir_stat); - } -#endif - switch (ret) { - case 0: - break; - case -ENOTSUP: - fprintf(stderr, "\n FDIR is not supported on port %-2d\n", - port_id); - break; - default: - fprintf(stderr, "programming error: (%s)\n", strerror(-ret)); - break; - } - return ret; -} - -void -fdir_get_infos(portid_t port_id) -{ - struct rte_eth_fdir_stats fdir_stat; - struct rte_eth_fdir_info fdir_info; - - static const char *fdir_stats_border = "########################"; - - if (port_id_is_invalid(port_id, ENABLED_WARN)) - return; - - memset(&fdir_info, 0, sizeof(fdir_info)); - memset(&fdir_stat, 0, sizeof(fdir_stat)); - if (get_fdir_info(port_id, &fdir_info, &fdir_stat)) - return; - - printf("\n %s FDIR infos for port %-2d %s\n", - fdir_stats_border, port_id, fdir_stats_border); - printf(" MODE: "); - if (fdir_info.mode == RTE_FDIR_MODE_PERFECT) - printf(" PERFECT\n"); - else if (fdir_info.mode == RTE_FDIR_MODE_PERFECT_MAC_VLAN) - printf(" PERFECT-MAC-VLAN\n"); - else if (fdir_info.mode == RTE_FDIR_MODE_PERFECT_TUNNEL) - printf(" PERFECT-TUNNEL\n"); - else if (fdir_info.mode == RTE_FDIR_MODE_SIGNATURE) - printf(" SIGNATURE\n"); - else - printf(" DISABLE\n"); - if (fdir_info.mode != RTE_FDIR_MODE_PERFECT_MAC_VLAN - && fdir_info.mode != RTE_FDIR_MODE_PERFECT_TUNNEL) { - printf(" SUPPORTED FLOW TYPE: "); - print_fdir_flow_type(fdir_info.flow_types_mask[0]); - } - printf(" FLEX PAYLOAD INFO:\n"); - printf(" max_len: %-10"PRIu32" payload_limit: %-10"PRIu32"\n" - " payload_unit: %-10"PRIu32" payload_seg: %-10"PRIu32"\n" - " bitmask_unit: %-10"PRIu32" bitmask_num: %-10"PRIu32"\n", - fdir_info.max_flexpayload, fdir_info.flex_payload_limit, - fdir_info.flex_payload_unit, - fdir_info.max_flex_payload_segment_num, - fdir_info.flex_bitmask_unit, fdir_info.max_flex_bitmask_num); - if (fdir_info.flex_conf.nb_payloads > 0) { - printf(" FLEX PAYLOAD SRC OFFSET:"); - print_fdir_flex_payload(&fdir_info.flex_conf, fdir_info.max_flexpayload); - } - if (fdir_info.flex_conf.nb_flexmasks > 0) { - printf(" FLEX MASK CFG:"); - print_fdir_flex_mask(&fdir_info.flex_conf, fdir_info.max_flexpayload); - } - printf(" guarant_count: %-10"PRIu32" best_count: %"PRIu32"\n", - fdir_stat.guarant_cnt, fdir_stat.best_cnt); - printf(" guarant_space: %-10"PRIu32" best_space: %"PRIu32"\n", - fdir_info.guarant_spc, fdir_info.best_spc); - printf(" collision: %-10"PRIu32" free: %"PRIu32"\n" - " maxhash: %-10"PRIu32" maxlen: %"PRIu32"\n" - " add: %-10"PRIu64" remove: %"PRIu64"\n" - " f_add: %-10"PRIu64" f_remove: %"PRIu64"\n", - fdir_stat.collision, fdir_stat.free, - fdir_stat.maxhash, fdir_stat.maxlen, - fdir_stat.add, fdir_stat.remove, - fdir_stat.f_add, fdir_stat.f_remove); - printf(" %s############################%s\n", - fdir_stats_border, fdir_stats_border); -} - -#endif /* RTE_NET_I40E || RTE_NET_IXGBE */ - void set_vf_traffic(portid_t port_id, uint8_t is_rx, uint16_t vf, uint8_t on) { diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index 083171853c..f7c10ab6b8 100644 --- a/app/test-pmd/testpmd.h +++ b/app/test-pmd/testpmd.h @@ -1212,9 +1212,6 @@ int all_ports_stopped(void); int port_is_stopped(portid_t port_id); int port_is_started(portid_t port_id); void pmd_test_exit(void); -#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE) -void fdir_get_infos(portid_t port_id); -#endif void port_rss_reta_info(portid_t port_id, struct rte_eth_rss_reta_entry64 *reta_conf, uint16_t nb_entries); diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst index e65376df54..062cf32fe9 100644 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst @@ -22,10 +22,10 @@ If you type a partial command and hit ``<TAB>`` you get a list of the available testpmd> show port <TAB> - info [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|dcb_tc|cap X - info [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|dcb_tc|cap all - stats [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|dcb_tc|cap X - stats [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|dcb_tc|cap all + info [Mul-choice STRING]: show|clear port info|stats|xstats|dcb_tc|cap X + info [Mul-choice STRING]: show|clear port info|stats|xstats|dcb_tc|cap all + stats [Mul-choice STRING]: show|clear port info|stats|xstats|dcb_tc|cap X + stats [Mul-choice STRING]: show|clear port info|stats|xstats|dcb_tc|cap all ... @@ -160,7 +160,7 @@ show port Display information for a given port or all ports:: - testpmd> show port (info|summary|stats|xstats|fdir|dcb_tc|cap) (port_id|all) + testpmd> show port (info|summary|stats|xstats|dcb_tc|cap) (port_id|all) The available information categories are: @@ -172,8 +172,6 @@ The available information categories are: * ``xstats``: RX/TX extended NIC statistics. -* ``fdir``: Flow Director information and statistics. - * ``dcb_tc``: DCB information such as TC mapping. For example: @@ -262,7 +260,7 @@ clear port Clear the port statistics and forward engine statistics for a given port or for all ports:: - testpmd> clear port (info|stats|xstats|fdir) (port_id|all) + testpmd> clear port (info|stats|xstats) (port_id|all) For example:: @@ -2288,42 +2286,6 @@ Where the threshold type can be: These threshold options are also available from the command-line. -port config pctype mapping -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Reset pctype mapping table:: - - testpmd> port config (port_id) pctype mapping reset - -Update hardware defined pctype to software defined flow type mapping table:: - - testpmd> port config (port_id) pctype mapping update (pctype_id_0[,pctype_id_1]*) (flow_type_id) - -where: - -* ``pctype_id_x``: hardware pctype id as index of bit in bitmask value of the pctype mapping table. - -* ``flow_type_id``: software flow type id as the index of the pctype mapping table. - -port config input set -~~~~~~~~~~~~~~~~~~~~~ - -Config RSS/FDIR/FDIR flexible payload input set for some pctype:: - - testpmd> port config (port_id) pctype (pctype_id) \ - (hash_inset|fdir_inset|fdir_flx_inset) \ - (get|set|clear) field (field_idx) - -Clear RSS/FDIR/FDIR flexible payload input set for some pctype:: - - testpmd> port config (port_id) pctype (pctype_id) \ - (hash_inset|fdir_inset|fdir_flx_inset) clear all - -where: - -* ``pctype_id``: hardware packet classification types. -* ``field_idx``: hardware field index. - port config udp_tunnel_port ~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -5519,10 +5481,10 @@ L2TPv2 RSS rules can be created by the following commands:: testpmd> flow create 0 ingress pattern eth / ipv6 / udp / l2tpv2 / ppp / ipv6 / end actions rss types ipv6 end queues end / end -Sample L2TPv2 FDIR rules +Sample L2TPv2 flow rules ~~~~~~~~~~~~~~~~~~~~~~~~ -L2TPv2 FDIR rules can be created by the following commands:: +L2TPv2 flow rules can be created by the following commands:: testpmd> flow create 0 ingress pattern eth / ipv4 / udp / l2tpv2 type control session_id is 0x1111 / end actions queue index 3 / end -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v3 06/23] app/testpmd: move str_to_flowtype to i40e 2026-08-04 15:44 ` [PATCH v3 00/23] ethdev: isolate legacy flow director Stephen Hemminger ` (4 preceding siblings ...) 2026-08-04 15:44 ` [PATCH v3 05/23] app/testpmd: remove support for flow director Stephen Hemminger @ 2026-08-04 15:44 ` Stephen Hemminger 2026-08-04 15:44 ` [PATCH v3 07/23] app/test: include headers directly Stephen Hemminger ` (16 subsequent siblings) 22 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-04 15:44 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Aman Singh, Bruce Richardson Only the i40e internal command is still using str_to_flowtype() so move it to there. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- app/test-pmd/config.c | 62 --------------------------- app/test-pmd/testpmd.h | 3 -- drivers/net/intel/i40e/i40e_testpmd.c | 51 ++++++++++++++++++++++ 3 files changed, 51 insertions(+), 65 deletions(-) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 582e7287be..230640ea44 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -3,7 +3,6 @@ * Copyright 2013-2014 6WIND S.A. */ -#include <ctype.h> #include <stdarg.h> #include <errno.h> #include <stdbool.h> @@ -182,35 +181,6 @@ static const struct { }, }; -static const struct { - char str[32]; - uint16_t ftype; -} flowtype_str_table[] = { - {"raw", RTE_ETH_FLOW_RAW}, - {"ipv4", RTE_ETH_FLOW_IPV4}, - {"ipv4-frag", RTE_ETH_FLOW_FRAG_IPV4}, - {"ipv4-tcp", RTE_ETH_FLOW_NONFRAG_IPV4_TCP}, - {"ipv4-udp", RTE_ETH_FLOW_NONFRAG_IPV4_UDP}, - {"ipv4-sctp", RTE_ETH_FLOW_NONFRAG_IPV4_SCTP}, - {"ipv4-other", RTE_ETH_FLOW_NONFRAG_IPV4_OTHER}, - {"ipv6", RTE_ETH_FLOW_IPV6}, - {"ipv6-frag", RTE_ETH_FLOW_FRAG_IPV6}, - {"ipv6-tcp", RTE_ETH_FLOW_NONFRAG_IPV6_TCP}, - {"ipv6-udp", RTE_ETH_FLOW_NONFRAG_IPV6_UDP}, - {"ipv6-sctp", RTE_ETH_FLOW_NONFRAG_IPV6_SCTP}, - {"ipv6-other", RTE_ETH_FLOW_NONFRAG_IPV6_OTHER}, - {"l2_payload", RTE_ETH_FLOW_L2_PAYLOAD}, - {"ipv6-ex", RTE_ETH_FLOW_IPV6_EX}, - {"ipv6-tcp-ex", RTE_ETH_FLOW_IPV6_TCP_EX}, - {"ipv6-udp-ex", RTE_ETH_FLOW_IPV6_UDP_EX}, - {"port", RTE_ETH_FLOW_PORT}, - {"vxlan", RTE_ETH_FLOW_VXLAN}, - {"geneve", RTE_ETH_FLOW_GENEVE}, - {"nvgre", RTE_ETH_FLOW_NVGRE}, - {"vxlan-gpe", RTE_ETH_FLOW_VXLAN_GPE}, - {"gtpu", RTE_ETH_FLOW_GTPU}, -}; - static void print_ethaddr(const char *name, struct rte_ether_addr *eth_addr) { @@ -7024,38 +6994,6 @@ set_record_burst_stats(uint8_t on_off) record_burst_stats = on_off; } -uint16_t -str_to_flowtype(const char *string) -{ - uint8_t i; - - for (i = 0; i < RTE_DIM(flowtype_str_table); i++) { - if (!strcmp(flowtype_str_table[i].str, string)) - return flowtype_str_table[i].ftype; - } - - if (isdigit(string[0])) { - int val = atoi(string); - if (val > 0 && val < 64) - return (uint16_t)val; - } - - return RTE_ETH_FLOW_UNKNOWN; -} - -const char* -flowtype_to_str(uint16_t flow_type) -{ - uint8_t i; - - for (i = 0; i < RTE_DIM(flowtype_str_table); i++) { - if (flowtype_str_table[i].ftype == flow_type) - return flowtype_str_table[i].str; - } - - return NULL; -} - void set_vf_traffic(portid_t port_id, uint8_t is_rx, uint16_t vf, uint8_t on) { diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index f7c10ab6b8..ed94bd65c6 100644 --- a/app/test-pmd/testpmd.h +++ b/app/test-pmd/testpmd.h @@ -1325,9 +1325,6 @@ int parse_hairpin_map(const char *hpmap); uint64_t str_to_rsstypes(const char *str); const char *rsstypes_to_str(uint64_t rss_type); -uint16_t str_to_flowtype(const char *string); -const char *flowtype_to_str(uint16_t flow_type); - /* For registering driver specific testpmd commands. */ struct testpmd_driver_commands { TAILQ_ENTRY(testpmd_driver_commands) next; diff --git a/drivers/net/intel/i40e/i40e_testpmd.c b/drivers/net/intel/i40e/i40e_testpmd.c index 21f596297b..8ae1db698f 100644 --- a/drivers/net/intel/i40e/i40e_testpmd.c +++ b/drivers/net/intel/i40e/i40e_testpmd.c @@ -2,6 +2,7 @@ * Copyright(c) 2010-2016 Intel Corporation. */ +#include <ctype.h> #include <stdlib.h> #include <rte_pmd_i40e.h> @@ -465,6 +466,56 @@ static cmdline_parse_inst_t cmd_show_queue_region_info_all = { }; /* *** deal with flow director filter *** */ + +static const struct { + char str[32]; + uint16_t ftype; +} flowtype_str_table[] = { + {"raw", RTE_ETH_FLOW_RAW}, + {"ipv4", RTE_ETH_FLOW_IPV4}, + {"ipv4-frag", RTE_ETH_FLOW_FRAG_IPV4}, + {"ipv4-tcp", RTE_ETH_FLOW_NONFRAG_IPV4_TCP}, + {"ipv4-udp", RTE_ETH_FLOW_NONFRAG_IPV4_UDP}, + {"ipv4-sctp", RTE_ETH_FLOW_NONFRAG_IPV4_SCTP}, + {"ipv4-other", RTE_ETH_FLOW_NONFRAG_IPV4_OTHER}, + {"ipv6", RTE_ETH_FLOW_IPV6}, + {"ipv6-frag", RTE_ETH_FLOW_FRAG_IPV6}, + {"ipv6-tcp", RTE_ETH_FLOW_NONFRAG_IPV6_TCP}, + {"ipv6-udp", RTE_ETH_FLOW_NONFRAG_IPV6_UDP}, + {"ipv6-sctp", RTE_ETH_FLOW_NONFRAG_IPV6_SCTP}, + {"ipv6-other", RTE_ETH_FLOW_NONFRAG_IPV6_OTHER}, + {"l2_payload", RTE_ETH_FLOW_L2_PAYLOAD}, + {"ipv6-ex", RTE_ETH_FLOW_IPV6_EX}, + {"ipv6-tcp-ex", RTE_ETH_FLOW_IPV6_TCP_EX}, + {"ipv6-udp-ex", RTE_ETH_FLOW_IPV6_UDP_EX}, + {"port", RTE_ETH_FLOW_PORT}, + {"vxlan", RTE_ETH_FLOW_VXLAN}, + {"geneve", RTE_ETH_FLOW_GENEVE}, + {"nvgre", RTE_ETH_FLOW_NVGRE}, + {"vxlan-gpe", RTE_ETH_FLOW_VXLAN_GPE}, + {"gtpu", RTE_ETH_FLOW_GTPU}, +}; + +static uint16_t +str_to_flowtype(const char *string) +{ + uint8_t i; + + for (i = 0; i < RTE_DIM(flowtype_str_table); i++) { + if (!strcmp(flowtype_str_table[i].str, string)) + return flowtype_str_table[i].ftype; + } + + if (isdigit(string[0])) { + int val = atoi(string); + if (val > 0 && val < 64) + return (uint16_t)val; + } + + return RTE_ETH_FLOW_UNKNOWN; +} + + struct cmd_flow_director_result { cmdline_fixed_string_t flow_director_filter; portid_t port_id; -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v3 07/23] app/test: include headers directly 2026-08-04 15:44 ` [PATCH v3 00/23] ethdev: isolate legacy flow director Stephen Hemminger ` (5 preceding siblings ...) 2026-08-04 15:44 ` [PATCH v3 06/23] app/testpmd: move str_to_flowtype to i40e Stephen Hemminger @ 2026-08-04 15:44 ` Stephen Hemminger 2026-08-04 15:53 ` Marat Khalili 2026-08-04 15:44 ` [PATCH v3 08/23] gro: " Stephen Hemminger ` (15 subsequent siblings) 22 siblings, 1 reply; 76+ messages in thread From: Stephen Hemminger @ 2026-08-04 15:44 UTC (permalink / raw) To: dev Cc: Stephen Hemminger, Jerin Jacob, Konstantin Ananyev, Marat Khalili, Akhil Goyal, Anoob Joseph The test code was getting network headers indirectly via inclusion of rte_ethdev.h. This will change in the future, instead get the headers directly. For BPF test, use the tool "iwyu" to get more complete set of headers. Replace use of htons() with equivalent DPDK byteorder macro. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- app/test-eventdev/test_pipeline_common.h | 1 + app/test/test_bpf.c | 20 +++++++++++++++----- app/test/test_security_inline_macsec.c | 2 ++ app/test/test_security_inline_proto.c | 1 + 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/app/test-eventdev/test_pipeline_common.h b/app/test-eventdev/test_pipeline_common.h index 61370fb799..e9f20e7f62 100644 --- a/app/test-eventdev/test_pipeline_common.h +++ b/app/test-eventdev/test_pipeline_common.h @@ -12,6 +12,7 @@ #include <rte_cycles.h> #include <rte_ethdev.h> #include <rte_ether.h> +#include <rte_ip.h> #include <rte_event_eth_rx_adapter.h> #include <rte_event_eth_tx_adapter.h> #include <rte_eventdev.h> diff --git a/app/test/test_bpf.c b/app/test/test_bpf.c index 3205afaa63..5b71f94a71 100644 --- a/app/test/test_bpf.c +++ b/app/test/test_bpf.c @@ -5,16 +5,28 @@ #include <stdio.h> #include <string.h> #include <stdint.h> +#include <stdlib.h> +#include <stdbool.h> +#include <stddef.h> +#include <stdalign.h> #include <inttypes.h> +#include <errno.h> +#include <limits.h> #include <unistd.h> -#include <rte_memory.h> +#include <rte_bitops.h> #include <rte_debug.h> #include <rte_hexdump.h> #include <rte_malloc.h> +#include <rte_memcpy.h> +#include <rte_mbuf.h> #include <rte_random.h> #include <rte_byteorder.h> #include <rte_errno.h> +#include <rte_ether.h> +#include <rte_ip.h> +#include <rte_udp.h> +#include <rte_tcp.h> #include "test.h" @@ -30,8 +42,6 @@ test_bpf(void) #else #include <rte_bpf.h> -#include <rte_ether.h> -#include <rte_ip.h> /* Tests of most simple BPF programs (no instructions, one instruction etc.) */ @@ -1331,7 +1341,7 @@ test_jump2_check(uint64_t rc, const void *arg) uint16_t eth_type; uint64_t v = -1; - if (eth_hdr->ether_type == htons(0x8100)) { + if (eth_hdr->ether_type == rte_cpu_to_be_16(0x8100)) { const struct rte_vlan_hdr *vlan_hdr = (const void *)(eth_hdr + 1); eth_type = vlan_hdr->eth_proto; @@ -1341,7 +1351,7 @@ test_jump2_check(uint64_t rc, const void *arg) next = eth_hdr + 1; } - if (eth_type == htons(0x0800)) { + if (eth_type == rte_cpu_to_be_16(0x0800)) { ipv4_hdr = next; if ((ipv4_hdr->dst_addr & rte_cpu_to_be_32(TEST_NETMASK)) == rte_cpu_to_be_32(TEST_SUBNET)) { diff --git a/app/test/test_security_inline_macsec.c b/app/test/test_security_inline_macsec.c index a929ff5326..43672ef237 100644 --- a/app/test/test_security_inline_macsec.c +++ b/app/test/test_security_inline_macsec.c @@ -8,6 +8,8 @@ #include <rte_ethdev.h> #include <rte_malloc.h> #include <rte_security.h> +#include <rte_flow.h> +#include <rte_macsec.h> #include "test.h" #include "test_security_inline_macsec_vectors.h" diff --git a/app/test/test_security_inline_proto.c b/app/test/test_security_inline_proto.c index 0b1f7fbbab..99111e5432 100644 --- a/app/test/test_security_inline_proto.c +++ b/app/test/test_security_inline_proto.c @@ -7,6 +7,7 @@ #include <inttypes.h> #include <rte_ethdev.h> +#include <rte_flow.h> #include <rte_malloc.h> #include <rte_security.h> -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* RE: [PATCH v3 07/23] app/test: include headers directly 2026-08-04 15:44 ` [PATCH v3 07/23] app/test: include headers directly Stephen Hemminger @ 2026-08-04 15:53 ` Marat Khalili 0 siblings, 0 replies; 76+ messages in thread From: Marat Khalili @ 2026-08-04 15:53 UTC (permalink / raw) To: Stephen Hemminger, dev@dpdk.org Cc: Jerin Jacob, Konstantin Ananyev, Akhil Goyal, Anoob Joseph > diff --git a/app/test/test_bpf.c b/app/test/test_bpf.c > index 3205afaa63..5b71f94a71 100644 > --- a/app/test/test_bpf.c > +++ b/app/test/test_bpf.c > @@ -5,16 +5,28 @@ > #include <stdio.h> > #include <string.h> > #include <stdint.h> > +#include <stdlib.h> > +#include <stdbool.h> > +#include <stddef.h> > +#include <stdalign.h> > #include <inttypes.h> > +#include <errno.h> > +#include <limits.h> > #include <unistd.h> > > -#include <rte_memory.h> > +#include <rte_bitops.h> > #include <rte_debug.h> > #include <rte_hexdump.h> > #include <rte_malloc.h> > +#include <rte_memcpy.h> > +#include <rte_mbuf.h> > #include <rte_random.h> > #include <rte_byteorder.h> > #include <rte_errno.h> > +#include <rte_ether.h> > +#include <rte_ip.h> > +#include <rte_udp.h> > +#include <rte_tcp.h> > > #include "test.h" > > @@ -30,8 +42,6 @@ test_bpf(void) > #else > > #include <rte_bpf.h> > -#include <rte_ether.h> > -#include <rte_ip.h> > > > /* Tests of most simple BPF programs (no instructions, one instruction etc.) */ > @@ -1331,7 +1341,7 @@ test_jump2_check(uint64_t rc, const void *arg) > uint16_t eth_type; > uint64_t v = -1; > > - if (eth_hdr->ether_type == htons(0x8100)) { > + if (eth_hdr->ether_type == rte_cpu_to_be_16(0x8100)) { > const struct rte_vlan_hdr *vlan_hdr = > (const void *)(eth_hdr + 1); > eth_type = vlan_hdr->eth_proto; > @@ -1341,7 +1351,7 @@ test_jump2_check(uint64_t rc, const void *arg) > next = eth_hdr + 1; > } > > - if (eth_type == htons(0x0800)) { > + if (eth_type == rte_cpu_to_be_16(0x0800)) { > ipv4_hdr = next; > if ((ipv4_hdr->dst_addr & rte_cpu_to_be_32(TEST_NETMASK)) == > rte_cpu_to_be_32(TEST_SUBNET)) { For the `test_bpf.c` part: Acked-by: Marat Khalili <marat.khalili@huawei.com> ^ permalink raw reply [flat|nested] 76+ messages in thread
* [PATCH v3 08/23] gro: include headers directly 2026-08-04 15:44 ` [PATCH v3 00/23] ethdev: isolate legacy flow director Stephen Hemminger ` (6 preceding siblings ...) 2026-08-04 15:44 ` [PATCH v3 07/23] app/test: include headers directly Stephen Hemminger @ 2026-08-04 15:44 ` Stephen Hemminger 2026-08-04 15:44 ` [PATCH v3 09/23] crypto/dpaa_sec: include UDP header Stephen Hemminger ` (14 subsequent siblings) 22 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-04 15:44 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Jiayu Hu The gro library was getting headers such as VXLAN implicitly via rte_ethdev.h. This will change, so include the needed headers directly. Use iwyu to make sure all headers are covered. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- lib/gro/gro_tcp4.c | 9 ++++++++- lib/gro/gro_tcp6.c | 9 ++++++++- lib/gro/gro_vxlan_tcp4.c | 10 +++++++++- lib/gro/gro_vxlan_udp4.c | 9 ++++++++- lib/gro/rte_gro.c | 9 ++++++++- 5 files changed, 41 insertions(+), 5 deletions(-) diff --git a/lib/gro/gro_tcp4.c b/lib/gro/gro_tcp4.c index 855cc7a71d..3997fb8bf1 100644 --- a/lib/gro/gro_tcp4.c +++ b/lib/gro/gro_tcp4.c @@ -2,9 +2,16 @@ * Copyright(c) 2017 Intel Corporation */ +#include <stddef.h> + +#include <rte_branch_prediction.h> +#include <rte_byteorder.h> +#include <rte_common.h> +#include <rte_ether.h> #include <rte_malloc.h> #include <rte_mbuf.h> -#include <rte_ethdev.h> +#include <rte_ip.h> +#include <rte_tcp.h> #include "gro_tcp4.h" #include "gro_tcp_internal.h" diff --git a/lib/gro/gro_tcp6.c b/lib/gro/gro_tcp6.c index ab4cd6c68b..4e1ae596b7 100644 --- a/lib/gro/gro_tcp6.c +++ b/lib/gro/gro_tcp6.c @@ -2,9 +2,16 @@ * Copyright(c) 2023 Intel Corporation */ +#include <stdbool.h> + +#include <rte_branch_prediction.h> +#include <rte_byteorder.h> +#include <rte_common.h> +#include <rte_ether.h> #include <rte_malloc.h> #include <rte_mbuf.h> -#include <rte_ethdev.h> +#include <rte_ip.h> +#include <rte_tcp.h> #include "gro_tcp6.h" #include "gro_tcp_internal.h" diff --git a/lib/gro/gro_vxlan_tcp4.c b/lib/gro/gro_vxlan_tcp4.c index 29d4a2e13d..650d02eb74 100644 --- a/lib/gro/gro_vxlan_tcp4.c +++ b/lib/gro/gro_vxlan_tcp4.c @@ -2,9 +2,17 @@ * Copyright(c) 2018 Intel Corporation */ +#include <stddef.h> + +#include <rte_branch_prediction.h> +#include <rte_byteorder.h> +#include <rte_common.h> #include <rte_malloc.h> #include <rte_mbuf.h> -#include <rte_ethdev.h> +#include <rte_ether.h> +#include <rte_vxlan.h> +#include <rte_ip.h> +#include <rte_tcp.h> #include <rte_udp.h> #include "gro_vxlan_tcp4.h" diff --git a/lib/gro/gro_vxlan_udp4.c b/lib/gro/gro_vxlan_udp4.c index ca8cee270d..bdfa8d6d20 100644 --- a/lib/gro/gro_vxlan_udp4.c +++ b/lib/gro/gro_vxlan_udp4.c @@ -2,9 +2,16 @@ * Copyright(c) 2020 Inspur Corporation */ +#include <stddef.h> + +#include <rte_branch_prediction.h> +#include <rte_byteorder.h> +#include <rte_common.h> #include <rte_malloc.h> #include <rte_mbuf.h> -#include <rte_ethdev.h> +#include <rte_ether.h> +#include <rte_vxlan.h> +#include <rte_ip.h> #include <rte_udp.h> #include "gro_vxlan_udp4.h" diff --git a/lib/gro/rte_gro.c b/lib/gro/rte_gro.c index 578cc9b801..5bccd3cbac 100644 --- a/lib/gro/rte_gro.c +++ b/lib/gro/rte_gro.c @@ -2,12 +2,19 @@ * Copyright(c) 2017 Intel Corporation */ +#include <stddef.h> + #include <eal_export.h> +#include <rte_branch_prediction.h> +#include <rte_common.h> #include <rte_malloc.h> +#include <rte_mbuf.h> #include <rte_cycles.h> -#include <rte_ethdev.h> +#include <rte_ether.h> +#include <rte_vxlan.h> #include "rte_gro.h" +#include "gro_tcp.h" #include "gro_tcp4.h" #include "gro_tcp6.h" #include "gro_udp4.h" -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v3 09/23] crypto/dpaa_sec: include UDP header 2026-08-04 15:44 ` [PATCH v3 00/23] ethdev: isolate legacy flow director Stephen Hemminger ` (7 preceding siblings ...) 2026-08-04 15:44 ` [PATCH v3 08/23] gro: " Stephen Hemminger @ 2026-08-04 15:44 ` Stephen Hemminger 2026-08-04 15:44 ` [PATCH v3 10/23] net/gve: include UDP, SCTP and TCP headers Stephen Hemminger ` (13 subsequent siblings) 22 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-04 15:44 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Gagandeep Singh, Hemant Agrawal The driver was getting the UDP header definition indirectly via rte_ethdev.h. That will change, so include the header directly. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- drivers/crypto/dpaa_sec/dpaa_sec.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.h b/drivers/crypto/dpaa_sec/dpaa_sec.h index d78cad818a..bce60d9cb8 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.h +++ b/drivers/crypto/dpaa_sec/dpaa_sec.h @@ -7,6 +7,8 @@ #ifndef _DPAA_SEC_H_ #define _DPAA_SEC_H_ +#include <rte_udp.h> + #define CRYPTODEV_NAME_DPAA_SEC_PMD crypto_dpaa_sec /**< NXP DPAA - SEC PMD device name */ -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v3 10/23] net/gve: include UDP, SCTP and TCP headers 2026-08-04 15:44 ` [PATCH v3 00/23] ethdev: isolate legacy flow director Stephen Hemminger ` (8 preceding siblings ...) 2026-08-04 15:44 ` [PATCH v3 09/23] crypto/dpaa_sec: include UDP header Stephen Hemminger @ 2026-08-04 15:44 ` Stephen Hemminger 2026-08-04 15:44 ` [PATCH v3 11/23] net/nfp: break implicit dependency on rte_eth_ctrl.h Stephen Hemminger ` (12 subsequent siblings) 22 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-04 15:44 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Joshua Washington, Jeroen de Borst This driver was getting rte_udp.h, rte_tcp.h and rte_sctp.h implicitly through rte_ethdev.h -> rte_eth_ctrl.h -> rte_flow.h. Since rte_eth_ctrl.h is deprecated, better to not depend on that. Use iwyu to make sure all used includes are here. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Reviewed-by: Joshua Washington <joshwash@google.com> --- drivers/net/gve/gve_ethdev.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/net/gve/gve_ethdev.h b/drivers/net/gve/gve_ethdev.h index c9a176ff17..95b32420b4 100644 --- a/drivers/net/gve/gve_ethdev.h +++ b/drivers/net/gve/gve_ethdev.h @@ -5,15 +5,26 @@ #ifndef _GVE_ETHDEV_H_ #define _GVE_ETHDEV_H_ +#include <stdbool.h> +#include <stdint.h> +#include <pthread.h> +#include <sys/queue.h> + #include <ethdev_driver.h> #include <ethdev_pci.h> #include <rte_alarm.h> +#include <rte_atomic.h> +#include <rte_stdatomic.h> +#include <rte_bitops.h> +#include <rte_ethdev.h> #include <rte_ether.h> #include <rte_pci.h> -#include <pthread.h> #include <rte_bitmap.h> #include <rte_memzone.h> #include <rte_thread.h> +#include <rte_udp.h> +#include <rte_tcp.h> +#include <rte_sctp.h> #include "base/gve.h" -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v3 11/23] net/nfp: break implicit dependency on rte_eth_ctrl.h 2026-08-04 15:44 ` [PATCH v3 00/23] ethdev: isolate legacy flow director Stephen Hemminger ` (9 preceding siblings ...) 2026-08-04 15:44 ` [PATCH v3 10/23] net/gve: include UDP, SCTP and TCP headers Stephen Hemminger @ 2026-08-04 15:44 ` Stephen Hemminger 2026-08-04 15:45 ` [PATCH v3 12/23] net/mana: include used network headers Stephen Hemminger ` (11 subsequent siblings) 22 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-04 15:44 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Chaoyong He This driver was using UINT64_BIT which was getting defined via deprecated rte_eth_ctrl.h. Replace with local definition. Also include rte_flow.h instead of depending on indirect inclusion from rte_ethdev.h. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- drivers/net/nfp/nfp_ethdev.c | 6 ++++-- drivers/net/nfp/nfp_net_common.h | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c index d2da18013c..25be1de080 100644 --- a/drivers/net/nfp/nfp_ethdev.c +++ b/drivers/net/nfp/nfp_ethdev.c @@ -6,6 +6,7 @@ */ #include <unistd.h> +#include <limits.h> #include <eal_firmware.h> #include <rte_alarm.h> @@ -32,6 +33,7 @@ /* 64-bit per app capabilities */ #define NFP_NET_APP_CAP_SP_INDIFF RTE_BIT64(0) /* Indifferent to port speed */ +#define NFP_UINT64_BIT (CHAR_BIT * sizeof(uint64_t)) #define NFP_PF_DRIVER_NAME net_nfp_pf #define NFP_PF_FORCE_RELOAD_FW "force_reload_fw" @@ -2060,8 +2062,8 @@ nfp_net_speed_capa_get_real(struct nfp_eth_media_buf *media_buf, for (i = 0; i < RTE_DIM(media_buf->supported_modes); i++) { supported_modes = media_buf->supported_modes[i]; - offset = i * UINT64_BIT; - for (j = 0; j < UINT64_BIT; j++) { + offset = i * NFP_UINT64_BIT; + for (j = 0; j < NFP_UINT64_BIT; j++) { if (supported_modes == 0) break; diff --git a/drivers/net/nfp/nfp_net_common.h b/drivers/net/nfp/nfp_net_common.h index 2bd2d54028..62c6448cc3 100644 --- a/drivers/net/nfp/nfp_net_common.h +++ b/drivers/net/nfp/nfp_net_common.h @@ -8,9 +8,11 @@ #include <bus_pci_driver.h> #include <ethdev_driver.h> +#include <rte_flow.h> +#include <rte_spinlock.h> + #include <nfp_common.h> #include <nfp_dev.h> -#include <rte_spinlock.h> #include "nfpcore/nfp_sync.h" #include "nfp_net_ctrl.h" -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v3 12/23] net/mana: include used network headers 2026-08-04 15:44 ` [PATCH v3 00/23] ethdev: isolate legacy flow director Stephen Hemminger ` (10 preceding siblings ...) 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 ` Stephen Hemminger 2026-08-04 15:45 ` [PATCH v3 13/23] node: get UDP header Stephen Hemminger ` (10 subsequent siblings) 22 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-04 15:45 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Long Li, Wei Hu This driver was getting definition of IP, UDP, and TCP headers implicitly via rte_ethdev.h. That will be changing so instead include the required headers directly. Use include-what-you-use (iwyu) to add headers that are being used in this driver to avoid future issues. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Reviewed-by: Long Li <longli@microsoft.com> --- drivers/net/mana/mana.c | 26 +++++++++++++++++++++++--- drivers/net/mana/tx.c | 3 +++ 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/drivers/net/mana/mana.c b/drivers/net/mana/mana.c index 0b72f711a1..89f6033517 100644 --- a/drivers/net/mana/mana.c +++ b/drivers/net/mana/mana.c @@ -2,24 +2,44 @@ * Copyright 2022 Microsoft Corporation */ +#include <stdio.h> +#include <stdlib.h> #include <unistd.h> #include <dirent.h> #include <fcntl.h> +#include <errno.h> +#include <time.h> +#include <string.h> +#include <inttypes.h> #include <sys/mman.h> +#include <sys/socket.h> #include <sys/ioctl.h> #include <net/if.h> +#include <netinet/in.h> #include <ethdev_driver.h> #include <ethdev_pci.h> -#include <rte_kvargs.h> +#include <rte_atomic.h> +#include <rte_debug.h> +#include <rte_dev.h> +#include <rte_devargs.h> +#include <rte_eal.h> #include <rte_eal_paging.h> +#include <rte_errno.h> +#include <rte_ether.h> +#include <rte_interrupts.h> +#include <rte_kvargs.h> +#include <rte_malloc.h> +#include <rte_mbuf.h> +#include <rte_memory.h> +#include <rte_memzone.h> +#include <rte_pause.h> #include <rte_pci.h> +#include <rte_spinlock.h> #include <infiniband/verbs.h> #include <infiniband/manadv.h> -#include <assert.h> - #include "mana.h" /* Shared memory between primary/secondary processes, per driver */ diff --git a/drivers/net/mana/tx.c b/drivers/net/mana/tx.c index 10f2212b5d..9517b033dc 100644 --- a/drivers/net/mana/tx.c +++ b/drivers/net/mana/tx.c @@ -3,6 +3,9 @@ */ #include <ethdev_driver.h> +#include <rte_ip.h> +#include <rte_udp.h> +#include <rte_tcp.h> #include <infiniband/verbs.h> #include <infiniband/manadv.h> -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v3 13/23] node: get UDP header 2026-08-04 15:44 ` [PATCH v3 00/23] ethdev: isolate legacy flow director Stephen Hemminger ` (11 preceding siblings ...) 2026-08-04 15:45 ` [PATCH v3 12/23] net/mana: include used network headers Stephen Hemminger @ 2026-08-04 15:45 ` Stephen Hemminger 2026-08-04 15:45 ` [PATCH v3 14/23] net/rnp: include network headers Stephen Hemminger ` (9 subsequent siblings) 22 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-04 15:45 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Nithin Dabilpuram, Pavan Nikhilesh This library was getting UDP header indirectly via rte_ethdev.h Use iwyu to update includes to match usage. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- lib/node/udp4_input.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/node/udp4_input.c b/lib/node/udp4_input.c index 5a74e28c85..02a8284982 100644 --- a/lib/node/udp4_input.c +++ b/lib/node/udp4_input.c @@ -2,20 +2,21 @@ * Copyright(C) 2023 Marvell International Ltd. */ -#include <arpa/inet.h> -#include <sys/socket.h> +#include <stdio.h> +#include <stdint.h> #include <eal_export.h> -#include <rte_ethdev.h> +#include <rte_common.h> +#include <rte_byteorder.h> +#include <rte_errno.h> #include <rte_ether.h> #include <rte_graph.h> -#include <rte_graph_worker.h> -#include <rte_ip.h> -#include <rte_lpm.h> #include <rte_hash.h> -#include <rte_fbk_hash.h> +#include <rte_ip.h> #include <rte_jhash.h> -#include <rte_hash_crc.h> +#include <rte_log.h> +#include <rte_memcpy.h> +#include <rte_udp.h> #include "rte_node_udp4_input_api.h" -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v3 14/23] net/rnp: include network headers 2026-08-04 15:44 ` [PATCH v3 00/23] ethdev: isolate legacy flow director Stephen Hemminger ` (12 preceding siblings ...) 2026-08-04 15:45 ` [PATCH v3 13/23] node: get UDP header Stephen Hemminger @ 2026-08-04 15:45 ` Stephen Hemminger 2026-08-04 15:45 ` [PATCH v3 15/23] net/r8169: get " Stephen Hemminger ` (8 subsequent siblings) 22 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-04 15:45 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Wenbo Cao The driver was getting definition of standard network protocol headers indirectly from rte_ethdev.h. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- drivers/net/rnp/rnp_rxtx.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/rnp/rnp_rxtx.c b/drivers/net/rnp/rnp_rxtx.c index 81e8c6ba44..93a3372e5a 100644 --- a/drivers/net/rnp/rnp_rxtx.c +++ b/drivers/net/rnp/rnp_rxtx.c @@ -8,6 +8,12 @@ #include <rte_memzone.h> #include <rte_mbuf.h> #include <rte_malloc.h> +#include <rte_vxlan.h> +#include <rte_ip.h> +#include <rte_gre.h> +#include <rte_udp.h> +#include <rte_tcp.h> +#include <rte_sctp.h> #include "base/rnp_bdq_if.h" #include "base/rnp_dma_regs.h" -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v3 15/23] net/r8169: get network headers 2026-08-04 15:44 ` [PATCH v3 00/23] ethdev: isolate legacy flow director Stephen Hemminger ` (13 preceding siblings ...) 2026-08-04 15:45 ` [PATCH v3 14/23] net/rnp: include network headers Stephen Hemminger @ 2026-08-04 15:45 ` Stephen Hemminger 2026-08-04 15:45 ` [PATCH v3 16/23] net/ngbe: include network protocol headers Stephen Hemminger ` (7 subsequent siblings) 22 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-04 15:45 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Howard Wang, Chunhao Lin, Xing Wang, Javen Xu This driver was getting network protocol headers indirectly via rte_ethdev.h. Use iwyu to update to full list of includes. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- drivers/net/r8169/r8169_rxtx.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/drivers/net/r8169/r8169_rxtx.c b/drivers/net/r8169/r8169_rxtx.c index 00de0471f4..750ddd20db 100644 --- a/drivers/net/r8169/r8169_rxtx.c +++ b/drivers/net/r8169/r8169_rxtx.c @@ -5,21 +5,29 @@ #include <stdio.h> #include <errno.h> #include <stdint.h> - -#include <rte_eal.h> +#include <stdbool.h> +#include <string.h> +#include <arpa/inet.h> #include <rte_common.h> -#include <rte_interrupts.h> +#include <rte_atomic.h> #include <rte_byteorder.h> #include <rte_debug.h> -#include <rte_pci.h> +#include <rte_log.h> #include <bus_pci_driver.h> #include <rte_ether.h> +#include <rte_ethdev.h> #include <ethdev_driver.h> #include <ethdev_pci.h> -#include <rte_memory.h> +#include <rte_bitops.h> +#include <rte_memzone.h> #include <rte_malloc.h> +#include <rte_mbuf.h> +#include <rte_prefetch.h> +#include <rte_random.h> +#include <rte_stdatomic.h> #include <dev_driver.h> +#include <rte_udp.h> #include "r8169_ethdev.h" #include "r8169_hw.h" -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v3 16/23] net/ngbe: include network protocol headers 2026-08-04 15:44 ` [PATCH v3 00/23] ethdev: isolate legacy flow director Stephen Hemminger ` (14 preceding siblings ...) 2026-08-04 15:45 ` [PATCH v3 15/23] net/r8169: get " Stephen Hemminger @ 2026-08-04 15:45 ` Stephen Hemminger 2026-08-04 15:45 ` [PATCH v3 17/23] examples: include network headers Stephen Hemminger ` (6 subsequent siblings) 22 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-04 15:45 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Jiawen Wu, Zaiyu Wang Do not depend on network protocol headers getting included via rte_ethdev.h. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- drivers/net/ngbe/ngbe_rxtx.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ngbe/ngbe_rxtx.c b/drivers/net/ngbe/ngbe_rxtx.c index a1389de9c0..fee984c396 100644 --- a/drivers/net/ngbe/ngbe_rxtx.c +++ b/drivers/net/ngbe/ngbe_rxtx.c @@ -11,6 +11,10 @@ #include <rte_malloc.h> #include <rte_net.h> #include <rte_vect.h> +#include <rte_ip.h> +#include <rte_udp.h> +#include <rte_tcp.h> +#include <rte_sctp.h> #include "ngbe_logs.h" #include "base/ngbe.h" -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v3 17/23] examples: include network headers 2026-08-04 15:44 ` [PATCH v3 00/23] ethdev: isolate legacy flow director Stephen Hemminger ` (15 preceding siblings ...) 2026-08-04 15:45 ` [PATCH v3 16/23] net/ngbe: include network protocol headers Stephen Hemminger @ 2026-08-04 15:45 ` Stephen Hemminger 2026-08-04 15:45 ` [PATCH v3 18/23] net/mlx5: include rte_flow as needed Stephen Hemminger ` (5 subsequent siblings) 22 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-04 15:45 UTC (permalink / raw) To: dev Cc: Stephen Hemminger, Akhil Goyal, Jerin Jacob, Kiran Kumar K, Nithin Dabilpuram, Zhirun Yan Don't depend on network protocol headers getting indirectly included via rte_ethdev.h. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- examples/l2fwd-macsec/main.c | 2 ++ examples/l3fwd-graph/main.c | 1 + examples/l3fwd/l3fwd.h | 2 ++ 3 files changed, 5 insertions(+) diff --git a/examples/l2fwd-macsec/main.c b/examples/l2fwd-macsec/main.c index 059f8a2170..e07769bd57 100644 --- a/examples/l2fwd-macsec/main.c +++ b/examples/l2fwd-macsec/main.c @@ -33,9 +33,11 @@ #include <rte_debug.h> #include <rte_ether.h> #include <rte_ethdev.h> +#include <rte_flow.h> #include <rte_mempool.h> #include <rte_mbuf.h> #include <rte_security.h> +#include <rte_macsec.h> #include <rte_string_fns.h> static volatile bool force_quit; diff --git a/examples/l3fwd-graph/main.c b/examples/l3fwd-graph/main.c index 5f89286dce..79dee4d103 100644 --- a/examples/l3fwd-graph/main.c +++ b/examples/l3fwd-graph/main.c @@ -36,6 +36,7 @@ #include <rte_per_lcore.h> #include <rte_string_fns.h> #include <rte_vect.h> +#include <rte_ip.h> #include <cmdline_parse.h> #include <cmdline_parse_etheraddr.h> diff --git a/examples/l3fwd/l3fwd.h b/examples/l3fwd/l3fwd.h index 349fc37c79..db7b746f59 100644 --- a/examples/l3fwd/l3fwd.h +++ b/examples/l3fwd/l3fwd.h @@ -8,6 +8,8 @@ #include <rte_ethdev.h> #include <rte_vect.h> #include <rte_acl.h> +#include <rte_ip.h> + #define DO_RFC_1812_CHECKS -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v3 18/23] net/mlx5: include rte_flow as needed 2026-08-04 15:44 ` [PATCH v3 00/23] ethdev: isolate legacy flow director Stephen Hemminger ` (16 preceding siblings ...) 2026-08-04 15:45 ` [PATCH v3 17/23] examples: include network headers Stephen Hemminger @ 2026-08-04 15:45 ` Stephen Hemminger 2026-08-04 15:45 ` [PATCH v3 19/23] net/sfc: include rte_flow Stephen Hemminger ` (4 subsequent siblings) 22 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-04 15:45 UTC (permalink / raw) To: dev Cc: Stephen Hemminger, Dariusz Sosnowski, Viacheslav Ovsiienko, Bing Zhao, Ori Kam, Suanming Mou, Matan Azrad The driver was getting rte_flow.h included indirectly via rte_ethdev.h. This will change in future and driver should include it where needed. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- drivers/net/mlx5/mlx5_ethdev.c | 1 + drivers/net/mlx5/mlx5_flow.h | 1 + drivers/net/mlx5/mlx5_txq.c | 1 + drivers/net/mlx5/mlx5_utils.c | 1 + drivers/net/mlx5/mlx5_utils.h | 1 + 5 files changed, 5 insertions(+) diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c index 8160d10e7e..c3d8e1b04f 100644 --- a/drivers/net/mlx5/mlx5_ethdev.c +++ b/drivers/net/mlx5/mlx5_ethdev.c @@ -19,6 +19,7 @@ #include <rte_string_fns.h> #include <rte_rwlock.h> #include <rte_cycles.h> +#include <rte_flow.h> #include <mlx5_malloc.h> diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h index 3415b4722e..0da50fab85 100644 --- a/drivers/net/mlx5/mlx5_flow.h +++ b/drivers/net/mlx5/mlx5_flow.h @@ -12,6 +12,7 @@ #include <rte_alarm.h> #include <rte_mtr.h> +#include <rte_flow.h> #include <mlx5_glue.h> #include <mlx5_prm.h> diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c index f9b254c6c5..f0b7b2d032 100644 --- a/drivers/net/mlx5/mlx5_txq.c +++ b/drivers/net/mlx5/mlx5_txq.c @@ -18,6 +18,7 @@ #include <rte_common.h> #include <rte_eal_paging.h> #include <rte_bitops.h> +#include <rte_flow.h> #include <mlx5_common.h> #include <mlx5_common_mr.h> diff --git a/drivers/net/mlx5/mlx5_utils.c b/drivers/net/mlx5/mlx5_utils.c index 606743c4b7..12820054ff 100644 --- a/drivers/net/mlx5/mlx5_utils.c +++ b/drivers/net/mlx5/mlx5_utils.c @@ -3,6 +3,7 @@ */ #include <rte_malloc.h> +#include <rte_flow.h> #include <mlx5_malloc.h> diff --git a/drivers/net/mlx5/mlx5_utils.h b/drivers/net/mlx5/mlx5_utils.h index 9ab79c8ad5..19d03145a6 100644 --- a/drivers/net/mlx5/mlx5_utils.h +++ b/drivers/net/mlx5/mlx5_utils.h @@ -16,6 +16,7 @@ #include <rte_rwlock.h> #include <rte_memory.h> #include <rte_bitmap.h> +#include <rte_flow.h> #include <mlx5_common.h> #include <mlx5_common_utils.h> -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v3 19/23] net/sfc: include rte_flow 2026-08-04 15:44 ` [PATCH v3 00/23] ethdev: isolate legacy flow director Stephen Hemminger ` (17 preceding siblings ...) 2026-08-04 15:45 ` [PATCH v3 18/23] net/mlx5: include rte_flow as needed Stephen Hemminger @ 2026-08-04 15:45 ` Stephen Hemminger 2026-08-04 15:45 ` [PATCH v3 20/23] net/intel/common: include network headers Stephen Hemminger ` (3 subsequent siblings) 22 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-04 15:45 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Andrew Rybchenko This driver was depending on rte_ethdev.h doing inclusion of rte_flow.h. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- drivers/net/sfc/sfc_dp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/sfc/sfc_dp.c b/drivers/net/sfc/sfc_dp.c index 7e2a20e4dc..c867c2c2ff 100644 --- a/drivers/net/sfc/sfc_dp.c +++ b/drivers/net/sfc/sfc_dp.c @@ -15,6 +15,7 @@ #include <rte_ethdev.h> #include <rte_log.h> #include <rte_mbuf_dyn.h> +#include <rte_flow.h> #include "efx.h" -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v3 20/23] net/intel/common: include network headers 2026-08-04 15:44 ` [PATCH v3 00/23] ethdev: isolate legacy flow director Stephen Hemminger ` (18 preceding siblings ...) 2026-08-04 15:45 ` [PATCH v3 19/23] net/sfc: include rte_flow Stephen Hemminger @ 2026-08-04 15:45 ` Stephen Hemminger 2026-08-04 15:45 ` [PATCH v3 21/23] net/enetfec: add missing sys/types.h include Stephen Hemminger ` (2 subsequent siblings) 22 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-04 15:45 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Bruce Richardson This file was depending on network protocol headers getting included via rte_ethdev.h -> rte_flow.h. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- drivers/net/intel/common/tx_scalar.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/intel/common/tx_scalar.h b/drivers/net/intel/common/tx_scalar.h index 11ab6c08fc..dcb2ea5542 100644 --- a/drivers/net/intel/common/tx_scalar.h +++ b/drivers/net/intel/common/tx_scalar.h @@ -8,6 +8,9 @@ #include <stdint.h> #include <rte_io.h> #include <rte_byteorder.h> +#include <rte_udp.h> +#include <rte_tcp.h> +#include <rte_sctp.h> /* depends on common Tx definitions. */ #include "tx.h" -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v3 21/23] net/enetfec: add missing sys/types.h include 2026-08-04 15:44 ` [PATCH v3 00/23] ethdev: isolate legacy flow director Stephen Hemminger ` (19 preceding siblings ...) 2026-08-04 15:45 ` [PATCH v3 20/23] net/intel/common: include network headers Stephen Hemminger @ 2026-08-04 15:45 ` 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 22 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-04 15:45 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Apeksha Gupta, Sachin Saxena The enet_regs.h header uses BSD types 'uint' and 'ushort' which were previously available through indirect inclusion via: rte_ethdev.h -> rte_flow.h -> rte_ip.h -> rte_ip[46].h -> sys/types.h After changes to reduce rte_ethdev.h header dependencies, this indirect inclusion no longer occurs, causing build failures on PowerPC. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- drivers/net/enetfec/enet_regs.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/enetfec/enet_regs.h b/drivers/net/enetfec/enet_regs.h index c9400957f8..a834fa5889 100644 --- a/drivers/net/enetfec/enet_regs.h +++ b/drivers/net/enetfec/enet_regs.h @@ -5,6 +5,8 @@ #ifndef __ENETFEC_REGS_H #define __ENETFEC_REGS_H +#include <sys/types.h> + /* Ethernet receive use control and status of buffer descriptor */ #define RX_BD_TR ((ushort)0x0001) /* Truncated */ -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v3 22/23] ethdev, drivers: isolate flow director 2026-08-04 15:44 ` [PATCH v3 00/23] ethdev: isolate legacy flow director Stephen Hemminger ` (20 preceding siblings ...) 2026-08-04 15:45 ` [PATCH v3 21/23] net/enetfec: add missing sys/types.h include Stephen Hemminger @ 2026-08-04 15:45 ` Stephen Hemminger 2026-08-04 15:45 ` [PATCH v3 23/23] doc: add release note about rte_ethdev changes Stephen Hemminger 22 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-04 15:45 UTC (permalink / raw) To: dev Cc: Stephen Hemminger, Xiaoyun Wang, Feifei Wang, Praveen Shetty, Bruce Richardson, Vladimir Medvedkin, Anatoly Burakov, Rosen Xu, Dimon Zhao, Leon Yu, Sam Chen, Jiawen Wu, Zaiyu Wang, Thomas Monjalon, Andrew Rybchenko There are leftover bits of legacy flow director that are still being used by drivers. Move the definitions contained in ethdev_driver.h and rte_eth_ctrl.h into a single file ethdev_fdir.h and only include it in the drivers that require it. Change rte_ethdev.h to include the headers required which it was previously getting from rte_eth_ctrl.h -> rte_flow.h. Since ethdev_fdir.h is internal for driver SDK only it does not have to include as many secondary headers. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- doc/api/doxy-api-index.md | 1 - drivers/net/hinic/hinic_pmd_ethdev.h | 2 + drivers/net/hinic3/hinic3_ethdev.h | 1 + drivers/net/intel/cpfl/cpfl_flow_engine_fxp.c | 2 +- drivers/net/intel/e1000/e1000_ethdev.h | 1 + drivers/net/intel/e1000/igc_filter.h | 2 +- drivers/net/intel/i40e/i40e_ethdev.h | 1 + drivers/net/intel/iavf/iavf_fsub.c | 2 +- drivers/net/intel/iavf/iavf_hash.c | 2 +- drivers/net/intel/ice/ice_acl_filter.c | 2 +- drivers/net/intel/ice/ice_ethdev.h | 2 + drivers/net/intel/ice/ice_generic_flow.c | 1 + drivers/net/intel/ice/ice_hash.c | 2 +- drivers/net/intel/ice/ice_switch_filter.c | 2 +- drivers/net/intel/ipn3ke/ipn3ke_flow.c | 2 +- drivers/net/intel/ixgbe/ixgbe_ethdev.h | 1 + drivers/net/nbl/nbl_include/nbl_include.h | 1 + drivers/net/txgbe/txgbe_ethdev.h | 1 + lib/ethdev/ethdev_driver.h | 36 ------------ lib/ethdev/{rte_eth_ctrl.h => ethdev_fdir.h} | 58 ++++++++++++++----- lib/ethdev/meson.build | 2 +- lib/ethdev/rte_ethdev.h | 13 +---- 22 files changed, 67 insertions(+), 70 deletions(-) rename lib/ethdev/{rte_eth_ctrl.h => ethdev_fdir.h} (91%) diff --git a/doc/api/doxy-api-index.md b/doc/api/doxy-api-index.md index 9296042119..ac8314e908 100644 --- a/doc/api/doxy-api-index.md +++ b/doc/api/doxy-api-index.md @@ -11,7 +11,6 @@ The public API headers are grouped by topics: - **device**: [dev](@ref rte_dev.h), [ethdev](@ref rte_ethdev.h), - [ethctrl](@ref rte_eth_ctrl.h), [rte_flow](@ref rte_flow.h), [rte_tm](@ref rte_tm.h), [rte_mtr](@ref rte_mtr.h), diff --git a/drivers/net/hinic/hinic_pmd_ethdev.h b/drivers/net/hinic/hinic_pmd_ethdev.h index 8e6251f69f..10285ce814 100644 --- a/drivers/net/hinic/hinic_pmd_ethdev.h +++ b/drivers/net/hinic/hinic_pmd_ethdev.h @@ -7,7 +7,9 @@ #include <rte_ethdev.h> #include <rte_ethdev_core.h> +#include <rte_flow.h> #include <ethdev_driver.h> +#include <ethdev_fdir.h> #include "base/hinic_compat.h" #include "base/hinic_pmd_cfg.h" diff --git a/drivers/net/hinic3/hinic3_ethdev.h b/drivers/net/hinic3/hinic3_ethdev.h index 9061e2b217..515ba044a1 100644 --- a/drivers/net/hinic3/hinic3_ethdev.h +++ b/drivers/net/hinic3/hinic3_ethdev.h @@ -7,6 +7,7 @@ #include <rte_ethdev.h> #include <rte_ethdev_core.h> +#include <ethdev_fdir.h> #include "hinic3_fdir.h" diff --git a/drivers/net/intel/cpfl/cpfl_flow_engine_fxp.c b/drivers/net/intel/cpfl/cpfl_flow_engine_fxp.c index f42156e28f..977036bec5 100644 --- a/drivers/net/intel/cpfl/cpfl_flow_engine_fxp.c +++ b/drivers/net/intel/cpfl/cpfl_flow_engine_fxp.c @@ -16,7 +16,7 @@ #include <rte_ether.h> #include <rte_log.h> #include <rte_malloc.h> -#include <rte_eth_ctrl.h> +#include <ethdev_fdir.h> #include <rte_tailq.h> #include <rte_flow_driver.h> #include <rte_flow.h> diff --git a/drivers/net/intel/e1000/e1000_ethdev.h b/drivers/net/intel/e1000/e1000_ethdev.h index 0907c7c259..da4dacc7d4 100644 --- a/drivers/net/intel/e1000/e1000_ethdev.h +++ b/drivers/net/intel/e1000/e1000_ethdev.h @@ -9,6 +9,7 @@ #include <sys/queue.h> #include <rte_flow.h> +#include <ethdev_fdir.h> #include <rte_time.h> #include <rte_pci.h> diff --git a/drivers/net/intel/e1000/igc_filter.h b/drivers/net/intel/e1000/igc_filter.h index 2b7e6b619a..d1e098e5bb 100644 --- a/drivers/net/intel/e1000/igc_filter.h +++ b/drivers/net/intel/e1000/igc_filter.h @@ -8,7 +8,7 @@ #include <rte_ethdev.h> #include <rte_ethdev_core.h> #include <ethdev_driver.h> -#include <rte_eth_ctrl.h> +#include <ethdev_fdir.h> #include "igc_ethdev.h" diff --git a/drivers/net/intel/i40e/i40e_ethdev.h b/drivers/net/intel/i40e/i40e_ethdev.h index 3968bfd267..c03eaab946 100644 --- a/drivers/net/intel/i40e/i40e_ethdev.h +++ b/drivers/net/intel/i40e/i40e_ethdev.h @@ -13,6 +13,7 @@ #include <rte_hash.h> #include <rte_flow.h> #include <rte_flow_driver.h> +#include <ethdev_fdir.h> #include <rte_tm_driver.h> #include "rte_pmd_i40e.h" #include <rte_vect.h> diff --git a/drivers/net/intel/iavf/iavf_fsub.c b/drivers/net/intel/iavf/iavf_fsub.c index 19ae0e2dc2..745089c1e4 100644 --- a/drivers/net/intel/iavf/iavf_fsub.c +++ b/drivers/net/intel/iavf/iavf_fsub.c @@ -14,7 +14,7 @@ #include <rte_ethdev.h> #include <rte_log.h> #include <rte_malloc.h> -#include <rte_eth_ctrl.h> +#include <ethdev_fdir.h> #include <rte_tailq.h> #include <rte_flow_driver.h> #include <rte_flow.h> diff --git a/drivers/net/intel/iavf/iavf_hash.c b/drivers/net/intel/iavf/iavf_hash.c index 9515094402..38526eb7e6 100644 --- a/drivers/net/intel/iavf/iavf_hash.c +++ b/drivers/net/intel/iavf/iavf_hash.c @@ -15,7 +15,7 @@ #include <ethdev_driver.h> #include <rte_log.h> #include <rte_malloc.h> -#include <rte_eth_ctrl.h> +#include <ethdev_fdir.h> #include <rte_tailq.h> #include <rte_flow_driver.h> diff --git a/drivers/net/intel/ice/ice_acl_filter.c b/drivers/net/intel/ice/ice_acl_filter.c index 30ff1254c9..08f44e26cf 100644 --- a/drivers/net/intel/ice/ice_acl_filter.c +++ b/drivers/net/intel/ice/ice_acl_filter.c @@ -13,9 +13,9 @@ #include <rte_debug.h> #include <rte_ether.h> #include <ethdev_driver.h> +#include <ethdev_fdir.h> #include <rte_log.h> #include <rte_malloc.h> -#include <rte_eth_ctrl.h> #include <rte_tailq.h> #include <rte_flow_driver.h> #include <rte_flow.h> diff --git a/drivers/net/intel/ice/ice_ethdev.h b/drivers/net/intel/ice/ice_ethdev.h index 7ee3ea8a70..fe0dc19c98 100644 --- a/drivers/net/intel/ice/ice_ethdev.h +++ b/drivers/net/intel/ice/ice_ethdev.h @@ -8,8 +8,10 @@ #include <rte_compat.h> #include <rte_kvargs.h> #include <rte_time.h> +#include <rte_flow.h> #include <ethdev_driver.h> +#include <ethdev_fdir.h> #include <rte_tm_driver.h> #include <rte_vect.h> diff --git a/drivers/net/intel/ice/ice_generic_flow.c b/drivers/net/intel/ice/ice_generic_flow.c index 76b3800545..9c81c3aea8 100644 --- a/drivers/net/intel/ice/ice_generic_flow.c +++ b/drivers/net/intel/ice/ice_generic_flow.c @@ -13,6 +13,7 @@ #include <rte_ether.h> #include <ethdev_driver.h> +#include <ethdev_fdir.h> #include <rte_hexdump.h> #include <rte_malloc.h> #include <rte_tailq.h> diff --git a/drivers/net/intel/ice/ice_hash.c b/drivers/net/intel/ice/ice_hash.c index 7a9a4f1a04..5158a4f886 100644 --- a/drivers/net/intel/ice/ice_hash.c +++ b/drivers/net/intel/ice/ice_hash.c @@ -16,7 +16,7 @@ #include <ethdev_driver.h> #include <rte_log.h> #include <rte_malloc.h> -#include <rte_eth_ctrl.h> +#include <ethdev_fdir.h> #include <rte_tailq.h> #include <rte_flow_driver.h> diff --git a/drivers/net/intel/ice/ice_switch_filter.c b/drivers/net/intel/ice/ice_switch_filter.c index 6f5af03f6a..cbc3df6d7c 100644 --- a/drivers/net/intel/ice/ice_switch_filter.c +++ b/drivers/net/intel/ice/ice_switch_filter.c @@ -15,7 +15,7 @@ #include <ethdev_driver.h> #include <rte_log.h> #include <rte_malloc.h> -#include <rte_eth_ctrl.h> +#include <ethdev_fdir.h> #include <rte_tailq.h> #include <rte_flow_driver.h> #include <rte_flow.h> diff --git a/drivers/net/intel/ipn3ke/ipn3ke_flow.c b/drivers/net/intel/ipn3ke/ipn3ke_flow.c index 941d2921fb..47f4936bc6 100644 --- a/drivers/net/intel/ipn3ke/ipn3ke_flow.c +++ b/drivers/net/intel/ipn3ke/ipn3ke_flow.c @@ -16,7 +16,7 @@ #include <ethdev_driver.h> #include <rte_log.h> #include <rte_malloc.h> -#include <rte_eth_ctrl.h> +#include <ethdev_fdir.h> #include <rte_tailq.h> #include <rte_rawdev.h> #include <rte_rawdev_pmd.h> diff --git a/drivers/net/intel/ixgbe/ixgbe_ethdev.h b/drivers/net/intel/ixgbe/ixgbe_ethdev.h index c290f04611..68b54ae750 100644 --- a/drivers/net/intel/ixgbe/ixgbe_ethdev.h +++ b/drivers/net/intel/ixgbe/ixgbe_ethdev.h @@ -16,6 +16,7 @@ #include "ixgbe_bypass.h" #include "ixgbe_ipsec.h" #include <rte_flow.h> +#include <ethdev_fdir.h> #include <rte_time.h> #include <rte_hash.h> #include <rte_pci.h> diff --git a/drivers/net/nbl/nbl_include/nbl_include.h b/drivers/net/nbl/nbl_include/nbl_include.h index eeae6a3301..c1383e7b4e 100644 --- a/drivers/net/nbl/nbl_include/nbl_include.h +++ b/drivers/net/nbl/nbl_include/nbl_include.h @@ -27,6 +27,7 @@ #include <rte_alarm.h> #include <rte_ethdev.h> +#include <rte_flow.h> #include <ethdev_driver.h> #include <ethdev_pci.h> #include <bus_pci_driver.h> diff --git a/drivers/net/txgbe/txgbe_ethdev.h b/drivers/net/txgbe/txgbe_ethdev.h index c32c61d8bf..a48d710ab1 100644 --- a/drivers/net/txgbe/txgbe_ethdev.h +++ b/drivers/net/txgbe/txgbe_ethdev.h @@ -18,6 +18,7 @@ #include <rte_time.h> #include <rte_ethdev.h> #include <rte_ethdev_core.h> +#include <ethdev_fdir.h> #include <rte_hash.h> #include <rte_hash_crc.h> #include <bus_pci_driver.h> diff --git a/lib/ethdev/ethdev_driver.h b/lib/ethdev/ethdev_driver.h index 0f336f9567..2dc63cfa18 100644 --- a/lib/ethdev/ethdev_driver.h +++ b/lib/ethdev/ethdev_driver.h @@ -2365,42 +2365,6 @@ struct rte_eth_tunnel_filter_conf { uint16_t queue_id; /**< Queue assigned to if match */ }; -/** - * Memory space that can be configured to store Flow Director filters - * in the board memory. - */ -enum rte_eth_fdir_pballoc_type { - RTE_ETH_FDIR_PBALLOC_64K = 0, /**< 64k. */ - RTE_ETH_FDIR_PBALLOC_128K, /**< 128k. */ - RTE_ETH_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_MODE_NONE, the pballoc value is ignored. - */ -struct rte_eth_fdir_conf { - enum rte_fdir_mode mode; /**< Flow Director mode. */ - enum rte_eth_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; - /** Flex payload configuration. */ - struct rte_eth_fdir_flex_conf flex_conf; -}; - /** * @internal * Fetch from the driver what kind of configuration must be restored by ethdev layer, diff --git a/lib/ethdev/rte_eth_ctrl.h b/lib/ethdev/ethdev_fdir.h similarity index 91% rename from lib/ethdev/rte_eth_ctrl.h rename to lib/ethdev/ethdev_fdir.h index 9ec3f5eff9..ca3f866e69 100644 --- a/lib/ethdev/rte_eth_ctrl.h +++ b/lib/ethdev/ethdev_fdir.h @@ -1,24 +1,19 @@ /* SPDX-License-Identifier: BSD-3-Clause - * Copyright(c) 2010-2015 Intel Corporation + * Copyright(c) 2010-2017 Intel Corporation */ -#ifndef _RTE_ETH_CTRL_H_ -#define _RTE_ETH_CTRL_H_ - -#include <stdint.h> -#include <rte_common.h> -#include <rte_ether.h> -#include "rte_flow.h" -#include "rte_ethdev.h" +#ifndef _ETHDEV_FDIR_H_ +#define _ETHDEV_FDIR_H_ /** - * @deprecated Please use rte_flow API instead of this legacy one. * @file * - * Ethernet device features and related data structures used - * by control APIs should be defined in this file. + * Ethernet device definitions used by devices still dependent on legacy + * flow director definitions. Do not use in new drivers. */ +#include <rte_flow.h> + /** * Define all structures for ntuple Filter type. */ @@ -483,4 +478,41 @@ struct rte_eth_fdir_stats { uint32_t best_cnt; /**< Number of filters in best effort spaces. */ }; -#endif /* _RTE_ETH_CTRL_H_ */ + +/** + * Memory space that can be configured to store Flow Director filters + * in the board memory. + */ +enum rte_eth_fdir_pballoc_type { + RTE_ETH_FDIR_PBALLOC_64K = 0, /**< 64k. */ + RTE_ETH_FDIR_PBALLOC_128K, /**< 128k. */ + RTE_ETH_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_MODE_NONE, the pballoc value is ignored. + */ +struct rte_eth_fdir_conf { + enum rte_fdir_mode mode; /**< Flow Director mode. */ + enum rte_eth_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; + /** Flex payload configuration. */ + struct rte_eth_fdir_flex_conf flex_conf; +}; + +#endif /* _ETHDEV_FDIR_H_ */ diff --git a/lib/ethdev/meson.build b/lib/ethdev/meson.build index 8ba6c708a2..3d556f8b7f 100644 --- a/lib/ethdev/meson.build +++ b/lib/ethdev/meson.build @@ -32,11 +32,11 @@ headers = files( indirect_headers += files( 'rte_ethdev_core.h', - 'rte_eth_ctrl.h', ) driver_sdk_headers += files( 'ethdev_driver.h', + 'ethdev_fdir.h', 'ethdev_pci.h', 'ethdev_vdev.h', 'rte_flow_driver.h', diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h index ee400b386f..7a17b81208 100644 --- a/lib/ethdev/rte_ethdev.h +++ b/lib/ethdev/rte_ethdev.h @@ -164,8 +164,10 @@ #include <rte_devargs.h> #include <rte_bitops.h> #include <rte_errno.h> +#include <rte_ether.h> #include <rte_common.h> #include <rte_config.h> +#include <rte_mbuf_history.h> #include <rte_power_intrinsics.h> #include "rte_ethdev_trace_fp.h" @@ -1505,17 +1507,6 @@ enum rte_eth_tunnel_type { RTE_ETH_TUNNEL_TYPE_MAX, }; -#ifdef __cplusplus -} -#endif - -/* Deprecated API file for rte_eth_dev_filter_* functions */ -#include "rte_eth_ctrl.h" - -#ifdef __cplusplus -extern "C" { -#endif - /** * UDP tunneling configuration. * -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v3 23/23] doc: add release note about rte_ethdev changes 2026-08-04 15:44 ` [PATCH v3 00/23] ethdev: isolate legacy flow director Stephen Hemminger ` (21 preceding siblings ...) 2026-08-04 15:45 ` [PATCH v3 22/23] ethdev, drivers: isolate flow director Stephen Hemminger @ 2026-08-04 15:45 ` Stephen Hemminger 22 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-04 15:45 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger The changes to rte_ethdev are visible to applications, which may need to include some network headers directly. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- doc/guides/rel_notes/release_26_11.rst | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/doc/guides/rel_notes/release_26_11.rst b/doc/guides/rel_notes/release_26_11.rst index c8cc86295d..a5e049ac04 100644 --- a/doc/guides/rel_notes/release_26_11.rst +++ b/doc/guides/rel_notes/release_26_11.rst @@ -77,6 +77,15 @@ Removed Items ``rte_rib6_is_equal`` * table: ``RTE_LPM_IPV6_ADDR_SIZE`` +* Removed the experimental flow director API: + + * ixgbe: ``rte_pmd_ixgbe_get_fdir_info``, ``rte_pmd_ixgbe_get_fdir_stats`` + * i40e: ``rte_pmd_i40e_get_fdir_info``, ``rte_pmd_i40e_get_fdir_stats`` + +* Removed some testpmd commands: + + The ``fdir`` option in ``show port`` and ``clear port`` were removed. + API Changes ----------- @@ -93,6 +102,16 @@ API Changes Also, make sure to start the actual text at the margin. ======================================================= +* **Changed ethdev include files.** + + * Dropped inclusion of ``rte_flow.h`` in ``rte_ethdev.h``. + Applications using flow API should include it directly. + * Network headers ``rte_ip.h``, ``rte_udp.h``, ``rte_tcp.h`` and ``rte_sctp.h`` + are no longer indirectly included by ``rte_ethdev.h``. + Applications should include network headers as needed. + * Legacy flow director definitions are no longer included by ``rte_ethdev.h``. + ``rte_eth_ctrl.h`` is removed. Internal driver definitions were moved to ``ethdev_fdir.h``. + ABI Changes ----------- -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v4 00/23] ethdev: refactor remaining uses of flow director 2026-08-03 16:51 [PATCH v2 00/22] ethdev: clean up legacy flow director Stephen Hemminger ` (22 preceding siblings ...) 2026-08-04 15:44 ` [PATCH v3 00/23] ethdev: isolate legacy flow director Stephen Hemminger @ 2026-08-06 5:08 ` Stephen Hemminger 2026-08-06 5:08 ` [PATCH v4 01/23] drivers/net: remove unused include in dpaa and dpaa2 Stephen Hemminger ` (22 more replies) 23 siblings, 23 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-06 5:08 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger The original flow support in DPDK was Intel-specific and built around the flow director feature. It was superseded by the generic rte_flow API introduced in the 17.02 release. The direct API calls to flow director were removed in 20.11, but the data structures were never removed and drivers still use them. Some Intel drivers also carry driver-specific APIs related to flow director. These vestiges mean applications can still see flow director data structures, since rte_ethdev.h pulls in rte_eth_ctrl.h. It also means several drivers and libraries have come to depend on network header definitions arriving indirectly. Since drivers still need these definitions, rte_eth_ctrl.h is renamed to ethdev_fdir.h and the remaining bits in ethdev_driver.h are folded into it. This is a driver SDK header, not public API, and exists only so that drivers still carrying legacy flow director state have somewhere to get these definitions. New drivers should not use it. Applications relying on the indirect includes will need to add explicit ones; this is a source level change only, with no ABI impact. The fdir option of the testpmd "show port" and "clear port" commands is also removed. v4 - fix AI review comments - fix build of enetfec - cleanup more leftovers from flow director in testpmd Stephen Hemminger (23): drivers/net: remove unused include in dpaa and dpaa2 ethdev: use DPDK byte order conversion net/ixgbe: remove experimental FDIR API net/i40e: remove experimental FDIR API app/testpmd: remove support for flow director app/testpmd: move str_to_flowtype to i40e app/test: include headers directly gro: include headers directly crypto/dpaa_sec: include UDP header net/gve: include UDP, SCTP and TCP headers net/nfp: break implicit dependency on rte_eth_ctrl.h net/mana: include used network headers node: get UDP header net/rnp: include network headers net/r8169: get network headers net/ngbe: include network protocol headers examples: include network headers net/mlx5: include rte_flow as needed net/sfc: include rte_flow net/intel/common: include network headers net/enetfec: add missing sys/types.h include ethdev, drivers: isolate flow director doc: add release note about rte_ethdev changes app/test-eventdev/test_pipeline_common.h | 1 + app/test-pmd/cmdline.c | 21 +- app/test-pmd/config.c | 225 ------------------ app/test-pmd/testpmd.h | 6 - app/test/test_bpf.c | 20 +- app/test/test_security_inline_macsec.c | 2 + app/test/test_security_inline_proto.c | 1 + doc/api/doxy-api-index.md | 1 - doc/guides/nics/i40e.rst | 46 ---- doc/guides/rel_notes/release_26_11.rst | 24 ++ doc/guides/testpmd_app_ug/intro.rst | 4 +- doc/guides/testpmd_app_ug/testpmd_funcs.rst | 56 +---- drivers/crypto/dpaa_sec/dpaa_sec.h | 2 + drivers/net/dpaa/dpaa_ptp.c | 1 - drivers/net/dpaa2/dpaa2_ptp.c | 1 - drivers/net/enetfec/enet_regs.h | 2 + drivers/net/gve/gve_ethdev.h | 13 +- drivers/net/hinic/hinic_pmd_ethdev.h | 2 + drivers/net/hinic3/hinic3_ethdev.h | 1 + drivers/net/intel/common/tx_scalar.h | 3 + drivers/net/intel/cpfl/cpfl_flow_engine_fxp.c | 2 +- drivers/net/intel/e1000/e1000_ethdev.h | 1 + drivers/net/intel/e1000/igc_filter.h | 2 +- drivers/net/intel/i40e/i40e_ethdev.c | 4 +- drivers/net/intel/i40e/i40e_ethdev.h | 5 +- drivers/net/intel/i40e/i40e_fdir.c | 140 ----------- drivers/net/intel/i40e/i40e_flow.c | 3 +- drivers/net/intel/i40e/i40e_testpmd.c | 51 ++++ drivers/net/intel/i40e/rte_pmd_i40e.c | 34 --- drivers/net/intel/i40e/rte_pmd_i40e.h | 33 --- drivers/net/intel/iavf/iavf_fsub.c | 2 +- drivers/net/intel/iavf/iavf_hash.c | 2 +- drivers/net/intel/ice/ice_acl_filter.c | 2 +- drivers/net/intel/ice/ice_ethdev.h | 2 + drivers/net/intel/ice/ice_generic_flow.c | 1 + drivers/net/intel/ice/ice_hash.c | 2 +- drivers/net/intel/ice/ice_switch_filter.c | 2 +- drivers/net/intel/ipn3ke/ipn3ke_flow.c | 2 +- drivers/net/intel/ixgbe/ixgbe_ethdev.h | 6 +- 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 --- drivers/net/mana/mana.c | 26 +- drivers/net/mana/tx.c | 3 + drivers/net/mlx5/mlx5_ethdev.c | 1 + drivers/net/mlx5/mlx5_flow.h | 1 + drivers/net/mlx5/mlx5_txq.c | 1 + drivers/net/mlx5/mlx5_utils.c | 1 + drivers/net/mlx5/mlx5_utils.h | 1 + drivers/net/nbl/nbl_include/nbl_include.h | 1 + drivers/net/nfp/nfp_ethdev.c | 6 +- drivers/net/nfp/nfp_net_common.h | 4 +- drivers/net/ngbe/ngbe_rxtx.c | 4 + drivers/net/r8169/r8169_rxtx.c | 19 +- drivers/net/rnp/rnp_rxtx.c | 6 + drivers/net/sfc/sfc_dp.c | 1 + drivers/net/txgbe/txgbe_ethdev.h | 1 + examples/l2fwd-macsec/main.c | 2 + examples/l3fwd-graph/main.c | 1 + examples/l3fwd/l3fwd.h | 2 + lib/ethdev/ethdev_driver.h | 36 --- lib/ethdev/{rte_eth_ctrl.h => ethdev_fdir.h} | 62 ++++- lib/ethdev/meson.build | 2 +- lib/ethdev/rte_ethdev.h | 13 +- lib/ethdev/sff_8472.c | 4 +- lib/gro/gro_tcp4.c | 9 +- lib/gro/gro_tcp6.c | 9 +- lib/gro/gro_vxlan_tcp4.c | 10 +- lib/gro/gro_vxlan_udp4.c | 9 +- lib/gro/rte_gro.c | 9 +- lib/node/udp4_input.c | 17 +- 71 files changed, 324 insertions(+), 848 deletions(-) rename lib/ethdev/{rte_eth_ctrl.h => ethdev_fdir.h} (90%) -- 2.53.0 ^ permalink raw reply [flat|nested] 76+ messages in thread
* [PATCH v4 01/23] drivers/net: remove unused include in dpaa and dpaa2 2026-08-06 5:08 ` [PATCH v4 00/23] ethdev: refactor remaining uses of flow director Stephen Hemminger @ 2026-08-06 5:08 ` 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 ` (21 subsequent siblings) 22 siblings, 1 reply; 76+ messages in thread From: Stephen Hemminger @ 2026-08-06 5:08 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Hemant Agrawal, Sachin Saxena rte_eth_ctrl.h is deprecated and its contents are not used here. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- drivers/net/dpaa/dpaa_ptp.c | 1 - drivers/net/dpaa2/dpaa2_ptp.c | 1 - 2 files changed, 2 deletions(-) diff --git a/drivers/net/dpaa/dpaa_ptp.c b/drivers/net/dpaa/dpaa_ptp.c index e9b332c571..f91d3f9ce3 100644 --- a/drivers/net/dpaa/dpaa_ptp.c +++ b/drivers/net/dpaa/dpaa_ptp.c @@ -9,7 +9,6 @@ #include <rte_ethdev.h> #include <rte_log.h> -#include <rte_eth_ctrl.h> #include <rte_malloc.h> #include <rte_time.h> diff --git a/drivers/net/dpaa2/dpaa2_ptp.c b/drivers/net/dpaa2/dpaa2_ptp.c index 751e558c73..77d5d82b44 100644 --- a/drivers/net/dpaa2/dpaa2_ptp.c +++ b/drivers/net/dpaa2/dpaa2_ptp.c @@ -12,7 +12,6 @@ #include <ethdev_driver.h> #include <rte_log.h> -#include <rte_eth_ctrl.h> #include <rte_malloc.h> #include <rte_time.h> -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* Re: [PATCH v4 01/23] drivers/net: remove unused include in dpaa and dpaa2 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 0 siblings, 0 replies; 76+ messages in thread From: Hemant Agrawal @ 2026-08-06 6:13 UTC (permalink / raw) To: Stephen Hemminger, dev; +Cc: Hemant Agrawal, Sachin Saxena On 06-08-2026 10:38, Stephen Hemminger wrote: > rte_eth_ctrl.h is deprecated and its contents are not used here. > > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com> > --- > drivers/net/dpaa/dpaa_ptp.c | 1 - > drivers/net/dpaa2/dpaa2_ptp.c | 1 - > 2 files changed, 2 deletions(-) > > diff --git a/drivers/net/dpaa/dpaa_ptp.c b/drivers/net/dpaa/dpaa_ptp.c > index e9b332c571..f91d3f9ce3 100644 > --- a/drivers/net/dpaa/dpaa_ptp.c > +++ b/drivers/net/dpaa/dpaa_ptp.c > @@ -9,7 +9,6 @@ > > #include <rte_ethdev.h> > #include <rte_log.h> > -#include <rte_eth_ctrl.h> > #include <rte_malloc.h> > #include <rte_time.h> > > diff --git a/drivers/net/dpaa2/dpaa2_ptp.c b/drivers/net/dpaa2/dpaa2_ptp.c > index 751e558c73..77d5d82b44 100644 > --- a/drivers/net/dpaa2/dpaa2_ptp.c > +++ b/drivers/net/dpaa2/dpaa2_ptp.c > @@ -12,7 +12,6 @@ > > #include <ethdev_driver.h> > #include <rte_log.h> > -#include <rte_eth_ctrl.h> > #include <rte_malloc.h> > #include <rte_time.h> > ^ permalink raw reply [flat|nested] 76+ messages in thread
* [PATCH v4 02/23] ethdev: use DPDK byte order conversion 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 5:08 ` Stephen Hemminger 2026-08-06 5:08 ` [PATCH v4 03/23] net/ixgbe: remove experimental FDIR API Stephen Hemminger ` (20 subsequent siblings) 22 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-06 5:08 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Thomas Monjalon, Andrew Rybchenko DPDK has its own byte order macros which are preferred over the POSIX/libc ones in arpa/inet.h This resolves issue where this code was inheriting the inclusion of arpa/inet.h from rte_ethdev.h -> rte_eth_ctrl.h. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- lib/ethdev/sff_8472.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ethdev/sff_8472.c b/lib/ethdev/sff_8472.c index 97f231854c..e29711eb74 100644 --- a/lib/ethdev/sff_8472.c +++ b/lib/ethdev/sff_8472.c @@ -5,6 +5,8 @@ #include <stdio.h> +#include <rte_byteorder.h> + #include "sff_common.h" /* Offsets in decimal, for direct comparison with the SFF specs */ @@ -176,7 +178,7 @@ static float befloattoh(const uint32_t *source) float dst; } converter; - converter.src = ntohl(*source); + converter.src = rte_be_to_cpu_32(*source); return converter.dst; } -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v4 03/23] net/ixgbe: remove experimental FDIR API 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 5:08 ` [PATCH v4 02/23] ethdev: use DPDK byte order conversion Stephen Hemminger @ 2026-08-06 5:08 ` Stephen Hemminger 2026-08-06 5:08 ` [PATCH v4 04/23] net/i40e: " Stephen Hemminger ` (19 subsequent siblings) 22 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-06 5:08 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Anatoly Burakov, Vladimir Medvedkin 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 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v4 04/23] net/i40e: remove experimental FDIR API 2026-08-06 5:08 ` [PATCH v4 00/23] ethdev: refactor remaining uses of flow director Stephen Hemminger ` (2 preceding siblings ...) 2026-08-06 5:08 ` [PATCH v4 03/23] net/ixgbe: remove experimental FDIR API Stephen Hemminger @ 2026-08-06 5:08 ` Stephen Hemminger 2026-08-06 5:08 ` [PATCH v4 05/23] app/testpmd: remove support for flow director Stephen Hemminger ` (18 subsequent siblings) 22 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-06 5:08 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Bruce Richardson Remove the flow director related private APIs in i40e. These APIs are experimental, therefore they can be removed without additional warnings. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- doc/guides/nics/i40e.rst | 46 --------- drivers/net/intel/i40e/i40e_ethdev.c | 4 +- drivers/net/intel/i40e/i40e_ethdev.h | 4 - drivers/net/intel/i40e/i40e_fdir.c | 140 -------------------------- drivers/net/intel/i40e/i40e_flow.c | 3 +- drivers/net/intel/i40e/rte_pmd_i40e.c | 34 ------- drivers/net/intel/i40e/rte_pmd_i40e.h | 33 ------ 7 files changed, 3 insertions(+), 261 deletions(-) diff --git a/doc/guides/nics/i40e.rst b/doc/guides/nics/i40e.rst index 29234dbf0f..67a3b29024 100644 --- a/doc/guides/nics/i40e.rst +++ b/doc/guides/nics/i40e.rst @@ -397,52 +397,6 @@ Add a rule to direct ``ipv4-udp`` packet whose ``dst_ip=2.2.2.5, src_ip=2.2.2.3, dst is 2.2.2.5 / udp src is 32 dst is 32 / end \ actions mark id 1 / queue index 1 / end -Check the flow director status: - -.. code-block:: console - - testpmd> show port fdir 0 - - ######################## FDIR infos for port 0 #################### - MODE: PERFECT - SUPPORTED FLOW TYPE: ipv4-frag ipv4-tcp ipv4-udp ipv4-sctp ipv4-other - ipv6-frag ipv6-tcp ipv6-udp ipv6-sctp ipv6-other - l2_payload - FLEX PAYLOAD INFO: - max_len: 16 payload_limit: 480 - payload_unit: 2 payload_seg: 3 - bitmask_unit: 2 bitmask_num: 2 - MASK: - vlan_tci: 0x0000, - src_ipv4: 0x00000000, - dst_ipv4: 0x00000000, - src_port: 0x0000, - dst_port: 0x0000 - src_ipv6: 0x00000000,0x00000000,0x00000000,0x00000000, - dst_ipv6: 0x00000000,0x00000000,0x00000000,0x00000000 - FLEX PAYLOAD SRC OFFSET: - L2_PAYLOAD: 0 1 2 3 4 5 6 ... - L3_PAYLOAD: 0 1 2 3 4 5 6 ... - L4_PAYLOAD: 0 1 2 3 4 5 6 ... - FLEX MASK CFG: - ipv4-udp: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - ipv4-tcp: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - ipv4-sctp: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - ipv4-other: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - ipv4-frag: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - ipv6-udp: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - ipv6-tcp: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - ipv6-sctp: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - ipv6-other: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - ipv6-frag: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - l2_payload: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - guarant_count: 1 best_count: 0 - guarant_space: 512 best_space: 7168 - collision: 0 free: 0 - maxhash: 0 maxlen: 0 - add: 0 remove: 0 - f_add: 0 f_remove: 0 - Floating VEB ~~~~~~~~~~~~ diff --git a/drivers/net/intel/i40e/i40e_ethdev.c b/drivers/net/intel/i40e/i40e_ethdev.c index b6b2d291ee..5cbdfe9db2 100644 --- a/drivers/net/intel/i40e/i40e_ethdev.c +++ b/drivers/net/intel/i40e/i40e_ethdev.c @@ -9335,8 +9335,8 @@ i40e_get_valid_input_set(enum i40e_filter_pctype pctype, }; /** - * Flow director supports only fields defined in - * union rte_eth_fdir_flow. + * Flow director supports only fields reachable through + * rte_flow item patterns. */ static const uint64_t valid_fdir_inset_table[] = { [I40E_FILTER_PCTYPE_FRAG_IPV4] = diff --git a/drivers/net/intel/i40e/i40e_ethdev.h b/drivers/net/intel/i40e/i40e_ethdev.h index 9d9bde6aeb..3968bfd267 100644 --- a/drivers/net/intel/i40e/i40e_ethdev.h +++ b/drivers/net/intel/i40e/i40e_ethdev.h @@ -1369,10 +1369,6 @@ enum i40e_filter_pctype uint16_t i40e_pctype_to_flowtype(const struct i40e_adapter *adapter, enum i40e_filter_pctype pctype); int i40e_dev_set_gre_key_len(struct i40e_hw *hw, uint8_t len); -void i40e_fdir_info_get(struct rte_eth_dev *dev, - struct rte_eth_fdir_info *fdir); -void i40e_fdir_stats_get(struct rte_eth_dev *dev, - struct rte_eth_fdir_stats *stat); int i40e_select_filter_input_set(struct i40e_hw *hw, struct rte_eth_input_set_conf *conf, enum rte_filter_type filter); diff --git a/drivers/net/intel/i40e/i40e_fdir.c b/drivers/net/intel/i40e/i40e_fdir.c index 8a233f8a97..f36eceab3a 100644 --- a/drivers/net/intel/i40e/i40e_fdir.c +++ b/drivers/net/intel/i40e/i40e_fdir.c @@ -1800,146 +1800,6 @@ i40e_fdir_flush(struct rte_eth_dev *dev) return 0; } -static inline void -i40e_fdir_info_get_flex_set(struct i40e_pf *pf, - struct rte_eth_flex_payload_cfg *flex_set, - uint16_t *num) -{ - struct i40e_fdir_flex_pit *flex_pit; - struct rte_eth_flex_payload_cfg *ptr = flex_set; - uint16_t src, dst, size, j, k; - uint8_t i, layer_idx; - - for (layer_idx = I40E_FLXPLD_L2_IDX; - layer_idx <= I40E_FLXPLD_L4_IDX; - layer_idx++) { - if (layer_idx == I40E_FLXPLD_L2_IDX) - ptr->type = RTE_ETH_L2_PAYLOAD; - else if (layer_idx == I40E_FLXPLD_L3_IDX) - ptr->type = RTE_ETH_L3_PAYLOAD; - else if (layer_idx == I40E_FLXPLD_L4_IDX) - ptr->type = RTE_ETH_L4_PAYLOAD; - - for (i = 0; i < I40E_MAX_FLXPLD_FIED; i++) { - flex_pit = &pf->fdir.flex_set[layer_idx * - I40E_MAX_FLXPLD_FIED + i]; - if (flex_pit->size == 0) - continue; - src = flex_pit->src_offset * sizeof(uint16_t); - dst = flex_pit->dst_offset * sizeof(uint16_t); - size = flex_pit->size * sizeof(uint16_t); - for (j = src, k = dst; j < src + size; j++, k++) - ptr->src_offset[k] = j; - } - (*num)++; - ptr++; - } -} - -static inline void -i40e_fdir_info_get_flex_mask(struct i40e_pf *pf, - struct rte_eth_fdir_flex_mask *flex_mask, - uint16_t *num) -{ - struct i40e_fdir_flex_mask *mask; - struct rte_eth_fdir_flex_mask *ptr = flex_mask; - uint16_t flow_type; - uint8_t i, j; - uint16_t off_bytes, mask_tmp; - - for (i = I40E_FILTER_PCTYPE_NONF_IPV4_UDP; - i <= I40E_FILTER_PCTYPE_L2_PAYLOAD; - i++) { - mask = &pf->fdir.flex_mask[i]; - flow_type = i40e_pctype_to_flowtype(pf->adapter, - (enum i40e_filter_pctype)i); - if (flow_type == RTE_ETH_FLOW_UNKNOWN) - continue; - - for (j = 0; j < I40E_FDIR_MAX_FLEXWORD_NUM; j++) { - if (mask->word_mask & I40E_FLEX_WORD_MASK(j)) { - ptr->mask[j * sizeof(uint16_t)] = UINT8_MAX; - ptr->mask[j * sizeof(uint16_t) + 1] = UINT8_MAX; - } else { - ptr->mask[j * sizeof(uint16_t)] = 0x0; - ptr->mask[j * sizeof(uint16_t) + 1] = 0x0; - } - } - for (j = 0; j < I40E_FDIR_BITMASK_NUM_WORD; j++) { - off_bytes = mask->bitmask[j].offset * sizeof(uint16_t); - mask_tmp = ~mask->bitmask[j].mask; - ptr->mask[off_bytes] &= I40E_HI_BYTE(mask_tmp); - ptr->mask[off_bytes + 1] &= I40E_LO_BYTE(mask_tmp); - } - ptr->flow_type = flow_type; - ptr++; - (*num)++; - } -} - -/* - * i40e_fdir_info_get - get information of Flow Director - * @pf: ethernet device to get info from - * @fdir: a pointer to a structure of type *rte_eth_fdir_info* to be filled with - * the flow director information. - */ -void -i40e_fdir_info_get(struct rte_eth_dev *dev, struct rte_eth_fdir_info *fdir) -{ - struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private); - struct i40e_hw *hw = I40E_PF_TO_HW(pf); - uint16_t num_flex_set = 0; - uint16_t num_flex_mask = 0; - uint16_t i; - - fdir->mode = RTE_FDIR_MODE_NONE; - - fdir->guarant_spc = - (uint32_t)hw->func_caps.fd_filters_guaranteed; - fdir->best_spc = - (uint32_t)hw->func_caps.fd_filters_best_effort; - fdir->max_flexpayload = I40E_FDIR_MAX_FLEX_LEN; - fdir->flow_types_mask[0] = I40E_FDIR_FLOWS; - for (i = 1; i < RTE_FLOW_MASK_ARRAY_SIZE; i++) - fdir->flow_types_mask[i] = 0ULL; - fdir->flex_payload_unit = sizeof(uint16_t); - fdir->flex_bitmask_unit = sizeof(uint16_t); - fdir->max_flex_payload_segment_num = I40E_MAX_FLXPLD_FIED; - fdir->flex_payload_limit = I40E_MAX_FLX_SOURCE_OFF; - fdir->max_flex_bitmask_num = I40E_FDIR_BITMASK_NUM_WORD; - - i40e_fdir_info_get_flex_set(pf, - fdir->flex_conf.flex_set, - &num_flex_set); - i40e_fdir_info_get_flex_mask(pf, - fdir->flex_conf.flex_mask, - &num_flex_mask); - - fdir->flex_conf.nb_payloads = num_flex_set; - fdir->flex_conf.nb_flexmasks = num_flex_mask; -} - -/* - * i40e_fdir_stat_get - get statistics of Flow Director - * @pf: ethernet device to get info from - * @stat: a pointer to a structure of type *rte_eth_fdir_stats* to be filled with - * the flow director statistics. - */ -void -i40e_fdir_stats_get(struct rte_eth_dev *dev, struct rte_eth_fdir_stats *stat) -{ - struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private); - struct i40e_hw *hw = I40E_PF_TO_HW(pf); - uint32_t fdstat; - - fdstat = I40E_READ_REG(hw, I40E_PFQF_FDSTAT); - stat->guarant_cnt = - (uint32_t)((fdstat & I40E_PFQF_FDSTAT_GUARANT_CNT_MASK) >> - I40E_PFQF_FDSTAT_GUARANT_CNT_SHIFT); - stat->best_cnt = - (uint32_t)((fdstat & I40E_PFQF_FDSTAT_BEST_CNT_MASK) >> - I40E_PFQF_FDSTAT_BEST_CNT_SHIFT); -} /* Restore flow director filter */ void diff --git a/drivers/net/intel/i40e/i40e_flow.c b/drivers/net/intel/i40e/i40e_flow.c index 6eb85a7d0d..e9993db6dd 100644 --- a/drivers/net/intel/i40e/i40e_flow.c +++ b/drivers/net/intel/i40e/i40e_flow.c @@ -2391,8 +2391,7 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev, for (i = 0; i < raw_spec->length; i++) { j = i + next_dst_off; - if (j >= RTE_ETH_FDIR_MAX_FLEXLEN || - j >= I40E_FDIR_MAX_FLEX_LEN) + if (j >= I40E_FDIR_MAX_FLEX_LEN) break; filter->input.flow_ext.flexbytes[j] = raw_spec->pattern[i]; diff --git a/drivers/net/intel/i40e/rte_pmd_i40e.c b/drivers/net/intel/i40e/rte_pmd_i40e.c index 2e7943ef8b..e47c1aa9d7 100644 --- a/drivers/net/intel/i40e/rte_pmd_i40e.c +++ b/drivers/net/intel/i40e/rte_pmd_i40e.c @@ -3219,40 +3219,6 @@ rte_pmd_i40e_inset_set(uint16_t port, uint8_t pctype, return 0; } -RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_pmd_i40e_get_fdir_info, 20.08) -int -rte_pmd_i40e_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_i40e_supported(dev)) - return -ENOTSUP; - - i40e_fdir_info_get(dev, fdir_info); - - return 0; -} - -RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_pmd_i40e_get_fdir_stats, 20.08) -int -rte_pmd_i40e_get_fdir_stats(uint16_t port, struct rte_eth_fdir_stats *fdir_stat) -{ - struct rte_eth_dev *dev; - - RTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV); - - dev = &rte_eth_devices[port]; - if (!is_i40e_supported(dev)) - return -ENOTSUP; - - i40e_fdir_stats_get(dev, fdir_stat); - - return 0; -} - RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_pmd_i40e_set_gre_key_len, 20.08) int rte_pmd_i40e_set_gre_key_len(uint16_t port, uint8_t len) diff --git a/drivers/net/intel/i40e/rte_pmd_i40e.h b/drivers/net/intel/i40e/rte_pmd_i40e.h index 5af7e2330f..34900f9bec 100644 --- a/drivers/net/intel/i40e/rte_pmd_i40e.h +++ b/drivers/net/intel/i40e/rte_pmd_i40e.h @@ -1067,39 +1067,6 @@ rte_pmd_i40e_inset_field_clear(uint64_t *inset, uint8_t field_idx) return 0; } -/** - * 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_i40e_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_stat - * The fdir status of the port - * @return - * - (0) if successful. - * - (-ENODEV) if *port* invalid. - * - (-ENOTSUP) if operation not supported. - */ -__rte_experimental -int -rte_pmd_i40e_get_fdir_stats(uint16_t port, - struct rte_eth_fdir_stats *fdir_stat); - /** * Set GRE key length * -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v4 05/23] app/testpmd: remove support for flow director 2026-08-06 5:08 ` [PATCH v4 00/23] ethdev: refactor remaining uses of flow director Stephen Hemminger ` (3 preceding siblings ...) 2026-08-06 5:08 ` [PATCH v4 04/23] net/i40e: " Stephen Hemminger @ 2026-08-06 5:08 ` Stephen Hemminger 2026-08-06 5:09 ` [PATCH v4 06/23] app/testpmd: move str_to_flowtype to i40e Stephen Hemminger ` (17 subsequent siblings) 22 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-06 5:08 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Aman Singh The legacy flow director API is deprecated and being removed. Drop it from testpmd; the testpmd CLI is not a stable API. Removed commands: show port fdir (port_id|all) clear port fdir (port_id|all) Also, update documentation of testpmd to not refer to Flow Director. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- app/test-pmd/cmdline.c | 21 +-- app/test-pmd/config.c | 163 -------------------- app/test-pmd/testpmd.h | 3 - doc/guides/testpmd_app_ug/intro.rst | 4 +- doc/guides/testpmd_app_ug/testpmd_funcs.rst | 56 ++----- 5 files changed, 17 insertions(+), 230 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 10ee7c5179..c142a8ec50 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -163,7 +163,7 @@ static void cmd_help_long_parsed(void *parsed_result, "Display:\n" "--------\n\n" - "show port (info|stats|summary|xstats|fdir|dcb_tc) (port_id|all)\n" + "show port (info|stats|summary|xstats|dcb_tc) (port_id|all)\n" " Display information for port_id, or all.\n\n" "show port info (port_id) representor\n" @@ -189,7 +189,7 @@ static void cmd_help_long_parsed(void *parsed_result, "show port (port_id) rss-hash [key | algorithm]\n" " Display the RSS hash functions, RSS hash key and RSS hash algorithms of port\n\n" - "clear port (info|stats|xstats|fdir) (port_id|all)\n" + "clear port (info|stats|xstats) (port_id|all)\n" " Clear information for port_id, or all.\n\n" "show (rxq|txq) info (port_id) (queue_id)\n" @@ -7514,11 +7514,6 @@ static void cmd_showportall_parsed(void *parsed_result, else if (!strcmp(res->what, "xstats")) RTE_ETH_FOREACH_DEV(i) nic_xstats_display(i); -#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE) - else if (!strcmp(res->what, "fdir")) - RTE_ETH_FOREACH_DEV(i) - fdir_get_infos(i); -#endif else if (!strcmp(res->what, "dcb_tc")) RTE_ETH_FOREACH_DEV(i) port_dcb_info_display(i); @@ -7531,14 +7526,14 @@ static cmdline_parse_token_string_t cmd_showportall_port = TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, port, "port"); static cmdline_parse_token_string_t cmd_showportall_what = TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, what, - "info#summary#stats#xstats#fdir#dcb_tc"); + "info#summary#stats#xstats#dcb_tc"); static cmdline_parse_token_string_t cmd_showportall_all = TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, all, "all"); static cmdline_parse_inst_t cmd_showportall = { .f = cmd_showportall_parsed, .data = NULL, .help_str = "show|clear port " - "info|summary|stats|xstats|fdir|dcb_tc all", + "info|summary|stats|xstats|dcb_tc all", .tokens = { (void *)&cmd_showportall_show, (void *)&cmd_showportall_port, @@ -7576,10 +7571,6 @@ static void cmd_showport_parsed(void *parsed_result, nic_stats_display(res->portnum); else if (!strcmp(res->what, "xstats")) nic_xstats_display(res->portnum); -#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE) - else if (!strcmp(res->what, "fdir")) - fdir_get_infos(res->portnum); -#endif else if (!strcmp(res->what, "dcb_tc")) port_dcb_info_display(res->portnum); } @@ -7591,7 +7582,7 @@ static cmdline_parse_token_string_t cmd_showport_port = TOKEN_STRING_INITIALIZER(struct cmd_showport_result, port, "port"); static cmdline_parse_token_string_t cmd_showport_what = TOKEN_STRING_INITIALIZER(struct cmd_showport_result, what, - "info#summary#stats#xstats#fdir#dcb_tc"); + "info#summary#stats#xstats#dcb_tc"); static cmdline_parse_token_num_t cmd_showport_portnum = TOKEN_NUM_INITIALIZER(struct cmd_showport_result, portnum, RTE_UINT16); @@ -7599,7 +7590,7 @@ static cmdline_parse_inst_t cmd_showport = { .f = cmd_showport_parsed, .data = NULL, .help_str = "show|clear port " - "info|summary|stats|xstats|fdir|dcb_tc " + "info|summary|stats|xstats|dcb_tc " "<port_id>", .tokens = { (void *)&cmd_showport_show, diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index aa03eb99cc..582e7287be 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -7056,169 +7056,6 @@ flowtype_to_str(uint16_t flow_type) return NULL; } -#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE) - -static inline void -print_fdir_flex_payload(struct rte_eth_fdir_flex_conf *flex_conf, uint32_t num) -{ - struct rte_eth_flex_payload_cfg *cfg; - uint32_t i, j; - - for (i = 0; i < flex_conf->nb_payloads; i++) { - cfg = &flex_conf->flex_set[i]; - if (cfg->type == RTE_ETH_RAW_PAYLOAD) - printf("\n RAW: "); - else if (cfg->type == RTE_ETH_L2_PAYLOAD) - printf("\n L2_PAYLOAD: "); - else if (cfg->type == RTE_ETH_L3_PAYLOAD) - printf("\n L3_PAYLOAD: "); - else if (cfg->type == RTE_ETH_L4_PAYLOAD) - printf("\n L4_PAYLOAD: "); - else - printf("\n UNKNOWN PAYLOAD(%u): ", cfg->type); - for (j = 0; j < num; j++) - printf(" %-5u", cfg->src_offset[j]); - } - printf("\n"); -} - -static inline void -print_fdir_flex_mask(struct rte_eth_fdir_flex_conf *flex_conf, uint32_t num) -{ - struct rte_eth_fdir_flex_mask *mask; - uint32_t i, j; - const char *p; - - for (i = 0; i < flex_conf->nb_flexmasks; i++) { - mask = &flex_conf->flex_mask[i]; - p = flowtype_to_str(mask->flow_type); - printf("\n %s:\t", p ? p : "unknown"); - for (j = 0; j < num; j++) - printf(" %02x", mask->mask[j]); - } - printf("\n"); -} - -static inline void -print_fdir_flow_type(uint32_t flow_types_mask) -{ - int i; - const char *p; - - for (i = RTE_ETH_FLOW_UNKNOWN; i < RTE_ETH_FLOW_MAX; i++) { - if (!(flow_types_mask & (1 << i))) - continue; - p = flowtype_to_str(i); - if (p) - printf(" %s", p); - else - printf(" unknown"); - } - printf("\n"); -} - -static int -get_fdir_info(portid_t port_id, struct rte_eth_fdir_info *fdir_info, - struct rte_eth_fdir_stats *fdir_stat) -{ - int ret = -ENOTSUP; - -#ifdef RTE_NET_I40E - if (ret == -ENOTSUP) { - ret = rte_pmd_i40e_get_fdir_info(port_id, fdir_info); - if (!ret) - ret = rte_pmd_i40e_get_fdir_stats(port_id, fdir_stat); - } -#endif -#ifdef RTE_NET_IXGBE - if (ret == -ENOTSUP) { - ret = rte_pmd_ixgbe_get_fdir_info(port_id, fdir_info); - if (!ret) - ret = rte_pmd_ixgbe_get_fdir_stats(port_id, fdir_stat); - } -#endif - switch (ret) { - case 0: - break; - case -ENOTSUP: - fprintf(stderr, "\n FDIR is not supported on port %-2d\n", - port_id); - break; - default: - fprintf(stderr, "programming error: (%s)\n", strerror(-ret)); - break; - } - return ret; -} - -void -fdir_get_infos(portid_t port_id) -{ - struct rte_eth_fdir_stats fdir_stat; - struct rte_eth_fdir_info fdir_info; - - static const char *fdir_stats_border = "########################"; - - if (port_id_is_invalid(port_id, ENABLED_WARN)) - return; - - memset(&fdir_info, 0, sizeof(fdir_info)); - memset(&fdir_stat, 0, sizeof(fdir_stat)); - if (get_fdir_info(port_id, &fdir_info, &fdir_stat)) - return; - - printf("\n %s FDIR infos for port %-2d %s\n", - fdir_stats_border, port_id, fdir_stats_border); - printf(" MODE: "); - if (fdir_info.mode == RTE_FDIR_MODE_PERFECT) - printf(" PERFECT\n"); - else if (fdir_info.mode == RTE_FDIR_MODE_PERFECT_MAC_VLAN) - printf(" PERFECT-MAC-VLAN\n"); - else if (fdir_info.mode == RTE_FDIR_MODE_PERFECT_TUNNEL) - printf(" PERFECT-TUNNEL\n"); - else if (fdir_info.mode == RTE_FDIR_MODE_SIGNATURE) - printf(" SIGNATURE\n"); - else - printf(" DISABLE\n"); - if (fdir_info.mode != RTE_FDIR_MODE_PERFECT_MAC_VLAN - && fdir_info.mode != RTE_FDIR_MODE_PERFECT_TUNNEL) { - printf(" SUPPORTED FLOW TYPE: "); - print_fdir_flow_type(fdir_info.flow_types_mask[0]); - } - printf(" FLEX PAYLOAD INFO:\n"); - printf(" max_len: %-10"PRIu32" payload_limit: %-10"PRIu32"\n" - " payload_unit: %-10"PRIu32" payload_seg: %-10"PRIu32"\n" - " bitmask_unit: %-10"PRIu32" bitmask_num: %-10"PRIu32"\n", - fdir_info.max_flexpayload, fdir_info.flex_payload_limit, - fdir_info.flex_payload_unit, - fdir_info.max_flex_payload_segment_num, - fdir_info.flex_bitmask_unit, fdir_info.max_flex_bitmask_num); - if (fdir_info.flex_conf.nb_payloads > 0) { - printf(" FLEX PAYLOAD SRC OFFSET:"); - print_fdir_flex_payload(&fdir_info.flex_conf, fdir_info.max_flexpayload); - } - if (fdir_info.flex_conf.nb_flexmasks > 0) { - printf(" FLEX MASK CFG:"); - print_fdir_flex_mask(&fdir_info.flex_conf, fdir_info.max_flexpayload); - } - printf(" guarant_count: %-10"PRIu32" best_count: %"PRIu32"\n", - fdir_stat.guarant_cnt, fdir_stat.best_cnt); - printf(" guarant_space: %-10"PRIu32" best_space: %"PRIu32"\n", - fdir_info.guarant_spc, fdir_info.best_spc); - printf(" collision: %-10"PRIu32" free: %"PRIu32"\n" - " maxhash: %-10"PRIu32" maxlen: %"PRIu32"\n" - " add: %-10"PRIu64" remove: %"PRIu64"\n" - " f_add: %-10"PRIu64" f_remove: %"PRIu64"\n", - fdir_stat.collision, fdir_stat.free, - fdir_stat.maxhash, fdir_stat.maxlen, - fdir_stat.add, fdir_stat.remove, - fdir_stat.f_add, fdir_stat.f_remove); - printf(" %s############################%s\n", - fdir_stats_border, fdir_stats_border); -} - -#endif /* RTE_NET_I40E || RTE_NET_IXGBE */ - void set_vf_traffic(portid_t port_id, uint8_t is_rx, uint16_t vf, uint8_t on) { diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index 083171853c..f7c10ab6b8 100644 --- a/app/test-pmd/testpmd.h +++ b/app/test-pmd/testpmd.h @@ -1212,9 +1212,6 @@ int all_ports_stopped(void); int port_is_stopped(portid_t port_id); int port_is_started(portid_t port_id); void pmd_test_exit(void); -#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE) -void fdir_get_infos(portid_t port_id); -#endif void port_rss_reta_info(portid_t port_id, struct rte_eth_rss_reta_entry64 *reta_conf, uint16_t nb_entries); diff --git a/doc/guides/testpmd_app_ug/intro.rst b/doc/guides/testpmd_app_ug/intro.rst index 5d8d8cf4eb..35321b084a 100644 --- a/doc/guides/testpmd_app_ug/intro.rst +++ b/doc/guides/testpmd_app_ug/intro.rst @@ -7,8 +7,8 @@ Introduction This document is a user guide for the ``testpmd`` example application that is shipped as part of the Data Plane Development Kit. The ``testpmd`` application can be used to test the DPDK in a packet forwarding mode -and also to access NIC hardware features such as Flow Director. -It also serves as a example of how to build a more fully-featured application using the DPDK SDK. +and also to access NIC hardware offload and flow features. +It also serves as an example of how to build a more fully-featured application using the DPDK SDK. The guide shows how to build and run the testpmd application and how to configure the application from the command line and the run-time environment. diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst index e65376df54..09783bead1 100644 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst @@ -7,7 +7,7 @@ Testpmd Runtime Functions Where the testpmd application is started in interactive mode, (``-i|--interactive``), it displays a prompt that can be used to start and stop forwarding, configure the application, display statistics (including the extended NIC -statistics aka xstats) , set the Flow Director and other tasks:: +statistics aka xstats), set offload parameters and other tasks:: testpmd> @@ -22,10 +22,10 @@ If you type a partial command and hit ``<TAB>`` you get a list of the available testpmd> show port <TAB> - info [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|dcb_tc|cap X - info [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|dcb_tc|cap all - stats [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|dcb_tc|cap X - stats [Mul-choice STRING]: show|clear port info|stats|xstats|fdir|dcb_tc|cap all + info [Mul-choice STRING]: show|clear port info|stats|xstats|dcb_tc|cap X + info [Mul-choice STRING]: show|clear port info|stats|xstats|dcb_tc|cap all + stats [Mul-choice STRING]: show|clear port info|stats|xstats|dcb_tc|cap X + stats [Mul-choice STRING]: show|clear port info|stats|xstats|dcb_tc|cap all ... @@ -160,7 +160,7 @@ show port Display information for a given port or all ports:: - testpmd> show port (info|summary|stats|xstats|fdir|dcb_tc|cap) (port_id|all) + testpmd> show port (info|summary|stats|xstats|dcb_tc|cap) (port_id|all) The available information categories are: @@ -172,8 +172,6 @@ The available information categories are: * ``xstats``: RX/TX extended NIC statistics. -* ``fdir``: Flow Director information and statistics. - * ``dcb_tc``: DCB information such as TC mapping. For example: @@ -262,7 +260,7 @@ clear port Clear the port statistics and forward engine statistics for a given port or for all ports:: - testpmd> clear port (info|stats|xstats|fdir) (port_id|all) + testpmd> clear port (info|stats|xstats) (port_id|all) For example:: @@ -2288,42 +2286,6 @@ Where the threshold type can be: These threshold options are also available from the command-line. -port config pctype mapping -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Reset pctype mapping table:: - - testpmd> port config (port_id) pctype mapping reset - -Update hardware defined pctype to software defined flow type mapping table:: - - testpmd> port config (port_id) pctype mapping update (pctype_id_0[,pctype_id_1]*) (flow_type_id) - -where: - -* ``pctype_id_x``: hardware pctype id as index of bit in bitmask value of the pctype mapping table. - -* ``flow_type_id``: software flow type id as the index of the pctype mapping table. - -port config input set -~~~~~~~~~~~~~~~~~~~~~ - -Config RSS/FDIR/FDIR flexible payload input set for some pctype:: - - testpmd> port config (port_id) pctype (pctype_id) \ - (hash_inset|fdir_inset|fdir_flx_inset) \ - (get|set|clear) field (field_idx) - -Clear RSS/FDIR/FDIR flexible payload input set for some pctype:: - - testpmd> port config (port_id) pctype (pctype_id) \ - (hash_inset|fdir_inset|fdir_flx_inset) clear all - -where: - -* ``pctype_id``: hardware packet classification types. -* ``field_idx``: hardware field index. - port config udp_tunnel_port ~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -5519,10 +5481,10 @@ L2TPv2 RSS rules can be created by the following commands:: testpmd> flow create 0 ingress pattern eth / ipv6 / udp / l2tpv2 / ppp / ipv6 / end actions rss types ipv6 end queues end / end -Sample L2TPv2 FDIR rules +Sample L2TPv2 flow rules ~~~~~~~~~~~~~~~~~~~~~~~~ -L2TPv2 FDIR rules can be created by the following commands:: +L2TPv2 flow rules can be created by the following commands:: testpmd> flow create 0 ingress pattern eth / ipv4 / udp / l2tpv2 type control session_id is 0x1111 / end actions queue index 3 / end -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v4 06/23] app/testpmd: move str_to_flowtype to i40e 2026-08-06 5:08 ` [PATCH v4 00/23] ethdev: refactor remaining uses of flow director Stephen Hemminger ` (4 preceding siblings ...) 2026-08-06 5:08 ` [PATCH v4 05/23] app/testpmd: remove support for flow director Stephen Hemminger @ 2026-08-06 5:09 ` Stephen Hemminger 2026-08-06 5:09 ` [PATCH v4 07/23] app/test: include headers directly Stephen Hemminger ` (16 subsequent siblings) 22 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-06 5:09 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Aman Singh, Bruce Richardson Only the i40e internal command is still using str_to_flowtype() so move it to there. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- app/test-pmd/config.c | 62 --------------------------- app/test-pmd/testpmd.h | 3 -- drivers/net/intel/i40e/i40e_testpmd.c | 51 ++++++++++++++++++++++ 3 files changed, 51 insertions(+), 65 deletions(-) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 582e7287be..230640ea44 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -3,7 +3,6 @@ * Copyright 2013-2014 6WIND S.A. */ -#include <ctype.h> #include <stdarg.h> #include <errno.h> #include <stdbool.h> @@ -182,35 +181,6 @@ static const struct { }, }; -static const struct { - char str[32]; - uint16_t ftype; -} flowtype_str_table[] = { - {"raw", RTE_ETH_FLOW_RAW}, - {"ipv4", RTE_ETH_FLOW_IPV4}, - {"ipv4-frag", RTE_ETH_FLOW_FRAG_IPV4}, - {"ipv4-tcp", RTE_ETH_FLOW_NONFRAG_IPV4_TCP}, - {"ipv4-udp", RTE_ETH_FLOW_NONFRAG_IPV4_UDP}, - {"ipv4-sctp", RTE_ETH_FLOW_NONFRAG_IPV4_SCTP}, - {"ipv4-other", RTE_ETH_FLOW_NONFRAG_IPV4_OTHER}, - {"ipv6", RTE_ETH_FLOW_IPV6}, - {"ipv6-frag", RTE_ETH_FLOW_FRAG_IPV6}, - {"ipv6-tcp", RTE_ETH_FLOW_NONFRAG_IPV6_TCP}, - {"ipv6-udp", RTE_ETH_FLOW_NONFRAG_IPV6_UDP}, - {"ipv6-sctp", RTE_ETH_FLOW_NONFRAG_IPV6_SCTP}, - {"ipv6-other", RTE_ETH_FLOW_NONFRAG_IPV6_OTHER}, - {"l2_payload", RTE_ETH_FLOW_L2_PAYLOAD}, - {"ipv6-ex", RTE_ETH_FLOW_IPV6_EX}, - {"ipv6-tcp-ex", RTE_ETH_FLOW_IPV6_TCP_EX}, - {"ipv6-udp-ex", RTE_ETH_FLOW_IPV6_UDP_EX}, - {"port", RTE_ETH_FLOW_PORT}, - {"vxlan", RTE_ETH_FLOW_VXLAN}, - {"geneve", RTE_ETH_FLOW_GENEVE}, - {"nvgre", RTE_ETH_FLOW_NVGRE}, - {"vxlan-gpe", RTE_ETH_FLOW_VXLAN_GPE}, - {"gtpu", RTE_ETH_FLOW_GTPU}, -}; - static void print_ethaddr(const char *name, struct rte_ether_addr *eth_addr) { @@ -7024,38 +6994,6 @@ set_record_burst_stats(uint8_t on_off) record_burst_stats = on_off; } -uint16_t -str_to_flowtype(const char *string) -{ - uint8_t i; - - for (i = 0; i < RTE_DIM(flowtype_str_table); i++) { - if (!strcmp(flowtype_str_table[i].str, string)) - return flowtype_str_table[i].ftype; - } - - if (isdigit(string[0])) { - int val = atoi(string); - if (val > 0 && val < 64) - return (uint16_t)val; - } - - return RTE_ETH_FLOW_UNKNOWN; -} - -const char* -flowtype_to_str(uint16_t flow_type) -{ - uint8_t i; - - for (i = 0; i < RTE_DIM(flowtype_str_table); i++) { - if (flowtype_str_table[i].ftype == flow_type) - return flowtype_str_table[i].str; - } - - return NULL; -} - void set_vf_traffic(portid_t port_id, uint8_t is_rx, uint16_t vf, uint8_t on) { diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index f7c10ab6b8..ed94bd65c6 100644 --- a/app/test-pmd/testpmd.h +++ b/app/test-pmd/testpmd.h @@ -1325,9 +1325,6 @@ int parse_hairpin_map(const char *hpmap); uint64_t str_to_rsstypes(const char *str); const char *rsstypes_to_str(uint64_t rss_type); -uint16_t str_to_flowtype(const char *string); -const char *flowtype_to_str(uint16_t flow_type); - /* For registering driver specific testpmd commands. */ struct testpmd_driver_commands { TAILQ_ENTRY(testpmd_driver_commands) next; diff --git a/drivers/net/intel/i40e/i40e_testpmd.c b/drivers/net/intel/i40e/i40e_testpmd.c index 21f596297b..8ae1db698f 100644 --- a/drivers/net/intel/i40e/i40e_testpmd.c +++ b/drivers/net/intel/i40e/i40e_testpmd.c @@ -2,6 +2,7 @@ * Copyright(c) 2010-2016 Intel Corporation. */ +#include <ctype.h> #include <stdlib.h> #include <rte_pmd_i40e.h> @@ -465,6 +466,56 @@ static cmdline_parse_inst_t cmd_show_queue_region_info_all = { }; /* *** deal with flow director filter *** */ + +static const struct { + char str[32]; + uint16_t ftype; +} flowtype_str_table[] = { + {"raw", RTE_ETH_FLOW_RAW}, + {"ipv4", RTE_ETH_FLOW_IPV4}, + {"ipv4-frag", RTE_ETH_FLOW_FRAG_IPV4}, + {"ipv4-tcp", RTE_ETH_FLOW_NONFRAG_IPV4_TCP}, + {"ipv4-udp", RTE_ETH_FLOW_NONFRAG_IPV4_UDP}, + {"ipv4-sctp", RTE_ETH_FLOW_NONFRAG_IPV4_SCTP}, + {"ipv4-other", RTE_ETH_FLOW_NONFRAG_IPV4_OTHER}, + {"ipv6", RTE_ETH_FLOW_IPV6}, + {"ipv6-frag", RTE_ETH_FLOW_FRAG_IPV6}, + {"ipv6-tcp", RTE_ETH_FLOW_NONFRAG_IPV6_TCP}, + {"ipv6-udp", RTE_ETH_FLOW_NONFRAG_IPV6_UDP}, + {"ipv6-sctp", RTE_ETH_FLOW_NONFRAG_IPV6_SCTP}, + {"ipv6-other", RTE_ETH_FLOW_NONFRAG_IPV6_OTHER}, + {"l2_payload", RTE_ETH_FLOW_L2_PAYLOAD}, + {"ipv6-ex", RTE_ETH_FLOW_IPV6_EX}, + {"ipv6-tcp-ex", RTE_ETH_FLOW_IPV6_TCP_EX}, + {"ipv6-udp-ex", RTE_ETH_FLOW_IPV6_UDP_EX}, + {"port", RTE_ETH_FLOW_PORT}, + {"vxlan", RTE_ETH_FLOW_VXLAN}, + {"geneve", RTE_ETH_FLOW_GENEVE}, + {"nvgre", RTE_ETH_FLOW_NVGRE}, + {"vxlan-gpe", RTE_ETH_FLOW_VXLAN_GPE}, + {"gtpu", RTE_ETH_FLOW_GTPU}, +}; + +static uint16_t +str_to_flowtype(const char *string) +{ + uint8_t i; + + for (i = 0; i < RTE_DIM(flowtype_str_table); i++) { + if (!strcmp(flowtype_str_table[i].str, string)) + return flowtype_str_table[i].ftype; + } + + if (isdigit(string[0])) { + int val = atoi(string); + if (val > 0 && val < 64) + return (uint16_t)val; + } + + return RTE_ETH_FLOW_UNKNOWN; +} + + struct cmd_flow_director_result { cmdline_fixed_string_t flow_director_filter; portid_t port_id; -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v4 07/23] app/test: include headers directly 2026-08-06 5:08 ` [PATCH v4 00/23] ethdev: refactor remaining uses of flow director Stephen Hemminger ` (5 preceding siblings ...) 2026-08-06 5:09 ` [PATCH v4 06/23] app/testpmd: move str_to_flowtype to i40e Stephen Hemminger @ 2026-08-06 5:09 ` Stephen Hemminger 2026-08-06 5:09 ` [PATCH v4 08/23] gro: " Stephen Hemminger ` (15 subsequent siblings) 22 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-06 5:09 UTC (permalink / raw) To: dev Cc: Stephen Hemminger, Jerin Jacob, Konstantin Ananyev, Marat Khalili, Akhil Goyal, Anoob Joseph The test code was getting network headers indirectly via inclusion of rte_ethdev.h. This will change in the future, instead get the headers directly. For BPF test, use the tool "iwyu" to get more complete set of headers. Replace use of htons() with equivalent DPDK byteorder macro. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- app/test-eventdev/test_pipeline_common.h | 1 + app/test/test_bpf.c | 20 +++++++++++++++----- app/test/test_security_inline_macsec.c | 2 ++ app/test/test_security_inline_proto.c | 1 + 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/app/test-eventdev/test_pipeline_common.h b/app/test-eventdev/test_pipeline_common.h index 61370fb799..e9f20e7f62 100644 --- a/app/test-eventdev/test_pipeline_common.h +++ b/app/test-eventdev/test_pipeline_common.h @@ -12,6 +12,7 @@ #include <rte_cycles.h> #include <rte_ethdev.h> #include <rte_ether.h> +#include <rte_ip.h> #include <rte_event_eth_rx_adapter.h> #include <rte_event_eth_tx_adapter.h> #include <rte_eventdev.h> diff --git a/app/test/test_bpf.c b/app/test/test_bpf.c index 3205afaa63..5b71f94a71 100644 --- a/app/test/test_bpf.c +++ b/app/test/test_bpf.c @@ -5,16 +5,28 @@ #include <stdio.h> #include <string.h> #include <stdint.h> +#include <stdlib.h> +#include <stdbool.h> +#include <stddef.h> +#include <stdalign.h> #include <inttypes.h> +#include <errno.h> +#include <limits.h> #include <unistd.h> -#include <rte_memory.h> +#include <rte_bitops.h> #include <rte_debug.h> #include <rte_hexdump.h> #include <rte_malloc.h> +#include <rte_memcpy.h> +#include <rte_mbuf.h> #include <rte_random.h> #include <rte_byteorder.h> #include <rte_errno.h> +#include <rte_ether.h> +#include <rte_ip.h> +#include <rte_udp.h> +#include <rte_tcp.h> #include "test.h" @@ -30,8 +42,6 @@ test_bpf(void) #else #include <rte_bpf.h> -#include <rte_ether.h> -#include <rte_ip.h> /* Tests of most simple BPF programs (no instructions, one instruction etc.) */ @@ -1331,7 +1341,7 @@ test_jump2_check(uint64_t rc, const void *arg) uint16_t eth_type; uint64_t v = -1; - if (eth_hdr->ether_type == htons(0x8100)) { + if (eth_hdr->ether_type == rte_cpu_to_be_16(0x8100)) { const struct rte_vlan_hdr *vlan_hdr = (const void *)(eth_hdr + 1); eth_type = vlan_hdr->eth_proto; @@ -1341,7 +1351,7 @@ test_jump2_check(uint64_t rc, const void *arg) next = eth_hdr + 1; } - if (eth_type == htons(0x0800)) { + if (eth_type == rte_cpu_to_be_16(0x0800)) { ipv4_hdr = next; if ((ipv4_hdr->dst_addr & rte_cpu_to_be_32(TEST_NETMASK)) == rte_cpu_to_be_32(TEST_SUBNET)) { diff --git a/app/test/test_security_inline_macsec.c b/app/test/test_security_inline_macsec.c index a929ff5326..43672ef237 100644 --- a/app/test/test_security_inline_macsec.c +++ b/app/test/test_security_inline_macsec.c @@ -8,6 +8,8 @@ #include <rte_ethdev.h> #include <rte_malloc.h> #include <rte_security.h> +#include <rte_flow.h> +#include <rte_macsec.h> #include "test.h" #include "test_security_inline_macsec_vectors.h" diff --git a/app/test/test_security_inline_proto.c b/app/test/test_security_inline_proto.c index 0b1f7fbbab..99111e5432 100644 --- a/app/test/test_security_inline_proto.c +++ b/app/test/test_security_inline_proto.c @@ -7,6 +7,7 @@ #include <inttypes.h> #include <rte_ethdev.h> +#include <rte_flow.h> #include <rte_malloc.h> #include <rte_security.h> -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v4 08/23] gro: include headers directly 2026-08-06 5:08 ` [PATCH v4 00/23] ethdev: refactor remaining uses of flow director Stephen Hemminger ` (6 preceding siblings ...) 2026-08-06 5:09 ` [PATCH v4 07/23] app/test: include headers directly Stephen Hemminger @ 2026-08-06 5:09 ` Stephen Hemminger 2026-08-06 5:09 ` [PATCH v4 09/23] crypto/dpaa_sec: include UDP header Stephen Hemminger ` (14 subsequent siblings) 22 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-06 5:09 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Jiayu Hu The gro library was getting headers such as VXLAN implicitly via rte_ethdev.h. This will change, so include the needed headers directly. Use iwyu to make sure all headers are covered. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- lib/gro/gro_tcp4.c | 9 ++++++++- lib/gro/gro_tcp6.c | 9 ++++++++- lib/gro/gro_vxlan_tcp4.c | 10 +++++++++- lib/gro/gro_vxlan_udp4.c | 9 ++++++++- lib/gro/rte_gro.c | 9 ++++++++- 5 files changed, 41 insertions(+), 5 deletions(-) diff --git a/lib/gro/gro_tcp4.c b/lib/gro/gro_tcp4.c index 855cc7a71d..3997fb8bf1 100644 --- a/lib/gro/gro_tcp4.c +++ b/lib/gro/gro_tcp4.c @@ -2,9 +2,16 @@ * Copyright(c) 2017 Intel Corporation */ +#include <stddef.h> + +#include <rte_branch_prediction.h> +#include <rte_byteorder.h> +#include <rte_common.h> +#include <rte_ether.h> #include <rte_malloc.h> #include <rte_mbuf.h> -#include <rte_ethdev.h> +#include <rte_ip.h> +#include <rte_tcp.h> #include "gro_tcp4.h" #include "gro_tcp_internal.h" diff --git a/lib/gro/gro_tcp6.c b/lib/gro/gro_tcp6.c index ab4cd6c68b..4e1ae596b7 100644 --- a/lib/gro/gro_tcp6.c +++ b/lib/gro/gro_tcp6.c @@ -2,9 +2,16 @@ * Copyright(c) 2023 Intel Corporation */ +#include <stdbool.h> + +#include <rte_branch_prediction.h> +#include <rte_byteorder.h> +#include <rte_common.h> +#include <rte_ether.h> #include <rte_malloc.h> #include <rte_mbuf.h> -#include <rte_ethdev.h> +#include <rte_ip.h> +#include <rte_tcp.h> #include "gro_tcp6.h" #include "gro_tcp_internal.h" diff --git a/lib/gro/gro_vxlan_tcp4.c b/lib/gro/gro_vxlan_tcp4.c index 29d4a2e13d..650d02eb74 100644 --- a/lib/gro/gro_vxlan_tcp4.c +++ b/lib/gro/gro_vxlan_tcp4.c @@ -2,9 +2,17 @@ * Copyright(c) 2018 Intel Corporation */ +#include <stddef.h> + +#include <rte_branch_prediction.h> +#include <rte_byteorder.h> +#include <rte_common.h> #include <rte_malloc.h> #include <rte_mbuf.h> -#include <rte_ethdev.h> +#include <rte_ether.h> +#include <rte_vxlan.h> +#include <rte_ip.h> +#include <rte_tcp.h> #include <rte_udp.h> #include "gro_vxlan_tcp4.h" diff --git a/lib/gro/gro_vxlan_udp4.c b/lib/gro/gro_vxlan_udp4.c index ca8cee270d..bdfa8d6d20 100644 --- a/lib/gro/gro_vxlan_udp4.c +++ b/lib/gro/gro_vxlan_udp4.c @@ -2,9 +2,16 @@ * Copyright(c) 2020 Inspur Corporation */ +#include <stddef.h> + +#include <rte_branch_prediction.h> +#include <rte_byteorder.h> +#include <rte_common.h> #include <rte_malloc.h> #include <rte_mbuf.h> -#include <rte_ethdev.h> +#include <rte_ether.h> +#include <rte_vxlan.h> +#include <rte_ip.h> #include <rte_udp.h> #include "gro_vxlan_udp4.h" diff --git a/lib/gro/rte_gro.c b/lib/gro/rte_gro.c index 578cc9b801..5bccd3cbac 100644 --- a/lib/gro/rte_gro.c +++ b/lib/gro/rte_gro.c @@ -2,12 +2,19 @@ * Copyright(c) 2017 Intel Corporation */ +#include <stddef.h> + #include <eal_export.h> +#include <rte_branch_prediction.h> +#include <rte_common.h> #include <rte_malloc.h> +#include <rte_mbuf.h> #include <rte_cycles.h> -#include <rte_ethdev.h> +#include <rte_ether.h> +#include <rte_vxlan.h> #include "rte_gro.h" +#include "gro_tcp.h" #include "gro_tcp4.h" #include "gro_tcp6.h" #include "gro_udp4.h" -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v4 09/23] crypto/dpaa_sec: include UDP header 2026-08-06 5:08 ` [PATCH v4 00/23] ethdev: refactor remaining uses of flow director Stephen Hemminger ` (7 preceding siblings ...) 2026-08-06 5:09 ` [PATCH v4 08/23] gro: " Stephen Hemminger @ 2026-08-06 5:09 ` 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 ` (13 subsequent siblings) 22 siblings, 1 reply; 76+ messages in thread From: Stephen Hemminger @ 2026-08-06 5:09 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Gagandeep Singh, Hemant Agrawal The driver was getting the UDP header definition indirectly via rte_ethdev.h. That will change, so include the header directly. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- drivers/crypto/dpaa_sec/dpaa_sec.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.h b/drivers/crypto/dpaa_sec/dpaa_sec.h index d78cad818a..bce60d9cb8 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.h +++ b/drivers/crypto/dpaa_sec/dpaa_sec.h @@ -7,6 +7,8 @@ #ifndef _DPAA_SEC_H_ #define _DPAA_SEC_H_ +#include <rte_udp.h> + #define CRYPTODEV_NAME_DPAA_SEC_PMD crypto_dpaa_sec /**< NXP DPAA - SEC PMD device name */ -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* Re: [PATCH v4 09/23] crypto/dpaa_sec: include UDP header 2026-08-06 5:09 ` [PATCH v4 09/23] crypto/dpaa_sec: include UDP header Stephen Hemminger @ 2026-08-06 6:12 ` Hemant Agrawal 0 siblings, 0 replies; 76+ messages in thread From: Hemant Agrawal @ 2026-08-06 6:12 UTC (permalink / raw) To: Stephen Hemminger, dev; +Cc: Gagandeep Singh, Hemant Agrawal On 06-08-2026 10:39, Stephen Hemminger wrote: > The driver was getting the UDP header definition indirectly via > rte_ethdev.h. That will change, so include the header directly. > > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com> > --- > drivers/crypto/dpaa_sec/dpaa_sec.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.h b/drivers/crypto/dpaa_sec/dpaa_sec.h > index d78cad818a..bce60d9cb8 100644 > --- a/drivers/crypto/dpaa_sec/dpaa_sec.h > +++ b/drivers/crypto/dpaa_sec/dpaa_sec.h > @@ -7,6 +7,8 @@ > #ifndef _DPAA_SEC_H_ > #define _DPAA_SEC_H_ > > +#include <rte_udp.h> > + > #define CRYPTODEV_NAME_DPAA_SEC_PMD crypto_dpaa_sec > /**< NXP DPAA - SEC PMD device name */ > ^ permalink raw reply [flat|nested] 76+ messages in thread
* [PATCH v4 10/23] net/gve: include UDP, SCTP and TCP headers 2026-08-06 5:08 ` [PATCH v4 00/23] ethdev: refactor remaining uses of flow director Stephen Hemminger ` (8 preceding siblings ...) 2026-08-06 5:09 ` [PATCH v4 09/23] crypto/dpaa_sec: include UDP header Stephen Hemminger @ 2026-08-06 5:09 ` Stephen Hemminger 2026-08-06 5:09 ` [PATCH v4 11/23] net/nfp: break implicit dependency on rte_eth_ctrl.h Stephen Hemminger ` (12 subsequent siblings) 22 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-06 5:09 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Joshua Washington, Jeroen de Borst This driver was getting rte_udp.h, rte_tcp.h and rte_sctp.h implicitly through rte_ethdev.h -> rte_eth_ctrl.h -> rte_flow.h. Since rte_eth_ctrl.h is deprecated, better to not depend on that. Use iwyu to make sure all used includes are here. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Reviewed-by: Joshua Washington <joshwash@google.com> --- drivers/net/gve/gve_ethdev.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/net/gve/gve_ethdev.h b/drivers/net/gve/gve_ethdev.h index c9a176ff17..95b32420b4 100644 --- a/drivers/net/gve/gve_ethdev.h +++ b/drivers/net/gve/gve_ethdev.h @@ -5,15 +5,26 @@ #ifndef _GVE_ETHDEV_H_ #define _GVE_ETHDEV_H_ +#include <stdbool.h> +#include <stdint.h> +#include <pthread.h> +#include <sys/queue.h> + #include <ethdev_driver.h> #include <ethdev_pci.h> #include <rte_alarm.h> +#include <rte_atomic.h> +#include <rte_stdatomic.h> +#include <rte_bitops.h> +#include <rte_ethdev.h> #include <rte_ether.h> #include <rte_pci.h> -#include <pthread.h> #include <rte_bitmap.h> #include <rte_memzone.h> #include <rte_thread.h> +#include <rte_udp.h> +#include <rte_tcp.h> +#include <rte_sctp.h> #include "base/gve.h" -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v4 11/23] net/nfp: break implicit dependency on rte_eth_ctrl.h 2026-08-06 5:08 ` [PATCH v4 00/23] ethdev: refactor remaining uses of flow director Stephen Hemminger ` (9 preceding siblings ...) 2026-08-06 5:09 ` [PATCH v4 10/23] net/gve: include UDP, SCTP and TCP headers Stephen Hemminger @ 2026-08-06 5:09 ` Stephen Hemminger 2026-08-06 5:09 ` [PATCH v4 12/23] net/mana: include used network headers Stephen Hemminger ` (11 subsequent siblings) 22 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-06 5:09 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Chaoyong He This driver was using UINT64_BIT which was getting defined via deprecated rte_eth_ctrl.h. Replace with local definition. Also include rte_flow.h instead of depending on indirect inclusion from rte_ethdev.h. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- drivers/net/nfp/nfp_ethdev.c | 6 ++++-- drivers/net/nfp/nfp_net_common.h | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c index d2da18013c..25be1de080 100644 --- a/drivers/net/nfp/nfp_ethdev.c +++ b/drivers/net/nfp/nfp_ethdev.c @@ -6,6 +6,7 @@ */ #include <unistd.h> +#include <limits.h> #include <eal_firmware.h> #include <rte_alarm.h> @@ -32,6 +33,7 @@ /* 64-bit per app capabilities */ #define NFP_NET_APP_CAP_SP_INDIFF RTE_BIT64(0) /* Indifferent to port speed */ +#define NFP_UINT64_BIT (CHAR_BIT * sizeof(uint64_t)) #define NFP_PF_DRIVER_NAME net_nfp_pf #define NFP_PF_FORCE_RELOAD_FW "force_reload_fw" @@ -2060,8 +2062,8 @@ nfp_net_speed_capa_get_real(struct nfp_eth_media_buf *media_buf, for (i = 0; i < RTE_DIM(media_buf->supported_modes); i++) { supported_modes = media_buf->supported_modes[i]; - offset = i * UINT64_BIT; - for (j = 0; j < UINT64_BIT; j++) { + offset = i * NFP_UINT64_BIT; + for (j = 0; j < NFP_UINT64_BIT; j++) { if (supported_modes == 0) break; diff --git a/drivers/net/nfp/nfp_net_common.h b/drivers/net/nfp/nfp_net_common.h index 2bd2d54028..62c6448cc3 100644 --- a/drivers/net/nfp/nfp_net_common.h +++ b/drivers/net/nfp/nfp_net_common.h @@ -8,9 +8,11 @@ #include <bus_pci_driver.h> #include <ethdev_driver.h> +#include <rte_flow.h> +#include <rte_spinlock.h> + #include <nfp_common.h> #include <nfp_dev.h> -#include <rte_spinlock.h> #include "nfpcore/nfp_sync.h" #include "nfp_net_ctrl.h" -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v4 12/23] net/mana: include used network headers 2026-08-06 5:08 ` [PATCH v4 00/23] ethdev: refactor remaining uses of flow director Stephen Hemminger ` (10 preceding siblings ...) 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 ` Stephen Hemminger 2026-08-06 5:09 ` [PATCH v4 13/23] node: get UDP header Stephen Hemminger ` (10 subsequent siblings) 22 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-06 5:09 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Long Li, Wei Hu This driver was getting definition of IP, UDP, and TCP headers implicitly via rte_ethdev.h. That will be changing so instead include the required headers directly. Use include-what-you-use (iwyu) to add headers that are being used in this driver to avoid future issues. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Reviewed-by: Long Li <longli@microsoft.com> --- drivers/net/mana/mana.c | 26 +++++++++++++++++++++++--- drivers/net/mana/tx.c | 3 +++ 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/drivers/net/mana/mana.c b/drivers/net/mana/mana.c index 0b72f711a1..89f6033517 100644 --- a/drivers/net/mana/mana.c +++ b/drivers/net/mana/mana.c @@ -2,24 +2,44 @@ * Copyright 2022 Microsoft Corporation */ +#include <stdio.h> +#include <stdlib.h> #include <unistd.h> #include <dirent.h> #include <fcntl.h> +#include <errno.h> +#include <time.h> +#include <string.h> +#include <inttypes.h> #include <sys/mman.h> +#include <sys/socket.h> #include <sys/ioctl.h> #include <net/if.h> +#include <netinet/in.h> #include <ethdev_driver.h> #include <ethdev_pci.h> -#include <rte_kvargs.h> +#include <rte_atomic.h> +#include <rte_debug.h> +#include <rte_dev.h> +#include <rte_devargs.h> +#include <rte_eal.h> #include <rte_eal_paging.h> +#include <rte_errno.h> +#include <rte_ether.h> +#include <rte_interrupts.h> +#include <rte_kvargs.h> +#include <rte_malloc.h> +#include <rte_mbuf.h> +#include <rte_memory.h> +#include <rte_memzone.h> +#include <rte_pause.h> #include <rte_pci.h> +#include <rte_spinlock.h> #include <infiniband/verbs.h> #include <infiniband/manadv.h> -#include <assert.h> - #include "mana.h" /* Shared memory between primary/secondary processes, per driver */ diff --git a/drivers/net/mana/tx.c b/drivers/net/mana/tx.c index 10f2212b5d..9517b033dc 100644 --- a/drivers/net/mana/tx.c +++ b/drivers/net/mana/tx.c @@ -3,6 +3,9 @@ */ #include <ethdev_driver.h> +#include <rte_ip.h> +#include <rte_udp.h> +#include <rte_tcp.h> #include <infiniband/verbs.h> #include <infiniband/manadv.h> -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v4 13/23] node: get UDP header 2026-08-06 5:08 ` [PATCH v4 00/23] ethdev: refactor remaining uses of flow director Stephen Hemminger ` (11 preceding siblings ...) 2026-08-06 5:09 ` [PATCH v4 12/23] net/mana: include used network headers Stephen Hemminger @ 2026-08-06 5:09 ` Stephen Hemminger 2026-08-06 5:09 ` [PATCH v4 14/23] net/rnp: include network headers Stephen Hemminger ` (9 subsequent siblings) 22 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-06 5:09 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Nithin Dabilpuram, Pavan Nikhilesh This library was getting UDP header indirectly via rte_ethdev.h Use iwyu to update includes to match usage. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- lib/node/udp4_input.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/node/udp4_input.c b/lib/node/udp4_input.c index 5a74e28c85..02a8284982 100644 --- a/lib/node/udp4_input.c +++ b/lib/node/udp4_input.c @@ -2,20 +2,21 @@ * Copyright(C) 2023 Marvell International Ltd. */ -#include <arpa/inet.h> -#include <sys/socket.h> +#include <stdio.h> +#include <stdint.h> #include <eal_export.h> -#include <rte_ethdev.h> +#include <rte_common.h> +#include <rte_byteorder.h> +#include <rte_errno.h> #include <rte_ether.h> #include <rte_graph.h> -#include <rte_graph_worker.h> -#include <rte_ip.h> -#include <rte_lpm.h> #include <rte_hash.h> -#include <rte_fbk_hash.h> +#include <rte_ip.h> #include <rte_jhash.h> -#include <rte_hash_crc.h> +#include <rte_log.h> +#include <rte_memcpy.h> +#include <rte_udp.h> #include "rte_node_udp4_input_api.h" -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v4 14/23] net/rnp: include network headers 2026-08-06 5:08 ` [PATCH v4 00/23] ethdev: refactor remaining uses of flow director Stephen Hemminger ` (12 preceding siblings ...) 2026-08-06 5:09 ` [PATCH v4 13/23] node: get UDP header Stephen Hemminger @ 2026-08-06 5:09 ` Stephen Hemminger 2026-08-06 5:09 ` [PATCH v4 15/23] net/r8169: get " Stephen Hemminger ` (8 subsequent siblings) 22 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-06 5:09 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Wenbo Cao The driver was getting definition of standard network protocol headers indirectly from rte_ethdev.h. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- drivers/net/rnp/rnp_rxtx.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/rnp/rnp_rxtx.c b/drivers/net/rnp/rnp_rxtx.c index 81e8c6ba44..93a3372e5a 100644 --- a/drivers/net/rnp/rnp_rxtx.c +++ b/drivers/net/rnp/rnp_rxtx.c @@ -8,6 +8,12 @@ #include <rte_memzone.h> #include <rte_mbuf.h> #include <rte_malloc.h> +#include <rte_vxlan.h> +#include <rte_ip.h> +#include <rte_gre.h> +#include <rte_udp.h> +#include <rte_tcp.h> +#include <rte_sctp.h> #include "base/rnp_bdq_if.h" #include "base/rnp_dma_regs.h" -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v4 15/23] net/r8169: get network headers 2026-08-06 5:08 ` [PATCH v4 00/23] ethdev: refactor remaining uses of flow director Stephen Hemminger ` (13 preceding siblings ...) 2026-08-06 5:09 ` [PATCH v4 14/23] net/rnp: include network headers Stephen Hemminger @ 2026-08-06 5:09 ` Stephen Hemminger 2026-08-06 5:09 ` [PATCH v4 16/23] net/ngbe: include network protocol headers Stephen Hemminger ` (7 subsequent siblings) 22 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-06 5:09 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Howard Wang, Chunhao Lin, Xing Wang, Javen Xu This driver was getting network protocol headers indirectly via rte_ethdev.h. Use iwyu to update to full list of includes. Replace POSIX/libc byte swap with equivalent DPDK function. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- drivers/net/r8169/r8169_rxtx.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/drivers/net/r8169/r8169_rxtx.c b/drivers/net/r8169/r8169_rxtx.c index 00de0471f4..5786624e27 100644 --- a/drivers/net/r8169/r8169_rxtx.c +++ b/drivers/net/r8169/r8169_rxtx.c @@ -5,21 +5,28 @@ #include <stdio.h> #include <errno.h> #include <stdint.h> - -#include <rte_eal.h> +#include <stdbool.h> +#include <string.h> #include <rte_common.h> -#include <rte_interrupts.h> +#include <rte_atomic.h> #include <rte_byteorder.h> #include <rte_debug.h> -#include <rte_pci.h> +#include <rte_log.h> #include <bus_pci_driver.h> #include <rte_ether.h> +#include <rte_ethdev.h> #include <ethdev_driver.h> #include <ethdev_pci.h> -#include <rte_memory.h> +#include <rte_bitops.h> +#include <rte_memzone.h> #include <rte_malloc.h> +#include <rte_mbuf.h> +#include <rte_prefetch.h> +#include <rte_random.h> +#include <rte_stdatomic.h> #include <dev_driver.h> +#include <rte_udp.h> #include "r8169_ethdev.h" #include "r8169_hw.h" @@ -1535,7 +1542,7 @@ rtl8125_get_patch_pad_len(struct rte_mbuf *tx_pkt) if (trans_data_len > 3 && trans_data_len < MIN_PATCH_LENGTH) { udp_hdr = rte_pktmbuf_mtod_offset(tx_pkt, struct rte_udp_hdr *, l4_offset); - dest_port = ntohs(udp_hdr->dst_port); + dest_port = rte_be_to_cpu_16(udp_hdr->dst_port); if (dest_port == 0x13f || dest_port == 0x140) { pad_len = MIN_PATCH_LENGTH - trans_data_len; goto out; -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v4 16/23] net/ngbe: include network protocol headers 2026-08-06 5:08 ` [PATCH v4 00/23] ethdev: refactor remaining uses of flow director Stephen Hemminger ` (14 preceding siblings ...) 2026-08-06 5:09 ` [PATCH v4 15/23] net/r8169: get " Stephen Hemminger @ 2026-08-06 5:09 ` Stephen Hemminger 2026-08-06 5:09 ` [PATCH v4 17/23] examples: include network headers Stephen Hemminger ` (6 subsequent siblings) 22 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-06 5:09 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Jiawen Wu, Zaiyu Wang Do not depend on network protocol headers getting included via rte_ethdev.h. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- drivers/net/ngbe/ngbe_rxtx.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ngbe/ngbe_rxtx.c b/drivers/net/ngbe/ngbe_rxtx.c index a1389de9c0..fee984c396 100644 --- a/drivers/net/ngbe/ngbe_rxtx.c +++ b/drivers/net/ngbe/ngbe_rxtx.c @@ -11,6 +11,10 @@ #include <rte_malloc.h> #include <rte_net.h> #include <rte_vect.h> +#include <rte_ip.h> +#include <rte_udp.h> +#include <rte_tcp.h> +#include <rte_sctp.h> #include "ngbe_logs.h" #include "base/ngbe.h" -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v4 17/23] examples: include network headers 2026-08-06 5:08 ` [PATCH v4 00/23] ethdev: refactor remaining uses of flow director Stephen Hemminger ` (15 preceding siblings ...) 2026-08-06 5:09 ` [PATCH v4 16/23] net/ngbe: include network protocol headers Stephen Hemminger @ 2026-08-06 5:09 ` Stephen Hemminger 2026-08-06 5:09 ` [PATCH v4 18/23] net/mlx5: include rte_flow as needed Stephen Hemminger ` (5 subsequent siblings) 22 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-06 5:09 UTC (permalink / raw) To: dev Cc: Stephen Hemminger, Akhil Goyal, Jerin Jacob, Kiran Kumar K, Nithin Dabilpuram, Zhirun Yan Don't depend on network protocol headers getting indirectly included via rte_ethdev.h. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- examples/l2fwd-macsec/main.c | 2 ++ examples/l3fwd-graph/main.c | 1 + examples/l3fwd/l3fwd.h | 2 ++ 3 files changed, 5 insertions(+) diff --git a/examples/l2fwd-macsec/main.c b/examples/l2fwd-macsec/main.c index 059f8a2170..e07769bd57 100644 --- a/examples/l2fwd-macsec/main.c +++ b/examples/l2fwd-macsec/main.c @@ -33,9 +33,11 @@ #include <rte_debug.h> #include <rte_ether.h> #include <rte_ethdev.h> +#include <rte_flow.h> #include <rte_mempool.h> #include <rte_mbuf.h> #include <rte_security.h> +#include <rte_macsec.h> #include <rte_string_fns.h> static volatile bool force_quit; diff --git a/examples/l3fwd-graph/main.c b/examples/l3fwd-graph/main.c index 5f89286dce..79dee4d103 100644 --- a/examples/l3fwd-graph/main.c +++ b/examples/l3fwd-graph/main.c @@ -36,6 +36,7 @@ #include <rte_per_lcore.h> #include <rte_string_fns.h> #include <rte_vect.h> +#include <rte_ip.h> #include <cmdline_parse.h> #include <cmdline_parse_etheraddr.h> diff --git a/examples/l3fwd/l3fwd.h b/examples/l3fwd/l3fwd.h index 349fc37c79..db7b746f59 100644 --- a/examples/l3fwd/l3fwd.h +++ b/examples/l3fwd/l3fwd.h @@ -8,6 +8,8 @@ #include <rte_ethdev.h> #include <rte_vect.h> #include <rte_acl.h> +#include <rte_ip.h> + #define DO_RFC_1812_CHECKS -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v4 18/23] net/mlx5: include rte_flow as needed 2026-08-06 5:08 ` [PATCH v4 00/23] ethdev: refactor remaining uses of flow director Stephen Hemminger ` (16 preceding siblings ...) 2026-08-06 5:09 ` [PATCH v4 17/23] examples: include network headers Stephen Hemminger @ 2026-08-06 5:09 ` Stephen Hemminger 2026-08-06 5:09 ` [PATCH v4 19/23] net/sfc: include rte_flow Stephen Hemminger ` (4 subsequent siblings) 22 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-06 5:09 UTC (permalink / raw) To: dev Cc: Stephen Hemminger, Dariusz Sosnowski, Viacheslav Ovsiienko, Bing Zhao, Ori Kam, Suanming Mou, Matan Azrad The driver was getting rte_flow.h included indirectly via rte_ethdev.h. This will change in future and driver should include it where needed. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- drivers/net/mlx5/mlx5_ethdev.c | 1 + drivers/net/mlx5/mlx5_flow.h | 1 + drivers/net/mlx5/mlx5_txq.c | 1 + drivers/net/mlx5/mlx5_utils.c | 1 + drivers/net/mlx5/mlx5_utils.h | 1 + 5 files changed, 5 insertions(+) diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c index 8160d10e7e..c3d8e1b04f 100644 --- a/drivers/net/mlx5/mlx5_ethdev.c +++ b/drivers/net/mlx5/mlx5_ethdev.c @@ -19,6 +19,7 @@ #include <rte_string_fns.h> #include <rte_rwlock.h> #include <rte_cycles.h> +#include <rte_flow.h> #include <mlx5_malloc.h> diff --git a/drivers/net/mlx5/mlx5_flow.h b/drivers/net/mlx5/mlx5_flow.h index 3415b4722e..0da50fab85 100644 --- a/drivers/net/mlx5/mlx5_flow.h +++ b/drivers/net/mlx5/mlx5_flow.h @@ -12,6 +12,7 @@ #include <rte_alarm.h> #include <rte_mtr.h> +#include <rte_flow.h> #include <mlx5_glue.h> #include <mlx5_prm.h> diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c index f9b254c6c5..f0b7b2d032 100644 --- a/drivers/net/mlx5/mlx5_txq.c +++ b/drivers/net/mlx5/mlx5_txq.c @@ -18,6 +18,7 @@ #include <rte_common.h> #include <rte_eal_paging.h> #include <rte_bitops.h> +#include <rte_flow.h> #include <mlx5_common.h> #include <mlx5_common_mr.h> diff --git a/drivers/net/mlx5/mlx5_utils.c b/drivers/net/mlx5/mlx5_utils.c index 606743c4b7..12820054ff 100644 --- a/drivers/net/mlx5/mlx5_utils.c +++ b/drivers/net/mlx5/mlx5_utils.c @@ -3,6 +3,7 @@ */ #include <rte_malloc.h> +#include <rte_flow.h> #include <mlx5_malloc.h> diff --git a/drivers/net/mlx5/mlx5_utils.h b/drivers/net/mlx5/mlx5_utils.h index 9ab79c8ad5..19d03145a6 100644 --- a/drivers/net/mlx5/mlx5_utils.h +++ b/drivers/net/mlx5/mlx5_utils.h @@ -16,6 +16,7 @@ #include <rte_rwlock.h> #include <rte_memory.h> #include <rte_bitmap.h> +#include <rte_flow.h> #include <mlx5_common.h> #include <mlx5_common_utils.h> -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v4 19/23] net/sfc: include rte_flow 2026-08-06 5:08 ` [PATCH v4 00/23] ethdev: refactor remaining uses of flow director Stephen Hemminger ` (17 preceding siblings ...) 2026-08-06 5:09 ` [PATCH v4 18/23] net/mlx5: include rte_flow as needed Stephen Hemminger @ 2026-08-06 5:09 ` Stephen Hemminger 2026-08-06 5:09 ` [PATCH v4 20/23] net/intel/common: include network headers Stephen Hemminger ` (3 subsequent siblings) 22 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-06 5:09 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Andrew Rybchenko This driver was depending on rte_ethdev.h doing inclusion of rte_flow.h. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- drivers/net/sfc/sfc_dp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/sfc/sfc_dp.c b/drivers/net/sfc/sfc_dp.c index 7e2a20e4dc..c867c2c2ff 100644 --- a/drivers/net/sfc/sfc_dp.c +++ b/drivers/net/sfc/sfc_dp.c @@ -15,6 +15,7 @@ #include <rte_ethdev.h> #include <rte_log.h> #include <rte_mbuf_dyn.h> +#include <rte_flow.h> #include "efx.h" -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v4 20/23] net/intel/common: include network headers 2026-08-06 5:08 ` [PATCH v4 00/23] ethdev: refactor remaining uses of flow director Stephen Hemminger ` (18 preceding siblings ...) 2026-08-06 5:09 ` [PATCH v4 19/23] net/sfc: include rte_flow Stephen Hemminger @ 2026-08-06 5:09 ` Stephen Hemminger 2026-08-06 5:09 ` [PATCH v4 21/23] net/enetfec: add missing sys/types.h include Stephen Hemminger ` (2 subsequent siblings) 22 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-06 5:09 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Bruce Richardson This file was depending on network protocol headers getting included via rte_ethdev.h -> rte_flow.h. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- drivers/net/intel/common/tx_scalar.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/intel/common/tx_scalar.h b/drivers/net/intel/common/tx_scalar.h index 11ab6c08fc..dcb2ea5542 100644 --- a/drivers/net/intel/common/tx_scalar.h +++ b/drivers/net/intel/common/tx_scalar.h @@ -8,6 +8,9 @@ #include <stdint.h> #include <rte_io.h> #include <rte_byteorder.h> +#include <rte_udp.h> +#include <rte_tcp.h> +#include <rte_sctp.h> /* depends on common Tx definitions. */ #include "tx.h" -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v4 21/23] net/enetfec: add missing sys/types.h include 2026-08-06 5:08 ` [PATCH v4 00/23] ethdev: refactor remaining uses of flow director Stephen Hemminger ` (19 preceding siblings ...) 2026-08-06 5:09 ` [PATCH v4 20/23] net/intel/common: include network headers Stephen Hemminger @ 2026-08-06 5:09 ` 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 22 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-06 5:09 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Apeksha Gupta, Sachin Saxena The enet_regs.h header uses BSD types 'uint' and 'ushort' which were previously available through indirect inclusion via: rte_ethdev.h -> rte_flow.h -> rte_ip.h -> rte_ip[46].h -> sys/types.h After changes to reduce rte_ethdev.h header dependencies, this indirect inclusion no longer occurs, causing build failures. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- drivers/net/enetfec/enet_regs.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/enetfec/enet_regs.h b/drivers/net/enetfec/enet_regs.h index c9400957f8..a834fa5889 100644 --- a/drivers/net/enetfec/enet_regs.h +++ b/drivers/net/enetfec/enet_regs.h @@ -5,6 +5,8 @@ #ifndef __ENETFEC_REGS_H #define __ENETFEC_REGS_H +#include <sys/types.h> + /* Ethernet receive use control and status of buffer descriptor */ #define RX_BD_TR ((ushort)0x0001) /* Truncated */ -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v4 22/23] ethdev, drivers: isolate flow director 2026-08-06 5:08 ` [PATCH v4 00/23] ethdev: refactor remaining uses of flow director Stephen Hemminger ` (20 preceding siblings ...) 2026-08-06 5:09 ` [PATCH v4 21/23] net/enetfec: add missing sys/types.h include Stephen Hemminger @ 2026-08-06 5:09 ` Stephen Hemminger 2026-08-06 5:09 ` [PATCH v4 23/23] doc: add release note about rte_ethdev changes Stephen Hemminger 22 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-06 5:09 UTC (permalink / raw) To: dev Cc: Stephen Hemminger, Xiaoyun Wang, Feifei Wang, Praveen Shetty, Bruce Richardson, Vladimir Medvedkin, Anatoly Burakov, Rosen Xu, Dimon Zhao, Leon Yu, Sam Chen, Jiawen Wu, Zaiyu Wang, Thomas Monjalon, Andrew Rybchenko There are leftover bits of legacy flow director that are still being used by drivers. Move the definitions contained in ethdev_driver.h and rte_eth_ctrl.h into a single file ethdev_fdir.h and only include it in the drivers that require it. Change rte_ethdev.h to include the headers required which it was previously getting from rte_eth_ctrl.h -> rte_flow.h. Since ethdev_fdir.h is internal for driver SDK only it does not have to include as many secondary headers. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- doc/api/doxy-api-index.md | 1 - drivers/net/hinic/hinic_pmd_ethdev.h | 2 + drivers/net/hinic3/hinic3_ethdev.h | 1 + drivers/net/intel/cpfl/cpfl_flow_engine_fxp.c | 2 +- drivers/net/intel/e1000/e1000_ethdev.h | 1 + drivers/net/intel/e1000/igc_filter.h | 2 +- drivers/net/intel/i40e/i40e_ethdev.h | 1 + drivers/net/intel/iavf/iavf_fsub.c | 2 +- drivers/net/intel/iavf/iavf_hash.c | 2 +- drivers/net/intel/ice/ice_acl_filter.c | 2 +- drivers/net/intel/ice/ice_ethdev.h | 2 + drivers/net/intel/ice/ice_generic_flow.c | 1 + drivers/net/intel/ice/ice_hash.c | 2 +- drivers/net/intel/ice/ice_switch_filter.c | 2 +- drivers/net/intel/ipn3ke/ipn3ke_flow.c | 2 +- drivers/net/intel/ixgbe/ixgbe_ethdev.h | 1 + drivers/net/nbl/nbl_include/nbl_include.h | 1 + drivers/net/txgbe/txgbe_ethdev.h | 1 + lib/ethdev/ethdev_driver.h | 36 ----------- lib/ethdev/{rte_eth_ctrl.h => ethdev_fdir.h} | 62 +++++++++++++++---- lib/ethdev/meson.build | 2 +- lib/ethdev/rte_ethdev.h | 13 +--- 22 files changed, 71 insertions(+), 70 deletions(-) rename lib/ethdev/{rte_eth_ctrl.h => ethdev_fdir.h} (90%) diff --git a/doc/api/doxy-api-index.md b/doc/api/doxy-api-index.md index 9296042119..ac8314e908 100644 --- a/doc/api/doxy-api-index.md +++ b/doc/api/doxy-api-index.md @@ -11,7 +11,6 @@ The public API headers are grouped by topics: - **device**: [dev](@ref rte_dev.h), [ethdev](@ref rte_ethdev.h), - [ethctrl](@ref rte_eth_ctrl.h), [rte_flow](@ref rte_flow.h), [rte_tm](@ref rte_tm.h), [rte_mtr](@ref rte_mtr.h), diff --git a/drivers/net/hinic/hinic_pmd_ethdev.h b/drivers/net/hinic/hinic_pmd_ethdev.h index 8e6251f69f..10285ce814 100644 --- a/drivers/net/hinic/hinic_pmd_ethdev.h +++ b/drivers/net/hinic/hinic_pmd_ethdev.h @@ -7,7 +7,9 @@ #include <rte_ethdev.h> #include <rte_ethdev_core.h> +#include <rte_flow.h> #include <ethdev_driver.h> +#include <ethdev_fdir.h> #include "base/hinic_compat.h" #include "base/hinic_pmd_cfg.h" diff --git a/drivers/net/hinic3/hinic3_ethdev.h b/drivers/net/hinic3/hinic3_ethdev.h index 9061e2b217..515ba044a1 100644 --- a/drivers/net/hinic3/hinic3_ethdev.h +++ b/drivers/net/hinic3/hinic3_ethdev.h @@ -7,6 +7,7 @@ #include <rte_ethdev.h> #include <rte_ethdev_core.h> +#include <ethdev_fdir.h> #include "hinic3_fdir.h" diff --git a/drivers/net/intel/cpfl/cpfl_flow_engine_fxp.c b/drivers/net/intel/cpfl/cpfl_flow_engine_fxp.c index f42156e28f..977036bec5 100644 --- a/drivers/net/intel/cpfl/cpfl_flow_engine_fxp.c +++ b/drivers/net/intel/cpfl/cpfl_flow_engine_fxp.c @@ -16,7 +16,7 @@ #include <rte_ether.h> #include <rte_log.h> #include <rte_malloc.h> -#include <rte_eth_ctrl.h> +#include <ethdev_fdir.h> #include <rte_tailq.h> #include <rte_flow_driver.h> #include <rte_flow.h> diff --git a/drivers/net/intel/e1000/e1000_ethdev.h b/drivers/net/intel/e1000/e1000_ethdev.h index 0907c7c259..da4dacc7d4 100644 --- a/drivers/net/intel/e1000/e1000_ethdev.h +++ b/drivers/net/intel/e1000/e1000_ethdev.h @@ -9,6 +9,7 @@ #include <sys/queue.h> #include <rte_flow.h> +#include <ethdev_fdir.h> #include <rte_time.h> #include <rte_pci.h> diff --git a/drivers/net/intel/e1000/igc_filter.h b/drivers/net/intel/e1000/igc_filter.h index 2b7e6b619a..d1e098e5bb 100644 --- a/drivers/net/intel/e1000/igc_filter.h +++ b/drivers/net/intel/e1000/igc_filter.h @@ -8,7 +8,7 @@ #include <rte_ethdev.h> #include <rte_ethdev_core.h> #include <ethdev_driver.h> -#include <rte_eth_ctrl.h> +#include <ethdev_fdir.h> #include "igc_ethdev.h" diff --git a/drivers/net/intel/i40e/i40e_ethdev.h b/drivers/net/intel/i40e/i40e_ethdev.h index 3968bfd267..c03eaab946 100644 --- a/drivers/net/intel/i40e/i40e_ethdev.h +++ b/drivers/net/intel/i40e/i40e_ethdev.h @@ -13,6 +13,7 @@ #include <rte_hash.h> #include <rte_flow.h> #include <rte_flow_driver.h> +#include <ethdev_fdir.h> #include <rte_tm_driver.h> #include "rte_pmd_i40e.h" #include <rte_vect.h> diff --git a/drivers/net/intel/iavf/iavf_fsub.c b/drivers/net/intel/iavf/iavf_fsub.c index 19ae0e2dc2..745089c1e4 100644 --- a/drivers/net/intel/iavf/iavf_fsub.c +++ b/drivers/net/intel/iavf/iavf_fsub.c @@ -14,7 +14,7 @@ #include <rte_ethdev.h> #include <rte_log.h> #include <rte_malloc.h> -#include <rte_eth_ctrl.h> +#include <ethdev_fdir.h> #include <rte_tailq.h> #include <rte_flow_driver.h> #include <rte_flow.h> diff --git a/drivers/net/intel/iavf/iavf_hash.c b/drivers/net/intel/iavf/iavf_hash.c index 9515094402..38526eb7e6 100644 --- a/drivers/net/intel/iavf/iavf_hash.c +++ b/drivers/net/intel/iavf/iavf_hash.c @@ -15,7 +15,7 @@ #include <ethdev_driver.h> #include <rte_log.h> #include <rte_malloc.h> -#include <rte_eth_ctrl.h> +#include <ethdev_fdir.h> #include <rte_tailq.h> #include <rte_flow_driver.h> diff --git a/drivers/net/intel/ice/ice_acl_filter.c b/drivers/net/intel/ice/ice_acl_filter.c index 30ff1254c9..08f44e26cf 100644 --- a/drivers/net/intel/ice/ice_acl_filter.c +++ b/drivers/net/intel/ice/ice_acl_filter.c @@ -13,9 +13,9 @@ #include <rte_debug.h> #include <rte_ether.h> #include <ethdev_driver.h> +#include <ethdev_fdir.h> #include <rte_log.h> #include <rte_malloc.h> -#include <rte_eth_ctrl.h> #include <rte_tailq.h> #include <rte_flow_driver.h> #include <rte_flow.h> diff --git a/drivers/net/intel/ice/ice_ethdev.h b/drivers/net/intel/ice/ice_ethdev.h index 7ee3ea8a70..fe0dc19c98 100644 --- a/drivers/net/intel/ice/ice_ethdev.h +++ b/drivers/net/intel/ice/ice_ethdev.h @@ -8,8 +8,10 @@ #include <rte_compat.h> #include <rte_kvargs.h> #include <rte_time.h> +#include <rte_flow.h> #include <ethdev_driver.h> +#include <ethdev_fdir.h> #include <rte_tm_driver.h> #include <rte_vect.h> diff --git a/drivers/net/intel/ice/ice_generic_flow.c b/drivers/net/intel/ice/ice_generic_flow.c index 76b3800545..9c81c3aea8 100644 --- a/drivers/net/intel/ice/ice_generic_flow.c +++ b/drivers/net/intel/ice/ice_generic_flow.c @@ -13,6 +13,7 @@ #include <rte_ether.h> #include <ethdev_driver.h> +#include <ethdev_fdir.h> #include <rte_hexdump.h> #include <rte_malloc.h> #include <rte_tailq.h> diff --git a/drivers/net/intel/ice/ice_hash.c b/drivers/net/intel/ice/ice_hash.c index 7a9a4f1a04..5158a4f886 100644 --- a/drivers/net/intel/ice/ice_hash.c +++ b/drivers/net/intel/ice/ice_hash.c @@ -16,7 +16,7 @@ #include <ethdev_driver.h> #include <rte_log.h> #include <rte_malloc.h> -#include <rte_eth_ctrl.h> +#include <ethdev_fdir.h> #include <rte_tailq.h> #include <rte_flow_driver.h> diff --git a/drivers/net/intel/ice/ice_switch_filter.c b/drivers/net/intel/ice/ice_switch_filter.c index 6f5af03f6a..cbc3df6d7c 100644 --- a/drivers/net/intel/ice/ice_switch_filter.c +++ b/drivers/net/intel/ice/ice_switch_filter.c @@ -15,7 +15,7 @@ #include <ethdev_driver.h> #include <rte_log.h> #include <rte_malloc.h> -#include <rte_eth_ctrl.h> +#include <ethdev_fdir.h> #include <rte_tailq.h> #include <rte_flow_driver.h> #include <rte_flow.h> diff --git a/drivers/net/intel/ipn3ke/ipn3ke_flow.c b/drivers/net/intel/ipn3ke/ipn3ke_flow.c index 941d2921fb..47f4936bc6 100644 --- a/drivers/net/intel/ipn3ke/ipn3ke_flow.c +++ b/drivers/net/intel/ipn3ke/ipn3ke_flow.c @@ -16,7 +16,7 @@ #include <ethdev_driver.h> #include <rte_log.h> #include <rte_malloc.h> -#include <rte_eth_ctrl.h> +#include <ethdev_fdir.h> #include <rte_tailq.h> #include <rte_rawdev.h> #include <rte_rawdev_pmd.h> diff --git a/drivers/net/intel/ixgbe/ixgbe_ethdev.h b/drivers/net/intel/ixgbe/ixgbe_ethdev.h index c290f04611..68b54ae750 100644 --- a/drivers/net/intel/ixgbe/ixgbe_ethdev.h +++ b/drivers/net/intel/ixgbe/ixgbe_ethdev.h @@ -16,6 +16,7 @@ #include "ixgbe_bypass.h" #include "ixgbe_ipsec.h" #include <rte_flow.h> +#include <ethdev_fdir.h> #include <rte_time.h> #include <rte_hash.h> #include <rte_pci.h> diff --git a/drivers/net/nbl/nbl_include/nbl_include.h b/drivers/net/nbl/nbl_include/nbl_include.h index eeae6a3301..c1383e7b4e 100644 --- a/drivers/net/nbl/nbl_include/nbl_include.h +++ b/drivers/net/nbl/nbl_include/nbl_include.h @@ -27,6 +27,7 @@ #include <rte_alarm.h> #include <rte_ethdev.h> +#include <rte_flow.h> #include <ethdev_driver.h> #include <ethdev_pci.h> #include <bus_pci_driver.h> diff --git a/drivers/net/txgbe/txgbe_ethdev.h b/drivers/net/txgbe/txgbe_ethdev.h index c32c61d8bf..a48d710ab1 100644 --- a/drivers/net/txgbe/txgbe_ethdev.h +++ b/drivers/net/txgbe/txgbe_ethdev.h @@ -18,6 +18,7 @@ #include <rte_time.h> #include <rte_ethdev.h> #include <rte_ethdev_core.h> +#include <ethdev_fdir.h> #include <rte_hash.h> #include <rte_hash_crc.h> #include <bus_pci_driver.h> diff --git a/lib/ethdev/ethdev_driver.h b/lib/ethdev/ethdev_driver.h index 0f336f9567..2dc63cfa18 100644 --- a/lib/ethdev/ethdev_driver.h +++ b/lib/ethdev/ethdev_driver.h @@ -2365,42 +2365,6 @@ struct rte_eth_tunnel_filter_conf { uint16_t queue_id; /**< Queue assigned to if match */ }; -/** - * Memory space that can be configured to store Flow Director filters - * in the board memory. - */ -enum rte_eth_fdir_pballoc_type { - RTE_ETH_FDIR_PBALLOC_64K = 0, /**< 64k. */ - RTE_ETH_FDIR_PBALLOC_128K, /**< 128k. */ - RTE_ETH_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_MODE_NONE, the pballoc value is ignored. - */ -struct rte_eth_fdir_conf { - enum rte_fdir_mode mode; /**< Flow Director mode. */ - enum rte_eth_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; - /** Flex payload configuration. */ - struct rte_eth_fdir_flex_conf flex_conf; -}; - /** * @internal * Fetch from the driver what kind of configuration must be restored by ethdev layer, diff --git a/lib/ethdev/rte_eth_ctrl.h b/lib/ethdev/ethdev_fdir.h similarity index 90% rename from lib/ethdev/rte_eth_ctrl.h rename to lib/ethdev/ethdev_fdir.h index 9ec3f5eff9..a304efcf31 100644 --- a/lib/ethdev/rte_eth_ctrl.h +++ b/lib/ethdev/ethdev_fdir.h @@ -1,24 +1,23 @@ /* SPDX-License-Identifier: BSD-3-Clause - * Copyright(c) 2010-2015 Intel Corporation + * Copyright(c) 2010-2017 Intel Corporation */ -#ifndef _RTE_ETH_CTRL_H_ -#define _RTE_ETH_CTRL_H_ - -#include <stdint.h> -#include <rte_common.h> -#include <rte_ether.h> -#include "rte_flow.h" -#include "rte_ethdev.h" +#ifndef _ETHDEV_FDIR_H_ +#define _ETHDEV_FDIR_H_ /** - * @deprecated Please use rte_flow API instead of this legacy one. * @file * - * Ethernet device features and related data structures used - * by control APIs should be defined in this file. + * Ethernet device definitions for legacy Flow Director support. + * This API is maintained only for existing driver compatibility. + * New drivers should use the rte_flow API (rte_flow.h) instead. + * + * This header is part of the driver SDK and is installed for drivers + * that still depend on legacy FDIR structures. Do not use in new drivers. */ +#include <rte_flow.h> + /** * Define all structures for ntuple Filter type. */ @@ -483,4 +482,41 @@ struct rte_eth_fdir_stats { uint32_t best_cnt; /**< Number of filters in best effort spaces. */ }; -#endif /* _RTE_ETH_CTRL_H_ */ + +/** + * Memory space that can be configured to store Flow Director filters + * in the board memory. + */ +enum rte_eth_fdir_pballoc_type { + RTE_ETH_FDIR_PBALLOC_64K = 0, /**< 64k. */ + RTE_ETH_FDIR_PBALLOC_128K, /**< 128k. */ + RTE_ETH_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_MODE_NONE, the pballoc value is ignored. + */ +struct rte_eth_fdir_conf { + enum rte_fdir_mode mode; /**< Flow Director mode. */ + enum rte_eth_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; + /** Flex payload configuration. */ + struct rte_eth_fdir_flex_conf flex_conf; +}; + +#endif /* _ETHDEV_FDIR_H_ */ diff --git a/lib/ethdev/meson.build b/lib/ethdev/meson.build index 8ba6c708a2..3d556f8b7f 100644 --- a/lib/ethdev/meson.build +++ b/lib/ethdev/meson.build @@ -32,11 +32,11 @@ headers = files( indirect_headers += files( 'rte_ethdev_core.h', - 'rte_eth_ctrl.h', ) driver_sdk_headers += files( 'ethdev_driver.h', + 'ethdev_fdir.h', 'ethdev_pci.h', 'ethdev_vdev.h', 'rte_flow_driver.h', diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h index ee400b386f..7a17b81208 100644 --- a/lib/ethdev/rte_ethdev.h +++ b/lib/ethdev/rte_ethdev.h @@ -164,8 +164,10 @@ #include <rte_devargs.h> #include <rte_bitops.h> #include <rte_errno.h> +#include <rte_ether.h> #include <rte_common.h> #include <rte_config.h> +#include <rte_mbuf_history.h> #include <rte_power_intrinsics.h> #include "rte_ethdev_trace_fp.h" @@ -1505,17 +1507,6 @@ enum rte_eth_tunnel_type { RTE_ETH_TUNNEL_TYPE_MAX, }; -#ifdef __cplusplus -} -#endif - -/* Deprecated API file for rte_eth_dev_filter_* functions */ -#include "rte_eth_ctrl.h" - -#ifdef __cplusplus -extern "C" { -#endif - /** * UDP tunneling configuration. * -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
* [PATCH v4 23/23] doc: add release note about rte_ethdev changes 2026-08-06 5:08 ` [PATCH v4 00/23] ethdev: refactor remaining uses of flow director Stephen Hemminger ` (21 preceding siblings ...) 2026-08-06 5:09 ` [PATCH v4 22/23] ethdev, drivers: isolate flow director Stephen Hemminger @ 2026-08-06 5:09 ` Stephen Hemminger 22 siblings, 0 replies; 76+ messages in thread From: Stephen Hemminger @ 2026-08-06 5:09 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger The changes to rte_ethdev are visible to applications, which may need to include some network headers directly. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> --- doc/guides/rel_notes/release_26_11.rst | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/doc/guides/rel_notes/release_26_11.rst b/doc/guides/rel_notes/release_26_11.rst index c8cc86295d..3749cbd456 100644 --- a/doc/guides/rel_notes/release_26_11.rst +++ b/doc/guides/rel_notes/release_26_11.rst @@ -77,6 +77,21 @@ Removed Items ``rte_rib6_is_equal`` * table: ``RTE_LPM_IPV6_ADDR_SIZE`` +* Removed legacy flow director related API and files. + + * Removed experimental APIs in: + + * ixgbe: ``rte_pmd_ixgbe_get_fdir_info``, ``rte_pmd_ixgbe_get_fdir_stats`` + * i40e: ``rte_pmd_i40e_get_fdir_info``, ``rte_pmd_i40e_get_fdir_stats`` + + * Removed testpmd commands: + + The ``fdir`` option in ``show port`` and ``clear port`` were removed. + + * Removed file ``rte_eth_ctrl.h``. + Drivers that still require FDIR related structures now use ``ethdev_fdir.h`` + in driver SDK. + API Changes ----------- @@ -93,6 +108,15 @@ API Changes Also, make sure to start the actual text at the margin. ======================================================= +* **Changed ethdev include files.** + + * Dropped inclusion of ``rte_flow.h`` in ``rte_ethdev.h``. + Applications using flow API should include it directly. + * Network headers ``rte_ip.h``, ``rte_udp.h``, ``rte_tcp.h`` and ``rte_sctp.h`` + are no longer indirectly included by ``rte_ethdev.h``. + Applications should include network headers as needed. + * Legacy flow director definitions are no longer included by ``rte_ethdev.h``. + ABI Changes ----------- -- 2.53.0 ^ permalink raw reply related [flat|nested] 76+ messages in thread
end of thread, other threads:[~2026-08-06 6:13 UTC | newest] Thread overview: 76+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 ` [PATCH v4 03/23] net/ixgbe: remove experimental FDIR API Stephen Hemminger 2026-08-06 5:08 ` [PATCH v4 04/23] net/i40e: " 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
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox