ethdev: deprecate legacy filter API
Subsystems (2)
PATCH 1/1 ethdev: deprecate legacy filter API
As stated in the deprecation notice from December 2016, "the legacy filter API, including rte_eth_dev_filter_supported(), rte_eth_dev_filter_ctrl() as well as filter types MACVLAN, ETHERTYPE, FLEXIBLE, SYN, NTUPLE, TUNNEL, FDIR, HASH and L2_TUNNEL, is superseded by the generic flow API (rte_flow)".
After a long wait of more than two years, the legacy filter API is marked as deprecated, while still tested with testpmd and the tep_termination example.
The next step will be to announce a deadline for complete removal. As preparation of the removal of rte_eth_ctrl.h, RTE_ETH_FLOW_*, RTE_TUNNEL_TYPE_* and RTE_ETH_HASH_FUNCTION_* definitions are moved to rte_ethdev.h and rte_flow.h.
--- app/test-pmd/cmdline.c | 1 - app/test-pmd/cmdline_flow.c | 1 - drivers/net/dpaa2/dpaa2_flow.c | 1 - drivers/net/dpaa2/dpaa2_mux.c | 1 - drivers/net/enic/enic_clsf.c | 1 - drivers/net/failsafe/failsafe_ops.c | 20 +-------- drivers/net/i40e/i40e_ethdev.c | 1 - drivers/net/i40e/i40e_ethdev.h | 1 - drivers/net/i40e/i40e_flow.c | 1 - drivers/net/mlx4/mlx4_flow.c | 1 - drivers/net/mlx4/mlx4_flow.h | 1 - drivers/net/mlx5/mlx5_flow.c | 1 - drivers/net/mlx5/mlx5_flow_dv.c | 1 - drivers/net/mlx5/mlx5_flow_verbs.c | 1 - drivers/net/sfc/sfc_flow.c | 1 - examples/tep_termination/Makefile | 2 + examples/tep_termination/meson.build | 1 + lib/librte_ethdev/rte_eth_ctrl.h | 64 +--------------------------- lib/librte_ethdev/rte_ethdev.h | 62 +++++++++++++++++++++++++-- lib/librte_ethdev/rte_flow.h | 11 ++++- 20 files changed, 75 insertions(+), 99 deletions(-)
app/test-pmd/cmdline.c +0 -1
@@ -44,7 +44,6 @@#include <rte_ethdev.h> #include <rte_string_fns.h> #include <rte_devargs.h> -#include <rte_eth_ctrl.h> #include <rte_flow.h> #include <rte_gro.h>
app/test-pmd/cmdline_flow.c +0 -1
@@ -15,7 +15,6 @@#include <rte_string_fns.h> #include <rte_common.h> -#include <rte_eth_ctrl.h> #include <rte_ethdev.h> #include <rte_byteorder.h> #include <cmdline_parse.h>
drivers/net/dpaa2/dpaa2_flow.c +0 -1
@@ -12,7 +12,6 @@#include <rte_ethdev.h> #include <rte_log.h> -#include <rte_eth_ctrl.h> #include <rte_malloc.h> #include <rte_flow_driver.h> #include <rte_tailq.h>
drivers/net/dpaa2/dpaa2_mux.c +0 -1
@@ -12,7 +12,6 @@#include <rte_ethdev.h> #include <rte_log.h> -#include <rte_eth_ctrl.h> #include <rte_malloc.h> #include <rte_flow_driver.h> #include <rte_tailq.h>
drivers/net/enic/enic_clsf.c +0 -1
@@ -11,7 +11,6 @@#include <rte_tcp.h> #include <rte_udp.h> #include <rte_sctp.h> -#include <rte_eth_ctrl.h> #include "enic_compat.h" #include "enic.h"
drivers/net/failsafe/failsafe_ops.c +2 -18
@@ -1208,33 +1208,17 @@ fs_rss_hash_update(struct rte_eth_dev *dev, }static int -fs_filter_ctrl (struct rte_eth_dev *dev, +fs_filter_ctrl(struct rte_eth_dev *dev __rte_unused,enum rte_filter_type type,enum rte_filter_op op,void *arg) { -struct sub_device *sdev; -uint8_t i; -int ret; -if (type ==RTE_ETH_FILTER_GENERIC && op ==RTE_ETH_FILTER_GET ) { *(const void **)arg = &fs_flow_ops;return 0 ; } -fs_lock (dev,0 ); - FOREACH_SUBDEV_STATE(sdev, i, dev, DEV_ACTIVE) { -DEBUG ("Calling rte_eth_dev_filter_ctrl on sub_device %d" , i); - ret =rte_eth_dev_filter_ctrl (PORT_ID (sdev), type, op, arg); -if ((ret =fs_err (sdev, ret))) { -ERROR ("Operation rte_eth_dev_filter_ctrl failed for sub_device %d" -" with error %d" , i, ret); -fs_unlock (dev,0 ); -return ret; - } - } -fs_unlock (dev,0 ); -return 0 ; +return -ENOTSUP ; }const struct eth_dev_ops failsafe_ops = {
drivers/net/i40e/i40e_ethdev.c +0 -1
@@ -24,7 +24,6 @@#include <rte_memcpy.h> #include <rte_alarm.h> #include <rte_dev.h> -#include <rte_eth_ctrl.h> #include <rte_tailq.h> #include <rte_hash_crc.h>
drivers/net/i40e/i40e_ethdev.h +0 -1
@@ -7,7 +7,6 @@#include <stdint.h> -#include <rte_eth_ctrl.h> #include <rte_time.h> #include <rte_kvargs.h> #include <rte_hash.h>
drivers/net/i40e/i40e_flow.c +0 -1
@@ -15,7 +15,6 @@#include <rte_ethdev_driver.h> #include <rte_log.h> #include <rte_malloc.h> -#include <rte_eth_ctrl.h> #include <rte_tailq.h> #include <rte_flow_driver.h>
drivers/net/mlx4/mlx4_flow.c +0 -1
@@ -28,7 +28,6 @@#include <rte_byteorder.h> #include <rte_errno.h> -#include <rte_eth_ctrl.h> #include <rte_ethdev_driver.h> #include <rte_ether.h> #include <rte_flow.h>
drivers/net/mlx4/mlx4_flow.h +0 -1
@@ -18,7 +18,6 @@#pragma GCC diagnostic error "-Wpedantic"#endif -#include <rte_eth_ctrl.h> #include <rte_ethdev_driver.h> #include <rte_flow.h> #include <rte_flow_driver.h>
drivers/net/mlx5/mlx5_flow.c +0 -1
@@ -21,7 +21,6 @@#include <rte_common.h> #include <rte_ether.h> -#include <rte_eth_ctrl.h> #include <rte_ethdev_driver.h> #include <rte_flow.h> #include <rte_flow_driver.h>
drivers/net/mlx5/mlx5_flow_dv.c +0 -1
@@ -19,7 +19,6 @@#include <rte_common.h> #include <rte_ether.h> -#include <rte_eth_ctrl.h> #include <rte_ethdev_driver.h> #include <rte_flow.h> #include <rte_flow_driver.h>
drivers/net/mlx5/mlx5_flow_verbs.c +0 -1
@@ -20,7 +20,6 @@#include <rte_common.h> #include <rte_ether.h> -#include <rte_eth_ctrl.h> #include <rte_ethdev_driver.h> #include <rte_flow.h> #include <rte_flow_driver.h>
drivers/net/sfc/sfc_flow.c +0 -1
@@ -11,7 +11,6 @@#include <rte_tailq.h> #include <rte_common.h> #include <rte_ethdev_driver.h> -#include <rte_eth_ctrl.h> #include <rte_ether.h> #include <rte_flow.h> #include <rte_flow_driver.h>
examples/tep_termination/Makefile +2 -0
@@ -26,6 +26,7 @@ LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) CFLAGS += -DALLOW_EXPERIMENTAL_API +CFLAGS += -Wno-deprecated-declarations build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)
@@ -60,6 +61,7 @@ endif CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +CFLAGS += -Wno-deprecated-declarations include $(RTE_SDK)/mk/rte.extapp.mk endif
examples/tep_termination/meson.build +1 -0
@@ -11,6 +11,7 @@ if host_machine.system() != 'linux' endif deps += ['hash', 'vhost'] allow_experimental_apis = true +cflags += '-Wno-deprecated-declarations' sources = files( 'main.c', 'vxlan.c', 'vxlan_setup.c' )
lib/librte_ethdev/rte_eth_ctrl.h +2 -62
94 lines not on this page · raw message
lib/librte_ethdev/rte_ethdev.h +58 -4
98 lines not on this page · raw message
lib/librte_ethdev/rte_flow.h +10 -1
@@ -20,7 +20,6 @@#include <rte_arp.h> #include <rte_common.h> #include <rte_ether.h> -#include <rte_eth_ctrl.h> #include <rte_icmp.h> #include <rte_ip.h> #include <rte_sctp.h>
@@ -1738,6 +1737,16 @@ struct rte_flow_query_count {uint64_t bytes;/**< Number of bytes through this rule [out]. */ }; +/** +* Hash function types. +*/ +enum rte_eth_hash_function { +RTE_ETH_HASH_FUNCTION_DEFAULT =0 , +RTE_ETH_HASH_FUNCTION_TOEPLITZ ,/**< Toeplitz */ +RTE_ETH_HASH_FUNCTION_SIMPLE_XOR ,/**< Simple XOR */ +RTE_ETH_HASH_FUNCTION_MAX , +}; +/** * RTE_FLOW_ACTION_TYPE_RSS *
Signature · 1 line
2.21.0
Wednesday, April 17, 2019 3:36 AM, Thomas Monjalon:
Quoted 12 lines
Subject: [PATCH] ethdev: deprecate legacy filter API
As stated in the deprecation notice from December 2016, "the legacy filter API, including
rte_eth_dev_filter_supported(),rte_eth_dev_filter_ctrl()as well as filter types MACVLAN, ETHERTYPE, FLEXIBLE, SYN, NTUPLE, TUNNEL, FDIR, HASH andL2_TUNNEL, is superseded by the generic flow API (rte_flow)".After a long wait of more than two years, the legacy filter API is marked as deprecated, while still tested with testpmd and the
tep_terminationexample.
Quoted 6 lines
The next step will be to announce a deadline for complete removal. As preparation of the removal of
rte_eth_ctrl.h, RTE_ETH_FLOW_*, RTE_TUNNEL_TYPE_* and RTE_ETH_HASH_FUNCTION_* definitions are moved torte_ethdev.handrte_flow.h.Signed-off-by Thomas Monjalon <[email protected]>
It's about time 😊.
Quoted 523 lines
--- app/test-pmd/cmdline.c | 1 - app/test-pmd/cmdline_flow.c | 1 - drivers/net/dpaa2/dpaa2_flow.c | 1 - drivers/net/dpaa2/dpaa2_mux.c | 1 - drivers/net/enic/enic_clsf.c | 1 - drivers/net/failsafe/failsafe_ops.c | 20 +-------- drivers/net/i40e/i40e_ethdev.c | 1 - drivers/net/i40e/i40e_ethdev.h | 1 - drivers/net/i40e/i40e_flow.c | 1 - drivers/net/mlx4/mlx4_flow.c | 1 - drivers/net/mlx4/mlx4_flow.h | 1 - drivers/net/mlx5/mlx5_flow.c | 1 - drivers/net/mlx5/mlx5_flow_dv.c | 1 - drivers/net/mlx5/mlx5_flow_verbs.c | 1 - drivers/net/sfc/sfc_flow.c | 1 - examples/tep_termination/Makefile | 2 + examples/tep_termination/meson.build | 1 + lib/librte_ethdev/rte_eth_ctrl.h | 64 +--------------------------- lib/librte_ethdev/rte_ethdev.h | 62 +++++++++++++++++++++++++-- lib/librte_ethdev/rte_flow.h | 11 ++++- 20 files changed, 75 insertions(+), 99 deletions(-)app/test-pmd/cmdline.c index renamed from app/test-pmd/cmdline.c +0
-0
2ab03c111..3e405d262100644app/test-pmd/cmdline.c +0
-1@@ -44,7 +44,6 @@#include <rte_ethdev.h> #include <rte_string_fns.h> #include <rte_devargs.h> -#include <rte_eth_ctrl.h> #include <rte_flow.h> #include <rte_gro.h> app/test-pmd/cmdline_flow.c +0
-1@@ -15,7 +15,6 @@#include <rte_string_fns.h> #include <rte_common.h> -#include <rte_eth_ctrl.h> #include <rte_ethdev.h> #include <rte_byteorder.h> #include <cmdline_parse.h> (quoted diff) +0
-0
b/drivers/net/dpaa2/dpaa2_flow.cindexc94c7ef6b..98f68139b100644drivers/net/dpaa2/dpaa2_flow.c +0
-1@@ -12,7 +12,6 @@#include <rte_ethdev.h> #include <rte_log.h> -#include <rte_eth_ctrl.h> #include <rte_malloc.h> #include <rte_flow_driver.h> #include <rte_tailq.h> (quoted diff) +0
-0
b/drivers/net/dpaa2/dpaa2_mux.cindex1d043dcdc..e487c6b54100644drivers/net/dpaa2/dpaa2_mux.c +0
-1@@ -12,7 +12,6 @@#include <rte_ethdev.h> #include <rte_log.h> -#include <rte_eth_ctrl.h> #include <rte_malloc.h> #include <rte_flow_driver.h> #include <rte_tailq.h> drivers/net/enic/enic_clsf.c index renamed from drivers/net/enic/enic_clsf.c +0
-0
48c8e6264..53f57b01a100644drivers/net/enic/enic_clsf.c +0
-1@@ -11,7 +11,6 @@#include <rte_tcp.h> #include <rte_udp.h> #include <rte_sctp.h> -#include <rte_eth_ctrl.h> #include "enic_compat.h" #include "enic.h" drivers/net/failsafe/failsafe_ops.c +1
-11@@ -1208,33 +1208,17 @@ fs_rss_hash_update(struct rte_eth_dev *dev, }static int -fs_filter_ctrl (struct rte_eth_dev *dev, +fs_filter_ctrl(struct rte_eth_dev *dev __rte_unused,enum rte_filter_type type,enum rte_filter_op op,void *arg) { -struct sub_device *sdev; -uint8_t i; -int ret; -if (type ==RTE_ETH_FILTER_GENERIC && op ==RTE_ETH_FILTER_GET ) { *(const void **)arg = &fs_flow_ops;return 0 ; } -fs_lock (dev,0 ); - FOREACH_SUBDEV_STATE(sdev, i, dev, DEV_ACTIVE) { -DEBUG ("Calling rte_eth_dev_filter_ctrl on sub_device %d" , i); - ret =rte_eth_dev_filter_ctrl (PORT_ID (sdev), type, op, arg); -if ((ret =fs_err (sdev, ret))) { - ERROR("Operation rte_eth_dev_filter_ctrl failed for
sub_device%d"drivers/net/failsafe/failsafe_ops.c +1
-7- " with error %d", i, ret); -fs_unlock (dev,0 ); -return ret; - } - } -fs_unlock (dev,0 ); -return 0 ; +return -ENOTSUP ; } const struct eth_dev_ops failsafe_ops = { diff --git
a/drivers/net/i40e/i40e_ethdev.cb/drivers/net/i40e/i40e_ethdev.cindex5b01dc1f0..f6fc0056c100644drivers/net/i40e/i40e_ethdev.c +0
-1@@ -24,7 +24,6 @@#include <rte_memcpy.h> #include <rte_alarm.h> #include <rte_dev.h> -#include <rte_eth_ctrl.h> #include <rte_tailq.h> #include <rte_hash_crc.h> (quoted diff) +0
-0
b/drivers/net/i40e/i40e_ethdev.hindex930eb9aba..98550380e100644drivers/net/i40e/i40e_ethdev.h +0
-1@@ -7,7 +7,6 @@#include <stdint.h> -#include <rte_eth_ctrl.h> #include <rte_time.h> #include <rte_kvargs.h> #include <rte_hash.h> drivers/net/i40e/i40e_flow.c +0
-1@@ -15,7 +15,6 @@#include <rte_ethdev_driver.h> #include <rte_log.h> #include <rte_malloc.h> -#include <rte_eth_ctrl.h> #include <rte_tailq.h> #include <rte_flow_driver.h> drivers/net/mlx4/mlx4_flow.c +0
-1@@ -28,7 +28,6 @@#include <rte_byteorder.h> #include <rte_errno.h> -#include <rte_eth_ctrl.h> #include <rte_ethdev_driver.h> #include <rte_ether.h> #include <rte_flow.h> drivers/net/mlx4/mlx4_flow.h +0
-1@@ -18,7 +18,6 @@#pragma GCC diagnostic error "-Wpedantic"#endif -#include <rte_eth_ctrl.h> #include <rte_ethdev_driver.h> #include <rte_flow.h> #include <rte_flow_driver.h> drivers/net/mlx5/mlx5_flow.c +0
-1@@ -21,7 +21,6 @@#include <rte_common.h> #include <rte_ether.h> -#include <rte_eth_ctrl.h> #include <rte_ethdev_driver.h> #include <rte_flow.h> #include <rte_flow_driver.h> (quoted diff) +0
-0
b/drivers/net/mlx5/mlx5_flow_dv.cindexccb2f7593..04c969b73100644drivers/net/mlx5/mlx5_flow_dv.c +0
-1@@ -19,7 +19,6 @@#include <rte_common.h> #include <rte_ether.h> -#include <rte_eth_ctrl.h> #include <rte_ethdev_driver.h> #include <rte_flow.h> #include <rte_flow_driver.h> drivers/net/mlx5/mlx5_flow_verbs.c +0
-1@@ -20,7 +20,6 @@#include <rte_common.h> #include <rte_ether.h> -#include <rte_eth_ctrl.h> #include <rte_ethdev_driver.h> #include <rte_flow.h> #include <rte_flow_driver.h> drivers/net/sfc/sfc_flow.c index renamed from drivers/net/sfc/sfc_flow.c +0
-0
cffcd9a4c..944296d7d100644drivers/net/sfc/sfc_flow.c +0
-1@@ -11,7 +11,6 @@#include <rte_tailq.h> #include <rte_common.h> #include <rte_ethdev_driver.h> -#include <rte_eth_ctrl.h> #include <rte_ether.h> #include <rte_flow.h> #include <rte_flow_driver.h> examples/tep_termination/Makefile +2
-0@@ -26,6 +26,7 @@ LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) CFLAGS += -DALLOW_EXPERIMENTAL_API +CFLAGS += -Wno-deprecated-declarations build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)@@ -60,6 +61,7 @@ endif CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +CFLAGS += -Wno-deprecated-declarations include $(RTE_SDK)/mk/rte.extapp.mk endifexamples/tep_termination/meson.build +1
-0@@ -11,6 +11,7 @@ if host_machine.system() != 'linux' endif deps += ['hash', 'vhost'] allow_experimental_apis = true +cflags += '-Wno-deprecated-declarations' sources = files( 'main.c', 'vxlan.c', 'vxlan_setup.c' )lib/librte_ethdev/rte_eth_ctrl.h +2
-24@@ -8,55 +8,20 @@#include <stdint.h> #include <rte_common.h> #include "rte_ether.h" +#include "rte_flow.h" /** +* @deprecated Please use rte_flow API instead of this legacy one. * @file * * Ethernet device features and related data structures used * by control APIs should be defined in this file. -* */ #ifdef __cplusplusextern "C" {#endif -/* -* A packet can be identified by hardware as different flow types. Different -* NIC hardwares may support different flow types. -* Basically, the NIC hardware identifies the flow type as deep protocol as -* possible, and exclusively. For example, if a packet is identified as -* 'RTE_ETH_FLOW_NONFRAG_IPV4_TCP', it will not be any of other flow types, -* though it is an actual IPV4 packet. -* Note that the flow types are used to define RSS offload types in -* rte_ethdev.h. -*/ -#define RTE_ETH_FLOW_UNKNOWN 0 -#define RTE_ETH_FLOW_RAW 1 -#define RTE_ETH_FLOW_IPV4 2 -#define RTE_ETH_FLOW_FRAG_IPV4 3 -#define RTE_ETH_FLOW_NONFRAG_IPV4_TCP 4 -#define RTE_ETH_FLOW_NONFRAG_IPV4_UDP 5 -#define RTE_ETH_FLOW_NONFRAG_IPV4_SCTP 6 -#define RTE_ETH_FLOW_NONFRAG_IPV4_OTHER 7 -#define RTE_ETH_FLOW_IPV6 8 -#define RTE_ETH_FLOW_FRAG_IPV6 9 -#define RTE_ETH_FLOW_NONFRAG_IPV6_TCP 10 -#define RTE_ETH_FLOW_NONFRAG_IPV6_UDP 11 -#define RTE_ETH_FLOW_NONFRAG_IPV6_SCTP 12 -#define
RTE_ETH_FLOW_NONFRAG_IPV6_OTHER13lib/librte_ethdev/rte_eth_ctrl.h +0
-7-#define RTE_ETH_FLOW_L2_PAYLOAD 14 -#define RTE_ETH_FLOW_IPV6_EX 15 -#define RTE_ETH_FLOW_IPV6_TCP_EX 16 -#define RTE_ETH_FLOW_IPV6_UDP_EX 17 -#define RTE_ETH_FLOW_PORT 18 -/**< Consider device port number as a flow differentiator */ -#define RTE_ETH_FLOW_VXLAN 19/**< VXLAN protocol based flow */
-#defineRTE_ETH_FLOW_GENEVE20 /**< GENEVE protocol based
flow */
-#defineRTE_ETH_FLOW_NVGRE21 /**< NVGRE protocol based flow
*/
-#defineRTE_ETH_FLOW_VXLAN_GPE22 /**< VXLAN-GPE protocol
based flow */lib/librte_ethdev/rte_eth_ctrl.h +0
-27-#define RTE_ETH_FLOW_MAX 23 -/** * Feature filter types */ @@ -218,21 +183,6 @@ struct rte_eth_ntuple_filter {uint16_t queue;/**< Queue assigned to when match*/ }; -/** -* Tunneled type. -*/ -enum rte_eth_tunnel_type { -RTE_TUNNEL_TYPE_NONE =0 , -RTE_TUNNEL_TYPE_VXLAN , -RTE_TUNNEL_TYPE_GENEVE , -RTE_TUNNEL_TYPE_TEREDO , -RTE_TUNNEL_TYPE_NVGRE , -RTE_TUNNEL_TYPE_IP_IN_GRE , -RTE_L2_TUNNEL_TYPE_E_TAG , -RTE_TUNNEL_TYPE_VXLAN_GPE , -RTE_TUNNEL_TYPE_MAX , -}; -/** * filter type of tunneling packet */ @@ -765,16 +715,6 @@ enum rte_eth_hash_filter_info_type { RTE_ETH_HASH_FILTER_INFO_TYPE_MAX, }; -/** -* Hash function types. -*/ -enum rte_eth_hash_function { -RTE_ETH_HASH_FUNCTION_DEFAULT =0 , -RTE_ETH_HASH_FUNCTION_TOEPLITZ ,/**< Toeplitz */ -RTE_ETH_HASH_FUNCTION_SIMPLE_XOR ,/**< Simple XOR */ -RTE_ETH_HASH_FUNCTION_MAX , -}; -#define RTE_SYM_HASH_MASK_ARRAY_SIZE \ (RTE_ALIGN(RTE_ETH_FLOW_MAX, UINT64_BIT)/UINT64_BIT)/** lib/librte_ethdev/rte_ethdev.h +0
-3@@ -158,7 +158,6 @@ extern "C" {#include <rte_config.h> #include "rte_ether.h" -#include "rte_eth_ctrl.h" #include "rte_dev_info.h" extern int rte_eth_dev_logtype;@@ -448,8 +447,43 @@ struct rte_eth_rss_conf { };/* -* The RSS offload types are defined based on flow types which are defined -* in rte_eth_ctrl.h. Different NIC hardwares may support different RSS offload
+ * A packet can be identified by hardware as different flow types.lib/librte_ethdev/rte_ethdev.h +31
-0+Different +* NIC hardwares may support different flow types. +* Basically, the NIC hardware identifies the flow type as deep +protocol as +* possible, and exclusively. For example, if a packet is identified as +* 'RTE_ETH_FLOW_NONFRAG_IPV4_TCP', it will not be any of other flow +types, +* though it is an actual IPV4 packet. +* Note that the flow types are used to define RSS offload types. +*/ +#define RTE_ETH_FLOW_UNKNOWN 0 +#define RTE_ETH_FLOW_RAW 1 +#define RTE_ETH_FLOW_IPV4 2 +#define RTE_ETH_FLOW_FRAG_IPV4 3 +#define RTE_ETH_FLOW_NONFRAG_IPV4_TCP 4 +#define RTE_ETH_FLOW_NONFRAG_IPV4_UDP 5 +#define RTE_ETH_FLOW_NONFRAG_IPV4_SCTP 6 +#define RTE_ETH_FLOW_NONFRAG_IPV4_OTHER 7 +#define RTE_ETH_FLOW_IPV6 8 +#define RTE_ETH_FLOW_FRAG_IPV6 9 +#define RTE_ETH_FLOW_NONFRAG_IPV6_TCP 10 +#define RTE_ETH_FLOW_NONFRAG_IPV6_UDP 11 +#define RTE_ETH_FLOW_NONFRAG_IPV6_SCTP 12 #define +RTE_ETH_FLOW_NONFRAG_IPV6_OTHER 13 +#define RTE_ETH_FLOW_L2_PAYLOAD 14 +#define RTE_ETH_FLOW_IPV6_EX 15 +#define RTE_ETH_FLOW_IPV6_TCP_EX 16 +#define RTE_ETH_FLOW_IPV6_UDP_EX 17 +#define RTE_ETH_FLOW_PORT 18 +/**< Consider device port number as a flow differentiator */ +#define RTE_ETH_FLOW_VXLAN 19/**< VXLAN protocol based flow */
+#defineRTE_ETH_FLOW_GENEVE20 /**< GENEVE protocol based
flow */
+#defineRTE_ETH_FLOW_NVGRE21 /**< NVGRE protocol based flow
*/
+#defineRTE_ETH_FLOW_VXLAN_GPE22 /**< VXLAN-GPE protocol
based flow */lib/librte_ethdev/rte_ethdev.h +23
-0+#define RTE_ETH_FLOW_MAX 23 + +/* +* The RSS offload types are defined based on flow types. +* Different NIC hardwares may support different RSS offload * types. The supported flow types or RSS offload types can be queried by * rte_eth_dev_info_get(). */ @@ -834,6 +868,24 @@ struct rte_eth_pfc_conf {uint8_t priority;/**< VLAN User Priority. */ }; +/** +* Tunneled type. +*/ +enum rte_eth_tunnel_type { +RTE_TUNNEL_TYPE_NONE =0 , +RTE_TUNNEL_TYPE_VXLAN , +RTE_TUNNEL_TYPE_GENEVE , +RTE_TUNNEL_TYPE_TEREDO , +RTE_TUNNEL_TYPE_NVGRE , +RTE_TUNNEL_TYPE_IP_IN_GRE , +RTE_L2_TUNNEL_TYPE_E_TAG , +RTE_TUNNEL_TYPE_VXLAN_GPE , +RTE_TUNNEL_TYPE_MAX , +}; + +/* Deprecated API file for rte_eth_dev_filter_* functions */ #include +"rte_eth_ctrl.h" +/** * Memory space that can be configured to store Flow Director filters * in the board memory. @@ -934,7 +986,7 @@ struct rte_eth_conf {/** Currently,Priority Flow Control(PFC) are supported,if DCB with PFC
is needed,and the variable must be setETH_DCB_PFC_SUPPORT.
*/lib/librte_ethdev/rte_ethdev.h +1
-1uint32_t dcb_capability_en; -struct rte_fdir_conf fdir_conf;/**< FDIR configuration. */ +struct rte_fdir_conf fdir_conf;/**< FDIR configuration. DEPRECATED */
structrte_intr_confintr_conf; /**< Interrupt mode configuration. */
};lib/librte_ethdev/rte_ethdev.h +2
-0@@ -3251,6 +3303,7 @@ rte_eth_dev_udp_tunnel_port_delete(uint16_tport_id, * - (-ENODEV) if *port_id* invalid. * - (-EIO) if device is removed. */ +__rte_deprecated int rte_eth_dev_filter_supported(uint16_t port_id,enum rte_filter_type filter_type);@@ -3273,6 +3326,7 @@ int rte_eth_dev_filter_supported(uint16_t port_id,* - (-EIO) if device is removed. * - others depends on the specific operations implementation. */ +__rte_deprecated int rte_eth_dev_filter_ctrl(uint16_t port_id, enum rte_filter_type filter_type,enum rte_filter_op filter_op,void *arg);lib/librte_ethdev/rte_flow.h index renamed from lib/librte_ethdev/rte_flow.h +0
-0
c0fe87924..63f84fca6100644lib/librte_ethdev/rte_flow.h +10
-2@@ -20,7 +20,6 @@#include <rte_arp.h> #include <rte_common.h> #include <rte_ether.h> -#include <rte_eth_ctrl.h> #include <rte_icmp.h> #include <rte_ip.h> #include <rte_sctp.h> @@ -1738,6 +1737,16 @@ struct rte_flow_query_count {uint64_t bytes;/**< Number of bytes through this rule [out]. */ }; +/** +* Hash function types. +*/ +enum rte_eth_hash_function { +RTE_ETH_HASH_FUNCTION_DEFAULT =0 , +RTE_ETH_HASH_FUNCTION_TOEPLITZ ,/**< Toeplitz */ +RTE_ETH_HASH_FUNCTION_SIMPLE_XOR ,/**< Simple XOR */ +RTE_ETH_HASH_FUNCTION_MAX , +}; +/** * RTE_FLOW_ACTION_TYPE_RSS * -- 2.21.0
Jerin Jacob Kollanukkaran
Acked-byQuoted 36 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Shahaf Shuler
Sent: Wednesday, April 17, 2019 11:11 AM
To: Thomas Monjalon <[email protected]>; Wenzhuo Lu <[email protected]>; Jingjing Wu <[email protected]>; Bernard Iremonger <[email protected]>; Adrien Mazarguil <[email protected]>; Hemant Agrawal <[email protected]>; Shreyansh Jain <[email protected]>; John Daley <[email protected]>; Hyong Youb Kim <[email protected]>; Gaetan Rivet <[email protected]>; Beilei Xing <[email protected]>; Qi Zhang <[email protected]>; Matan Azrad <[email protected]>; Yongseok Koh <[email protected]>; Andrew Rybchenko <[email protected]>; John McNamara <[email protected]>; Pablo de Lara <[email protected]>; Bruce Richardson <[email protected]>; Harry van Haaren <[email protected]>; Xiaoyun Li <[email protected]>; Ferruh Yigit <[email protected]>
Cc: [email protected]
Subject: Re: [dpdk-dev] [PATCH] ethdev: deprecate legacy filter APIWednesday, April 17, 2019 3:36 AM, Thomas Monjalon:
Quoted 8 lines
Subject: [PATCH] ethdev: deprecate legacy filter API
As stated in the deprecation notice from December 2016, "the legacy filter API, including
rte_eth_dev_filter_supported(),rte_eth_dev_filter_ctrl()as well as filter types MACVLAN, ETHERTYPE, FLEXIBLE, SYN, NTUPLE, TUNNEL, FDIR, HASH andL2_TUNNEL, is superseded by the generic flow API (rte_flow)".Quoted 7 lines
After a long wait of more than two years, the legacy filter API is marked as deprecated, while still tested with testpmd and the
tep_terminationexample.The next step will be to announce a deadline for complete removal. As preparation of the removal of
rte_eth_ctrl.h, RTE_ETH_FLOW_*, RTE_TUNNEL_TYPE_* and RTE_ETH_HASH_FUNCTION_* definitions are
Quoted 6 lines
moved to
Quoted 3 lines
rte_ethdev.handrte_flow.h.Signed-off-by Thomas Monjalon <[email protected]>Acked-by Shahaf Shuler <[email protected]>
Andrew Rybchenko
Acked-byQuoted 18 lines · Shahaf Shuler
Wednesday, April 17, 2019 3:36 AM, Thomas Monjalon:
Quoted 17 lines
Subject: [PATCH] ethdev: deprecate legacy filter API
As stated in the deprecation notice from December 2016, "the legacy filter API, including
rte_eth_dev_filter_supported(),rte_eth_dev_filter_ctrl()as well as filter types MACVLAN, ETHERTYPE, FLEXIBLE, SYN, NTUPLE, TUNNEL, FDIR, HASH andL2_TUNNEL, is superseded by the generic flow API (rte_flow)".After a long wait of more than two years, the legacy filter API is marked as deprecated, while still tested with testpmd and the
tep_terminationexample.The next step will be to announce a deadline for complete removal. As preparation of the removal of
rte_eth_ctrl.h, RTE_ETH_FLOW_*, RTE_TUNNEL_TYPE_* and RTE_ETH_HASH_FUNCTION_* definitions are moved torte_ethdev.handrte_flow.h.
Quoted 4 lines
Quoted 1 line
Signed-off-by Thomas Monjalon <[email protected]>Acked-by Shahaf Shuler <[email protected]>It's about time 😊.
Quoted 10 lines · On Wed, 17 Apr 2019 02:36:27 +0200 Thomas Monjalon <[email protected]> wrote:
As stated in the deprecation notice from December 2016, "the legacy filter API, including
rte_eth_dev_filter_supported(),rte_eth_dev_filter_ctrl()as well as filter types MACVLAN, ETHERTYPE, FLEXIBLE, SYN, NTUPLE, TUNNEL, FDIR, HASH andL2_TUNNEL, is superseded by the generic flow API (rte_flow)".After a long wait of more than two years, the legacy filter API is marked as deprecated, while still tested with testpmd and the
tep_terminationexample.
Quoted 6 lines
The next step will be to announce a deadline for complete removal. As preparation of the removal of
rte_eth_ctrl.h, RTE_ETH_FLOW_*, RTE_TUNNEL_TYPE_* and RTE_ETH_HASH_FUNCTION_* definitions are moved torte_ethdev.handrte_flow.h.Signed-off-by Thomas Monjalon <[email protected]>
Quoted 2 lines
drivers/net/dpaa2/dpaa2_flow.c | 1 - drivers/net/dpaa2/dpaa2_mux.c | 1 -
Quoted 10 lines · Thomas Monjalon
As stated in the deprecation notice from December 2016, "the legacy filter API, including
rte_eth_dev_filter_supported(),rte_eth_dev_filter_ctrl()as well as filter types MACVLAN, ETHERTYPE, FLEXIBLE, SYN, NTUPLE, TUNNEL, FDIR, HASH andL2_TUNNEL, is superseded by the generic flow API (rte_flow)".After a long wait of more than two years, the legacy filter API is marked as deprecated, while still tested with testpmd and the
tep_terminationexample.
Quoted 6 lines
The next step will be to announce a deadline for complete removal. As preparation of the removal of
rte_eth_ctrl.h, RTE_ETH_FLOW_*, RTE_TUNNEL_TYPE_* and RTE_ETH_HASH_FUNCTION_* definitions are moved torte_ethdev.handrte_flow.h.Signed-off-by Thomas Monjalon <[email protected]>
Signature · 2 lines
Adrien Mazarguil 6WIND
Quoted 10 lines · Thomas Monjalon
As stated in the deprecation notice from December 2016, "the legacy filter API, including
rte_eth_dev_filter_supported(),rte_eth_dev_filter_ctrl()as well as filter types MACVLAN, ETHERTYPE, FLEXIBLE, SYN, NTUPLE, TUNNEL, FDIR, HASH andL2_TUNNEL, is superseded by the generic flow API (rte_flow)".After a long wait of more than two years, the legacy filter API is marked as deprecated, while still tested with testpmd and the
tep_terminationexample.
Quoted 7 lines
The next step will be to announce a deadline for complete removal. As preparation of the removal of
rte_eth_ctrl.h, RTE_ETH_FLOW_*, RTE_TUNNEL_TYPE_* and RTE_ETH_HASH_FUNCTION_* definitions are moved torte_ethdev.handrte_flow.h.Signed-off-by Thomas Monjalon <[email protected]>
Quoted 537 lines
--- app/test-pmd/cmdline.c | 1 - app/test-pmd/cmdline_flow.c | 1 - drivers/net/dpaa2/dpaa2_flow.c | 1 - drivers/net/dpaa2/dpaa2_mux.c | 1 - drivers/net/enic/enic_clsf.c | 1 - drivers/net/failsafe/failsafe_ops.c | 20 +-------- drivers/net/i40e/i40e_ethdev.c | 1 - drivers/net/i40e/i40e_ethdev.h | 1 - drivers/net/i40e/i40e_flow.c | 1 - drivers/net/mlx4/mlx4_flow.c | 1 - drivers/net/mlx4/mlx4_flow.h | 1 - drivers/net/mlx5/mlx5_flow.c | 1 - drivers/net/mlx5/mlx5_flow_dv.c | 1 - drivers/net/mlx5/mlx5_flow_verbs.c | 1 - drivers/net/sfc/sfc_flow.c | 1 - examples/tep_termination/Makefile | 2 + examples/tep_termination/meson.build | 1 + lib/librte_ethdev/rte_eth_ctrl.h | 64 +--------------------------- lib/librte_ethdev/rte_ethdev.h | 62 +++++++++++++++++++++++++-- lib/librte_ethdev/rte_flow.h | 11 ++++- 20 files changed, 75 insertions(+), 99 deletions(-)app/test-pmd/cmdline.c +0
-1@@ -44,7 +44,6 @@#include <rte_ethdev.h> #include <rte_string_fns.h> #include <rte_devargs.h> -#include <rte_eth_ctrl.h> #include <rte_flow.h> #include <rte_gro.h> app/test-pmd/cmdline_flow.c +0
-1@@ -15,7 +15,6 @@#include <rte_string_fns.h> #include <rte_common.h> -#include <rte_eth_ctrl.h> #include <rte_ethdev.h> #include <rte_byteorder.h> #include <cmdline_parse.h> drivers/net/dpaa2/dpaa2_flow.c +0
-1@@ -12,7 +12,6 @@#include <rte_ethdev.h> #include <rte_log.h> -#include <rte_eth_ctrl.h> #include <rte_malloc.h> #include <rte_flow_driver.h> #include <rte_tailq.h> drivers/net/dpaa2/dpaa2_mux.c +0
-1@@ -12,7 +12,6 @@#include <rte_ethdev.h> #include <rte_log.h> -#include <rte_eth_ctrl.h> #include <rte_malloc.h> #include <rte_flow_driver.h> #include <rte_tailq.h> drivers/net/enic/enic_clsf.c +0
-1@@ -11,7 +11,6 @@#include <rte_tcp.h> #include <rte_udp.h> #include <rte_sctp.h> -#include <rte_eth_ctrl.h> #include "enic_compat.h" #include "enic.h" drivers/net/failsafe/failsafe_ops.c +1
-11@@ -1208,33 +1208,17 @@ fs_rss_hash_update(struct rte_eth_dev *dev, }static int -fs_filter_ctrl (struct rte_eth_dev *dev, +fs_filter_ctrl(struct rte_eth_dev *dev __rte_unused,enum rte_filter_type type,enum rte_filter_op op,void *arg) { -struct sub_device *sdev; -uint8_t i; -int ret; -if (type ==RTE_ETH_FILTER_GENERIC && op ==RTE_ETH_FILTER_GET ) { *(const void **)arg = &fs_flow_ops;return 0 ; } -fs_lock (dev,0 ); - FOREACH_SUBDEV_STATE(sdev, i, dev, DEV_ACTIVE) { -DEBUG ("Calling rte_eth_dev_filter_ctrl on sub_device %d" , i); - ret =rte_eth_dev_filter_ctrl (PORT_ID (sdev), type, op, arg); -if ((ret =fs_err (sdev, ret))) { - ERROR("Operation rte_eth_dev_filter_ctrl failedfor
sub_device%d"drivers/net/failsafe/failsafe_ops.c +1
-7- " with error %d", i, ret); -fs_unlock (dev,0 ); -return ret; - } - } -fs_unlock (dev,0 ); -return 0 ; +return -ENOTSUP ; }const struct eth_dev_ops failsafe_ops = {drivers/net/i40e/i40e_ethdev.c +0
-1@@ -24,7 +24,6 @@#include <rte_memcpy.h> #include <rte_alarm.h> #include <rte_dev.h> -#include <rte_eth_ctrl.h> #include <rte_tailq.h> #include <rte_hash_crc.h> drivers/net/i40e/i40e_ethdev.h +0
-1@@ -7,7 +7,6 @@#include <stdint.h> -#include <rte_eth_ctrl.h> #include <rte_time.h> #include <rte_kvargs.h> #include <rte_hash.h> drivers/net/i40e/i40e_flow.c +0
-1@@ -15,7 +15,6 @@#include <rte_ethdev_driver.h> #include <rte_log.h> #include <rte_malloc.h> -#include <rte_eth_ctrl.h> #include <rte_tailq.h> #include <rte_flow_driver.h> drivers/net/mlx4/mlx4_flow.c +0
-1@@ -28,7 +28,6 @@#include <rte_byteorder.h> #include <rte_errno.h> -#include <rte_eth_ctrl.h> #include <rte_ethdev_driver.h> #include <rte_ether.h> #include <rte_flow.h> drivers/net/mlx4/mlx4_flow.h +0
-1@@ -18,7 +18,6 @@#pragma GCC diagnostic error "-Wpedantic"#endif -#include <rte_eth_ctrl.h> #include <rte_ethdev_driver.h> #include <rte_flow.h> #include <rte_flow_driver.h> drivers/net/mlx5/mlx5_flow.c +0
-1@@ -21,7 +21,6 @@#include <rte_common.h> #include <rte_ether.h> -#include <rte_eth_ctrl.h> #include <rte_ethdev_driver.h> #include <rte_flow.h> #include <rte_flow_driver.h> drivers/net/mlx5/mlx5_flow_dv.c +0
-1@@ -19,7 +19,6 @@#include <rte_common.h> #include <rte_ether.h> -#include <rte_eth_ctrl.h> #include <rte_ethdev_driver.h> #include <rte_flow.h> #include <rte_flow_driver.h> drivers/net/mlx5/mlx5_flow_verbs.c +0
-1@@ -20,7 +20,6 @@#include <rte_common.h> #include <rte_ether.h> -#include <rte_eth_ctrl.h> #include <rte_ethdev_driver.h> #include <rte_flow.h> #include <rte_flow_driver.h> drivers/net/sfc/sfc_flow.c +0
-1@@ -11,7 +11,6 @@#include <rte_tailq.h> #include <rte_common.h> #include <rte_ethdev_driver.h> -#include <rte_eth_ctrl.h> #include <rte_ether.h> #include <rte_flow.h> #include <rte_flow_driver.h> examples/tep_termination/Makefile +2
-0@@ -26,6 +26,7 @@ LDFLAGS_SHARED = $(shell pkg-config --libs libdpdk) LDFLAGS_STATIC = -Wl,-Bstatic $(shell pkg-config --static --libs libdpdk) CFLAGS += -DALLOW_EXPERIMENTAL_API +CFLAGS += -Wno-deprecated-declarations build/$(APP)-shared: $(SRCS-y) Makefile $(PC_FILE) | build $(CC) $(CFLAGS) $(SRCS-y) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED)@@ -60,6 +61,7 @@ endif CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +CFLAGS += -Wno-deprecated-declarations include $(RTE_SDK)/mk/rte.extapp.mk endifexamples/tep_termination/meson.build +1
-0@@ -11,6 +11,7 @@ if host_machine.system() != 'linux' endif deps += ['hash', 'vhost'] allow_experimental_apis = true +cflags += '-Wno-deprecated-declarations' sources = files( 'main.c', 'vxlan.c', 'vxlan_setup.c' )lib/librte_ethdev/rte_eth_ctrl.h +2
-3@@ -8,55 +8,20 @@#include <stdint.h> #include <rte_common.h> #include "rte_ether.h" +#include "rte_flow.h" /** +* @deprecated Please use rte_flow API instead of this legacy one. * @file * * Ethernet device features and related data structures used * by control APIs should be defined in this file. -* */ #ifdef __cplusplusextern "C" {#endif -/* -* A packet can be identified by hardware as different flow types. Different
- * NIC hardwares may support different flow types.
- * Basically, the NIC hardware identifies the flow type as deep protocol as
- * possible, and exclusively. For example, if a packet is identified as
- * 'RTE_ETH_FLOW_NONFRAG_IPV4_TCP', it will not be any of other flow types,
- * though it is an actual IPV4 packet.
- * Note that the flow types are used to define RSS offload types in
- *rte_ethdev.h.
- */lib/librte_ethdev/rte_eth_ctrl.h +0
-21-#define RTE_ETH_FLOW_UNKNOWN 0 -#define RTE_ETH_FLOW_RAW 1 -#define RTE_ETH_FLOW_IPV4 2 -#define RTE_ETH_FLOW_FRAG_IPV4 3 -#define RTE_ETH_FLOW_NONFRAG_IPV4_TCP 4 -#define RTE_ETH_FLOW_NONFRAG_IPV4_UDP 5 -#define RTE_ETH_FLOW_NONFRAG_IPV4_SCTP 6 -#define RTE_ETH_FLOW_NONFRAG_IPV4_OTHER 7 -#define RTE_ETH_FLOW_IPV6 8 -#define RTE_ETH_FLOW_FRAG_IPV6 9 -#define RTE_ETH_FLOW_NONFRAG_IPV6_TCP 10 -#define RTE_ETH_FLOW_NONFRAG_IPV6_UDP 11 -#define RTE_ETH_FLOW_NONFRAG_IPV6_SCTP 12 -#define RTE_ETH_FLOW_NONFRAG_IPV6_OTHER 13 -#define RTE_ETH_FLOW_L2_PAYLOAD 14 -#define RTE_ETH_FLOW_IPV6_EX 15 -#define RTE_ETH_FLOW_IPV6_TCP_EX 16 -#define RTE_ETH_FLOW_IPV6_UDP_EX 17 -#define RTE_ETH_FLOW_PORT 18 -/**< Consider device port number as a flow differentiator */ -#define RTE_ETH_FLOW_VXLAN 19/**< VXLAN protocol based flow */
-#defineRTE_ETH_FLOW_GENEVE20 /**< GENEVE protocol based
flow */
-#defineRTE_ETH_FLOW_NVGRE21 /**< NVGRE protocol based flow
*/
-#defineRTE_ETH_FLOW_VXLAN_GPE22 /**< VXLAN-GPE protocol based
flow */lib/librte_ethdev/rte_eth_ctrl.h +0
-27-#define RTE_ETH_FLOW_MAX 23 -/** * Feature filter types */ @@ -218,21 +183,6 @@ struct rte_eth_ntuple_filter {uint16_t queue;/**< Queue assigned to when match*/ }; -/** -* Tunneled type. -*/ -enum rte_eth_tunnel_type { -RTE_TUNNEL_TYPE_NONE =0 , -RTE_TUNNEL_TYPE_VXLAN , -RTE_TUNNEL_TYPE_GENEVE , -RTE_TUNNEL_TYPE_TEREDO , -RTE_TUNNEL_TYPE_NVGRE , -RTE_TUNNEL_TYPE_IP_IN_GRE , -RTE_L2_TUNNEL_TYPE_E_TAG , -RTE_TUNNEL_TYPE_VXLAN_GPE , -RTE_TUNNEL_TYPE_MAX , -}; -/** * filter type of tunneling packet */ @@ -765,16 +715,6 @@ enum rte_eth_hash_filter_info_type { RTE_ETH_HASH_FILTER_INFO_TYPE_MAX, }; -/** -* Hash function types. -*/ -enum rte_eth_hash_function { -RTE_ETH_HASH_FUNCTION_DEFAULT =0 , -RTE_ETH_HASH_FUNCTION_TOEPLITZ ,/**< Toeplitz */ -RTE_ETH_HASH_FUNCTION_SIMPLE_XOR ,/**< Simple XOR */ -RTE_ETH_HASH_FUNCTION_MAX , -}; -#define RTE_SYM_HASH_MASK_ARRAY_SIZE \ (RTE_ALIGN(RTE_ETH_FLOW_MAX, UINT64_BIT)/UINT64_BIT)/** lib/librte_ethdev/rte_ethdev.h +0
-3@@ -158,7 +158,6 @@ extern "C" {#include <rte_config.h> #include "rte_ether.h" -#include "rte_eth_ctrl.h" #include "rte_dev_info.h" extern int rte_eth_dev_logtype;@@ -448,8 +447,43 @@ struct rte_eth_rss_conf { };/* -* The RSS offload types are defined based on flow types which are defined -* in rte_eth_ctrl.h. Different NIC hardwares may support different RSS offload
+ * A packet can be identified by hardware as different flow types. Different
+ * NIC hardwares may support different flow types.
+ * Basically, the NIC hardware identifies the flow type as deep protocol as
+ * possible, and exclusively. For example, if a packet is identified as
+ * 'RTE_ETH_FLOW_NONFRAG_IPV4_TCP', it will not be any of other flow types,
+ * though it is an actual IPV4 packet.
+ * Note that the flow types are used to define RSS offload types.
+ */lib/librte_ethdev/rte_ethdev.h +21
-0+#define RTE_ETH_FLOW_UNKNOWN 0 +#define RTE_ETH_FLOW_RAW 1 +#define RTE_ETH_FLOW_IPV4 2 +#define RTE_ETH_FLOW_FRAG_IPV4 3 +#define RTE_ETH_FLOW_NONFRAG_IPV4_TCP 4 +#define RTE_ETH_FLOW_NONFRAG_IPV4_UDP 5 +#define RTE_ETH_FLOW_NONFRAG_IPV4_SCTP 6 +#define RTE_ETH_FLOW_NONFRAG_IPV4_OTHER 7 +#define RTE_ETH_FLOW_IPV6 8 +#define RTE_ETH_FLOW_FRAG_IPV6 9 +#define RTE_ETH_FLOW_NONFRAG_IPV6_TCP 10 +#define RTE_ETH_FLOW_NONFRAG_IPV6_UDP 11 +#define RTE_ETH_FLOW_NONFRAG_IPV6_SCTP 12 +#define RTE_ETH_FLOW_NONFRAG_IPV6_OTHER 13 +#define RTE_ETH_FLOW_L2_PAYLOAD 14 +#define RTE_ETH_FLOW_IPV6_EX 15 +#define RTE_ETH_FLOW_IPV6_TCP_EX 16 +#define RTE_ETH_FLOW_IPV6_UDP_EX 17 +#define RTE_ETH_FLOW_PORT 18 +/**< Consider device port number as a flow differentiator */ +#define RTE_ETH_FLOW_VXLAN 19/**< VXLAN protocol based flow */
+#defineRTE_ETH_FLOW_GENEVE20 /**< GENEVE protocol based
flow */
+#defineRTE_ETH_FLOW_NVGRE21 /**< NVGRE protocol based flow
*/
+#defineRTE_ETH_FLOW_VXLAN_GPE22 /**< VXLAN-GPE protocol based
flow */lib/librte_ethdev/rte_ethdev.h +23
-0+#define RTE_ETH_FLOW_MAX 23 + +/* +* The RSS offload types are defined based on flow types. +* Different NIC hardwares may support different RSS offload * types. The supported flow types or RSS offload types can be queried by * rte_eth_dev_info_get(). */ @@ -834,6 +868,24 @@ struct rte_eth_pfc_conf {uint8_t priority;/**< VLAN User Priority. */ }; +/** +* Tunneled type. +*/ +enum rte_eth_tunnel_type { +RTE_TUNNEL_TYPE_NONE =0 , +RTE_TUNNEL_TYPE_VXLAN , +RTE_TUNNEL_TYPE_GENEVE , +RTE_TUNNEL_TYPE_TEREDO , +RTE_TUNNEL_TYPE_NVGRE , +RTE_TUNNEL_TYPE_IP_IN_GRE , +RTE_L2_TUNNEL_TYPE_E_TAG , +RTE_TUNNEL_TYPE_VXLAN_GPE , +RTE_TUNNEL_TYPE_MAX , +}; + +/* Deprecated API file for rte_eth_dev_filter_* functions */ +#include "rte_eth_ctrl.h" +/** * Memory space that can be configured to store Flow Director filters * in the board memory. @@ -934,7 +986,7 @@ struct rte_eth_conf {/** Currently,Priority Flow Control(PFC) are supported,if DCB with PFC
is needed,and the variable must be setETH_DCB_PFC_SUPPORT. */
uint32_tdcb_capability_en;lib/librte_ethdev/rte_ethdev.h +1
-1-struct rte_fdir_conf fdir_conf;/**< FDIR configuration. */ +struct rte_fdir_conf fdir_conf;/**< FDIR configuration. DEPRECATED */
structrte_intr_confintr_conf; /**< Interrupt mode configuration.
*/
};lib/librte_ethdev/rte_ethdev.h +2
-0@@ -3251,6 +3303,7 @@ rte_eth_dev_udp_tunnel_port_delete(uint16_t port_id,* - (-ENODEV) if *port_id* invalid. * - (-EIO) if device is removed. */ +__rte_deprecated int rte_eth_dev_filter_supported(uint16_t port_id,enum rte_filter_type filter_type);@@ -3273,6 +3326,7 @@ int rte_eth_dev_filter_supported(uint16_t port_id,* - (-EIO) if device is removed. * - others depends on the specific operations implementation. */ +__rte_deprecated int rte_eth_dev_filter_ctrl(uint16_t port_id, enum rte_filter_type filter_type,enum rte_filter_op filter_op,void *arg);lib/librte_ethdev/rte_flow.h +10
-2@@ -20,7 +20,6 @@#include <rte_arp.h> #include <rte_common.h> #include <rte_ether.h> -#include <rte_eth_ctrl.h> #include <rte_icmp.h> #include <rte_ip.h> #include <rte_sctp.h> @@ -1738,6 +1737,16 @@ struct rte_flow_query_count {uint64_t bytes;/**< Number of bytes through this rule [out]. */ }; +/** +* Hash function types. +*/ +enum rte_eth_hash_function { +RTE_ETH_HASH_FUNCTION_DEFAULT =0 , +RTE_ETH_HASH_FUNCTION_TOEPLITZ ,/**< Toeplitz */ +RTE_ETH_HASH_FUNCTION_SIMPLE_XOR ,/**< Simple XOR */ +RTE_ETH_HASH_FUNCTION_MAX , +}; +/** * RTE_FLOW_ACTION_TYPE_RSS * -- 2.21.0
Ferruh Yigit
Acked-by Shahaf Shuler Acked-by Andrew Rybchenko Acked-by Jerin Jacob Acked-by Stephen Hemminger Acked-by Hemant Agrawal Acked-by Adrien Mazarguil AppliedQuoted 12 lines · Ajit Khaparde
Quoted 10 lines · Thomas Monjalon
As stated in the deprecation notice from December 2016, "the legacy filter API, including
rte_eth_dev_filter_supported(),rte_eth_dev_filter_ctrl()as well as filter types MACVLAN, ETHERTYPE, FLEXIBLE, SYN, NTUPLE, TUNNEL, FDIR, HASH andL2_TUNNEL, is superseded by the generic flow API (rte_flow)".After a long wait of more than two years, the legacy filter API is marked as deprecated, while still tested with testpmd and the
tep_terminationexample.
Quoted 8 lines
Quoted 7 lines
The next step will be to announce a deadline for complete removal. As preparation of the removal of
rte_eth_ctrl.h, RTE_ETH_FLOW_*, RTE_TUNNEL_TYPE_* and RTE_ETH_HASH_FUNCTION_* definitions are moved torte_ethdev.handrte_flow.h.Signed-off-by Thomas Monjalon <[email protected]>Acked-by Ajit Khaparde <[email protected]>
Applied to dpdk-next-net/master, thanks.