Commit Graph

3085 Commits

Author SHA1 Message Date
Naga Harish K S V
3d9d8adf8c eventdev/timer: support periodic event timer
Add support to configure and use periodic event timers in
software timer adapter.

The structure ``rte_event_timer_adapter_stats`` is extended
by adding a new field, ``evtim_drop_count``. This stat
represents the number of times an event_timer expiry event
is dropped by the event timer adapter.

Updated the software eventdev pmd timer_adapter_caps_get
callback function to report the support of periodic
event timer capability.

Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
2022-09-26 15:33:48 +02:00
Stephen Hemminger
2b5c68956f app/eventdev: remove unnecessary memset
The function rte_event_dev_info_get already zeros the info structure.
Therefore the test code doesn't need to do it.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-09-26 15:33:46 +02:00
Ganapati Kundapura
b2963cbd5f eventdev/eth_tx: add adapter instance get API
Added rte_event_eth_tx_adapter_instance_get() to get the
adapter instance id for specified ethernet device id and
tx queue index.

Added testcase for rte_event_eth_tx_adapter_instance_get().

Added rte_event_eth_tx_adapter_instance_get() details in
prog_guide/event_ethernet_tx_adapter.rst

Signed-off-by: Ganapati Kundapura <ganapati.kundapura@intel.com>
Reviewed-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-09-26 15:33:45 +02:00
Ganapati Kundapura
a1793ee8ab eventdev/eth_rx: add adapter instance get API
Added rte_event_eth_rx_adapter_instance_get() to get
adapter instance id for specified ethernet device id and
rx queue index.

Added telemetry handler for rte_event_eth_rx_adapter_instance_get().

Added test case for rte_event_eth_rx_adapter_instance_get()

Added rte_event_eth_rx_adapter_instance_get() details in
prog_guide/event_ethernet_rx_adapter.rst

Signed-off-by: Ganapati Kundapura <ganapati.kundapura@intel.com>
Reviewed-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2022-09-26 15:33:44 +02:00
Ivan Malov
235558fe94 ethdev: remove deprecated flow action physical port
Such deprecation was commenced in DPDK 21.11.
Since then, no parties have objected. Remove.

The patch breaks ABI.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ori Kam <orika@nvidia.com>
2022-09-27 10:26:51 +02:00
Ivan Malov
5e3779b7ab ethdev: remove deprecated flow item physical port
Such deprecation was commenced in DPDK 21.11.
Since then, no parties have objected. Remove.

The patch breaks ABI.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ori Kam <orika@nvidia.com>
2022-09-27 10:26:51 +02:00
Ivan Malov
5c45fde3e9 ethdev: remove deprecated flow item VF
Such deprecation was commenced in DPDK 21.11.
Since then, no parties have objected. Remove.

The patch breaks ABI.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ori Kam <orika@nvidia.com>
2022-09-27 10:26:51 +02:00
Ivan Malov
13f8de927a ethdev: remove deprecated flow item PF
Such deprecation was commenced in DPDK 21.11.
Since then, no parties have objected. Remove.

The patch breaks ABI.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ori Kam <orika@nvidia.com>
2022-09-27 10:26:51 +02:00
Ivan Malov
c80ae10bc2 app/testpmd: add port steering targets to sample actions
Allow the use of actions PORT_REPRESENTOR / REPRESENTED_PORT
as targets in "set sample_actions" command.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-09-27 10:26:51 +02:00
Bruce Richardson
0f3d92f373 telemetry: eliminate duplicate code for json output
When preparing the json response to a telemetry socket query, the code
for prefixing the command name, and appending the file "}" on the end of
the response was duplicated for multiple reply types. Taking this code
out of the switch statement reduces the duplication and makes the code
more maintainable.

For completeness of testing, add in a test case to validate the "null"
response type - the only leg of the switch statement not already covered
by an existing test case in the telemetry_data tests.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
2022-09-26 13:49:38 +02:00
Bruce Richardson
d0049f7a2c test/telemetry_data: add test cases for character escaping
Add in some basic unit tests to validate the character escaping being
done on string data values, which tests end-to-end processing of those
values beyond just the json-encoding steps tested by the
"telemetry_json_autotest".

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
2022-09-26 13:49:38 +02:00
Bruce Richardson
1306df2cd1 test/telemetry_data: refactor for maintainability
To help with the writing and maintaining of test cases in this file we
can make the following changes to it:

