| Age | Commit message (Collapse) | Author |
|
test suite for verifying layer 3/4 checksum offload
features on poll mode driver.
Signed-off-by: Dean Marx <[email protected]>
Reviewed-by: Patrick Robb <[email protected]>
|
|
Add csum_set_hw method to testpmd shell class.
Signed-off-by: Dean Marx <[email protected]>
Reviewed-by: Patrick Robb <[email protected]>
|
|
This patch adds a new test suite that is designed to test the stopping
and modification of port queues at runtime. Specifically, there are
test cases that display the ports ability to stop some queues but still
send and receive traffic on others, as well as the ability to configure
the ring size of the queue without blocking the traffic on other queues.
Signed-off-by: Jeremy Spewock <[email protected]>
Signed-off-by: Dean Marx <[email protected]>
|
|
This patch adds methods for querying and modifying port queue state and
configuration. In addition to this, it also adds the ability to capture
the forwarding statistics that get outputted when you send the "stop"
command in testpmd. Querying of port queue information is handled
through a TextParser dataclass in case there is future need for using
more of the output from the command used to query the information.
Signed-off-by: Jeremy Spewock <[email protected]>
Signed-off-by: Dean Marx <[email protected]>
|
|
The test suite served as a demonstration of the Scapy traffic generator
implementation. Now that we have a test suite that uses DPDK code (via
testpmd), there is no reason to keep the test suite, as there's no
expectation it'll be actually used in any setup.
Signed-off-by: Juraj Linkeš <[email protected]>
Signed-off-by: Paul Szczepanek <[email protected]>
Reviewed-by: Luca Vizzarro <[email protected]>
Reviewed-by: Patrick Robb <[email protected]>
|
|
Adds the MAC filter testsuite, with support for MAC filtering,
MAC address addition and removal, and multicast filtering.
The test suite assesses the behavior of ethdev api calls as it relates
to MAC address filtering using TestPMD. Test cases have been
designed to be vendor agnostic.
Bugzilla ID: 1454
Signed-off-by: Nicholas Pratte <[email protected]>
|
|
The multicast address filter component of the MAC filter test suite
is not supported by all device drivers. So, a simple multicast
filter capability check is added for the multicast filter testcase.
Bugzilla ID: 1454
Signed-off-by: Nicholas Pratte <[email protected]>
|
|
New methods have been added to TestPMDShell in order to support the MAC
filter's individual test cases:
- set_mac_addr
- set_multicast_mac_addr
set_mac_addr and set_multicast_addr were created for the MAC filter test
suite, enabling users to both add or remove MAC and multicast
addresses based on a boolean 'add or remove' parameter.
Bugzilla ID: 1454
Signed-off-by: Nicholas Pratte <[email protected]>
|
|
This test suite tests the port blocklisting functionality built in
testpmd.
Signed-off-by: Luca Vizzarro <[email protected]>
Reviewed-by: Paul Szczepanek <[email protected]>
|
|
Make the "ports" attribute of EalParams as it actually is to
"allowed_ports", and add "blocked_ports".
Signed-off-by: Luca Vizzarro <[email protected]>
Reviewed-by: Paul Szczepanek <[email protected]>
Reviewed-by: Nicholas Pratte <[email protected]>
|
|
Currently, the async sniffer includes a callback function which
is responsible for the packets sending code. On certain devices this
callback function is being called before the asyncsniffer is ready.
This commit adds a 1 second sleep to help avoid this condition.
Bugzilla ID: 1573
Signed-off-by: Nicholas Pratte <[email protected]>
|
|
Add a basic L2 forwarding test suite which tests the correct
functionality of the forwarding facility built-in in the DPDK.
The tests are performed with different queues numbers per port.
Signed-off-by: Luca Vizzarro <[email protected]>
Signed-off-by: Thomas Wilks <[email protected]>
Reviewed-by: Paul Szczepanek <[email protected]>
Reviewed-by: Dean Marx <[email protected]>
Reviewed-by: Patrick Robb <[email protected]>
Tested-by: Patrick Robb <[email protected]>
|
|
At the moment there is only one facility that allows to prepare a packet
as it is expected to be received on the traffic generator end. Extend
this to allow to prepare multiple packets at the same time.
Signed-off-by: Luca Vizzarro <[email protected]>
Reviewed-by: Paul Szczepanek <[email protected]>
Reviewed-by: Dean Marx <[email protected]>
Reviewed-by: Patrick Robb <[email protected]>
Tested-by: Patrick Robb <[email protected]>
|
|
The _adjust_addresses function has been updated to both modify the
original packets and return new updated copies of them. Having a double
behavior even if documented is not intuitive and can lead to bugs.
This changes the behavior to solely act on copies, leaving the original
packet untouched.
Fixes: 1a1825962777 ("dts: rework packet addressing")
Signed-off-by: Luca Vizzarro <[email protected]>
Reviewed-by: Paul Szczepanek <[email protected]>
Reviewed-by: Dean Marx <[email protected]>
Reviewed-by: Patrick Robb <[email protected]>
Tested-by: Patrick Robb <[email protected]>
|
|
The existing statistics output only stores a basic testrun summary.
In this patch we are adding a header for each test run
and an overall summary of test runs at the end. This is
represented as textual summaries with basic information
and a json result with more detailed information.
Signed-off-by: Tomáš Ďurovec <[email protected]>
Signed-off-by: Luca Vizzarro <[email protected]>
Reviewed-by: Dean Marx <[email protected]>
Reviewed-by: Nicholas Pratte <[email protected]>
Reviewed-by: Paul Szczepanek <[email protected]>
Tested-by: Nicholas Pratte <[email protected]>
Reviewed-by: Patrick Robb <[email protected]>
Tested-by: Patrick Robb <[email protected]>
|
|
The introduction of TestSuiteSpec adds auto-discovery of test suites,
which are also automatically imported. This causes double imports as the
runner loads the test suites. This changes the behaviour of the runner
to load the imported classes from TestSuiteSpec instead of importing
them again.
Signed-off-by: Luca Vizzarro <[email protected]>
Reviewed-by: Paul Szczepanek <[email protected]>
Reviewed-by: Nicholas Pratte <[email protected]>
Reviewed-by: Patrick Robb <[email protected]>
|
|
When building docs without any dependencies, autodoc will mock all the
packages missing from the system. Because DTS makes use of a special
enum library called aenum, autodoc fails to recognise enum inheriting
it as such and raises exceptions as a consequence.
This change extends the already in-place mechanism for type checking
that pretends that aenums are builtin enums to the API doc building
process.
Fixes: 039256daa8bf ("dts: add topology capability")
Fixes: c89d00380603 ("dts: add NIC capability support")
Signed-off-by: Luca Vizzarro <[email protected]>
Reviewed-by: Paul Szczepanek <[email protected]>
|
|
Pydantic models are not treated the same way as dataclasses by autodoc.
As a consequence the docstrings need to be applied directly to each
field. Otherwise the generated API documentation page would present two
entries per each field with each their own differences.
Signed-off-by: Luca Vizzarro <[email protected]>
Reviewed-by: Paul Szczepanek <[email protected]>
Reviewed-by: Nicholas Pratte <[email protected]>
Reviewed-by: Patrick Robb <[email protected]>
|
|
Add and enable the autodoc-pydantic sphinx extension. Pydantic models
are not correctly recognised by autodoc, causing the generated docs to
lack all the actual model information. The autodoc-pydantic sphinx
extension fixes the original behaviour by correctly formatting them.
Signed-off-by: Luca Vizzarro <[email protected]>
Reviewed-by: Paul Szczepanek <[email protected]>
Reviewed-by: Nicholas Pratte <[email protected]>
Reviewed-by: Patrick Robb <[email protected]>
|
|
Since pydantic has completely replaced warlock, there is no more need to
keep it as a dependency. This removes it.
Signed-off-by: Luca Vizzarro <[email protected]>
Reviewed-by: Paul Szczepanek <[email protected]>
Reviewed-by: Nicholas Pratte <[email protected]>
Reviewed-by: Patrick Robb <[email protected]>
|
|
This change brings in pydantic in place of warlock. Pydantic offers
a built-in model validation system in the classes, which allows for
a more resilient and simpler code. As a consequence of this change:
- most validation is now built-in
- further validation is added to verify:
- cross referencing of node names and ports
- test suite and test cases names
- dictionaries representing the config schema are removed
- the config schema is no longer used and therefore dropped
- the TrafficGeneratorType enum has been changed from inheriting
StrEnum to the native str and Enum. This change was necessary to
enable the discriminator for object unions
- the structure of the classes has been slightly changed to perfectly
match the structure of the configuration files
- the test suite argument catches the ValidationError that
TestSuiteConfig can now raise
- the DPDK location has been wrapped under another configuration
mapping `dpdk_location`
- the DPDK locations are now structured and enforced by classes,
further simplifying the validation and handling thanks to
pattern matching
Bugzilla ID: 1508
Signed-off-by: Luca Vizzarro <[email protected]>
Reviewed-by: Paul Szczepanek <[email protected]>
Reviewed-by: Nicholas Pratte <[email protected]>
Reviewed-by: Patrick Robb <[email protected]>
|
|
The DPDKBuildInfo and NodeInfo classes, representing information
gathered in runtime, were erroneously placed in the configuration
package. This moves them in more appropriate modules.
NodeInfo, specifically, is moved to os_session instead of node mostly
as a consequence of circular dependencies. And given os_session is the
top-most module to reference it, it appears to be the most suitable
place outside of node.
Finally NodeInfo, is better renamed to OSSessionInfo as it represents
the information on the target OS session.
Signed-off-by: Luca Vizzarro <[email protected]>
Reviewed-by: Paul Szczepanek <[email protected]>
Reviewed-by: Nicholas Pratte <[email protected]>
Reviewed-by: Patrick Robb <[email protected]>
|
|
Currently there is a lack of a definition which identifies all the test
suites available to test. This change intends to simplify the process to
discover all the test suites and identify them.
Signed-off-by: Luca Vizzarro <[email protected]>
Reviewed-by: Paul Szczepanek <[email protected]>
Reviewed-by: Nicholas Pratte <[email protected]>
Reviewed-by: Patrick Robb <[email protected]>
|
|
As part of configuration validation and deserialization improvements,
this adds pydantic as a project dependency. Pydantic is a library that
caters to all of the aforementioned needs, while improving the process
and code.
Signed-off-by: Luca Vizzarro <[email protected]>
Reviewed-by: Paul Szczepanek <[email protected]>
Reviewed-by: Nicholas Pratte <[email protected]>
Reviewed-by: Patrick Robb <[email protected]>
|
|
Condition set_forward_mode verify code on the
verify argument, which was originally omitted.
Bugzilla ID: 1410
Fixes: fc0f7dc47ee3 ("dts: add testpmd shell params")
Signed-off-by: Dean Marx <[email protected]>
Reviewed-by: Patrick Robb <[email protected]>
Reviewed-by: Nicholas Pratte <[email protected]>
|
|
Given the whole DPDK tree directory can now be copied to the nodes,
there is no more need to use the git ref option, as the tree can be
controlled directly by the user.
Signed-off-by: Tomáš Ďurovec <[email protected]>
Signed-off-by: Luca Vizzarro <[email protected]>
|
|
Enable the user to use either a DPDK source tree directory or a
tarball, with and without a pre-built build directory. These can be
stored on either SUT node or the DTS host. The DPDK build setup or the
pre-built binaries can be specified through the configuration file,
the command line arguments or environment variables.
Signed-off-by: Tomáš Ďurovec <[email protected]>
Signed-off-by: Luca Vizzarro <[email protected]>
|
|
Currently there is no support to transfer whole directories between the
DTS host and the nodes. This change adds this new feature.
Signed-off-by: Tomáš Ďurovec <[email protected]>
Signed-off-by: Luca Vizzarro <[email protected]>
|
|
The OSSession (and its subclasses) should accept PurePaths
for remote paths to translate from OS-unaware (PurePath)
to OS-aware (Path) only on the remote side. For local paths,
they should accept Paths, as Python is OS-aware locally.
Signed-off-by: Tomáš Ďurovec <[email protected]>
Signed-off-by: Luca Vizzarro <[email protected]>
|
|
Given a pre-built DPDK repository can be supplied to DTS, there is no
need to define multiple build targets. To simplify the process this
change makes each test run use only one DPDK build whether it's
pre-built or it needs to be built by DTS.
Signed-off-by: Tomáš Ďurovec <[email protected]>
Signed-off-by: Luca Vizzarro <[email protected]>
|
|
Since the DPDK may already be built, some more general name
is needed that includes both the DPDK location and the build
config (if we are going to build).
Signed-off-by: Tomáš Ďurovec <[email protected]>
Signed-off-by: Luca Vizzarro <[email protected]>
|
|
Adds a test suite for verifying VLAN filtering, stripping, and insertion
functionality on a Poll Mode Driver.
Signed-off-by: Dean Marx <[email protected]>
Reviewed-by: Jeremy Spewock <[email protected]>
Reviewed-by: Patrick Robb <[email protected]>
|
|
Added the following methods to testpmd shell class:
set vlan filter on/off, rx vlan add/rm,
set vlan strip on/off, tx vlan set/reset,
set promisc/verbose. Fixed a bug in the VLAN regex
used in testpmd shell flags.
Fixes: 61d5bc9bf974 ("dts: add port info command to testpmd shell")
Signed-off-by: Dean Marx <[email protected]>
|
|
Add the capabilities advertised by the testpmd command "show port info"
so that test cases may be marked as requiring those capabilities:
RUNTIME_RX_QUEUE_SETUP
RUNTIME_TX_QUEUE_SETUP
RXQ_SHARE
FLOW_RULE_KEEP
FLOW_SHARED_OBJECT_KEEP
These names are copy pasted from the existing DeviceCapabilitiesFlag
class. Dynamic addition of Enum members runs into problems with typing
(mypy doesn't know about the members) and documentation generation
(Sphinx doesn't know about the members).
Signed-off-by: Juraj Linkeš <[email protected]>
Reviewed-by: Jeremy Spewock <[email protected]>
Reviewed-by: Dean Marx <[email protected]>
Reviewed-by: Luca Vizzarro <[email protected]>
|
|
The scatter Rx offload capability is needed for the pmd_buffer_scatter
test suite. The command that retrieves the capability is:
show port <port_id> rx_offload capabilities
The command also retrieves a lot of other capabilities (RX_OFFLOAD_*)
which are all added into a Flag. The Flag members correspond to NIC
capability names so a convenience function that looks for the supported
Flags in a testpmd output is also added.
The NIC capability names (mentioned above) are copy-pasted from the
Flag. Dynamic addition of Enum members runs into problems with typing
(mypy doesn't know about the members) and documentation generation
(Sphinx doesn't know about the members).
Signed-off-by: Juraj Linkeš <[email protected]>
Reviewed-by: Dean Marx <[email protected]>
Reviewed-by: Jeremy Spewock <[email protected]>
Reviewed-by: Luca Vizzarro <[email protected]>
|
|
Add support for marking test cases as requiring a certain topology. The
default topology is a two link topology and the other supported
topologies are one link and no link topologies.
The TestProtocol of test suites and cases is extended with the topology
type each test suite or case requires. Each test case starts out as
requiring a two link topology and can be marked as requiring as
topology directly (by decorating the test case) or through its test
suite. If a test suite is decorated as requiring a certain topology, all
its test cases are marked as such. If both test suite and a test case
are decorated as requiring a topology, the test case cannot require a
more complex topology than the whole suite (but it can require a less
complex one). If a test suite is not decorated, this has no effect on
required test case topology.
Since the default topology is defined as a reference to one of the
actual topologies, the NoAliasEnum from the aenum package is utilized,
which removes the aliasing of Enums so that TopologyType.two_links and
TopologyType.default are distinct. This is needed to distinguish between
a user passed value and the default value being used (which is used when
a test suite is or isn't decorated).
Signed-off-by: Juraj Linkeš <[email protected]>
Reviewed-by: Dean Marx <[email protected]>
Reviewed-by: Jeremy Spewock <[email protected]>
Reviewed-by: Luca Vizzarro <[email protected]>
|
|
Add parsing for the show rxq info <port_id> <queue_id> tespmd command
and add support for the Scattered Rx capability.
Signed-off-by: Juraj Linkeš <[email protected]>
Reviewed-by: Dean Marx <[email protected]>
Reviewed-by: Jeremy Spewock <[email protected]>
Reviewed-by: Luca Vizzarro <[email protected]>
|
|
Some test cases or suites may be testing a NIC feature that is not
supported on all NICs, so add support for marking test cases or suites
as requiring NIC capabilities.
The marking is done with a decorator, which populates the internal
required_capabilities attribute of TestProtocol. The NIC capability
itself is a wrapper around the NicCapability defined in testpmd_shell.
The reason is Enums cannot be extended and the class implements the
methods of its abstract base superclass.
The decorator API is designed to be simple to use. The arguments passed
to it are all from the testpmd shell. Everything else (even the actual
capability object creation) is done internally.
Signed-off-by: Juraj Linkeš <[email protected]>
Reviewed-by: Dean Marx <[email protected]>
Reviewed-by: Jeremy Spewock <[email protected]>
Reviewed-by: Luca Vizzarro <[email protected]>
|
|
A test case or suite may require certain capabilities to be present in
the tested environment. Add the basic infrastructure for checking the
support status of capabilities:
* The Capability ABC defining the common capability API
* Extension of the TestProtocol with required capabilities (each test
suite or case stores the capabilities it requires)
* Integration with the runner which calls the new APIs to get which
capabilities are supported.
Signed-off-by: Juraj Linkeš <[email protected]>
Reviewed-by: Jeremy Spewock <[email protected]>
Reviewed-by: Dean Marx <[email protected]>
Reviewed-by: Luca Vizzarro <[email protected]>
|
|
We currently assume there are two links between the SUT and TG nodes,
but that's too strict, even for some of the already existing test cases.
Add support for topologies with less than two links.
For topologies with no links, dummy ports are used. The expectation is
that test suites or cases that don't require any links won't be using
methods that use ports. Any test suites or cases requiring links will be
skipped in topologies with no links, but this feature is not implemented
in this commit.
Signed-off-by: Juraj Linkeš <[email protected]>
Reviewed-by: Jeremy Spewock <[email protected]>
Reviewed-by: Dean Marx <[email protected]>
Reviewed-by: Luca Vizzarro <[email protected]>
|
|
If a test case is not relevant to the testing environment (such as when
a NIC doesn't support a tested feature), the framework should skip it.
The mechanism is a skeleton without actual logic that would set a test
case or suite to be skipped.
The mechanism uses a protocol to extend test suites and test cases with
additional attributes that track whether the test case or suite should
be skipped the reason for skipping it.
Also update the results module with the new SKIP result.
Signed-off-by: Juraj Linkeš <[email protected]>
Reviewed-by: Dean Marx <[email protected]>
Reviewed-by: Jeremy Spewock <[email protected]>
Reviewed-by: Luca Vizzarro <[email protected]>
|
|
Add decorators for functional and performance test cases. These
decorators add attributes to the decorated test cases.
With the addition of decorators, we change the test case discovery
mechanism from looking at test case names according to a regex to simply
checking an attribute of the function added with one of the decorators.
The decorators allow us to add further variables to test cases.
Also move the test case filtering to TestSuite while changing the
mechanism to separate the logic in a more sensible manner.
Bugzilla ID: 1460
Signed-off-by: Juraj Linkeš <[email protected]>
Reviewed-by: Dean Marx <[email protected]>
Reviewed-by: Nicholas Pratte <[email protected]>
Reviewed-by: Jeremy Spewock <[email protected]>
Reviewed-by: Luca Vizzarro <[email protected]>
|
|
Regular Python enumerations create only one instance for members with
the same value, such as:
class MyEnum(Enum):
foo = 1
bar = 1
MyEnum.foo and MyEnum.bar are aliases that return the same instance.
DTS needs to return different instances in the above scenario so that we
can map capabilities with different names to the same function that
retrieves the capabilities.
Signed-off-by: Juraj Linkeš <[email protected]>
Reviewed-by: Jeremy Spewock <[email protected]>
Reviewed-by: Dean Marx <[email protected]>
Reviewed-by: Nicholas Pratte <[email protected]>
Reviewed-by: Luca Vizzarro <[email protected]>
|
|
Multiple test suites from the old DTS framework rely on being able to
consume and interpret the verbose output of testpmd. The new framework
doesn't have an elegant way for handling the verbose output, but test
suites are starting to be written that rely on it. This patch creates a
TextParser class that can be used to extract the verbose information
from any testpmd output and also adjusts the `stop` method of the shell
to return all output that it collected.
Signed-off-by: Jeremy Spewock <[email protected]>
Reviewed-by: Juraj Linkeš <[email protected]>
Reviewed-by: Luca Vizzarro <[email protected]>
|
|
Previously all scapy commands were handled using an XML-RPC server that
ran on the TGNode. This unnecessarily enforces a minimum Python version
of 3.10 on the server that is being used as a traffic generator and
complicates the implementation of scapy methods. This patch removes the
XML-RPC server completely and instead allows the Scapy TG to extend from
the PythonShell to implement the functionality of a traffic generator.
This is done by importing the Scapy library in the PythonShell and
sending commands directly to the interactive session on the TG Node.
Bugzilla ID: 1374
Signed-off-by: Jeremy Spewock <[email protected]>
Reviewed-by: Juraj Linkeš <[email protected]>
Reviewed-by: Luca Vizzarro <[email protected]>
|
|
Currently the only methods provided in the test suite class for sending
packets capture the resulting received traffic after sending. There is,
in some cases, a need to send multiple packets at once while not really
needing to capture any of said received traffic. It is favorable to
avoid capturing received traffic when you don't need it since not all
traffic generators will necessarily be capturing traffic generators.
The method to fulfill this need exists in the traffic generator
already, but this patch exposes the method to test suites.
Signed-off-by: Jeremy Spewock <[email protected]>
Reviewed-by: Juraj Linkeš <[email protected]>
Reviewed-by: Patrick Robb <[email protected]>
Reviewed-by: Luca Vizzarro <[email protected]>
|
|
This patch updates the _adjust_addresses method of test suites so
that addresses of packets are only modified if the developer did not
configure them beforehand. This allows for developers to have more
control over the content of their packets when sending them through the
framework.
Signed-off-by: Jeremy Spewock <[email protected]>
Reviewed-by: Juraj Linkeš <[email protected]>
Reviewed-by: Luca Vizzarro <[email protected]>
|
|
Currently the runner target in the Dockerfile attempts to run the
`poetry install` command when building the image, but this fails due to
poetry not being found in the container. Poetry is installed in a
previous step with pipx, but doing so adds the binary to use poetry to
~/.local/bin which isn't present in the PATH variable in the container
image. The command `pipx ensurepath` fixes this issue in most cases, but
it requires a restart of the shell in order for the changes to take
place which is not something that can be done in the runner target. To
solve this problem this patch manually adds ~/.local/bin to PATH in the
runner target.
Additionally, the command for installing poetry in the runner target
uses a depreciated flag, and the --revision parameter does not work with
the runner target. To address these problems the --no-dev flag is
removed in this patch and replaced with the new method of doing the same
thing and git is added to the base target of the image. The CMD of the
runner target is also replaced with an ENTRYPOINT for ease of use.
Fixes: 19082c1fac43 ("dts: add Dockerfile")
Signed-off-by: Jeremy Spewock <[email protected]>
Reviewed-by: Luca Vizzarro <[email protected]>
Reviewed-by: Patrick Robb <[email protected]>
|
|
Correct docstring error in conf.yaml showing incorrect
example PCI address for TG nodes.
Fixes: 55442c14297c ("dts: improve documentation")
Signed-off-by: Dean Marx <[email protected]>
Reviewed-by: Nicholas Pratte <[email protected]>
Reviewed-by: Luca Vizzarro <[email protected]>
Reviewed-by: Jeremy Spewock <[email protected]>
Reviewed-by: Juraj Linkeš <[email protected]>
|
|
In the current DTS setup description, the user installs poetry
with the --no-root option. However, adding 'package-mode = false'
to the pyproject.toml sets the same configuration, and running
poetry install --no-root will become an error in a future
poetry version.
Signed-off-by: Dean Marx <[email protected]>
Reviewed-by: Nicholas Pratte <[email protected]>
Reviewed-by: Luca Vizzarro <[email protected]>
Reviewed-by: Juraj Linkeš <[email protected]>
|