ethdev: clean up legacy flow director
Subsystems (3)
v2 cover ethdev: clean up legacy flow director
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%)Signature · 1 line
2.53.0
PATCH v2 1/22 drivers/net: remove unused include in dpaa
rte_eth_ctrl.h is deprecated and its contents are not used here.
--- drivers/net/dpaa/dpaa_ptp.c | 1 - drivers/net/dpaa2/dpaa2_ptp.c | 1 - 2 files changed, 2 deletions(-)
drivers/net/dpaa/dpaa_ptp.c +0 -1
@@ -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>
drivers/net/dpaa2/dpaa2_ptp.c +0 -1
@@ -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>
Signature · 1 line
2.53.0
PATCH v2 2/22 ethdev: use DPDK byte order conversion
In reply to Stephen HemmingerDPDK 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.
--- lib/ethdev/sff_8472.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
lib/ethdev/sff_8472.c +2 -1
@@ -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; }
Signature · 1 line
2.53.0
PATCH v2 3/22 net/ixgbe: remove experimental FDIR API
In reply to Stephen HemmingerRemove the PMD specific flow director API from ixgbe. These APIs are experimental, therefore they can be removed without additional warnings.
--- 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(-)
drivers/net/intel/ixgbe/ixgbe_ethdev.h +0 -5
@@ -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
drivers/net/intel/ixgbe/ixgbe_fdir.c +0 -117
123 lines not on this page · raw message
drivers/net/intel/ixgbe/rte_pmd_ixgbe.c +0 -34
@@ -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 ; -}
drivers/net/intel/ixgbe/rte_pmd_ixgbe.h +0 -32
@@ -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_ */
Signature · 1 line
2.53.0
PATCH v2 4/22 net/i40e: remove experimental FDIR API
In reply to Stephen HemmingerRemove the flow director related private APIs in i40e. These APIs are experimental, therefore they can be removed without additional warnings.
--- 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(-)
drivers/net/intel/i40e/i40e_ethdev.c +2 -2
@@ -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] =
drivers/net/intel/i40e/i40e_ethdev.h +0 -4
@@ -1369,10 +1369,6 @@ enum i40e_filter_pctypeuint16_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);
drivers/net/intel/i40e/i40e_fdir.c +0 -140
146 lines not on this page · raw message
drivers/net/intel/i40e/i40e_flow.c +1 -2
@@ -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];
drivers/net/intel/i40e/rte_pmd_i40e.c +0 -34
@@ -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)
drivers/net/intel/i40e/rte_pmd_i40e.h +0 -33
@@ -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 *
Signature · 1 line
2.53.0
PATCH v2 5/22 app/testpmd: remove support for flow director
In reply to Stephen HemmingerThe 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.
--- 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(-)
app/test-pmd/cmdline.c +6 -15
@@ -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,
app/test-pmd/config.c +0 -163
169 lines not on this page · raw message
app/test-pmd/testpmd.h +0 -3
@@ -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);
doc/guides/testpmd_app_ug/testpmd_funcs.rst +0 -36
@@ -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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signature · 1 line
2.53.0
PATCH v2 6/22 net/gve: include IP, UDP and TCP headers
In reply to Stephen HemmingerThis 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.
--- drivers/net/gve/gve_ethdev.h | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/gve/gve_ethdev.h +3 -0
@@ -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"
Signature · 1 line
2.53.0
Re: [PATCH v2 06/22] net/gve: include IP, UDP and TCP headers
Quoted 7 lines · Stephen Hemminger
This driver was getting
rte_ip.h,rte_udp.handrte_tcp.himplicitly throughrte_ethdev.h->rte_eth_ctrl.h->rte_flow.h. Sincerte_eth_ctrl.his deprecated, better to not depend on that.Signed-off-by Stephen Hemminger <[email protected]>
Quoted 21 lines
--- drivers/net/gve/gve_ethdev.h | 3 +++ 1 file changed, 3 insertions(+)drivers/net/gve/gve_ethdev.h +3
-1@@ -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
PATCH v2 7/22 crypto/dpaa_sec: include UDP header
In reply to Stephen HemmingerThe driver was getting the UDP header definition indirectly via rte_ethdev.h. That will change, so include the header directly.
--- drivers/crypto/dpaa_sec/dpaa_sec.h | 2 ++ 1 file changed, 2 insertions(+)
drivers/crypto/dpaa_sec/dpaa_sec.h +2 -0
@@ -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 */
Signature · 1 line
2.53.0
PATCH v2 8/22 net/nfp: break implicit dependency on rte_eth_ctrl.h
In reply to Stephen HemmingerThis 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.
--- drivers/net/nfp/nfp_ethdev.c | 6 ++++-- drivers/net/nfp/nfp_net_common.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-)
drivers/net/nfp/nfp_ethdev.c +4 -2
@@ -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 ;
drivers/net/nfp/nfp_net_common.h +1 -0
@@ -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>
Signature · 1 line
2.53.0
PATCH v2 9/22 net/mana: include used network headers
In reply to Stephen HemmingerThis 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.
--- drivers/net/mana/mana.c | 2 ++ drivers/net/mana/tx.c | 3 +++ 2 files changed, 5 insertions(+)
drivers/net/mana/mana.c +2 -0
@@ -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>
drivers/net/mana/tx.c +3 -0
@@ -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>
Signature · 1 line
2.53.0
RE: [EXTERNAL] [PATCH v2 09/22] net/mana: include used network headers
Quoted 10 lines
-----Original Message-----
From: Stephen Hemminger <[email protected]>
Sent: Monday, August 3, 2026 9:52 AM
To: [email protected]
Cc: Stephen Hemminger <[email protected]>; Long Li <[email protected]>; Wei Hu <[email protected]>
Subject: [EXTERNAL] [PATCH v2 09/22] net/mana: include used network headers
Quoted 5 lines
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 <[email protected]>
Quoted 36 lines
--- drivers/net/mana/mana.c | 2 ++ drivers/net/mana/tx.c | 3 +++ 2 files changed, 5 insertions(+)drivers/net/mana/mana.c index renamed from drivers/net/mana/mana.c +0
-0
0b72f711a1..3870cb4a52100644drivers/net/mana/mana.c +2
-0@@ -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> drivers/net/mana/tx.c index renamed from drivers/net/mana/tx.c +0
-0
10f2212b5d..9517b033dc100644drivers/net/mana/tx.c +3
-1@@ -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
PATCH v2 10/22 gro: include headers directly
In reply to Stephen HemmingerThe gro library was getting headers such as VXLAN implicitly via rte_ethdev.h.
This will change, so include the needed headers directly.
--- 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(-)
lib/gro/gro_tcp4.c +1 -0
@@ -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"
lib/gro/gro_vxlan_tcp4.c +3 -1
@@ -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"
lib/gro/gro_vxlan_udp4.c +1 -0
@@ -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"
lib/gro/rte_gro.c +1 -0
@@ -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"
Signature · 1 line
2.53.0
PATCH v2 11/22 app/test: include headers directly
In reply to Stephen HemmingerThe 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.
--- 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(-)
app/test-eventdev/test_pipeline_common.h +1 -0
@@ -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>
app/test/test_bpf.c +13 -5
@@ -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 )) {
app/test/test_security_inline_macsec.c +2 -0
@@ -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"
app/test/test_security_inline_proto.c +1 -0
@@ -7,6 +7,7 @@#include <inttypes.h> #include <rte_ethdev.h> +#include <rte_flow.h> #include <rte_malloc.h> #include <rte_security.h>
Signature · 1 line
2.53.0
PATCH v2 12/22 node: get UDP header
In reply to Stephen HemmingerThis library was getting UDP header indirectly via rte_ethdev.h
--- lib/node/udp4_input.c | 1 + 1 file changed, 1 insertion(+)
lib/node/udp4_input.c +1 -0
@@ -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>
Signature · 1 line
2.53.0
PATCH v2 13/22 net/rnp: include network headers
In reply to Stephen HemmingerThe driver was getting definition of standard network protocol headers indirectly from rte_ethdev.h.
--- drivers/net/rnp/rnp_rxtx.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/net/rnp/rnp_rxtx.c +6 -0
@@ -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"
Signature · 1 line
2.53.0
PATCH v2 14/22 net/r8169: get network headers
In reply to Stephen HemmingerThis driver was getting network protocol headers indirectly via rte_ethdev.h.
--- drivers/net/r8169/r8169_rxtx.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/r8169/r8169_rxtx.c +3 -0
@@ -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"
Signature · 1 line
2.53.0
PATCH v2 15/22 net/ngbe: include network protocol headers
In reply to Stephen HemmingerDo not depend on network protocol headers getting included via rte_ethdev.h.
--- drivers/net/ngbe/ngbe_rxtx.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/ngbe/ngbe_rxtx.c +4 -0
@@ -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"
Signature · 1 line
2.53.0
PATCH v2 16/22 examples: include network headers
In reply to Stephen HemmingerDon't depend on network protocol headers getting indirectly included via rte_ethdev.h.
--- examples/l2fwd-macsec/main.c | 2 ++ examples/l3fwd-graph/main.c | 1 + examples/l3fwd/l3fwd.h | 2 ++ 3 files changed, 5 insertions(+)
examples/l2fwd-macsec/main.c +2 -0
@@ -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;
examples/l3fwd-graph/main.c +1 -0
@@ -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>
examples/l3fwd/l3fwd.h +2 -0
@@ -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
Signature · 1 line
2.53.0
PATCH v2 17/22 net/mlx5: include rte_flow as needed
In reply to Stephen HemmingerThe driver was getting rte_flow.h included indirectly via rte_ethdev.h. This will change in future and driver should include it where needed.
--- 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(+)
drivers/net/mlx5/mlx5_ethdev.c +1 -0
@@ -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>
drivers/net/mlx5/mlx5_flow.h +1 -0
@@ -12,6 +12,7 @@#include <rte_alarm.h> #include <rte_mtr.h> +#include <rte_flow.h> #include <mlx5_glue.h> #include <mlx5_prm.h>
drivers/net/mlx5/mlx5_txq.c +1 -0
@@ -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>
drivers/net/mlx5/mlx5_utils.c +1 -0
@@ -3,6 +3,7 @@*/ #include <rte_malloc.h> +#include <rte_flow.h> #include <mlx5_malloc.h>
drivers/net/mlx5/mlx5_utils.h +1 -0
@@ -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>
Signature · 1 line
2.53.0
PATCH v2 18/22 net/sfc: include rte_flow
In reply to Stephen HemmingerThis driver was depending on rte_ethdev.h doing inclusion of rte_flow.h.
--- drivers/net/sfc/sfc_dp.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/sfc/sfc_dp.c +1 -0
@@ -15,6 +15,7 @@#include <rte_ethdev.h> #include <rte_log.h> #include <rte_mbuf_dyn.h> +#include <rte_flow.h> #include "efx.h"
Signature · 1 line
2.53.0
PATCH v2 19/22 net/intel/common: include network headers
In reply to Stephen HemmingerThis file was depending on network protocol headers getting included via rte_ethdev.h -> rte_flow.h.
--- drivers/net/intel/common/tx_scalar.h | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/intel/common/tx_scalar.h +3 -0
@@ -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"
Signature · 1 line
2.53.0
PATCH v2 20/22 net/enetfec: add missing sys/types.h include
In reply to Stephen HemmingerThe 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.
--- drivers/net/enetfec/enet_regs.h | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/enetfec/enet_regs.h +2 -0
@@ -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 */
Signature · 1 line
2.53.0
PATCH v2 21/22 ethdev, drivers: isolate flow director
In reply to Stephen HemmingerThere 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.
---
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%)doc/api/doxy-api-index.md +0 -1
@@ -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),
drivers/net/hinic/hinic_pmd_ethdev.h +2 -0
@@ -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"
drivers/net/hinic3/hinic3_ethdev.h +1 -0
@@ -7,6 +7,7 @@#include <rte_ethdev.h> #include <rte_ethdev_core.h> +#include <ethdev_fdir.h> #include "hinic3_fdir.h"
drivers/net/intel/cpfl/cpfl_flow_engine_fxp.c +1 -1
@@ -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>
drivers/net/intel/e1000/e1000_ethdev.h +1 -0
@@ -9,6 +9,7 @@#include <sys/queue.h> #include <rte_flow.h> +#include <ethdev_fdir.h> #include <rte_time.h> #include <rte_pci.h>
drivers/net/intel/e1000/igc_filter.h +1 -1
@@ -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"
drivers/net/intel/i40e/i40e_ethdev.h +1 -0
@@ -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>
drivers/net/intel/iavf/iavf_fsub.c +1 -1
@@ -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>
drivers/net/intel/iavf/iavf_hash.c +1 -1
@@ -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>
drivers/net/intel/ice/ice_acl_filter.c +1 -1
@@ -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>
drivers/net/intel/ice/ice_ethdev.h +2 -0
@@ -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>
drivers/net/intel/ice/ice_generic_flow.c +1 -0
@@ -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>
drivers/net/intel/ice/ice_hash.c +1 -1
@@ -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>
drivers/net/intel/ice/ice_switch_filter.c +1 -1
@@ -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>
drivers/net/intel/ipn3ke/ipn3ke_flow.c +1 -1
@@ -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>
drivers/net/intel/ixgbe/ixgbe_ethdev.h +1 -0
@@ -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>
drivers/net/nbl/nbl_include/nbl_include.h +1 -0
@@ -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>
drivers/net/txgbe/txgbe_ethdev.h +1 -0
@@ -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>
lib/ethdev/ethdev_driver.h +0 -36
@@ -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,
lib/ethdev/ethdev_fdir.h renamed from lib/ethdev/rte_eth_ctrl.h +45 -13
73 lines not on this page · raw message
lib/ethdev/meson.build +1 -1
@@ -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',
lib/ethdev/rte_ethdev.h +2 -11
@@ -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. *
Signature · 1 line
2.53.0
PATCH v2 22/22 doc: add release note about rte_ethdev changes
In reply to Stephen HemmingerThe changes to rte_ethdev are visible to applications, which may need to include some network headers directly.
--- doc/guides/rel_notes/release_26_11.rst | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
doc/guides/rel_notes/release_26_11.rst +19 -0
@@ -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 -----------
Signature · 1 line
2.53.0
v3 cover ethdev: isolate legacy flow director
In reply to Stephen HemmingerThe 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%)Signature · 1 line
2.53.0
PATCH v3 1/23 drivers/net: remove unused include in dpaa
rte_eth_ctrl.h is deprecated and its contents are not used here.
--- drivers/net/dpaa/dpaa_ptp.c | 1 - drivers/net/dpaa2/dpaa2_ptp.c | 1 - 2 files changed, 2 deletions(-)
drivers/net/dpaa/dpaa_ptp.c +0 -1
@@ -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>
drivers/net/dpaa2/dpaa2_ptp.c +0 -1
@@ -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>
Signature · 1 line
2.53.0
PATCH v3 2/23 ethdev: use DPDK byte order conversion
In reply to Stephen HemmingerDPDK 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.
--- lib/ethdev/sff_8472.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
lib/ethdev/sff_8472.c +2 -1
@@ -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; }
Signature · 1 line
2.53.0
PATCH v3 3/23 net/ixgbe: remove experimental FDIR API
In reply to Stephen HemmingerRemove the PMD specific flow director API from ixgbe. These APIs are experimental, therefore they can be removed without additional warnings.
--- 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(-)
drivers/net/intel/ixgbe/ixgbe_ethdev.h +0 -5
@@ -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
drivers/net/intel/ixgbe/ixgbe_fdir.c +0 -117
123 lines not on this page · raw message
drivers/net/intel/ixgbe/rte_pmd_ixgbe.c +0 -34
@@ -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 ; -}
drivers/net/intel/ixgbe/rte_pmd_ixgbe.h +0 -32
@@ -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_ */
Signature · 1 line
2.53.0
PATCH v3 4/23 net/i40e: remove experimental FDIR API
In reply to Stephen HemmingerRemove the flow director related private APIs in i40e. These APIs are experimental, therefore they can be removed without additional warnings.
--- 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(-)
doc/guides/nics/i40e.rst +0 -46
@@ -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 ~~~~~~~~~~~~
drivers/net/intel/i40e/i40e_ethdev.c +2 -2
@@ -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] =
drivers/net/intel/i40e/i40e_ethdev.h +0 -4
@@ -1369,10 +1369,6 @@ enum i40e_filter_pctypeuint16_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);
drivers/net/intel/i40e/i40e_fdir.c +0 -140
146 lines not on this page · raw message
drivers/net/intel/i40e/i40e_flow.c +1 -2
@@ -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];
drivers/net/intel/i40e/rte_pmd_i40e.c +0 -34
@@ -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)
drivers/net/intel/i40e/rte_pmd_i40e.h +0 -33
@@ -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 *
Signature · 1 line
2.53.0
PATCH v3 5/23 app/testpmd: remove support for flow director
In reply to Stephen HemmingerThe 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)
--- 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(-)
app/test-pmd/cmdline.c +6 -15
@@ -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,
app/test-pmd/config.c +0 -163
169 lines not on this page · raw message
app/test-pmd/testpmd.h +0 -3
@@ -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);
doc/guides/testpmd_app_ug/testpmd_funcs.rst +8 -46
92 lines not on this page · raw message
Signature · 1 line
2.53.0
PATCH v3 6/23 app/testpmd: move str_to_flowtype to i40e
In reply to Stephen HemmingerOnly the i40e internal command is still using str_to_flowtype() so move it to there.
--- 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(-)
app/test-pmd/config.c +0 -62
@@ -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) {
app/test-pmd/testpmd.h +0 -3
@@ -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;
drivers/net/intel/i40e/i40e_testpmd.c +51 -0
63 lines not on this page · raw message
Signature · 1 line
2.53.0
PATCH v3 7/23 app/test: include headers directly
In reply to Stephen HemmingerThe 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.
--- 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(-)
app/test-eventdev/test_pipeline_common.h +1 -0
@@ -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>
app/test/test_bpf.c +15 -5
@@ -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 )) {
app/test/test_security_inline_macsec.c +2 -0
@@ -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"
app/test/test_security_inline_proto.c +1 -0
@@ -7,6 +7,7 @@#include <inttypes.h> #include <rte_ethdev.h> +#include <rte_flow.h> #include <rte_malloc.h> #include <rte_security.h>
Signature · 1 line
2.53.0
RE: [PATCH v3 07/23] app/test: include headers directly
Quoted 53 lines
app/test/test_bpf.c +14
-4@@ -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;
app/test/test_bpf.c test_jump2_check(uint64_t rc, const void *arg) · line 1357
Quoted 8 lines
app/test/test_bpf.c +1
-1@@ -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:
PATCH v3 8/23 gro: include headers directly
In reply to Stephen HemmingerThe 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.
--- 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(-)
lib/gro/gro_tcp4.c +8 -1
@@ -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"
lib/gro/gro_tcp6.c +8 -1
@@ -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"
lib/gro/gro_vxlan_tcp4.c +9 -1
@@ -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"
lib/gro/gro_vxlan_udp4.c +8 -1
@@ -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"
lib/gro/rte_gro.c +8 -1
@@ -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"
Signature · 1 line
2.53.0
PATCH v3 9/23 crypto/dpaa_sec: include UDP header
In reply to Stephen HemmingerThe driver was getting the UDP header definition indirectly via rte_ethdev.h. That will change, so include the header directly.
--- drivers/crypto/dpaa_sec/dpaa_sec.h | 2 ++ 1 file changed, 2 insertions(+)
drivers/crypto/dpaa_sec/dpaa_sec.h +2 -0
@@ -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 */
Signature · 1 line
2.53.0
PATCH v3 10/23 net/gve: include UDP, SCTP and TCP headers
In reply to Stephen HemmingerThis 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.
--- drivers/net/gve/gve_ethdev.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
drivers/net/gve/gve_ethdev.h +12 -1
@@ -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"
Signature · 1 line
2.53.0
PATCH v3 11/23 net/nfp: break implicit dependency on rte_eth_ctrl.h
In reply to Stephen HemmingerThis 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.
--- drivers/net/nfp/nfp_ethdev.c | 6 ++++-- drivers/net/nfp/nfp_net_common.h | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-)
drivers/net/nfp/nfp_ethdev.c +4 -2
@@ -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 ;
drivers/net/nfp/nfp_net_common.h +3 -1
@@ -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"
Signature · 1 line
2.53.0
PATCH v3 12/23 net/mana: include used network headers
In reply to Stephen HemmingerThis 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.
--- drivers/net/mana/mana.c | 26 +++++++++++++++++++++++--- drivers/net/mana/tx.c | 3 +++ 2 files changed, 26 insertions(+), 3 deletions(-)
drivers/net/mana/mana.c +23 -3
@@ -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 */
drivers/net/mana/tx.c +3 -0
@@ -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>
Signature · 1 line
2.53.0
PATCH v3 13/23 node: get UDP header
In reply to Stephen HemmingerThis library was getting UDP header indirectly via rte_ethdev.h Use iwyu to update includes to match usage.
--- lib/node/udp4_input.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)
lib/node/udp4_input.c +9 -8
@@ -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"
Signature · 1 line
2.53.0
PATCH v3 14/23 net/rnp: include network headers
In reply to Stephen HemmingerThe driver was getting definition of standard network protocol headers indirectly from rte_ethdev.h.
--- drivers/net/rnp/rnp_rxtx.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/net/rnp/rnp_rxtx.c +6 -0
@@ -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"
Signature · 1 line
2.53.0
PATCH v3 15/23 net/r8169: get network headers
In reply to Stephen HemmingerThis driver was getting network protocol headers indirectly via rte_ethdev.h. Use iwyu to update to full list of includes.
--- drivers/net/r8169/r8169_rxtx.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-)
drivers/net/r8169/r8169_rxtx.c +13 -5
@@ -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"
Signature · 1 line
2.53.0
PATCH v3 16/23 net/ngbe: include network protocol headers
In reply to Stephen HemmingerDo not depend on network protocol headers getting included via rte_ethdev.h.
--- drivers/net/ngbe/ngbe_rxtx.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/ngbe/ngbe_rxtx.c +4 -0
@@ -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"
Signature · 1 line
2.53.0
PATCH v3 17/23 examples: include network headers
In reply to Stephen HemmingerDon't depend on network protocol headers getting indirectly included via rte_ethdev.h.
--- examples/l2fwd-macsec/main.c | 2 ++ examples/l3fwd-graph/main.c | 1 + examples/l3fwd/l3fwd.h | 2 ++ 3 files changed, 5 insertions(+)
examples/l2fwd-macsec/main.c +2 -0
@@ -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;
examples/l3fwd-graph/main.c +1 -0
@@ -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>
examples/l3fwd/l3fwd.h +2 -0
@@ -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
Signature · 1 line
2.53.0
PATCH v3 18/23 net/mlx5: include rte_flow as needed
In reply to Stephen HemmingerThe driver was getting rte_flow.h included indirectly via rte_ethdev.h. This will change in future and driver should include it where needed.
--- 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(+)
drivers/net/mlx5/mlx5_ethdev.c +1 -0
@@ -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>
drivers/net/mlx5/mlx5_flow.h +1 -0
@@ -12,6 +12,7 @@#include <rte_alarm.h> #include <rte_mtr.h> +#include <rte_flow.h> #include <mlx5_glue.h> #include <mlx5_prm.h>
drivers/net/mlx5/mlx5_txq.c +1 -0
@@ -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>
drivers/net/mlx5/mlx5_utils.c +1 -0
@@ -3,6 +3,7 @@*/ #include <rte_malloc.h> +#include <rte_flow.h> #include <mlx5_malloc.h>
drivers/net/mlx5/mlx5_utils.h +1 -0
@@ -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>
Signature · 1 line
2.53.0
PATCH v3 19/23 net/sfc: include rte_flow
In reply to Stephen HemmingerThis driver was depending on rte_ethdev.h doing inclusion of rte_flow.h.
--- drivers/net/sfc/sfc_dp.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/sfc/sfc_dp.c +1 -0
@@ -15,6 +15,7 @@#include <rte_ethdev.h> #include <rte_log.h> #include <rte_mbuf_dyn.h> +#include <rte_flow.h> #include "efx.h"
Signature · 1 line
2.53.0
PATCH v3 20/23 net/intel/common: include network headers
In reply to Stephen HemmingerThis file was depending on network protocol headers getting included via rte_ethdev.h -> rte_flow.h.
--- drivers/net/intel/common/tx_scalar.h | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/intel/common/tx_scalar.h +3 -0
@@ -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"
Signature · 1 line
2.53.0
PATCH v3 21/23 net/enetfec: add missing sys/types.h include
In reply to Stephen HemmingerThe 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.
--- drivers/net/enetfec/enet_regs.h | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/enetfec/enet_regs.h +2 -0
@@ -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 */
Signature · 1 line
2.53.0
PATCH v3 22/23 ethdev, drivers: isolate flow director
In reply to Stephen HemmingerThere 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.
---
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%)doc/api/doxy-api-index.md +0 -1
@@ -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),
drivers/net/hinic/hinic_pmd_ethdev.h +2 -0
@@ -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"
drivers/net/hinic3/hinic3_ethdev.h +1 -0
@@ -7,6 +7,7 @@#include <rte_ethdev.h> #include <rte_ethdev_core.h> +#include <ethdev_fdir.h> #include "hinic3_fdir.h"
drivers/net/intel/cpfl/cpfl_flow_engine_fxp.c +1 -1
@@ -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>
drivers/net/intel/e1000/e1000_ethdev.h +1 -0
@@ -9,6 +9,7 @@#include <sys/queue.h> #include <rte_flow.h> +#include <ethdev_fdir.h> #include <rte_time.h> #include <rte_pci.h>
drivers/net/intel/e1000/igc_filter.h +1 -1
@@ -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"
drivers/net/intel/i40e/i40e_ethdev.h +1 -0
@@ -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>
drivers/net/intel/iavf/iavf_fsub.c +1 -1
@@ -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>
drivers/net/intel/iavf/iavf_hash.c +1 -1
@@ -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>
drivers/net/intel/ice/ice_acl_filter.c +1 -1
@@ -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>
drivers/net/intel/ice/ice_ethdev.h +2 -0
@@ -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>
drivers/net/intel/ice/ice_generic_flow.c +1 -0
@@ -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>
drivers/net/intel/ice/ice_hash.c +1 -1
@@ -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>
drivers/net/intel/ice/ice_switch_filter.c +1 -1
@@ -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>
drivers/net/intel/ipn3ke/ipn3ke_flow.c +1 -1
@@ -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>
drivers/net/intel/ixgbe/ixgbe_ethdev.h +1 -0
@@ -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>
drivers/net/nbl/nbl_include/nbl_include.h +1 -0
@@ -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>
drivers/net/txgbe/txgbe_ethdev.h +1 -0
@@ -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>
lib/ethdev/ethdev_driver.h +0 -36
@@ -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,
lib/ethdev/ethdev_fdir.h renamed from lib/ethdev/rte_eth_ctrl.h +45 -13
73 lines not on this page · raw message
lib/ethdev/meson.build +1 -1
@@ -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',
lib/ethdev/rte_ethdev.h +2 -11
@@ -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. *
Signature · 1 line
2.53.0
PATCH v3 23/23 doc: add release note about rte_ethdev changes
In reply to Stephen HemmingerThe changes to rte_ethdev are visible to applications, which may need to include some network headers directly.
--- doc/guides/rel_notes/release_26_11.rst | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
doc/guides/rel_notes/release_26_11.rst +19 -0
@@ -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 -----------
Signature · 1 line
2.53.0
v4 cover ethdev: refactor remaining uses of flow director
In reply to Stephen HemmingerThe 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%)Signature · 1 line
2.53.0
PATCH v4 1/23 drivers/net: remove unused include in dpaa and dpaa2
rte_eth_ctrl.h is deprecated and its contents are not used here.
--- drivers/net/dpaa/dpaa_ptp.c | 1 - drivers/net/dpaa2/dpaa2_ptp.c | 1 - 2 files changed, 2 deletions(-)
drivers/net/dpaa/dpaa_ptp.c +0 -1
@@ -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>
drivers/net/dpaa2/dpaa2_ptp.c +0 -1
@@ -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>
Signature · 1 line
2.53.0
Re: [PATCH v4 01/23] drivers/net: remove unused include in dpaa and dpaa2
Quoted 3 lines · Stephen Hemminger
rte_eth_ctrl.his deprecated and its contents are not used here.Signed-off-by Stephen Hemminger <[email protected]>
Quoted 29 lines
--- drivers/net/dpaa/dpaa_ptp.c | 1 - drivers/net/dpaa2/dpaa2_ptp.c | 1 - 2 files changed, 2 deletions(-)drivers/net/dpaa/dpaa_ptp.c +0
-1@@ -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> drivers/net/dpaa2/dpaa2_ptp.c +0
-1@@ -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>
PATCH v4 2/23 ethdev: use DPDK byte order conversion
In reply to Stephen HemmingerDPDK 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.
--- lib/ethdev/sff_8472.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
lib/ethdev/sff_8472.c +3 -1
@@ -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; }
Signature · 1 line
2.53.0
Re: [PATCH v4 02/23] ethdev: use DPDK byte order conversion
Quoted 10 lines · Stephen Hemminger
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 ofarpa/inet.hfromrte_ethdev.h->rte_eth_ctrl.h.Signed-off-by Stephen Hemminger <[email protected]>--- lib/ethdev/sff_8472.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Ok fix, though I would note that this fix is nothing to do with the removal of flow director material.
Quoted 22 lines
lib/ethdev/sff_8472.c +3
-1@@ -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; }
Re: [PATCH v4 02/23] ethdev: use DPDK byte order conversion
Quoted 12 lines · On Thu, 3 Sep 2026 10:20:31 +0100 Bruce Richardson…
Quoted 10 lines · Stephen Hemminger
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 ofarpa/inet.hfromrte_ethdev.h->rte_eth_ctrl.h.Signed-off-by Stephen Hemminger <[email protected]>--- lib/ethdev/sff_8472.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Quoted 4 lines
Acked-by Bruce Richardson <[email protected]>Ok fix, though I would note that this fix is nothing to do with the removal of flow director material.
What happened was that when flow director part (in rte_eth_ctrl.h) is removed from always being included by rte_ethdev.h, then this code would not build. The code relied on the include cascade:
rte_ethdev.h
rte_eth_ctrl.h
rte_flow.h
rte_ip4.h
arpa/inet.hMaybe other things are getting this as well?
The DPDK IP headers should rely on the Linux definitions, but that is a different issue.
Re: [PATCH v4 02/23] ethdev: use DPDK byte order conversion
Quoted 20 lines · Stephen Hemminger
Quoted 12 lines · On Thu, 3 Sep 2026 10:20:31 +0100 Bruce Richardson…
Quoted 10 lines · Stephen Hemminger
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 ofarpa/inet.hfromrte_ethdev.h->rte_eth_ctrl.h.Signed-off-by Stephen Hemminger <[email protected]>--- lib/ethdev/sff_8472.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)Quoted 4 lines
Acked-by Bruce Richardson <[email protected]>Ok fix, though I would note that this fix is nothing to do with the removal of flow director material.
Quoted 9 lines
What happened was that when flow director part (in
rte_eth_ctrl.h) is removed from always being included byrte_ethdev.h, then this code would not build. The code relied on the include cascade:rte_ethdev.h rte_eth_ctrl.h rte_flow.h rte_ip4.h arpa/inet.h
Right. In cases like this, then, it's better that all the pre-requisite fixups go at the start of the series so they are in inter-mingled with the actual fdir removal. In this case, there are more fixes than removal patches so I think the series needs splitting (as I explained in another mail).
PATCH v4 3/23 net/ixgbe: remove experimental FDIR API
In reply to Stephen HemmingerRemove the PMD specific flow director API from ixgbe. These APIs are experimental, therefore they can be removed without additional warnings.
--- 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(-)
drivers/net/intel/ixgbe/ixgbe_ethdev.h +0 -5
@@ -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
drivers/net/intel/ixgbe/ixgbe_fdir.c +0 -117
123 lines not on this page · raw message
drivers/net/intel/ixgbe/rte_pmd_ixgbe.c +0 -34
@@ -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 ; -}
drivers/net/intel/ixgbe/rte_pmd_ixgbe.h +0 -32
@@ -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_ */
Signature · 1 line
2.53.0
Re: [PATCH v4 03/23] net/ixgbe: remove experimental FDIR API
Quoted 4 lines · Stephen Hemminger
Remove the PMD specific flow director API from ixgbe. These APIs are experimental, therefore they can be removed without additional warnings.
Quoted 8 lines
Signed-off-by Stephen Hemminger <[email protected]>--- 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(-)
Yes, they are experimental and can be removed without warning, but that doesn't mean that they should just be removed. Checking the original commit that added these, the comment says:
"There are also several small features which can not be
implemented in rte_flow. This patch re-implemented these features as private API."
Therefore, I think we should keep these two APIs or if we are going to remove them, we mark them as deprecated for a couple of releases first. Since these are driver private, and are not part of a common API like ethdev, I'd view their presence as "mostly harmless".
/Bruce
PATCH v4 4/23 net/i40e: remove experimental FDIR API
In reply to Stephen HemmingerRemove the flow director related private APIs in i40e. These APIs are experimental, therefore they can be removed without additional warnings.
--- 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(-)
doc/guides/nics/i40e.rst +0 -46
@@ -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 ~~~~~~~~~~~~
drivers/net/intel/i40e/i40e_ethdev.c +2 -2
@@ -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] =
drivers/net/intel/i40e/i40e_ethdev.h +0 -4
@@ -1369,10 +1369,6 @@ enum i40e_filter_pctypeuint16_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);
drivers/net/intel/i40e/i40e_fdir.c +0 -140
146 lines not on this page · raw message
drivers/net/intel/i40e/i40e_flow.c +1 -2
@@ -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];
drivers/net/intel/i40e/rte_pmd_i40e.c +0 -34
@@ -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)
drivers/net/intel/i40e/rte_pmd_i40e.h +0 -33
@@ -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 *
Signature · 1 line
2.53.0
PATCH v4 5/23 app/testpmd: remove support for flow director
In reply to Stephen HemmingerThe 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.
--- 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(-)
app/test-pmd/cmdline.c +6 -15
@@ -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,
app/test-pmd/config.c +0 -163
169 lines not on this page · raw message
app/test-pmd/testpmd.h +0 -3
@@ -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);
doc/guides/testpmd_app_ug/intro.rst +2 -2
@@ -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.
doc/guides/testpmd_app_ug/testpmd_funcs.rst +9 -47
100 lines not on this page · raw message
Signature · 1 line
2.53.0
Re: [PATCH v4 05/23] app/testpmd: remove support for flow director
Quoted 9 lines · Stephen Hemminger
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.
Quoted 9 lines
Signed-off-by Stephen Hemminger <[email protected]>--- 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(-)
PATCH v4 6/23 app/testpmd: move str_to_flowtype to i40e
In reply to Stephen HemmingerOnly the i40e internal command is still using str_to_flowtype() so move it to there.
--- 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(-)
app/test-pmd/config.c +0 -62
@@ -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) {
app/test-pmd/testpmd.h +0 -3
@@ -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;
drivers/net/intel/i40e/i40e_testpmd.c +51 -0
63 lines not on this page · raw message
Signature · 1 line
2.53.0
Re: [PATCH v4 06/23] app/testpmd: move str_to_flowtype to i40e
Quoted 10 lines · Stephen Hemminger
Only the i40e internal command is still using
str_to_flowtype()so move it to there.Signed-off-by Stephen Hemminger <[email protected]>--- 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(-)
PATCH v4 7/23 app/test: include headers directly
In reply to Stephen HemmingerThe 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.
--- 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(-)
app/test-eventdev/test_pipeline_common.h +1 -0
@@ -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>
app/test/test_bpf.c +15 -5
@@ -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 )) {
app/test/test_security_inline_macsec.c +2 -0
@@ -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"
app/test/test_security_inline_proto.c +1 -0
@@ -7,6 +7,7 @@#include <inttypes.h> #include <rte_ethdev.h> +#include <rte_flow.h> #include <rte_malloc.h> #include <rte_security.h>
Signature · 1 line
2.53.0
RE: [PATCH v4 07/23] app/test: include headers directly
Quoted 16 lines
-----Original Message-----
From: Stephen Hemminger <[email protected]>
Sent: Thursday 6 August 2026 06:09
To: [email protected]
Cc: Stephen Hemminger <[email protected]>; Jerin Jacob <[email protected]>; Konstantin Ananyev <[email protected]>; Marat Khalili <[email protected]>; Akhil Goyal <[email protected]>; Anoob Joseph <[email protected]>
Subject: [PATCH v4 07/23] app/test: include headers directlyThe 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.
Quoted 7 lines
Signed-off-by Stephen Hemminger <[email protected]>--- 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(-)
All of the new headers seem to be defined by always-enabled libraries, something worth mentioning in the future.
Quoted 101 lines
app/test-eventdev/test_pipeline_common.h +1
-0@@ -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> app/test/test_bpf.c +15
-5@@ -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 )) {app/test/test_security_inline_macsec.c +2
-0@@ -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" app/test/test_security_inline_proto.c +1
-1@@ -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
PATCH v4 8/23 gro: include headers directly
In reply to Stephen HemmingerThe 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.
--- 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(-)
lib/gro/gro_tcp4.c +8 -1
@@ -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"
lib/gro/gro_tcp6.c +8 -1
@@ -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"
lib/gro/gro_vxlan_tcp4.c +9 -1
@@ -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"
lib/gro/gro_vxlan_udp4.c +8 -1
@@ -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"
lib/gro/rte_gro.c +8 -1
@@ -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"
Signature · 1 line
2.53.0
Re: [PATCH v4 08/23] gro: include headers directly
Quoted 5 lines · Stephen Hemminger
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.
Quoted 9 lines
Signed-off-by Stephen Hemminger <[email protected]>--- 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(-)
PATCH v4 9/23 crypto/dpaa_sec: include UDP header
In reply to Stephen HemmingerThe driver was getting the UDP header definition indirectly via rte_ethdev.h. That will change, so include the header directly.
--- drivers/crypto/dpaa_sec/dpaa_sec.h | 2 ++ 1 file changed, 2 insertions(+)
drivers/crypto/dpaa_sec/dpaa_sec.h +2 -0
@@ -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 */
Signature · 1 line
2.53.0
Re: [PATCH v4 09/23] crypto/dpaa_sec: include UDP header
Quoted 4 lines · Stephen Hemminger
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 <[email protected]>
Quoted 17 lines
--- drivers/crypto/dpaa_sec/dpaa_sec.h | 2 ++ 1 file changed, 2 insertions(+)drivers/crypto/dpaa_sec/dpaa_sec.h +2
-0@@ -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 */
PATCH v4 10/23 net/gve: include UDP, SCTP and TCP headers
In reply to Stephen HemmingerThis 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.
--- drivers/net/gve/gve_ethdev.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
drivers/net/gve/gve_ethdev.h +12 -1
@@ -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"
Signature · 1 line
2.53.0
PATCH v4 11/23 net/nfp: break implicit dependency on rte_eth_ctrl.h
In reply to Stephen HemmingerThis 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.
--- drivers/net/nfp/nfp_ethdev.c | 6 ++++-- drivers/net/nfp/nfp_net_common.h | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-)
drivers/net/nfp/nfp_ethdev.c +4 -2
@@ -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 ;
drivers/net/nfp/nfp_net_common.h +3 -1
@@ -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"
Signature · 1 line
2.53.0
PATCH v4 12/23 net/mana: include used network headers
In reply to Stephen HemmingerThis 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.
--- drivers/net/mana/mana.c | 26 +++++++++++++++++++++++--- drivers/net/mana/tx.c | 3 +++ 2 files changed, 26 insertions(+), 3 deletions(-)
drivers/net/mana/mana.c +23 -3
@@ -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 */
drivers/net/mana/tx.c +3 -0
@@ -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>
Signature · 1 line
2.53.0
PATCH v4 13/23 node: get UDP header
In reply to Stephen HemmingerThis library was getting UDP header indirectly via rte_ethdev.h Use iwyu to update includes to match usage.
--- lib/node/udp4_input.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)
lib/node/udp4_input.c +9 -8
@@ -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"
Signature · 1 line
2.53.0
PATCH v4 14/23 net/rnp: include network headers
In reply to Stephen HemmingerThe driver was getting definition of standard network protocol headers indirectly from rte_ethdev.h.
--- drivers/net/rnp/rnp_rxtx.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/net/rnp/rnp_rxtx.c +6 -0
@@ -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"
Signature · 1 line
2.53.0
PATCH v4 15/23 net/r8169: get network headers
In reply to Stephen HemmingerThis 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.
--- drivers/net/r8169/r8169_rxtx.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-)
drivers/net/r8169/r8169_rxtx.c +13 -6
@@ -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;
Signature · 1 line
2.53.0
PATCH v4 16/23 net/ngbe: include network protocol headers
In reply to Stephen HemmingerDo not depend on network protocol headers getting included via rte_ethdev.h.
--- drivers/net/ngbe/ngbe_rxtx.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/ngbe/ngbe_rxtx.c +4 -0
@@ -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"
Signature · 1 line
2.53.0
PATCH v4 17/23 examples: include network headers
In reply to Stephen HemmingerDon't depend on network protocol headers getting indirectly included via rte_ethdev.h.
--- examples/l2fwd-macsec/main.c | 2 ++ examples/l3fwd-graph/main.c | 1 + examples/l3fwd/l3fwd.h | 2 ++ 3 files changed, 5 insertions(+)
examples/l2fwd-macsec/main.c +2 -0
@@ -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;
examples/l3fwd-graph/main.c +1 -0
@@ -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>
examples/l3fwd/l3fwd.h +2 -0
@@ -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
Signature · 1 line
2.53.0
Re: [PATCH v4 17/23] examples: include network headers
Quoted 10 lines · Stephen Hemminger
Don't depend on network protocol headers getting indirectly included via
rte_ethdev.h.Signed-off-by Stephen Hemminger <[email protected]>--- examples/l2fwd-macsec/main.c | 2 ++ examples/l3fwd-graph/main.c | 1 + examples/l3fwd/l3fwd.h | 2 ++ 3 files changed, 5 insertions(+)
PATCH v4 18/23 net/mlx5: include rte_flow as needed
In reply to Stephen HemmingerThe driver was getting rte_flow.h included indirectly via rte_ethdev.h. This will change in future and driver should include it where needed.
--- 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(+)
drivers/net/mlx5/mlx5_ethdev.c +1 -0
@@ -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>
drivers/net/mlx5/mlx5_flow.h +1 -0
@@ -12,6 +12,7 @@#include <rte_alarm.h> #include <rte_mtr.h> +#include <rte_flow.h> #include <mlx5_glue.h> #include <mlx5_prm.h>
drivers/net/mlx5/mlx5_txq.c +1 -0
@@ -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>
drivers/net/mlx5/mlx5_utils.c +1 -0
@@ -3,6 +3,7 @@*/ #include <rte_malloc.h> +#include <rte_flow.h> #include <mlx5_malloc.h>
drivers/net/mlx5/mlx5_utils.h +1 -0
@@ -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>
Signature · 1 line
2.53.0
PATCH v4 19/23 net/sfc: include rte_flow
In reply to Stephen HemmingerThis driver was depending on rte_ethdev.h doing inclusion of rte_flow.h.
--- drivers/net/sfc/sfc_dp.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/sfc/sfc_dp.c +1 -0
@@ -15,6 +15,7 @@#include <rte_ethdev.h> #include <rte_log.h> #include <rte_mbuf_dyn.h> +#include <rte_flow.h> #include "efx.h"
Signature · 1 line
2.53.0
PATCH v4 20/23 net/intel/common: include network headers
In reply to Stephen HemmingerThis file was depending on network protocol headers getting included via rte_ethdev.h -> rte_flow.h.
--- drivers/net/intel/common/tx_scalar.h | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/intel/common/tx_scalar.h +3 -0
@@ -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"
Signature · 1 line
2.53.0
Re: [PATCH v4 20/23] net/intel/common: include network headers
Quoted 14 lines · Stephen Hemminger
This file was depending on network protocol headers getting included via
rte_ethdev.h->rte_flow.h.Signed-off-by Stephen Hemminger <[email protected]>--- drivers/net/intel/common/tx_scalar.h | 3 +++ 1 file changed, 3 insertions(+)drivers/net/intel/common/tx_scalar.h +0
-0
drivers/net/intel/common/tx_scalar.h line 16
Quoted 9 lines
drivers/net/intel/common/tx_scalar.h +3
-0@@ -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"
PATCH v4 21/23 net/enetfec: add missing sys/types.h include
In reply to Stephen HemmingerThe 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.
--- drivers/net/enetfec/enet_regs.h | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/enetfec/enet_regs.h +2 -0
@@ -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 */
Signature · 1 line
2.53.0
PATCH v4 22/23 ethdev, drivers: isolate flow director
In reply to Stephen HemmingerThere 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.
---
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%)doc/api/doxy-api-index.md +0 -1
@@ -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),
drivers/net/hinic/hinic_pmd_ethdev.h +2 -0
@@ -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"
drivers/net/hinic3/hinic3_ethdev.h +1 -0
@@ -7,6 +7,7 @@#include <rte_ethdev.h> #include <rte_ethdev_core.h> +#include <ethdev_fdir.h> #include "hinic3_fdir.h"
drivers/net/intel/cpfl/cpfl_flow_engine_fxp.c +1 -1
@@ -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>
drivers/net/intel/e1000/e1000_ethdev.h +1 -0
@@ -9,6 +9,7 @@#include <sys/queue.h> #include <rte_flow.h> +#include <ethdev_fdir.h> #include <rte_time.h> #include <rte_pci.h>
drivers/net/intel/e1000/igc_filter.h +1 -1
@@ -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"
drivers/net/intel/i40e/i40e_ethdev.h +1 -0
@@ -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>
drivers/net/intel/iavf/iavf_fsub.c +1 -1
@@ -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>
drivers/net/intel/iavf/iavf_hash.c +1 -1
@@ -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>
drivers/net/intel/ice/ice_acl_filter.c +1 -1
@@ -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>
drivers/net/intel/ice/ice_ethdev.h +2 -0
@@ -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>
drivers/net/intel/ice/ice_generic_flow.c +1 -0
@@ -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>
drivers/net/intel/ice/ice_hash.c +1 -1
@@ -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>
drivers/net/intel/ice/ice_switch_filter.c +1 -1
@@ -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>
drivers/net/intel/ipn3ke/ipn3ke_flow.c +1 -1
@@ -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>
drivers/net/intel/ixgbe/ixgbe_ethdev.h +1 -0
@@ -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>
drivers/net/nbl/nbl_include/nbl_include.h +1 -0
@@ -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>
drivers/net/txgbe/txgbe_ethdev.h +1 -0
@@ -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>
lib/ethdev/ethdev_driver.h +0 -36
@@ -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,
lib/ethdev/ethdev_fdir.h renamed from lib/ethdev/rte_eth_ctrl.h +49 -13
77 lines not on this page · raw message
lib/ethdev/meson.build +1 -1
@@ -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',
lib/ethdev/rte_ethdev.h +2 -11
@@ -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. *
Signature · 1 line
2.53.0
Re: [PATCH v4 22/23] ethdev, drivers: isolate flow director
Quoted 30 lines · Stephen Hemminger
There are leftover bits of legacy flow director that are still being used by drivers. Move the definitions contained in
ethdev_driver.handrte_eth_ctrl.hinto a single fileethdev_fdir.hand only include it in the drivers that require it.Change
rte_ethdev.hto include the headers required which it was previously getting fromrte_eth_ctrl.h->rte_flow.h.Since
ethdev_fdir.his internal for driver SDK only it does not have to include as many secondary headers.Signed-off-by Stephen Hemminger <[email protected]>--- 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 +
Quoted 9 lines
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%)PATCH v4 23/23 doc: add release note about rte_ethdev changes
In reply to Stephen HemmingerThe changes to rte_ethdev are visible to applications, which may need to include some network headers directly.
--- doc/guides/rel_notes/release_26_11.rst | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)
doc/guides/rel_notes/release_26_11.rst +24 -0
@@ -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 -----------
Signature · 1 line
2.53.0
Re: [PATCH v4 23/23] doc: add release note about rte_ethdev changes
Quoted 13 lines · Stephen Hemminger
The changes to
rte_ethdevare visible to applications, which may need to include some network headers directly.Signed-off-by Stephen Hemminger <[email protected]>--- doc/guides/rel_notes/release_26_11.rst | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)doc/guides/rel_notes/release_26_11.rst +0
-0
doc/guides/rel_notes/release_26_11.rst Removed Items · line 86
Quoted 10 lines
doc/guides/rel_notes/release_26_11.rst +7
-0@@ -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`` +
Some concerns about this. I'd rather see them deprecated and then removed in a later release next year.
doc/guides/rel_notes/release_26_11.rst Removed Items · line 94
Quoted 8 lines
doc/guides/rel_notes/release_26_11.rst +8
-0+ * 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. +
Fine with this removal.
Quoted 21 lines
doc/guides/rel_notes/release_26_11.rst +9
-0API 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 -----------Signature · 1 line
2.53.0
Re: [PATCH v4 00/23] ethdev: refactor remaining uses of flow director
In reply to Stephen HemmingerQuoted 43 lines · 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_flowAPI 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.hpulls inrte_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.his renamed toethdev_fdir.hand the remaining bits inethdev_driver.hare 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 testpmdStephen 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: movestr_to_flowtypeto i40e app/test: include headers directly
gro: include headers directlycrypto/dpaa_sec: include UDP header net/gve: include UDP, SCTP and TCP headers net/nfp: break implicit dependency onrte_eth_ctrl.hnet/mana: include used network headers
node: get UDP header
net/rnp: include network headers
net/r8169: get network headers
Quoted 9 lines
net/ngbe: include network protocol headers
examples: include network headers
net/mlx5: includerte_flowas needed
net/sfc: includerte_flow
net/intel/common: include network headers
net/enetfec: add missingsys/types.hinclude
ethdev, drivers: isolate flow director
doc: add release note aboutrte_ethdevchanges
I think this patchset needs to be split up, as many patches have no relevance to flow director that I can see. The various patches cleaning up header includes should be in one patchset. The byte order conversion change probably belongs as a standalone patch, and then the actual fdir changes go as a final patchset.
/Bruce