- rename non-test-case functions i.e. the infrastructure functions, to
  not start with "test_", so that each sub-test case can be identified
  by starting with that prefix.
- add a comment at the start of the file explaining how tests are to be
  written and managed, so as to keep consistency.
- add a trivial test-case for returning a simple string value to use as
  a reference example for those wanting to add test cases.
- improve the key macro used for validating the output from each
  function, so that the standard json preamble can be skipped for each
  function. This hides more of the infrastructure implementation from
  the user i.e. they don't need to worry what the actual command used is
  called, and also shortens the output strings so we can avoid line
  splitting in most cases.
- add clearing the "response_data" structure to the loop calling each
  test to avoid each test function having to do so individually.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
2022-09-26 13:49:38 +02:00
Bruce Richardson
72f3c45c6a test/telemetry_json: add test for string escaping in objects
Add a test-case to validate that when adding strings either as the name
or the value of an entry in an object, that all values are escaped
properly.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
2022-09-26 13:49:11 +02:00
Bruce Richardson
f46d4260e7 test/telemetry-json: add test for escaping strings in arrays
Add test-case to validate that when adding strings to arrays, the
strings are properly escaped to remove any invalid characters.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
2022-09-26 13:49:11 +02:00
Bruce Richardson
56069f9832 test/telemetry_json: add test for string character escaping
Add unit test to validate that when creating a string response in json,
that characters such as \n or quotes are properly escaped.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
2022-09-26 13:49:11 +02:00
Bruce Richardson
4493654803 test/telemetry_json: print success or failure per subtest
rather than just printing out success or failure at the end of the test
only, print out "OK" or "ERROR" for each individual test case within the
overall test. As part of this, ensure each case returns 0 on success and
any other value on failure.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ciara Power <ciara.power@intel.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
2022-09-26 13:49:11 +02:00
Andrew Rybchenko
5007ac1318 ethdev: remove deprecated Flow Director configuration
Remove deprecated fdir_conf from device configuration.
Assume that mode is equal to RTE_FDIR_MODE_NONE.

Add internal Flow Director configuration copy in ixgbe and txgbe device
private data since flow API supports requires it. Initialize mode to
the first flow rule mode on the rule validation or creation.

Since Flow Director configuration data types are still used by some
drivers internally, move it from public API to ethdev driver internal
API.

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Dongdong Liu <liudongdong3@huawei.com>
2022-08-31 15:24:23 +02:00
David Marchand
3ab51564e9 net/ixgbe: move bypass init in a testpmd command
Introduce a new command and remove the last part of specific port init
from testpmd.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
2022-08-25 13:37:56 +02:00
David Marchand
0100a038fa net/ixgbe: move testpmd commands
Move related specific testpmd commands into this driver directory.
The bypass init is left in testpmd at this point and can be moved later.
While at it, fix checkpatch warnings.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
2022-08-25 13:37:56 +02:00
David Marchand
8d1bd1c04d app/testpmd: restore ixgbe bypass commands
Since the switch to meson, ixgbe bypass commands were ineffective as the
RTE_LIBRTE_IXGBE_BYPASS build flag was not set, even though the
net/ixgbe driver had this feature compiled in.

Fixes: 16ade738fd ("app/testpmd: build with meson")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
2022-08-25 13:37:56 +02:00
David Marchand
5b569f2ea8 dev: provide bus specific information
For diagnostic, it may be useful to provide a description of the device
with bus specific information.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-09-23 16:14:34 +02:00
David Marchand
ec5ecd7e37 dev: introduce device accessors
Prepare for making the device object opaque by adding accessors.
Update existing "external" users.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-09-23 16:14:34 +02:00
David Marchand
97bbdba31d dev: introduce driver accessors
Prepare for making the driver object opaque by adding accessors.
Update existing "external" users.
Internal users may still dereference a rte_driver object.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-09-23 16:14:34 +02:00
David Marchand
a04322f616 bus: hide bus object
Make rte_bus opaque for non internal users.
This will make extending this object possible without breaking the ABI.

