numam-dpdk/lib/librte_ethdev
Xiaoyu Min fc2dd8dd49 ethdev: fix expand RSS flows
rte_flow_expand_rss expands rte_flow item list based on the RSS
types. In another word, some additional rules are added if the user
specified items are not complete enough according to the RSS type,
for example:

  ... pattern eth / end actions rss type tcp end ...

User only provides item eth but want to do RSS on tcp traffic.
The pattern is not complete enough to filter TCP traffic only.
This will be a problem for some HWs.
So some PMDs use rte_flow_expand_rss to expand above user provided
flow to:

  ... pattern eth / end actions rss types tcp
  ... pattern eth / ipv4 / tcp / end actions rss types tcp ...
  ... pattern eth / ipv6 / tcp / end actions rss types tcp ...

in order to filter TCP traffic only and do RSS correctly.

However the current expansion cannot handle pattern as below, which
provides ethertype or ip next proto instead of providing an item:

  ... pattern eth type is 0x86DD / end actions rss types tcp ...

rte_flow_expand_rss will expand above flow to:

  ... pattern eth type is 0x86DD / ipv4 / tcp end ...

which has conflicting values: 0x86DD vs. ipv4 and some HWs will refuse
to create flow.

This patch will fix above by checking the last item's spec and to
expand RSS flows correctly.

Currently only support to complete item list based on ether type or ip
next proto.

Fixes: 4ed05fcd44 ("ethdev: add flow API to expand RSS flows")
Cc: stable@dpdk.org

Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
2019-11-08 23:15:05 +01:00
..
ethdev_private.c ethdev: move representor parsing functions 2018-10-26 22:14:06 +02:00
ethdev_private.h rename private header files 2019-10-27 22:03:06 +01:00
ethdev_profile.c ethdev: change vtune profiling approach 2018-08-28 15:27:39 +02:00
ethdev_profile.h ethdev: change vtune profiling approach 2018-08-28 15:27:39 +02:00
Makefile ethdev: bump library version 2019-10-27 10:41:50 +01:00
meson.build ethdev: bump library version 2019-10-27 10:41:50 +01:00
rte_class_eth.c ethdev: use new ethernet parsing function 2019-07-08 21:26:52 +02:00
rte_dev_info.h ethdev: add definitions for EEPROM standards 2019-10-23 16:43:08 +02:00
rte_eth_ctrl.h ethdev: fix include of ethernet header file 2019-10-25 19:00:22 +02:00
rte_ethdev_core.h ethdev: add hairpin queue 2019-11-08 23:15:04 +01:00
rte_ethdev_driver.h ethdev: add hairpin queue 2019-11-08 23:15:04 +01:00
rte_ethdev_pci.h ethdev: avoid error on PCI unplug of closed port 2019-07-05 01:52:01 +02:00
rte_ethdev_vdev.h ethdev: rename folder to library name 2018-04-27 18:01:00 +01:00
rte_ethdev_version.map ethdev: extend flow metadata 2019-11-08 23:15:04 +01:00
rte_ethdev.c ethdev: move egress metadata to dynamic field 2019-11-08 23:15:05 +01:00
rte_ethdev.h ethdev: move egress metadata to dynamic field 2019-11-08 23:15:05 +01:00
rte_flow_driver.h enforce experimental tag at beginning of declarations 2019-06-29 19:04:48 +02:00
rte_flow.c ethdev: fix expand RSS flows 2019-11-08 23:15:05 +01:00
rte_flow.h ethdev: move egress metadata to dynamic field 2019-11-08 23:15:05 +01:00
rte_mtr_driver.h meter: replace color definitions 2019-04-11 14:27:32 +02:00
rte_mtr.c remove experimental tags from all symbol definitions 2019-06-29 19:04:43 +02:00
rte_mtr.h ethdev: replace license text with SPDX tag 2019-07-29 15:07:48 +02:00
rte_tm_driver.h ethdev: rename folder to library name 2018-04-27 18:01:00 +01:00
rte_tm.c ethdev: rename folder to library name 2018-04-27 18:01:00 +01:00
rte_tm.h ethdev: replace license text with SPDX tag 2019-07-29 15:07:48 +02:00