retire legacy flow director API
cover retire legacy flow director API
The flow director (fdir) configuration API in <rte_eth_ctrl.h> was superseded by rte_flow in 17.05 but never removed. This series finishes the job: 26.07 retires the user-facing surface and decouples driver internals from the public ABI; the 26.11 deprecation notice covers the public ABI removal itself.
User-visible changes in 26.07:
- testpmd commands gone: show port fdir, clear port fdir, flow_director_filter, port config ... pctype mapping ..., and port config ... hash_inset|fdir_inset|fdir_flx_inset .... Use the flow command instead.
- Experimental functions gone:
rte_pmd_{i40e,ixgbe}_get_fdir_info() and rte_pmd_{i40e,ixgbe}_get_fdir_stats(). Removed early to give out-of-tree callers a build-time signal ahead of 26.11.
- <rte_pmd_i40e.h> filter configuration entry points are marked __rte_deprecated. -Werror sources will need -Wno-deprecated-declarations, or migration to rte_flow, before 26.11.
Scheduled for 26.11 (announced in deprecation.rst):
- Flow director types in <rte_eth_ctrl.h> and the driver-facing definitions in <ethdev_driver.h>.
- PMD-private filter API in <rte_pmd_i40e.h>.
The ixgbe and txgbe patches at the tail privatize internals that still used the legacy types — mechanical rename, no behavior change, so the 26.11 struct removal can proceed without further per-driver coupling.
The mbuf-side fdir metadata (RTE_MBUF_F_RX_FDIR* flags and the hash.fdir field) is unaffected — it is used by the rte_flow MARK and FLAG actions, not part of the legacy filter API.
Stephen Hemminger (8):
app/testpmd: remove support for flow director
net/i40e: remove testpmd flow filter commands
net/i40e: deprecate legacy flow filter API
net/i40e: remove experimental FDIR API
net/ixgbe: remove experimental FDIR API
doc: announce legacy flow director deprecation
net/ixgbe: privatize legacy flow director types
net/txgbe: privatize legacy flow director types
app/test-pmd/cmdline.c | 21 +- app/test-pmd/config.c | 163 ----- app/test-pmd/testpmd.h | 3 - doc/guides/nics/i40e.rst | 70 +- doc/guides/rel_notes/deprecation.rst | 10 + doc/guides/rel_notes/release_26_07.rst | 14 + doc/guides/testpmd_app_ug/testpmd_funcs.rst | 36 - 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/i40e_testpmd.c | 642 ------------------ drivers/net/intel/i40e/rte_pmd_i40e.c | 34 - drivers/net/intel/i40e/rte_pmd_i40e.h | 113 ++- drivers/net/intel/ixgbe/ixgbe_ethdev.c | 12 +- drivers/net/intel/ixgbe/ixgbe_ethdev.h | 100 ++- drivers/net/intel/ixgbe/ixgbe_fdir.c | 241 ++----- drivers/net/intel/ixgbe/ixgbe_flow.c | 28 +- .../net/intel/ixgbe/ixgbe_rxtx_vec_common.c | 4 +- drivers/net/intel/ixgbe/rte_pmd_ixgbe.c | 34 - drivers/net/intel/ixgbe/rte_pmd_ixgbe.h | 32 - drivers/net/txgbe/txgbe_ethdev.c | 6 +- drivers/net/txgbe/txgbe_ethdev.h | 101 ++- drivers/net/txgbe/txgbe_fdir.c | 78 +-- drivers/net/txgbe/txgbe_flow.c | 24 +- drivers/net/txgbe/txgbe_rxtx_vec_common.h | 4 +- 26 files changed, 448 insertions(+), 1473 deletions(-)
Signature · 1 line
2.53.0
RFC 1/8 app/testpmd: remove support for flow director
The flow director API is deprecated and will be removed in 26.11. Remove it from testpmd now since testpmd CLI is not a stable API.
--- 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"
@@ -7510,11 +7510,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);
@@ -7527,14 +7522,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,
@@ -7572,10 +7567,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); }
@@ -7587,7 +7578,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);
@@ -7595,7 +7586,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
@@ -1185,9 +1185,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
@@ -2266,42 +2266,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
RFC 2/8 net/i40e: remove testpmd flow filter commands
In reply to Stephen HemmingerRemove the testpmd commands that drive the i40e PMD-private legacy flow filter API, which is being deprecated in DPDK 26.07 and removed in 26.11.
flow_director_filter
Drove rte_pmd_i40e_flow_add_del_packet_template().
port config <port_id> pctype <pctype_id>
hash_inset|fdir_inset|fdir_flx_inset get|set|clear field
port config <port_id> pctype <pctype_id>
hash_inset|fdir_inset|fdir_flx_inset clear all Drove the rte_pmd_i40e_inset_get/set and inset_field_* helpers.
show port <port_id> pctype mapping
port config <port_id> pctype mapping reset
port config <port_id> pctype mapping update ...
Drove rte_pmd_i40e_flow_type_mapping_get/reset/update().
The visually-similar "ptype mapping" commands (ptype mapping get/replace/reset/update) are preserved — they drive the unrelated rte_pmd_i40e_ptype_mapping_* DDP packet-type mapping API, which is not in scope for this series. The naming collision between "pctype mapping" (legacy flow-type mapping, removed here) and "ptype mapping" (DDP packet-type mapping, kept) was a long-standing source of confusion.
--- doc/guides/nics/i40e.rst | 70 +-- drivers/net/intel/i40e/i40e_testpmd.c | 642 -------------------------- 2 files changed, 4 insertions(+), 708 deletions(-)
doc/guides/nics/i40e.rst +4 -66
@@ -399,52 +399,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 ~~~~~~~~~~~~~
@@ -613,19 +567,10 @@ Limitations or Known issues MPLS packet classification ~~~~~~~~~~~~~~~~~~~~~~~~~~ -For firmware versions prior to 5.0, MPLS packets are not recognized by the NIC. -The L2 Payload flow type in flow director can be used to classify MPLS packet -by using a command in testpmd like: - - testpmd> flow_director_filter 0 mode IP add flow l2_payload ether \ - 0x8847 flexbytes () fwd pf queue <N> fd_id <M> - -With the NIC firmware version 5.0 or greater, some limited MPLS support -is added: Native MPLS (MPLS in Ethernet) skip is implemented, while no -new packet type, no classification or offload are possible. With this change, -L2 Payload flow type in flow director cannot be used to classify MPLS packet -as with previous firmware versions. Meanwhile, the Ethertype filter can be -used to classify MPLS packet by using a command in testpmd like: +With NIC firmware version 5.0 or greater, native MPLS (MPLS in +Ethernet) skip is implemented, although no new packet type, no +classification, and no offload are possible. +The Ethertype filter can be used to classify MPLS packets via testpmd:: testpmd> flow create 0 ingress pattern eth type is 0x8847 / end \ actions queue index <M> / end
@@ -878,13 +823,6 @@ Reset ptype mapping table:: testpmd> ptype mapping reset (port_id) -show port pctype mapping -~~~~~~~~~~~~~~~~~~~~~~~~ - -List all items from the pctype mapping table:: - - testpmd> show port (port_id) pctype mapping - High Performance of Small Packets on 40GbE NIC ----------------------------------------------
drivers/net/intel/i40e/i40e_testpmd.c +0 -642
672 lines not on this page · raw message
Signature · 1 line
2.53.0
RFC 3/8 net/i40e: deprecate legacy flow filter API
In reply to Stephen HemmingerThe i40e PMD-private filter configuration API in rte_pmd_i40e.h predates the rte_flow API and duplicates functionality now expressed as rte_flow rules. Mark the legacy entry points as deprecated so they can be removed in DPDK 26.11.
The two functions taking public rte_eth_fdir_* types (rte_pmd_i40e_get_fdir_info, rte_pmd_i40e_get_fdir_stats) are already marked __rte_experimental and will be removed alongside the ethdev fdir struct family in 26.11; they need no separate deprecation notice.
--- doc/guides/rel_notes/deprecation.rst | 3 + drivers/net/intel/i40e/rte_pmd_i40e.h | 80 ++++++++++++++++++++++++++- 2 files changed, 82 insertions(+), 1 deletion(-)
doc/guides/rel_notes/deprecation.rst +3 -0
@@ -158,3 +158,6 @@ Deprecation Notices * net/iavf: The dynamic mbuf field used to detect LLDP packets on the transmit path in the iavf PMD will be removed in a future release. After removal, only packet type-based detection will be supported. + +* net/i40e: The legacy filter configuration API in ``rte_pmd_i40e.h``, + superseded by the ``rte_flow`` API, will be removed in DPDK 26.11.
drivers/net/intel/i40e/rte_pmd_i40e.h +79 -1
197 lines not on this page · raw message
Signature · 1 line
2.53.0
RFC 4/8 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 deprecation warning.
--- 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
@@ -9309,8 +9309,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
@@ -1366,10 +1366,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
@@ -2461,8 +2461,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
@@ -1145,39 +1145,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
RFC 5/8 net/ixgbe: remove experimental FDIR API
In reply to Stephen HemmingerRemove the flow director related private APIs in ixgbe.
These APIs are experimental therefore they can be removed without deprecation warning.
--- 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
RFC 6/8 doc: announce legacy flow director deprecation
In reply to Stephen HemmingerAdd the formal deprecation notice for the legacy flow director API and the matching 26.07 release note.
--- doc/guides/rel_notes/deprecation.rst | 7 +++++++ doc/guides/rel_notes/release_26_07.rst | 14 ++++++++++++++ 2 files changed, 21 insertions(+)
doc/guides/rel_notes/deprecation.rst +7 -0
@@ -131,6 +131,13 @@ Deprecation Notices The legacy actions should be removed once ``MODIFY_FIELD`` alternative is implemented in drivers. +* ethdev: Legacy flow director API will be removed in DPDK 26.11. + This affects: flow director data structures in ``rte_eth_ctrl.h`` + (``rte_eth_fdir_*`` and ``rte_fdir_*`` types and the associated + ``RTE_ETH_FDIR_*`` / ``RTE_FDIR_*`` macros) and the driver-facing + definitions in ``ethdev_driver.h`` (``struct rte_eth_fdir_conf``, + ``enum rte_eth_fdir_pballoc_type``, ``enum rte_fdir_status_mode``). + * cryptodev: Support for OpenSSL versions earlier than 3.0 is deprecated and will be removed. OpenSSL 1.1.1 reached end-of-life in September 2023. The minimum supported OpenSSL version will be 3.0,
doc/guides/rel_notes/release_26_07.rst +14 -0
@@ -100,6 +100,18 @@ Removed Items Also, make sure to start the actual text at the margin. ======================================================= +* Removed legacy flow director artifacts that depended on deprecated API. + Users should use ``rte_flow`` API and testpmd ``flow`` + command instead. + + * app/testpmd: ``show port fdir``, ``clear port fdir``, + ``flow_director_filter``, ``port config ... pctype mapping ...``, + and ``port config ... hash_inset|fdir_inset|fdir_flx_inset ...``. + + * net/i40e, net/ixgbe: the experimental + ``rte_pmd_{i40e,ixgbe}_get_fdir_info()`` and + ``rte_pmd_{i40e,ixgbe}_get_fdir_stats()`` functions. + API Changes -----------
@@ -116,6 +128,8 @@ API Changes Also, make sure to start the actual text at the margin. ======================================================= +* Deprecated the legacy flow director API; removal scheduled for + DPDK 26.11. Use the ``rte_flow`` API instead. ABI Changes -----------
Signature · 1 line
2.53.0
RFC 7/8 net/ixgbe: privatize legacy flow director types
In reply to Stephen HemmingerThe ixgbe driver uses several legacy ethdev flow director types (struct rte_eth_fdir_conf, enum rte_fdir_mode, and related) from <rte_eth_ctrl.h> and <ethdev_driver.h> as its internal IR for translating rte_flow rules into hardware programming state. These types are scheduled for removal from ethdev in DPDK 26.11.
Clone the relevant types into ixgbe_ethdev.h with an ixgbe-private prefix so the driver no longer depends on the legacy ABI. The embedded rte_eth_ipv4_flow / rte_eth_ipv6_flow types are cloned too since they live in the same removal candidate set.
enum ixgbe_fdir_pballoc_type already exists in the Intel base driver (drivers/net/intel/ixgbe/base/ixgbe_type.h) and is reused as-is. Its values are NONE=0, 64K=1, 128K=2, 256K=3, whereas the ethdev enum started at 64K=0. The adapter's pballoc field was previously zero-initialized and relied on the ethdev convention that 0 means 64K; initialize it explicitly in eth_ixgbe_dev_init() to preserve that behavior under the base enum.
--- drivers/net/intel/ixgbe/ixgbe_ethdev.c | 12 +- drivers/net/intel/ixgbe/ixgbe_ethdev.h | 95 +++++++++++++- drivers/net/intel/ixgbe/ixgbe_fdir.c | 124 +++++++++--------- drivers/net/intel/ixgbe/ixgbe_flow.c | 28 ++-- .../net/intel/ixgbe/ixgbe_rxtx_vec_common.c | 4 +- 5 files changed, 177 insertions(+), 86 deletions(-)
drivers/net/intel/ixgbe/ixgbe_ethdev.c +10 -2
@@ -1471,6 +1471,14 @@ static int ixgbe_fdir_filter_init(struct rte_eth_dev *eth_dev)/* drop queue is always fixed */ IXGBE_DEV_FDIR_CONF (eth_dev)->drop_queue =IXGBE_FDIR_DROP_QUEUE ; +/* +* Initialize pballoc to 64K. The base driver's +* enum ixgbe_fdir_pballoc_type uses NONE=0, 64K=1, ... so an +* uninitialized (zero) pballoc would be rejected by +* configure_fdir_flags(); set it explicitly here. +*/ +IXGBE_DEV_FDIR_CONF (eth_dev)->pballoc =IXGBE_FDIR_PBALLOC_64K ; +return 0 ; }
@@ -2618,7 +2626,7 @@ ixgbe_dev_start(struct rte_eth_dev *dev)struct ixgbe_adapter *adapter =IXGBE_DEV_PRIVATE_TO_ADAPTER (dev->data->dev_private);struct ixgbe_hw *hw =IXGBE_DEV_PRIVATE_TO_HW (adapter); -struct rte_eth_fdir_conf *fdir_conf =IXGBE_DEV_FDIR_CONF (dev); +struct ixgbe_fdir_conf *fdir_conf =IXGBE_DEV_FDIR_CONF (dev);struct ixgbe_vf_info *vfinfo = *IXGBE_DEV_PRIVATE_TO_P_VFDATA (dev->data->dev_private);struct rte_pci_device *pci_dev =RTE_ETH_DEV_TO_PCI (dev);
@@ -2723,7 +2731,7 @@ ixgbe_dev_start(struct rte_eth_dev *dev)/* Configure DCB hw */ ixgbe_configure_dcb (dev); -if (fdir_conf->mode !=RTE_FDIR_MODE_NONE ) { +if (fdir_conf->mode !=IXGBE_FDIR_MODE_NONE ) {struct ixgbe_hw_fdir_info *info =IXGBE_DEV_PRIVATE_TO_FDIR_INFO (adapter); err =ixgbe_fdir_configure (adapter, fdir_conf, &info->mask);
drivers/net/intel/ixgbe/ixgbe_ethdev.h +89 -6
126 lines not on this page · raw message
drivers/net/intel/ixgbe/ixgbe_fdir.c +62 -62
357 lines not on this page · raw message
drivers/net/intel/ixgbe/ixgbe_flow.c +14 -14
@@ -1501,7 +1501,7 @@ ixgbe_parse_fdir_act_attr(const struct rte_flow_attr *attr, rule->queue = act_q->index; }else {/* drop */ /* signature mode does not support drop action. */ -if (rule->mode ==RTE_FDIR_MODE_SIGNATURE ) { +if (rule->mode ==IXGBE_FDIR_MODE_SIGNATURE ) {memset (rule,0 ,sizeof (struct ixgbe_fdir_rule )); rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ACTION,
@@ -1727,9 +1727,9 @@ ixgbe_parse_fdir_filter_normal(struct rte_eth_dev *dev, }if (signature_match (pattern)) - rule->mode =RTE_FDIR_MODE_SIGNATURE ; + rule->mode =IXGBE_FDIR_MODE_SIGNATURE ;else - rule->mode =RTE_FDIR_MODE_PERFECT ; + rule->mode =IXGBE_FDIR_MODE_PERFECT ;/*Not supported last point for range*/ if (item->last) {
@@ -1772,7 +1772,7 @@ ixgbe_parse_fdir_filter_normal(struct rte_eth_dev *dev,/* Ether type should be masked. */ if (eth_mask->hdr.ether_type || - rule->mode ==RTE_FDIR_MODE_SIGNATURE ) { + rule->mode ==IXGBE_FDIR_MODE_SIGNATURE ) {memset (rule,0 ,sizeof (struct ixgbe_fdir_rule )); rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM,
@@ -1781,7 +1781,7 @@ ixgbe_parse_fdir_filter_normal(struct rte_eth_dev *dev, }/* If ethernet has meaning, it means MAC VLAN mode. */ - rule->mode =RTE_FDIR_MODE_PERFECT_MAC_VLAN ; + rule->mode =IXGBE_FDIR_MODE_PERFECT_MAC_VLAN ;/** * src MAC address must be masked,
@@ -1812,7 +1812,7 @@ ixgbe_parse_fdir_filter_normal(struct rte_eth_dev *dev,* IPv6 is not supported. */ item =next_no_fuzzy_pattern (pattern, item); -if (rule->mode ==RTE_FDIR_MODE_PERFECT_MAC_VLAN ) { +if (rule->mode ==IXGBE_FDIR_MODE_PERFECT_MAC_VLAN ) {if (item->type !=RTE_FLOW_ITEM_TYPE_VLAN ) {memset (rule,0 ,sizeof (struct ixgbe_fdir_rule )); rte_flow_error_set(error, EINVAL,
@@ -1955,7 +1955,7 @@ ixgbe_parse_fdir_filter_normal(struct rte_eth_dev *dev,* 2. not support last * 3. mask must not null */ -if (rule->mode !=RTE_FDIR_MODE_SIGNATURE || +if (rule->mode !=IXGBE_FDIR_MODE_SIGNATURE || item->last || !item->mask) {memset (rule,0 ,sizeof (struct ixgbe_fdir_rule ));
@@ -2432,7 +2432,7 @@ ixgbe_parse_fdir_filter_tunnel(const struct rte_flow_attr *attr,return -rte_errno; } - rule->mode =RTE_FDIR_MODE_PERFECT_TUNNEL ; + rule->mode =IXGBE_FDIR_MODE_PERFECT_TUNNEL ;/* Skip MAC. */ if (item->type ==RTE_FLOW_ITEM_TYPE_ETH ) {
@@ -2920,8 +2920,8 @@ ixgbe_fdir_flow_program(struct rte_eth_dev *dev,bool *first_mask, struct rte_flow_error *error) { - struct rte_eth_fdir_conf *fdir_conf = IXGBE_DEV_FDIR_CONF(dev); -struct rte_eth_fdir_conf local_fdir_conf = *fdir_conf; + struct ixgbe_fdir_conf *fdir_conf = IXGBE_DEV_FDIR_CONF(dev); +struct ixgbe_fdir_conf local_fdir_conf = *fdir_conf;struct ixgbe_hw_fdir_info *fdir_info =IXGBE_DEV_PRIVATE_TO_FDIR_INFO (adapter);int ret;
@@ -2935,7 +2935,7 @@ ixgbe_fdir_flow_program(struct rte_eth_dev *dev, local_fdir_conf.mode = fdir_rule->mode;/* Configure FDIR mode if this is the first filter */ -if (fdir_conf->mode ==RTE_FDIR_MODE_NONE ) { +if (fdir_conf->mode ==IXGBE_FDIR_MODE_NONE ) { ret =ixgbe_fdir_configure (adapter, &local_fdir_conf, &fdir_rule->mask);if (ret) { return rte_flow_error_set(error, EINVAL,
@@ -3249,7 +3249,7 @@ ixgbe_flow_create(struct rte_eth_dev *dev, ret =ixgbe_parse_fdir_filter (dev, attr, pattern, actions, &fdir_rule, error);if (!ret) { -struct rte_eth_fdir_conf *fdir_conf =IXGBE_DEV_FDIR_CONF (dev); +struct ixgbe_fdir_conf *fdir_conf =IXGBE_DEV_FDIR_CONF (dev);bool first_mask = false; ret = ixgbe_fdir_flow_program(dev, adapter, &fdir_rule,
@@ -3420,7 +3420,7 @@ ixgbe_flow_destroy(struct rte_eth_dev *dev,struct ixgbe_filter_ele_base *flow_mem_base;struct ixgbe_hw_fdir_info *fdir_info =IXGBE_DEV_PRIVATE_TO_FDIR_INFO (adapter); -struct rte_eth_fdir_conf *fdir_conf =IXGBE_DEV_FDIR_CONF (dev); +struct ixgbe_fdir_conf *fdir_conf =IXGBE_DEV_FDIR_CONF (dev);struct ixgbe_rss_conf_ele *rss_filter_ptr;/* Validate ownership before touching HW/SW state. */
@@ -3487,7 +3487,7 @@ ixgbe_flow_destroy(struct rte_eth_dev *dev, fdir_info->mask_added = false; fdir_info->mask = (struct ixgbe_hw_fdir_mask ){0 }; fdir_info->flex_bytes_offset =0 ; - fdir_conf->mode =RTE_FDIR_MODE_NONE ; + fdir_conf->mode =IXGBE_FDIR_MODE_NONE ; } }break ;
drivers/net/intel/ixgbe/ixgbe_rxtx_vec_common.c +2 -2
@@ -120,10 +120,10 @@ int __rte_cold ixgbe_rx_vec_dev_conf_condition_check(struct rte_eth_dev *dev) {#ifndef RTE_LIBRTE_IEEE1588 -struct rte_eth_fdir_conf *fconf =IXGBE_DEV_FDIR_CONF (dev); +struct ixgbe_fdir_conf *fconf =IXGBE_DEV_FDIR_CONF (dev);/* no fdir support */ -if (fconf->mode !=RTE_FDIR_MODE_NONE ) +if (fconf->mode !=IXGBE_FDIR_MODE_NONE )return -1 ;for (uint16_t i =0 ; i < dev->data->nb_rx_queues; i++) {
Signature · 1 line
2.53.0
RFC 8/8 net/txgbe: privatize legacy flow director types
In reply to Stephen HemmingerThe txgbe driver inherited its flow director representation from ixgbe (it derives from the same hardware lineage) and uses the same legacy ethdev types (struct rte_eth_fdir_conf, enum rte_fdir_mode, and related) as its internal IR for translating rte_flow rules into hardware programming state. These types are scheduled for removal from ethdev in DPDK 26.11.
Clone the relevant types into txgbe_ethdev.h with a txgbe-private prefix so the driver no longer depends on the legacy ABI. The embedded rte_eth_ipv4_flow / rte_eth_ipv6_flow types are cloned too since they live in the same removal candidate set.
Unlike ixgbe, txgbe base/ does not pre-declare an
enum txgbe_fdir_pballoc_type, so the cloned one is defined here. txgbe uses the integer value of pballoc directly in the table- size calculation
(1024 << (fdir_conf->pballoc + 1)) - 2
so the enum values match the original ethdev numbering (64K=0, 128K=1, 256K=2). pballoc is set explicitly from devargs in txgbe_handle_devarg(), so no extra initialization is required.
--- drivers/net/txgbe/txgbe_ethdev.c | 6 +- drivers/net/txgbe/txgbe_ethdev.h | 101 +++++++++++++++++++++- drivers/net/txgbe/txgbe_fdir.c | 78 ++++++++--------- drivers/net/txgbe/txgbe_flow.c | 24 ++--- drivers/net/txgbe/txgbe_rxtx_vec_common.h | 4 +- 5 files changed, 155 insertions(+), 58 deletions(-)
drivers/net/txgbe/txgbe_ethdev.c +3 -3
@@ -524,7 +524,7 @@ txgbe_handle_devarg(__rte_unused const char *key, const char *value,static void txgbe_parse_devargs (struct rte_eth_dev *dev) { -struct rte_eth_fdir_conf *fdir_conf =TXGBE_DEV_FDIR_CONF (dev); +struct txgbe_fdir_conf *fdir_conf =TXGBE_DEV_FDIR_CONF (dev);struct rte_pci_device *pci_dev =RTE_ETH_DEV_TO_PCI (dev);struct rte_devargs *devargs = pci_dev->device.devargs;struct txgbe_hw *hw =TXGBE_DEV_HW (dev);
@@ -934,7 +934,7 @@ static int txgbe_l2_tn_filter_uninit(struct rte_eth_dev *eth_dev)int txgbe_fdir_filter_init (struct rte_eth_dev *eth_dev) { -struct rte_eth_fdir_conf *fdir_conf =TXGBE_DEV_FDIR_CONF (eth_dev); +struct txgbe_fdir_conf *fdir_conf =TXGBE_DEV_FDIR_CONF (eth_dev);struct txgbe_hw_fdir_info *fdir_info =TXGBE_DEV_FDIR (eth_dev);char fdir_hash_name[RTE_HASH_NAMESIZE ];u16 max_fdir_num = (1024 << (fdir_conf->pballoc +1 )) -2 ;
@@ -1834,7 +1834,7 @@ txgbe_dev_start(struct rte_eth_dev *dev)txgbe_configure_port (dev);txgbe_configure_dcb (dev); -if (TXGBE_DEV_FDIR_CONF (dev)->mode !=RTE_FDIR_MODE_NONE ) { +if (TXGBE_DEV_FDIR_CONF (dev)->mode !=TXGBE_FDIR_MODE_NONE ) { err =txgbe_fdir_configure (dev);if (err) goto error;
drivers/net/txgbe/txgbe_ethdev.h +99 -2
119 lines not on this page · raw message
drivers/net/txgbe/txgbe_fdir.c +39 -39
227 lines not on this page · raw message
drivers/net/txgbe/txgbe_flow.c +12 -12
@@ -1412,7 +1412,7 @@ txgbe_parse_fdir_act_attr(const struct rte_flow_attr *attr, rule->queue = act_q->index; }else {/* drop */ /* signature mode does not support drop action. */ -if (rule->mode ==RTE_FDIR_MODE_SIGNATURE ) { +if (rule->mode ==TXGBE_FDIR_MODE_SIGNATURE ) {memset (rule,0 ,sizeof (struct txgbe_fdir_rule )); rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ACTION,
@@ -1646,9 +1646,9 @@ txgbe_parse_fdir_filter_normal(struct rte_eth_dev *dev __rte_unused, }if (signature_match (pattern)) - rule->mode =RTE_FDIR_MODE_SIGNATURE ; + rule->mode =TXGBE_FDIR_MODE_SIGNATURE ;else - rule->mode =RTE_FDIR_MODE_PERFECT ; + rule->mode =TXGBE_FDIR_MODE_PERFECT ;/*Not supported last point for range*/ if (item->last) {
@@ -1678,7 +1678,7 @@ txgbe_parse_fdir_filter_normal(struct rte_eth_dev *dev __rte_unused,/* Ether type should be masked. */ if (eth_mask->hdr.ether_type || - rule->mode ==RTE_FDIR_MODE_SIGNATURE ) { + rule->mode ==TXGBE_FDIR_MODE_SIGNATURE ) {memset (rule,0 ,sizeof (struct txgbe_fdir_rule )); rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM,
@@ -1687,7 +1687,7 @@ txgbe_parse_fdir_filter_normal(struct rte_eth_dev *dev __rte_unused, }/* If ethernet has meaning, it means MAC VLAN mode. */ - rule->mode =RTE_FDIR_MODE_PERFECT_MAC_VLAN ; + rule->mode =TXGBE_FDIR_MODE_PERFECT_MAC_VLAN ;/** * src MAC address must be masked,
@@ -1718,7 +1718,7 @@ txgbe_parse_fdir_filter_normal(struct rte_eth_dev *dev __rte_unused,* IPv6 is not supported. */ item =next_no_fuzzy_pattern (pattern, item); -if (rule->mode ==RTE_FDIR_MODE_PERFECT_MAC_VLAN ) { +if (rule->mode ==TXGBE_FDIR_MODE_PERFECT_MAC_VLAN ) {if (item->type !=RTE_FLOW_ITEM_TYPE_VLAN ) {memset (rule,0 ,sizeof (struct txgbe_fdir_rule )); rte_flow_error_set(error, EINVAL,
@@ -2282,7 +2282,7 @@ txgbe_parse_fdir_filter_tunnel(const struct rte_flow_attr *attr,return -rte_errno; } - rule->mode =RTE_FDIR_MODE_PERFECT ; + rule->mode =TXGBE_FDIR_MODE_PERFECT ; ptid =TXGBE_PTID_PKT_TUN ;/* Skip MAC. */
@@ -2949,7 +2949,7 @@ txgbe_parse_fdir_filter(struct rte_eth_dev *dev, struct rte_flow_error *error) {int ret; -struct rte_eth_fdir_conf *fdir_conf =TXGBE_DEV_FDIR_CONF (dev); +struct txgbe_fdir_conf *fdir_conf =TXGBE_DEV_FDIR_CONF (dev); ret =txgbe_parse_fdir_filter_normal (dev, attr, pattern, actions, rule, error);
@@ -2965,11 +2965,11 @@ txgbe_parse_fdir_filter(struct rte_eth_dev *dev,if (!txgbe_is_pf (TXGBE_DEV_HW (dev)))return ret; -if (fdir_conf->mode ==RTE_FDIR_MODE_NONE ) { +if (fdir_conf->mode ==TXGBE_FDIR_MODE_NONE ) { fdir_conf->mode = rule->mode; ret =txgbe_fdir_configure (dev);if (ret) { - fdir_conf->mode =RTE_FDIR_MODE_NONE ; + fdir_conf->mode =TXGBE_FDIR_MODE_NONE ;return ret; } }else if (fdir_conf->mode != rule->mode) {
@@ -3562,7 +3562,7 @@ txgbe_flow_destroy(struct rte_eth_dev *dev,struct txgbe_fdir_rule_ele *fdir_rule_ptr;struct txgbe_flow_mem *txgbe_flow_mem_ptr;struct txgbe_hw_fdir_info *fdir_info =TXGBE_DEV_FDIR (dev); -struct rte_eth_fdir_conf *fdir_conf =TXGBE_DEV_FDIR_CONF (dev); +struct txgbe_fdir_conf *fdir_conf =TXGBE_DEV_FDIR_CONF (dev);struct txgbe_rss_conf_ele *rss_filter_ptr;switch (filter_type) {
@@ -3625,7 +3625,7 @@ txgbe_flow_destroy(struct rte_eth_dev *dev, fdir_info->mask_added = false; fdir_info->flex_relative = false; fdir_info->flex_bytes_offset =0 ; - fdir_conf->mode =RTE_FDIR_MODE_NONE ; + fdir_conf->mode =TXGBE_FDIR_MODE_NONE ; } }break ;
drivers/net/txgbe/txgbe_rxtx_vec_common.h +2 -2
@@ -299,10 +299,10 @@ static inline int txgbe_rx_vec_dev_conf_condition_check_default(struct rte_eth_dev *dev) {#ifndef RTE_LIBRTE_IEEE1588 -struct rte_eth_fdir_conf *fconf =TXGBE_DEV_FDIR_CONF (dev); +struct txgbe_fdir_conf *fconf =TXGBE_DEV_FDIR_CONF (dev);/* no fdir support */ -if (fconf->mode !=RTE_FDIR_MODE_NONE ) +if (fconf->mode !=TXGBE_FDIR_MODE_NONE )return -1 ;return 0 ;
Signature · 1 line
2.53.0
RE: [RFC 8/8] net/txgbe: privatize legacy flow director types
Quoted 31 lines
-----Original Message-----
From: Stephen Hemminger <[email protected]>
Sent: Friday, May 29, 2026 5:37 AM
To: [email protected]
Cc: Stephen Hemminger <[email protected]>; Jiawen Wu <[email protected]>; Zaiyu Wang <[email protected]>
Subject: [RFC 8/8] net/txgbe: privatize legacy flow director typesThe txgbe driver inherited its flow director representation from ixgbe (it derives from the same hardware lineage) and uses the same legacy ethdev types (struct
rte_eth_fdir_conf, enumrte_fdir_mode, and related) as its internal IR for translatingrte_flowrules into hardware programming state. These types are scheduled for removal from ethdev in DPDK 26.11.Clone the relevant types into
txgbe_ethdev.hwith a txgbe-private prefix so the driver no longer depends on the legacy ABI. The embeddedrte_eth_ipv4_flow/rte_eth_ipv6_flowtypes are cloned too since they live in the same removal candidate set.Unlike ixgbe, txgbe base/ does not pre-declare an
enumtxgbe_fdir_pballoc_type, so the cloned one is defined here. txgbe uses the integer value of pballoc directly in the table- size calculation(1024 << (fdir_conf->pballoc + 1)) - 2so the enum values match the original ethdev numbering (64K=0, 128K=1, 256K=2). pballoc is set explicitly from devargs in
txgbe_handle_devarg(), so no extra initialization is required.
Quoted 8 lines
Signed-off-by Stephen Hemminger <[email protected]>--- drivers/net/txgbe/txgbe_ethdev.c | 6 +- drivers/net/txgbe/txgbe_ethdev.h | 101 +++++++++++++++++++++- drivers/net/txgbe/txgbe_fdir.c | 78 ++++++++--------- drivers/net/txgbe/txgbe_flow.c | 24 ++--- drivers/net/txgbe/txgbe_rxtx_vec_common.h | 4 +- 5 files changed, 155 insertions(+), 58 deletions(-)
LGTM, thanks.
Quoted 528 lines
drivers/net/txgbe/txgbe_ethdev.c +3
-3@@ -524,7 +524,7 @@ txgbe_handle_devarg(__rte_unused const char *key, const char *value,static void txgbe_parse_devargs (struct rte_eth_dev *dev) { -struct rte_eth_fdir_conf *fdir_conf =TXGBE_DEV_FDIR_CONF (dev); +struct txgbe_fdir_conf *fdir_conf =TXGBE_DEV_FDIR_CONF (dev);struct rte_pci_device *pci_dev =RTE_ETH_DEV_TO_PCI (dev);struct rte_devargs *devargs = pci_dev->device.devargs;struct txgbe_hw *hw =TXGBE_DEV_HW (dev);@@ -934,7 +934,7 @@ static int txgbe_l2_tn_filter_uninit(struct rte_eth_dev *eth_dev)int txgbe_fdir_filter_init (struct rte_eth_dev *eth_dev) { -struct rte_eth_fdir_conf *fdir_conf =TXGBE_DEV_FDIR_CONF (eth_dev); +struct txgbe_fdir_conf *fdir_conf =TXGBE_DEV_FDIR_CONF (eth_dev);struct txgbe_hw_fdir_info *fdir_info =TXGBE_DEV_FDIR (eth_dev);char fdir_hash_name[RTE_HASH_NAMESIZE ];u16 max_fdir_num = (1024 << (fdir_conf->pballoc +1 )) -2 ;@@ -1834,7 +1834,7 @@ txgbe_dev_start(struct rte_eth_dev *dev)txgbe_configure_port (dev);txgbe_configure_dcb (dev); -if (TXGBE_DEV_FDIR_CONF (dev)->mode !=RTE_FDIR_MODE_NONE ) { +if (TXGBE_DEV_FDIR_CONF (dev)->mode !=TXGBE_FDIR_MODE_NONE ) { err =txgbe_fdir_configure (dev);if (err) goto error;drivers/net/txgbe/txgbe_ethdev.h +99
-2@@ -83,6 +83,103 @@/* * Information about the fdir mode. */ +/* +* Privatized flow director configuration types. +* +* Cloned from <rte_eth_ctrl.h> and <ethdev_driver.h> so that txgbe no +* longer depends on the legacy ethdev flow director ABI, which is +* scheduled for removal in DPDK 26.11. Semantics unchanged; only the +* names are txgbe-private. +* +* NB: txgbe uses the integer value of pballoc directly in +* (1024 << (fdir_conf->pballoc + 1)) - 2 +* to size the HW filter table. The enum values therefore match the +* original ethdev numbering (64K=0, 128K=1, 256K=2). +*/ +#define TXGBE_FDIR_MAX_FLEXLEN 16/**< Max length of flexbytes. */ + +struct txgbe_ipv4_flow { +uint32_t src_ip; +uint32_t dst_ip; +uint8_t tos; +uint8_t ttl; +uint8_t proto; +}; + +struct txgbe_ipv6_flow { +uint32_t src_ip[4 ]; +uint32_t dst_ip[4 ]; +uint8_t tc; +uint8_t proto; +uint8_t hop_limits; +}; + +struct txgbe_fdir_masks { +uint16_t vlan_tci_mask; +struct txgbe_ipv4_flow ipv4_mask; +struct txgbe_ipv6_flow ipv6_mask; +uint16_t src_port_mask; +uint16_t dst_port_mask; +uint8_t mac_addr_byte_mask; +uint32_t tunnel_id_mask; +uint8_t tunnel_type_mask; +}; + +enum txgbe_payload_type { +TXGBE_PAYLOAD_UNKNOWN =0 , +TXGBE_RAW_PAYLOAD , +TXGBE_L2_PAYLOAD , +TXGBE_L3_PAYLOAD , +TXGBE_L4_PAYLOAD , +TXGBE_PAYLOAD_MAX =8 , +}; + +struct txgbe_flex_payload_cfg { +enum txgbe_payload_type type; +uint16_t src_offset[TXGBE_FDIR_MAX_FLEXLEN ]; +}; + +struct txgbe_fdir_flex_mask { +uint16_t flow_type; +uint8_t mask[TXGBE_FDIR_MAX_FLEXLEN ]; +}; + +struct txgbe_fdir_flex_conf { +uint16_t nb_payloads; +uint16_t nb_flexmasks; +struct txgbe_flex_payload_cfg flex_set[TXGBE_PAYLOAD_MAX ]; +struct txgbe_fdir_flex_mask flex_mask[RTE_ETH_FLOW_MAX ]; +}; + +enum txgbe_fdir_mode { +TXGBE_FDIR_MODE_NONE =0 , +TXGBE_FDIR_MODE_SIGNATURE , +TXGBE_FDIR_MODE_PERFECT , +TXGBE_FDIR_MODE_PERFECT_MAC_VLAN , +TXGBE_FDIR_MODE_PERFECT_TUNNEL , +}; + +enum txgbe_fdir_pballoc_type { +TXGBE_FDIR_PBALLOC_64K =0 , +TXGBE_FDIR_PBALLOC_128K , +TXGBE_FDIR_PBALLOC_256K , +}; + +enum txgbe_fdir_status_mode { +TXGBE_FDIR_NO_REPORT_STATUS =0 , +TXGBE_FDIR_REPORT_STATUS , +TXGBE_FDIR_REPORT_STATUS_ALWAYS , +}; + +struct txgbe_fdir_conf { +enum txgbe_fdir_mode mode; +enum txgbe_fdir_pballoc_type pballoc; +enum txgbe_fdir_status_mode status; +uint8_t drop_queue; +struct txgbe_fdir_masks mask; +struct txgbe_fdir_flex_conf flex_conf; +}; +struct txgbe_hw_fdir_mask {uint16_t vlan_tci_mask;uint32_t src_ipv4_mask;@@ -111,7 +208,7 @@ struct txgbe_fdir_rule {struct txgbe_atr_input input;/* key of fdir filter */ bool b_spec;/* If TRUE, input, fdirflags, queue have meaning. */ bool b_mask;/* If TRUE, mask has meaning. */ -enum rte_fdir_mode mode;/* IP, MAC VLAN, Tunnel */ +enum txgbe_fdir_mode mode;/* IP, MAC VLAN, Tunnel */ uint32_t fdirflags;/* drop or forward */ uint32_t soft_id;/* an unique value for this rule */ uint8_t queue;/* assigned rx queue */ @@ -352,7 +449,7 @@ struct txgbe_tm_conf {struct txgbe_adapter {struct txgbe_hw hw;struct txgbe_hw_stats stats; -struct rte_eth_fdir_conf fdir_conf; +struct txgbe_fdir_conf fdir_conf;struct txgbe_hw_fdir_info fdir;struct txgbe_interrupt intr;struct txgbe_stat_mappings stat_mappings;drivers/net/txgbe/txgbe_fdir.c +39
-39@@ -102,22 +102,22 @@ txgbe_fdir_enable(struct txgbe_hw *hw, uint32_t fdirctrl)* flexbytes matching field, and drop queue (only for perfect matching mode). */ static inline int -configure_fdir_flags (const struct rte_eth_fdir_conf *conf, +configure_fdir_flags (const struct txgbe_fdir_conf *conf,uint32_t *fdirctrl,uint32_t *flex) { *fdirctrl =0 ; *flex =0 ;switch (conf->pballoc) { -case RTE_ETH_FDIR_PBALLOC_64K : +case TXGBE_FDIR_PBALLOC_64K :/* 8k - 1 signature filters */ *fdirctrl |=TXGBE_FDIRCTL_BUF_64K ;break ; -case RTE_ETH_FDIR_PBALLOC_128K : +case TXGBE_FDIR_PBALLOC_128K :/* 16k - 1 signature filters */ *fdirctrl |=TXGBE_FDIRCTL_BUF_128K ;break ; -case RTE_ETH_FDIR_PBALLOC_256K : +case TXGBE_FDIR_PBALLOC_256K :/* 32k - 1 signature filters */ *fdirctrl |=TXGBE_FDIRCTL_BUF_256K ;break ;@@ -129,14 +129,14 @@ configure_fdir_flags(const struct rte_eth_fdir_conf *conf,/* status flags: write hash & swindex in the rx descriptor */ switch (conf->status) { -case RTE_FDIR_NO_REPORT_STATUS : +case TXGBE_FDIR_NO_REPORT_STATUS :/* do nothing, default mode */ break ; -case RTE_FDIR_REPORT_STATUS : +case TXGBE_FDIR_REPORT_STATUS :/* report status when the packet matches a fdir rule */ *fdirctrl |=TXGBE_FDIRCTL_REPORT_MATCH ;break ; -case RTE_FDIR_REPORT_STATUS_ALWAYS : +case TXGBE_FDIR_REPORT_STATUS_ALWAYS :/* always report status */ *fdirctrl |=TXGBE_FDIRCTL_REPORT_ALWAYS ;break ;@@ -150,9 +150,9 @@ configure_fdir_flags(const struct rte_eth_fdir_conf *conf, *flex |=TXGBE_FDIRFLEXCFG_OFST (TXGBE_DEFAULT_FLEXBYTES_OFFSET /2 );switch (conf->mode) { -case RTE_FDIR_MODE_SIGNATURE : +case TXGBE_FDIR_MODE_SIGNATURE :break ; -case RTE_FDIR_MODE_PERFECT : +case TXGBE_FDIR_MODE_PERFECT : *fdirctrl |=TXGBE_FDIRCTL_PERFECT ; *fdirctrl |=TXGBE_FDIRCTL_DROPQP (conf->drop_queue);break ;@@ -179,7 +179,7 @@ txgbe_fdir_set_input_mask(struct rte_eth_dev *dev) {struct txgbe_hw *hw =TXGBE_DEV_HW (dev);struct txgbe_hw_fdir_info *info =TXGBE_DEV_FDIR (dev); -enum rte_fdir_mode mode =TXGBE_DEV_FDIR_CONF (dev)->mode; +enum txgbe_fdir_mode mode =TXGBE_DEV_FDIR_CONF (dev)->mode;/* * mask VM pool and DIPv6 since there are currently not supported * mask FLEX byte, it will be set in flex_conf @@ -190,8 +190,8 @@ txgbe_fdir_set_input_mask(struct rte_eth_dev *dev)PMD_INIT_FUNC_TRACE (); -if (mode !=RTE_FDIR_MODE_SIGNATURE && - mode !=RTE_FDIR_MODE_PERFECT ) { +if (mode !=TXGBE_FDIR_MODE_SIGNATURE && + mode !=TXGBE_FDIR_MODE_PERFECT ) {PMD_DRV_LOG (ERR ,"Not supported fdir mode - %d!" , mode);return -ENOTSUP ; }@@ -232,14 +232,14 @@ txgbe_fdir_set_input_mask(struct rte_eth_dev *dev)static int txgbe_fdir_store_input_mask (struct rte_eth_dev *dev) { -struct rte_eth_fdir_masks *input_mask = &TXGBE_DEV_FDIR_CONF (dev)->mask; -enum rte_fdir_mode mode =TXGBE_DEV_FDIR_CONF (dev)->mode; +struct txgbe_fdir_masks *input_mask = &TXGBE_DEV_FDIR_CONF (dev)->mask; +enum txgbe_fdir_mode mode =TXGBE_DEV_FDIR_CONF (dev)->mode;struct txgbe_hw_fdir_info *info =TXGBE_DEV_FDIR (dev);uint16_t dst_ipv6m =0 ;uint16_t src_ipv6m =0 ; -if (mode !=RTE_FDIR_MODE_SIGNATURE && - mode !=RTE_FDIR_MODE_PERFECT ) { +if (mode !=TXGBE_FDIR_MODE_SIGNATURE && + mode !=TXGBE_FDIR_MODE_PERFECT ) {PMD_DRV_LOG (ERR ,"Not supported fdir mode - %d!" , mode);return -ENOTSUP ; }@@ -304,12 +304,12 @@ txgbe_fdir_set_flexbytes_offset(struct rte_eth_dev *dev,static int txgbe_set_fdir_flex_conf (struct rte_eth_dev *dev,uint32_t flex) { -const struct rte_eth_fdir_flex_conf *conf = +const struct txgbe_fdir_flex_conf *conf = &TXGBE_DEV_FDIR_CONF (dev)->flex_conf;struct txgbe_hw *hw =TXGBE_DEV_HW (dev);struct txgbe_hw_fdir_info *info =TXGBE_DEV_FDIR (dev); -const struct rte_eth_flex_payload_cfg *flex_cfg; -const struct rte_eth_fdir_flex_mask *flex_mask; +const struct txgbe_flex_payload_cfg *flex_cfg; +const struct txgbe_fdir_flex_mask *flex_mask;uint16_t flexbytes =0 ;uint16_t i;@@ -322,7 +322,7 @@ txgbe_set_fdir_flex_conf(struct rte_eth_dev *dev, uint32_t flex)for (i =0 ; i < conf->nb_payloads; i++) { flex_cfg = &conf->flex_set[i]; -if (flex_cfg->type !=RTE_ETH_RAW_PAYLOAD ) { +if (flex_cfg->type !=TXGBE_RAW_PAYLOAD ) {PMD_DRV_LOG (ERR ,"unsupported payload type." );return -EINVAL ; }@@ -375,13 +375,13 @@ txgbe_fdir_configure(struct rte_eth_dev *dev)int err;uint32_t fdirctrl, flex, pbsize;int i; -enum rte_fdir_mode mode =TXGBE_DEV_FDIR_CONF (dev)->mode; +enum txgbe_fdir_mode mode =TXGBE_DEV_FDIR_CONF (dev)->mode;PMD_INIT_FUNC_TRACE ();/* supports mac-vlan and tunnel mode */ -if (mode !=RTE_FDIR_MODE_SIGNATURE && - mode !=RTE_FDIR_MODE_PERFECT ) +if (mode !=TXGBE_FDIR_MODE_SIGNATURE && + mode !=TXGBE_FDIR_MODE_PERFECT )return -ENOSYS ; err =configure_fdir_flags (TXGBE_DEV_FDIR_CONF (dev), &fdirctrl, &flex);@@ -531,15 +531,15 @@ txgbe_atr_compute_hash(struct txgbe_atr_input *atr_input,static uint32_t atr_compute_perfect_hash (struct txgbe_atr_input *input, -enum rte_eth_fdir_pballoc_type pballoc) +enum txgbe_fdir_pballoc_type pballoc) {uint32_t bucket_hash; bucket_hash =txgbe_atr_compute_hash (input,TXGBE_ATR_BUCKET_HASH_KEY ); -if (pballoc ==RTE_ETH_FDIR_PBALLOC_256K ) +if (pballoc ==TXGBE_FDIR_PBALLOC_256K ) bucket_hash &=PERFECT_BUCKET_256KB_HASH_MASK ; -else if (pballoc ==RTE_ETH_FDIR_PBALLOC_128K ) +else if (pballoc ==TXGBE_FDIR_PBALLOC_128K ) bucket_hash &=PERFECT_BUCKET_128KB_HASH_MASK ;else bucket_hash &=PERFECT_BUCKET_64KB_HASH_MASK ;@@ -574,15 +574,15 @@ txgbe_fdir_check_cmd_complete(struct txgbe_hw *hw, uint32_t *fdircmd)*/ static uint32_t atr_compute_signature_hash (struct txgbe_atr_input *input, -enum rte_eth_fdir_pballoc_type pballoc) +enum txgbe_fdir_pballoc_type pballoc) {uint32_t bucket_hash, sig_hash; bucket_hash =txgbe_atr_compute_hash (input,TXGBE_ATR_BUCKET_HASH_KEY ); -if (pballoc ==RTE_ETH_FDIR_PBALLOC_256K ) +if (pballoc ==TXGBE_FDIR_PBALLOC_256K ) bucket_hash &=SIG_BUCKET_256KB_HASH_MASK ; -else if (pballoc ==RTE_ETH_FDIR_PBALLOC_128K ) +else if (pballoc ==TXGBE_FDIR_PBALLOC_128K ) bucket_hash &=SIG_BUCKET_128KB_HASH_MASK ;else bucket_hash &=SIG_BUCKET_64KB_HASH_MASK ;@@ -603,7 +603,7 @@ static int fdir_write_perfect_filter(struct txgbe_hw *hw, struct txgbe_atr_input *input, uint8_t queue, uint32_t fdircmd, uint32_t fdirhash, - enum rte_fdir_mode mode) + enum txgbe_fdir_mode mode) { uint32_t fdirport, fdirflex;int err =0 ;@@ -830,14 +830,14 @@ txgbe_fdir_filter_program(struct rte_eth_dev *dev,bool is_perfect = FALSE;int err;struct txgbe_hw_fdir_info *info =TXGBE_DEV_FDIR (dev); -enum rte_fdir_mode fdir_mode =TXGBE_DEV_FDIR_CONF (dev)->mode; +enum txgbe_fdir_mode fdir_mode =TXGBE_DEV_FDIR_CONF (dev)->mode;struct txgbe_fdir_filter *node; -if (fdir_mode ==RTE_FDIR_MODE_NONE || +if (fdir_mode ==TXGBE_FDIR_MODE_NONE || fdir_mode != rule->mode)return -ENOTSUP ; -if (fdir_mode >=RTE_FDIR_MODE_PERFECT ) +if (fdir_mode >=TXGBE_FDIR_MODE_PERFECT ) is_perfect = TRUE;txgbe_fdir_mask_input (&info->mask, &rule->input);@@ -1021,7 +1021,7 @@ txgbevf_fdir_filter_program(struct rte_eth_dev *dev,uint32_t fdirhash;int ret; -if (rule->mode !=RTE_FDIR_MODE_PERFECT || +if (rule->mode !=TXGBE_FDIR_MODE_PERFECT || rule->fdirflags ==TXGBE_FDIRPICMD_DROP )return -ENOTSUP ;@@ -1109,10 +1109,10 @@ txgbe_fdir_filter_restore(struct rte_eth_dev *dev)struct txgbe_hw_fdir_info *fdir_info =TXGBE_DEV_FDIR (dev);struct txgbe_fdir_filter *node;bool is_perfect = FALSE; -enum rte_fdir_mode fdir_mode =TXGBE_DEV_FDIR_CONF (dev)->mode; +enum txgbe_fdir_mode fdir_mode =TXGBE_DEV_FDIR_CONF (dev)->mode; -if (fdir_mode >=RTE_FDIR_MODE_PERFECT && - fdir_mode <=RTE_FDIR_MODE_PERFECT_TUNNEL ) +if (fdir_mode >=TXGBE_FDIR_MODE_PERFECT && + fdir_mode <=TXGBE_FDIR_MODE_PERFECT_TUNNEL ) is_perfect = TRUE;if (is_perfect) {@@ -1139,7 +1139,7 @@ txgbe_fdir_filter_restore(struct rte_eth_dev *dev)int txgbe_clear_all_fdir_filter (struct rte_eth_dev *dev) { -struct rte_eth_fdir_conf *fdir_conf =TXGBE_DEV_FDIR_CONF (dev); +struct txgbe_fdir_conf *fdir_conf =TXGBE_DEV_FDIR_CONF (dev);struct txgbe_hw_fdir_info *fdir_info =TXGBE_DEV_FDIR (dev);struct txgbe_fdir_filter *fdir_filter;struct txgbe_fdir_filter *filter_flag;@@ -1150,7 +1150,7 @@ txgbe_clear_all_fdir_filter(struct rte_eth_dev *dev)memset (fdir_info->hash_map,0 ,sizeof (struct txgbe_fdir_filter *) * ((1024 << (fdir_conf->pballoc +1 )) -2 )); - fdir_conf->mode =RTE_FDIR_MODE_NONE ; + fdir_conf->mode =TXGBE_FDIR_MODE_NONE ; filter_flag =TAILQ_FIRST (&fdir_info->fdir_list);while ((fdir_filter =TAILQ_FIRST (&fdir_info->fdir_list))) { TAILQ_REMOVE(&fdir_info->fdir_list,drivers/net/txgbe/txgbe_flow.c +12
-12@@ -1412,7 +1412,7 @@ txgbe_parse_fdir_act_attr(const struct rte_flow_attr *attr, rule->queue = act_q->index; }else {/* drop */ /* signature mode does not support drop action. */ -if (rule->mode ==RTE_FDIR_MODE_SIGNATURE ) { +if (rule->mode ==TXGBE_FDIR_MODE_SIGNATURE ) {memset (rule,0 ,sizeof (struct txgbe_fdir_rule )); rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ACTION,@@ -1646,9 +1646,9 @@ txgbe_parse_fdir_filter_normal(struct rte_eth_dev *dev __rte_unused, }if (signature_match (pattern)) - rule->mode =RTE_FDIR_MODE_SIGNATURE ; + rule->mode =TXGBE_FDIR_MODE_SIGNATURE ;else - rule->mode =RTE_FDIR_MODE_PERFECT ; + rule->mode =TXGBE_FDIR_MODE_PERFECT ;/*Not supported last point for range*/ if (item->last) {@@ -1678,7 +1678,7 @@ txgbe_parse_fdir_filter_normal(struct rte_eth_dev *dev __rte_unused,/* Ether type should be masked. */ if (eth_mask->hdr.ether_type || - rule->mode ==RTE_FDIR_MODE_SIGNATURE ) { + rule->mode ==TXGBE_FDIR_MODE_SIGNATURE ) {memset (rule,0 ,sizeof (struct txgbe_fdir_rule )); rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM,@@ -1687,7 +1687,7 @@ txgbe_parse_fdir_filter_normal(struct rte_eth_dev *dev __rte_unused, }/* If ethernet has meaning, it means MAC VLAN mode. */ - rule->mode =RTE_FDIR_MODE_PERFECT_MAC_VLAN ; + rule->mode =TXGBE_FDIR_MODE_PERFECT_MAC_VLAN ;/** * src MAC address must be masked, @@ -1718,7 +1718,7 @@ txgbe_parse_fdir_filter_normal(struct rte_eth_dev *dev __rte_unused,* IPv6 is not supported. */ item =next_no_fuzzy_pattern (pattern, item); -if (rule->mode ==RTE_FDIR_MODE_PERFECT_MAC_VLAN ) { +if (rule->mode ==TXGBE_FDIR_MODE_PERFECT_MAC_VLAN ) {if (item->type !=RTE_FLOW_ITEM_TYPE_VLAN ) {memset (rule,0 ,sizeof (struct txgbe_fdir_rule )); rte_flow_error_set(error, EINVAL,@@ -2282,7 +2282,7 @@ txgbe_parse_fdir_filter_tunnel(const struct rte_flow_attr *attr,return -rte_errno; } - rule->mode =RTE_FDIR_MODE_PERFECT ; + rule->mode =TXGBE_FDIR_MODE_PERFECT ; ptid =TXGBE_PTID_PKT_TUN ;/* Skip MAC. */ @@ -2949,7 +2949,7 @@ txgbe_parse_fdir_filter(struct rte_eth_dev *dev, struct rte_flow_error *error) {int ret; -struct rte_eth_fdir_conf *fdir_conf =TXGBE_DEV_FDIR_CONF (dev); +struct txgbe_fdir_conf *fdir_conf =TXGBE_DEV_FDIR_CONF (dev); ret =txgbe_parse_fdir_filter_normal (dev, attr, pattern, actions, rule, error);@@ -2965,11 +2965,11 @@ txgbe_parse_fdir_filter(struct rte_eth_dev *dev,if (!txgbe_is_pf (TXGBE_DEV_HW (dev)))return ret; -if (fdir_conf->mode ==RTE_FDIR_MODE_NONE ) { +if (fdir_conf->mode ==TXGBE_FDIR_MODE_NONE ) { fdir_conf->mode = rule->mode; ret =txgbe_fdir_configure (dev);if (ret) { - fdir_conf->mode =RTE_FDIR_MODE_NONE ; + fdir_conf->mode =TXGBE_FDIR_MODE_NONE ;return ret; } }else if (fdir_conf->mode != rule->mode) {@@ -3562,7 +3562,7 @@ txgbe_flow_destroy(struct rte_eth_dev *dev,struct txgbe_fdir_rule_ele *fdir_rule_ptr;struct txgbe_flow_mem *txgbe_flow_mem_ptr;struct txgbe_hw_fdir_info *fdir_info =TXGBE_DEV_FDIR (dev); -struct rte_eth_fdir_conf *fdir_conf =TXGBE_DEV_FDIR_CONF (dev); +struct txgbe_fdir_conf *fdir_conf =TXGBE_DEV_FDIR_CONF (dev);struct txgbe_rss_conf_ele *rss_filter_ptr;switch (filter_type) {@@ -3625,7 +3625,7 @@ txgbe_flow_destroy(struct rte_eth_dev *dev, fdir_info->mask_added = false; fdir_info->flex_relative = false; fdir_info->flex_bytes_offset =0 ; - fdir_conf->mode =RTE_FDIR_MODE_NONE ; + fdir_conf->mode =TXGBE_FDIR_MODE_NONE ; } }break ;drivers/net/txgbe/txgbe_rxtx_vec_common.h +2
-3@@ -299,10 +299,10 @@ static inline int txgbe_rx_vec_dev_conf_condition_check_default(struct rte_eth_dev *dev) {#ifndef RTE_LIBRTE_IEEE1588 -struct rte_eth_fdir_conf *fconf =TXGBE_DEV_FDIR_CONF (dev); +struct txgbe_fdir_conf *fconf =TXGBE_DEV_FDIR_CONF (dev);/* no fdir support */ -if (fconf->mode !=RTE_FDIR_MODE_NONE ) +if (fconf->mode !=TXGBE_FDIR_MODE_NONE )return -1 ;return 0 ; --2.53.0