Introduce a new driver header and move rte_bus definition and helpers.
Update drivers and library to use the internal header.

Some applications may have been dereferencing rte_bus objects, mark
this object's accessors as stable.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-09-23 16:14:34 +02:00
David Marchand
148c51a3de bus: introduce accessors
Add helpers to get a rte_bus object details.
This will be used externally.
Internal users may still dereference a rte_bus object.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-09-23 16:14:34 +02:00
David Marchand
770ebc060e bus: move IOVA definition from header
iova enum definition does not need to be defined as part of the bus API.
Move it to rte_eal.h.
With this step, rte_eal.h does not depend on rte_bus.h and rte_dev.h.
Fix existing code that was relying on these implicit inclusions.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-09-23 16:14:34 +02:00
David Marchand
1f37cb2bb4 bus/pci: make driver-only headers private
The pci bus interface is for drivers only.
Mark as internal and move the header in the driver headers list.

While at it, cleanup the code:
- fix indentation,
- remove unneeded reference to bus specific singleton object,
- remove unneeded list head structure type,
- reorder the definitions and macro manipulating the bus singleton object,
- remove inclusion of rte_bus.h and fix the code that relied on implicit
  inclusion,

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
2022-09-23 16:14:34 +02:00
David Marchand
82ee04a855 devargs: remove dependency on bus header
We don't need to include rte_bus.h in rte_devargs.h.
Only a forward declaration of rte_bus and an inclusion of rte_dev.h are
needed.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-09-23 16:14:34 +02:00
David Marchand
99948194a8 dev: hide debug messages in device iterator
For any bus that does not support device iteration, rte_dev_iterator_init
both returned an error code and logged an error message.
An application (like testpmd) that only wants to list devices, would have
no choice but to inspect a bus object to avoid spewing error logs.

Make those log messages debug level, and remove the check in testpmd.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-09-23 16:14:34 +02:00
David Marchand
18bdf6ab8e kni: stop populating PCI info in examples
addr and id fields are deprecated and are not used in the kni library.
Stop populating them in the in-tree examples.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-09-23 16:14:33 +02:00
David Marchand
1bcb7ba9de app/testpmd: drop PCI register commands
Those commands date back to the early stages of DPDK when only PCI
devices were supported.
At the time, developers may have used those commands to help in
debugging their buggy^Wwork in progress drivers.

Removing them, we can drop the dependency on the PCI bus and library and
make testpmd bus agnostic.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-09-23 16:14:33 +02:00
Dmitry Kozlyuk
72b452c5f2 eal: remove unneeded includes from a public header
Do not include <ctype.h>, <errno.h>, and <stdlib.h> from <rte_common.h>,
because they are not used by this file.
Include the needed headers directly from the files that need them.

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-09-21 15:31:03 +02:00
Dmitry Kozlyuk
1a7374c956 eal: fix side effect in some pointer arithmetic macros
RTE_PTR_SUB(ptr, x) and RTE_PTR_ALIGN_FLOOR() worked incorrectly
if "ptr" was an expression:

    uint32_t arr[3];

    RTE_PTR_SUB(arr + 1, sizeof(arr[0]));
    // expected: (uint32_t *)((uintptr_t)(arr + 1) - 4) == arr
    // actual:   (uint32_t *)((uintptr_t) arr + 1  - 4) != arr

    RTE_PTR_ALIGN_FLOOR(arr + 2, sizeof(arr[0]));
    // expected: RTE_ALIGN_FLOOR((uintptr_t)(arr + 2), 4) == &arr[2]
    // actual:   RTE_ALIGN_FLOOR((uintptr_t) arr + 2,  4) == &arr[0]

Fix the macros and extend the relevant unit test.
Convert uses of a custom test failure macro to RTE_TEST_ASSERT*().

