aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python
AgeCommit message (Collapse)AuthorFilesLines
2022-05-16Core: T-rex 2.97pmikus1-8/+2
Signed-off-by: pmikus <pmikus@cisco.com> Change-Id: Id4d84aa7268080843b099fd7ab9851234612968b
2022-05-03feat(astf): Support framesizes for ASTFVratko Polak4-41/+78
- No support for IMIX. + Fix a bad bug in padding (most ASTF profiles had wrong frame sizes). + Fix a big typo in TCP PPS profiles (s->c was not data, just RST). + Control transaction size via ASTF_N_DATA_FRAMES env variable. - Default value 5 leads to transactions smaller than before. + It ensures transaction is one burst (per direction) even for jumbo. + Edit autogen to set supported frame sizes based on suite id. + Both TCP and UDP use the same values: + 64B for CPS (exact for UDP, nominal for TCP). + 100B, 1518B and 9000B for TPUT and PPS. - TCP TPUT achievable minimum is 70B. + Used 100B to leave room for possible IPv6 ASTF tests. + Separate function for code reused by vpp and trex tests. - I do not really like the new "copy and edit" approach added here. + But it is a quick edit, better autogen refactor is low priority. + Consider both established and transitory sessions as valid. - Mostly for compatibility with 2202 behavior and to avoid ramp-ups. - Assuming both session states have similar enough VPP CPU overhead. + Added a TODO to investigate and maybe reconsider later. + Update the state timeout value to 240s. + That is the default for TCP (for transitory state). - UDP could keep using 300s. + But I prefer UDP and TCP to behave as similarly as possible. + Use TRex tunables to get the exact frame size (for data packets). - It is not clear why the recipe for MSS has to be this complicated. + Move code away from profile init, as frame size is not known there. + Change internal profile API, so values related to MSS are passed. + Lower ramp-up rate for TCP TPUT tests. + Because without lower rate, jumbo fails on packet loss in ramp-up. + UDP TPUT ramp-up rate also lowered (just to keep suites more similar). + Distinguish one-direction and aggregated average frame size. + Update keyword documentation where the distiction matters. + One-direction is needed for turning bandwidth limit to TPS limit. + Aggregated is needed for correct NDRPDR bandwidth result value. - TCP TPUT will always be few percent below bidirectional maximum. + That is unavoidable, as one direction sends more control packets. + Add runtime consistency checks so future refactors are safer. + Fail if padding requested would be negative. + Fail if suite claims unexpected values for packets per transaction. + Edit the 4 types of ASTF profiles to keep them similar to each other. + Move UDP TPUT limit value from a field back to direct argument. + Stop pretending first UDP packet is not data. + Apply small improvements where convenient. + Replace "aggregate" with "aggregated" where possible. + To lower probability of any future typos in variable names. + Avoid calling Set Numeric Frame Sizes twice. + Code formatting, keyword documentation, code comments, ... + Add TODOs for less important code quality improvements. - Postpone updating of methodology pages to a subsequent change. Change-Id: I4b381e5210e69669f972326202fdcc5a2c9c923b Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2022-04-26fix(tgtest): filter by TG NIC modelVratko Polak1-3/+9
The previous path computation code was only correct for tests with DUT (and TG). There, we only want to filter by DUT NICs, but not TG NICs (e.g. to allow testing E810 DUT with MLX TG). But for tests without DUT (still with TG), we do indeed want to filter by NICs on TG, so this patch does that. Change-Id: Ia482c6327af7bca26353ad6e503ae224d90cb3a4 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2022-04-07Revert "feat(core): Add dpdk log level"Peter Mikus2-4/+4
This reverts commit 22bfd741614145d86751df2d61ff77af9db63627. Reason for revert: OMFG this patch is causing 90% perf degradation on AWS Change-Id: Id081f61ae849678b6b877fbf03309c4b1b0c6df6 Signed-off-by: Peter Mikus <pmikus@cisco.com>
2022-04-05VppConfigGenerator: disable vpp cli pagerDave Wallace1-1/+6
- Robot framework logs contain 'show pci' output from VPP that is truncated due to the VPP cli pager. Add UNIX cli-no-pager configuration to the default startup config to fix this issue. Signed-off-by: Dave Wallace <dwallacelf@gmail.com> Change-Id: I80f2cd045063245098f22eb638a9796c5031fecf
2022-03-21feat(core): Add dpdk log levelPeter Mikus2-4/+4
Signed-off-by: Peter Mikus <pmikus@cisco.com> Change-Id: I8af9bae81ec83a3195ae83febd978882ebc2474d
2022-03-15Soak: Improve ordering and commentsVratko Polak1-10/+15
After the previous fix, the code was not straightforward enough. Change-Id: I4e2d872b3f86de2868d947ad038b5f0f2c7eebd7 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2022-02-22fix(uti): Fixing broken code part VIPeter Mikus1-5/+2
- Printing large sets makes no sense. Signed-off-by: Peter Mikus <pmikus@cisco.com> Change-Id: Ia4bf411368ca2424ad313b8e7bb0fb76cb175988
2022-02-16chore(api): use the non-deprecated nat init callVratko Polak1-16/+5
Change-Id: Ic1949c46aa339e66a47a0ebbc428499c5cf9305e Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2022-02-15fix(nat): parse new show nat44 summary outputVratko Polak1-13/+54
+ Keep support for VPP 22.02 CLI output. + Keep tolerating "timed out" sessions for 2202 output. + Subtract timed-out sessions for post-2202 output. + Explain the logic differences in docstring. + Convert the return value to int. Change-Id: I8a119e1034848bfd0fb131cb633e2441b44634a2 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2022-02-08feat(autogen): generate gso suites for all nicsVratko Polak1-15/+16
Previously, only x710 was generated, but ICX has xxv710 instead. Nic drivers (tap or vhost) remain hardcoded. Change-Id: I0ed3abb60258d74622995a8910f67ae4500ace56 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2022-01-27fix(dpdk): JumboPeter Mikus2-5/+0
Signed-off-by: Peter Mikus <pmikus@cisco.com> Change-Id: I0e659937440e9ff7070f0d13b7a1db99f27cf2bb
2022-01-17fix(uti): Fixing broken code part VPeter Mikus2-5/+5
- UTI export breaks local execution - disabling useless tox rules Signed-off-by: Peter Mikus <pmikus@cisco.com> Change-Id: I2f610b08f06f437e4482f291fa7b47cbb7b92984
2022-01-17fix(IPsec): fix policy testsJuraj Linkeš1-14/+35
Replace the hardcoded SPD inbound/outbound ranges with values derived from test inputs. Add the necessary routes now that the tunnel endpoints are not in the same subnet. Also add ip neighbor entry on DUT2 for the same reason. Also replace ipsec sa dump with show ipsec all in teardown of tests where both SAs and SPDs are configured to improve troubleshooting. Change-Id: I7d89a99fcf457a701c87bf6ac07364b62802677d Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
2022-01-14JumpAvg: Fix string formatVratko Polak1-2/+2
Change-Id: Id3975dfcca0040b799f31dcd14789d8c90993b14 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2022-01-10fix(core): Constants.pyPeter Mikus1-3/+3
Signed-off-by: Peter Mikus <pmikus@cisco.com> Change-Id: Ia5a097797b54c2e71acdcc8d72706e5540536252
2021-12-21feat(infra): DPDK 21.11pmikus1-1/+1
Signed-off-by: pmikus <pmikus@cisco.com> Change-Id: Ib52fab112d458decfecf39c77085bcd85f811eba
2021-12-15fix(dpdk): allowpmikus1-2/+2
Signed-off-by: pmikus <pmikus@cisco.com> Change-Id: Ic7f24767b60eef5ddb7cdf5f933d82930c625f5c
2021-12-15UTI: Export resultsVratko Polak12-30/+1253
+ Model version 1.0.0. - Only some result types are exported. + MRR, NDRPDR and SOAK. - Other result types to be added later. + In contrast, all test types are detected. + Convert custom classes to JSON-serializable equivalents. + Sort dict keys before converting to JSON. + Override the order for some known keys. + Export sets as sorted arrays. + Convert to info content from serialized raw content. + Also export outputs for suite setups and teardowns. + Info files for setup/teardown exist only temporarily. + The data is merged into suite.info.json file. + This simplifies presentation of total suite duration. + Define model via JSON schema: - Just test case, suite setup/teardown/suite to be added later. - Just info, raw to be added later. + Proper descriptions. + Json is generated from yaml. + This is a convenience for maintainers. + The officially used schema is the .json one. + TODOs written into a separate .txt file. + Validate exported instance against the schema. + Include format checking. + Update CSIT requirements for validation dependencies. + This needs python-dateutil==2.8.2, only a patch bump. + Compute bandwidth also for soak tests. + This unifies with NDRPDR to simplify schema definition. - PAL may need an update for parsing soak test message. + Include SSH log items, raw output only. + Generate all outputs in a single filesystem tree. + Move raw outputs into test_output_raw.tar.xz. + Rename existing tar with suites to generated_robot_files.tar.xz. Change-Id: I69ff7b330ed1a14dc435fd0ef008e753c0d7f78c Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2021-12-15Tox: Add checker for CSIT model versionVratko Polak2-0/+19
+ Implementation stub so checker can check already. + Also add documentation stub for the implemented model. + Checker checks also for bumps in documentation version. - Not comparing implementation and documentation version yet. Change-Id: I4d19c00315a1c171de325c4494c28f5210635f32 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2021-12-13doc: fixing documentation structureViliam Luc1-16/+17
When building documentation using sphinx we see ~1200 similar warnings [0] [0] - https://s3-logs.fd.io/vex-yul-rot-jenkins-1/csit-verify-tox-master-ubuntu2004-x86_64/3289/doc_verify.log.gz These warning are harmless and can be fixed later Signed-off-by: Viliam Luc <vluc@cisco.com> Change-Id: I1ac1099d38935971d47491dde905715345d3935c
2021-12-06PLRsearch: Update docscringsVratko Polak1-3/+11
Previous code changes updated code comments, but not docstring. Change-Id: I5be3fd07620cc97c9088efceb72c2f68ab103915 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2021-12-01feat(Performance): Add 2M/1G hugepagespmikus5-49/+40
+ Add ability to switch between hugepages. Signed-off-by: pmikus <pmikus@cisco.com> Change-Id: I84d8eae28ed414a32e5ba82e6c9ed10d7f0ef9cb
2021-11-25PAPI: Include more details in PAPI fail messageVratko Polak1-3/+4
This helps to distinguish different symptoms for PAL failure alerting. Change-Id: Idd8e8f4b427641fa055516bdf17715f6b967ca72 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2021-11-08vpp_device: bind to vfio-pci before running testsJuraj Linkeš1-3/+8
In rare cases, binding the whole /dev/vfio folder will result in unusable VFs: notice dpdk EAL: Cannot open /dev/vfio/151: Device or resource busy [0], section 4.3.1. provides some clues as to what's going on and how to avoid the failure. Mounting /dev/vfio reset the file descriptors of all devices under /dev/vfio. Vfio-pci creates a device when an interface is bound to it. The rare failure then occurs when /dev/vfio is mounted while a process is using the file descriptors result in that process using invalid file descriptors (or file descriptors belonging to a different VF). Fix the issue by binding i40e and ice VFs to vfio-pci before containers are created and make sure that the VFs are not unbound later in testing. Only bind DUT VFs since the TG uses the kernel driver. [0]: https://connect.redhat.com/sites/default/files/2021-03/Cloud Native Network Function Requirements.pdf Ticket: CSIT-1794 Change-Id: I83db91b29d16669fb034b141ad247f6f796fdf64 Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
2021-11-02fix(autogen): VSAP testcase namingpmikus1-0/+1
Signed-off-by: pmikus <pmikus@cisco.com> Change-Id: Ic6d440ffdf7e27c9e6ce65605178163652758f77
2021-10-28fix(Autogen): VSAP driver combinationspmikus1-8/+39
Signed-off-by: pmikus <pmikus@cisco.com> Change-Id: Ieac8cd32009bebbd1a3324a81becfbf3abb814ab
2021-10-25IPsec: add nth SPD entry outbound flow cache TCsJuraj Linkeš1-0/+5
Add 1, 10, 100 and 1000 SPD entries using IPv4 outbound flow cache optimization. Change-Id: I7abb65a82454c17ef754cb11386186610f0c27e8 Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
2021-10-18fix(flow): Move import back to functionspmikus1-2/+28
+ This makes a problem. It would be better to have ENUMS in code as everywhere else Signed-off-by: pmikus <pmikus@cisco.com> Change-Id: I90f8e7c0177cb6a76eef5d4444f0ec22f57236c4
2021-10-13DUTSetup: FIX Format symbolxizhanx1-2/+2
Signed-off-by: xizhanx <xix.zhang@intel.com> Change-Id: Ic6ccc206632023297d35d0020397e8fd5706ea1c
2021-10-08fix(Pylint): Small fixespmikus7-41/+25
+ Just few obvious one Signed-off-by: pmikus <pmikus@cisco.com> Change-Id: I9bbac293a56d6b2943bef03cb3b8943e967dae6b
2021-10-08Add flow test suitesxinfeng zhao2-3/+582
The comms DDP package needs to be installed to support all flow protocols Signed-off-by: xinfeng zhao <xinfengx.zhao@intel.com> Change-Id: I6ab1bd8beb9edb8c9889a0ed9a999080ca3cef3d
2021-10-06docstring: Docstring warnings fixed.Viliam Luc9-28/+28
Change-Id: I8679c819b7c6ecd9e680bdc6edeafd2124def0b5 Signed-off-by: Viliam Luc <vluc@cisco.com>
2021-10-06Fix: Do not touch PAPI history on bad DICT__nodesVratko Polak1-1/+6
Usually, DICT__nodes is populated from reserved topology yaml. But is some cases (doc generation, maybe pylint) there is no yaml. The proper fix is to never execute any business logic just when a module is imported. This is just a quick workaround. Ticket: CSIT-1793 Change-Id: I6d7250dc75d12baf120758ade8730af89431265a Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2021-09-29feat(DPDK): Bump payload version to 21.08pmikus1-1/+1
Signed-off-by: pmikus <pmikus@cisco.com> Change-Id: Ic249493a39faa8f429ae4fa1de644d74d874151b
2021-09-29MLRsearch: Increase timeout to 20 minutesVratko Polak1-1/+1
There are sporadic failures due to timeout. An earlier edit changed how the timeout is applied (now it is for the whole search, previously it was for final phase only) so failures are not unexpected. Increasing timeout value from 12 minutes to 20 minutes (both for NDRPDR and for NDR part of RECONF) as the frequency shows it will not prolong runs much. The timeout is increased both in Robot call site and in Python keyword default argument. Change-Id: I3f07125ba9eeb90ce5819b1450044441b8b3977a Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2021-09-28fix(Core): Interface not recognizedpmikus1-0/+4
+ Make better error message. Signed-off-by: pmikus <pmikus@cisco.com> Change-Id: I2dbb9a50215bd6665c5c278653edd9324314e6b8
2021-09-28fix(DPDK): Increase install timeoutpmikus1-1/+1
Signed-off-by: pmikus <pmikus@cisco.com> Change-Id: Ib87e173daba3315c51794a12e22f7961a5709699
2021-09-20API: Remove old_cmd supportVratko Polak2-17/+4
Master branch is no longer expected to work with such old VPP builds, and CRC values were removed already anyway. Change-Id: I707a61bc82d7d8998100fcd9fe78b90e7b074675 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2021-09-14back-to-back: add tg n2n suitesViliam Luc1-4/+16
Change-Id: I911e121475221fbf5449ed49dc6236caf13742b0 Signed-off-by: Viliam Luc <vluc@cisco.com>
2021-09-14API: Use newer message versionsVratko Polak4-37/+50
Based on latest common ancestor of master and stable/2106: 1372178e0e674143bfec14b17050d5e92e4fcf1a Only ipsec_sad_entry_add_del_v3 needs non-trivial argument edits. Change-Id: I813367292a830e5a1fac765e9f24057b6b0192ee Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2021-09-10back-to-back tests: add TG testsViliam Luc4-29/+178
Change-Id: I9d028294deb1e31b6d185deb1c7523e0226a0ada Signed-off-by: Viliam Luc <vluc@cisco.com>
2021-08-24Fix DPDK nb_cores allocationpmikus2-5/+8
+ Migrate the call to main python util Signed-off-by: pmikus <pmikus@cisco.com> Change-Id: I8d00165071d4764121740c1c77819b8ffc65b3ba
2021-08-20Scale tests: Use exec commands and VAT executorVratko Polak1-34/+74
This is the same appoach as in ipsec tests. This is the fastest way to fix scale tests. - Some argument combinations are not supported, e.g. multipath=False. + Make multipath=True default. - Devicetest using local=True only works with PAPI. + But that was true already in rls2106, so no need to fix here. + Add two more formats to NetworkIncrement. + Check address is aligned, unless call side disables that. + Only one keyword for two devicetests disables the check. + Papi history condition to print first and last. + Minor docstring edits. Change-Id: I32d24e2f821b412b5841a50d2f87e1c86345b1aa Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2021-08-20Improve NetworkIncrementVratko Polak2-22/+38
+ Set 1 as default value for increment. + Update IPsecUtil. + Tolerate address with host bits set when incrementing. + Call sites can check initial value on their own. + Support multiple ways of converting to string. - Only the previous "dash" format is supported here. + Update docstrings. Change-Id: I0c71a6327cca6a319715b3fcfbbee800cac14287 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
2021-08-19vpp_device: Multiple NICs (suitegen)pmikus2-0/+79
Signed-off-by: pmikus <pmikus@cisco.com> Change-Id: I81958fbf6ef240d53a0fb8708ca882baf02f606c
2021-08-02FIX: init_interface driver and sr-iovJuraj Linkeš2-49/+28
Add checks for not unbinding a driver that is not bound and not trying to remove VFs from interfaces not supporting SR-IOV. Change-Id: Iae7ce37aabeadbb541fe9eac8b83b4ee18d028e6 Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
2021-08-02FIX: init interfaces for rdma-core driverJuraj Linkeš1-0/+4
We're only initializing interfaces for avf and af_xdp VPP drivers. This causes issues for the rdma-core driver when the underlying mlnx kernel driver is not bound. Fix this so that all interfaces are properly bound to the kernel driver required by rdma-core. Change-Id: I204309a9bb61b56b96497a287178f0b1efe2f362 Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
2021-07-28CSIT-1782: 4c AVF tests are failingpmikus1-2/+13
+ Implement temporary ugly workaround as I cannot do driver upgrade now after discussions with PTL. Signed-off-by: pmikus <pmikus@cisco.com> Change-Id: I400e3b61bd831b9c9820b1fab8852118f2d48f0e
2021-07-28IPsec: add nth matching SPD entry outbound TCsJuraj Linkeš3-102/+369
Add testcases with plain ipv4 forwarding with 1, 10, 100 and 1000 SPD entries on outbound traffic in both directions both directions. Only match the last SPD entry and process others before the matching entry. Add testcases only without flow cache optimization. Refactor the Python functions that add SPD entries: - Unify the args in functions that add one and multiple entries. - For multiple entries, add the ability to pass an object that will handle how values in each iteration (i.e. for each entry) are modified. Change-Id: I061922eec6acc75a4e115202c07e72d89bf1f4d3 Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>