Test-Label: intel-Testing Test-Status: SUCCESS _Testing PASS DPDK git repo: dpdk-next-net commit 6834ff7eab934c806a44650065f6527ef607861f Author: Rongwei Liu Date: Thu Feb 2 13:19:27 2023 +0200 ethdev: add optimization hints in flow template table In case flow rules match only one kind of traffic in a flow table, then optimization can be done via allocation of this table. Such optimization is possible only if the application gives a hint about its usage of the table during initial configuration. The transfer domain rules may process traffic from wire or vport, which may correspond to two kinds of underlayer resources. That's why the first two hints introduced in this patch are about wire and vport traffic specialization. Wire means traffic arrives from the uplink port while vport means traffic initiated from VF/SF. There are two possible approaches for providing the hints. Using IPv4 as an example: 1. Use pattern item in both flow template table and rules. template table 3 = transfer pattern ANY_VPORT / eth / ipv4 src is 255.255.255.255 / end flow rule = template_table 3 pattern ANY_VPORT / eth / ipv4 src is 1.1.1.1 / end The pattern template 3 will be used only to match flows coming from vports. ANY_VPORT needs to be present in each flow rule. ANY_VPORT matching is redundant with IP src 1.1.1.1 because the user knows 1.1.1.1 is the IP of a vport. 2. Add specialization flag into flow template table attribute: template table 3 = transfer VPORT_ORIG pattern eth / ipv4 src is 255.255.255.255 / end flow rule = template_table 3 pattern eth / ipv4 src is 1.1.1.1 / end The pattern template 3 can be used only to match flows coming from vports. Approach 1 needs to specify the hint in each flow rule that wastes memory and is not user friendly. This patch takes the 2nd approach and introduces one new member "specialize" into rte_flow_table_attr to indicate possible flow table optimization. By default, there is no hint, so nothing change. There is no guarantee that the hints will be effective in the driver. The application functionality must not rely on the hints. Signed-off-by: Rongwei Liu Acked-by: Ori Kam Acked-by: Andrew Rybchenko Acked-by: Thomas Monjalon Testing Summary : 18 Case Done, 18 Successful, 0 Failures Testbed #1: 9 Case Done, 9 Successful, 0 Failures * Test result details: +-------------+---------------------------+-------+ | suite | case | status| +-------------+---------------------------+-------+ | asan_smoke | test_rxtx_with_ASan_enable| passed| | pf_smoke | test_pf_jumbo_frames | passed| | pf_smoke | test_pf_rss | passed| | pf_smoke | test_pf_tx_rx_queue | passed| | vf_smoke | test_vf_jumbo_frames | passed| | vf_smoke | test_vf_rss | passed| | vf_smoke | test_vf_tx_rx_queue | passed| | virtio_smoke| test_virtio_loopback | passed| | virtio_smoke| test_virtio_pvp | passed| +-------------+---------------------------+-------+ * Environment: OS : Ubuntu 20.04.5 LTS Kernel : 5.8.0-63-generic GCC : 9.4.0-1ubuntu1~20.04.1 NIC : Ethernet Controller E810-C for SFP Target : x86_64-native-linuxapp-gcc Testbed #2: 9 Case Done, 9 Successful, 0 Failures * Test result details: +-------------+---------------------------+-------+ | suite | case | status| +-------------+---------------------------+-------+ | asan_smoke | test_rxtx_with_ASan_enable| passed| | pf_smoke | test_pf_jumbo_frames | passed| | pf_smoke | test_pf_rss | passed| | pf_smoke | test_pf_tx_rx_queue | passed| | vf_smoke | test_vf_rss | passed| | vf_smoke | test_vf_tx_rx_queue | passed| | vf_smoke | test_vf_jumbo_frames | n/a | | virtio_smoke| test_virtio_loopback | passed| | virtio_smoke| test_virtio_pvp | passed| +-------------+---------------------------+-------+ * Environment: OS : Ubuntu 20.04.5 LTS Kernel : 5.13.0-30-generic GCC : 9.4.0-1ubuntu1~20.04.1 NIC : Ethernet Controller XL710 for 40GbE QSFP+ Target : x86_64-native-linuxapp-gcc TestPlan: pf_smoke: http://git.dpdk.org/tools/dts/tree/test_plans/pf_smoke_test_plan.rst vf_smoke: http://git.dpdk.org/tools/dts/tree/test_plans/vf_smoke_test_plan.rst asan_smoke: http://git.dpdk.org/tools/dts/tree/test_plans/asan_smoke_test_plan.rst TestSuite: pf_smoke: http://git.dpdk.org/tools/dts/tree/tests/TestSuite_pf_smoke.py vf_smoke: http://git.dpdk.org/tools/dts/tree/tests/TestSuite_vf_smoke.py virtio_smoke: http://git.dpdk.org/tools/dts/tree/tests/TestSuite_virtio_smoke.py asan_smoke: http://git.dpdk.org/tools/dts/tree/tests/TestSuite_asan_smoke.py DPDK STV team