Fixes: af75078fec ("first public release")
Cc: stable@dpdk.org

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
2022-09-21 15:31:03 +02:00
Mattias Rönnblom
89832b4778 test/cksum: add checksum performance test
Add performance test for the rte_raw_cksum() function, which delegates
the actual work to __rte_raw_cksum(), which in turn is used by other
functions in need of Internet checksum calculation.

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2022-09-20 18:09:16 +02:00
Huichao Cai
4aee6110bb ip_frag: add IPv4 fragment copy
Some NIC drivers support MBUF_FAST_FREE (device supports optimization
for fast release of mbufs. When set, application must guarantee that
per-queue all mbufs comes from the same mempool, has refcnt = 1, direct
and non-segmented.) offload.
In order to adapt to this offload function, add this API.
Add some test data for this API.

Signed-off-by: Huichao Cai <chcchc88@163.com>
Acked-by: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
2022-08-29 16:24:18 +02:00
David Marchand
09521b1cbe test: invoke all telemetry commands
Try and call all possible telemetry commands.
Each commands is tested with no argument, 0 (for command that accepts
a single integer like for a port identifier) and z (to catch commands
not properly validating input).
Fake cryptodev, dmadev, ethdev, eventdev and rawdev devices are created
using dummy drivers.

Output of the commands is not checked, the point of this test is mainly
to catch simple issues and leaks (when coupled with ASan in the CI).

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Acked-by: Ciara Power <ciara.power@intel.com>
2022-08-25 16:23:17 +02:00
David Marchand
3e88909dfe test: load drivers using build directory
Since commit 49b536fc30 ("eal: load only shared libs from driver ..."),
we can specify a build directory to the -d option.

Suggested-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2022-08-25 16:23:17 +02:00
Huisong Li
b7e77411a7 app/testpmd: fix RSS types display
Now testpmd fails to display types when query RSS rule. The failure is
because the '\n' character is missing at the end of the function
'rss_config_display()'.
Actually, all places calling 'xxx_types_display()' need to '\n'. So this
patch moves '\n' to the inside of these function.

Bugzilla ID: 1048
Fixes: 534988c490 ("app/testpmd: unify RSS types display")
Fixes: 44a37f3cff ("app/testpmd: compact RSS types output")

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Tested-by: Weiyuan Li <weiyuanx.li@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
2022-07-08 12:28:38 +02:00
Jasvinder Singh
e1673dde51 app/testpmd: fix memory leak for DSCP table
Fix memory leak reported by Coverity.

Coverity issue: 379220
Fixes: 9f5488e326 ("app/testpmd: support different input color method")
Cc: stable@dpdk.org

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Reviewed-by: Sean Morrissey <sean.morrissey@intel.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-07-07 14:38:33 +02:00
Gregory Etelson
a942222d56 app/testpmd: fix GTP PSC raw processing
Fix GTP PSP extension size initialization.
Clear input buffer.

Fixes: c65282c9aa ("app/testpmd: fix GTP PSC raw processing")
Cc: stable@dpdk.org

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-07-07 13:24:08 +02:00
Raslan Darawsheh
a442ca2d23 app/regex: fix mbuf size for multi-segment buffer
When allocating multi segmented buffers, and in case there is
a remainder in total buf len, the actual job len might be more
than expected job_len.

This adds additional space in the mbuf in the multi seg case,
to allow the remaining memory to be stored in one segment.

Fixes: c1d1b94eec ("app/regex: fix number of matches")
Cc: stable@dpdk.org

Signed-off-by: Raslan Darawsheh <rasland@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
2022-07-05 22:19:03 +02:00
Thierry Herbelot
1afdf9edc8 app/regex: avoid division by zero
Check that nb_jobs is not zero before using it for a division.

Fixes: f5cffb7eb7 ("app/regex: read data file once at startup")
Cc: stable@dpdk.org

Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
2022-07-05 22:03:39 +02:00
Ferruh Yigit
119786aa6e app/testpmd: remove duplicated flow type name table
Flow type table has two instance, one is used for flow type to string
conversion, and other is used for string to flow type conversion.
And tables are diverged by time.

Unifying tables to prevent maintaining two different tables.

