numam-dpdk/app
Lijun Ou 1848b117cc app/testpmd: fix RSS key for flow API RSS rule
When a flow API RSS rule is issued in testpmd, device RSS key is changed
unexpectedly, device RSS key is changed to the testpmd default RSS key.

Consider the following usage with testpmd:
1. first, startup testpmd:
 testpmd> show port 0 rss-hash key
 RSS functions: all ipv4-frag ipv4-other ipv6-frag ipv6-other ip
 RSS key: 6D5A56DA255B0EC24167253D43A38FB0D0CA2BCBAE7B30B477CB2DA38030F
          20C6A42B73BBEAC01FA
2. create a rss rule
 testpmd> flow create 0 ingress pattern eth / ipv4 / udp / end \
          actions rss types ipv4-udp end queues end / end

3. show rss-hash key
 testpmd> show port 0 rss-hash key
 RSS functions: all ipv4-udp udp
 RSS key: 74657374706D6427732064656661756C74205253532068617368206B65792
          C206F76657272696465

This is because testpmd always sends a key with the RSS rule,
if user provides a key as part of the rule that key is used, if user
doesn't provide a key, testpmd default key is sent to the PMDs, which is
causing device programmed RSS key to be changed.

There was a previous attempt to fix the same issue [1], but it has been
reverted back [2] because of the crash when 'key_len' is provided
without 'key'.

This patch follows the same approach with the initial fix [1] but also
addresses the crash.

After change, testpmd RSS key is 'NULL' by default, if user provides a
key as part of rule it is used, if not no key is sent to the PMDs at all

[1]
Commit a4391f8bae ("app/testpmd: set default RSS key as null")

[2]
Commit f3698c3d09 ("app/testpmd: revert setting default RSS")

Fixes: d0ad8648b1 ("app/testpmd: fix RSS flow action configuration")
Cc: stable@dpdk.org

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
2020-11-03 23:24:26 +01:00
..
pdump eal: rename lcore master and slave 2020-10-20 13:17:08 +02:00
proc-info app/procinfo: clean old build macro 2020-10-26 12:03:31 +01:00
test test/crypto: disable wireless cases for CPU crypto API 2020-11-02 09:24:41 +01:00
test-acl eal: rename lcore master and slave 2020-10-20 13:17:08 +02:00
test-bbdev app/bbdev: dequeue full ring in offload test 2020-11-02 09:24:41 +01:00
test-cmdline cmdline: make implementation logically opaque 2020-10-15 00:39:10 +02:00
test-compress-perf eal: rename lcore master and slave 2020-10-20 13:17:08 +02:00
test-crypto-perf eal: rename lcore master and slave 2020-10-20 13:17:08 +02:00
test-eventdev app/eventdev: switch sequence number to dynamic mbuf field 2020-10-31 22:14:43 +01:00
test-fib app/fib: select lookup 2020-10-28 21:29:13 +01:00
test-flow-perf eal: rename lcore master and slave 2020-10-20 13:17:08 +02:00
test-pipeline eal: rename lcore master and slave 2020-10-20 13:17:08 +02:00
test-pmd app/testpmd: fix RSS key for flow API RSS rule 2020-11-03 23:24:26 +01:00
test-regex app/regex: add job context 2020-11-03 02:06:03 +01:00
test-sad eal: rename lcore master and slave 2020-10-20 13:17:08 +02:00
meson.build app/regex: add RegEx test application 2020-07-30 09:13:52 +02:00