Note: made 'flowtype_to_str()' and 'str_to_flowtype()' non-static to
prevent build error for the case PMDs using it disables. Making the two
functions generic, not for some PMDs.

Signed-off-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
Signed-off-by: Huisong Li <lihuisong@huawei.com>
2022-06-29 21:40:50 +02:00
Huisong Li
d7bfa4df99 app/testpmd: reorder RSS type table
There are group and individual types in rss_type_table[]. However, group
types are very scattered, and individual types are not arranged based on
the bit number order in 'RTE_ETH_RSS_xxx'. For a clear distribution of
types and better maintenance, this patch reorders this table.

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
2022-06-29 21:40:50 +02:00
Ferruh Yigit
44a37f3cff app/testpmd: compact RSS types output
In port info command output, 'show port info all', supported RSS offload
types printed one type per line, and although this information is not
most important part of the command it takes big part of the command
output.

In port RSS hash and flow RSS command output, 'show port 0 rss-hash',
and 'flow query 0 0 rss', all enabled RSS types are printed on one line.
If there are many types, the print will be very long.

Compacting these RSS offloads and types output by fixing the length of
the character string printed on each line, instead of one per line or
one line.
Output becomes as following:

Supported RSS offload flow types:
  ipv4-frag  ipv4-tcp  ipv4-udp  ipv4-sctp  ipv4-other
  ipv6-frag  ipv6-tcp  ipv6-udp  ipv6-sctp  ipv6-other
  l4-dst-only  l4-src-only  l3-dst-only  l3-src-only

Signed-off-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
Signed-off-by: Huisong Li <lihuisong@huawei.com>
2022-06-29 21:40:50 +02:00
Huisong Li
534988c490 app/testpmd: unify RSS types display
The 'rss_type_table[]' maintains the name and value of RSS types. This
patch unifies a common interface to display RSS types.

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
2022-06-29 21:40:50 +02:00
Huisong Li
9ad341b5c5 app/testpmd: refactor config all RSS command
The "port config <port_id> rss-hash-key" and "show port <port_id>
rss-hash key" commands both use the 'rss_type_table[]' to get
'rss_types' or the RSS type name. So this patch uses the
'rss_type_table[]' to get the RSS types.  In this way, this command
naturally supports more individual types.

Suggested-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
2022-06-29 21:40:50 +02:00
Huisong Li
b0f02d9a82 app/testpmd: unify name of L2 payload offload
Currently, the "port config all rss xx" command uses 'ether' name to match
and to set 'RTE_ETH_RSS_L2_PAYLOAD' offload. However, others RSS command,
such as, "port config <port_id> rss-hash-key" and "show port <port_id>
rss-hash key", use 'l2-payload' to represent this offload. So this patch
unifies the name of 'RTE_ETH_RSS_L2_PAYLOAD' offload.

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
2022-06-29 21:40:49 +02:00
Huisong Li
3c23ee6cdd app/testpmd: fix supported RSS offload display
The rte_eth_dev_info.flow_type_rss_offloads is populated in terms of
RTE_ETH_RSS_* bits. If PMD sets RTE_ETH_RSS_L3_SRC_ONLY to
dev_info->flow_type_rss_offloads. testpmd will display "user defined 63"
when run 'show port info 0'. Because testpmd use flowtype_to_str()
to display the supported RSS offload of PMD. In fact, the function is
used to display flow type in FDIR commands for i40e or ixgbe. This patch
uses the RTE_ETH_RSS_* bits to display supported RSS offload of PMD.

Fixes: b12964f621 ("ethdev: unification of RSS offload types")
Cc: stable@dpdk.org

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@xilinx.com>
2022-06-29 21:40:49 +02:00
Tejasree Kondoj
5f8cdb8df3 test/crypto: add additional stream cipher cases
Added ZUC, SNOW3G and AES-CTR-CMAC auth-cipher
test vectors with same auth and cipher offsets
and total digest data encrypted.
Existing tests have different cipher and
auth offsets and partial or no digest encrypted.

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Acked-by: Ciara Power <ciara.power@intel.com>
2022-06-30 06:54:21 +02:00