diff options
author | Vratko Polak <vrpolak@cisco.com> | 2022-04-25 10:22:05 +0200 |
---|---|---|
committer | Vratko Polak <vrpolak@cisco.com> | 2022-05-03 15:23:47 +0000 |
commit | 1daa6fdc0bae284dee1b61f34534e59b60b7526a (patch) | |
tree | 6314e011a8f029c4332586d5fd05b51d1a69a89c /resources/libraries/python/NATUtil.py | |
parent | cd417be7f836eb9346fad4f87bd4f75dc1d9a429 (diff) |
feat(astf): Support framesizes for ASTF
- 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>
Diffstat (limited to 'resources/libraries/python/NATUtil.py')
-rw-r--r-- | resources/libraries/python/NATUtil.py | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/resources/libraries/python/NATUtil.py b/resources/libraries/python/NATUtil.py index ceed560a04..841bd2e683 100644 --- a/resources/libraries/python/NATUtil.py +++ b/resources/libraries/python/NATUtil.py @@ -278,7 +278,7 @@ class NATUtil: @staticmethod def get_nat44_sessions_number(node, proto): - """Get number of established NAT44 sessions from NAT44 mapping data. + """Get number of expected NAT44 sessions from NAT44 mapping data. This keyword uses output from a CLI command, so it can start failing when VPP changes the output format. @@ -287,17 +287,21 @@ class NATUtil: The current implementation supports both 2202 and post-2202 format. (The Gerrit number changing the output format is 34877.) - For TCP proto, the post-2202 format includes "timed out" - established sessions into its count of total sessions. + For TCP proto, the expected state after rampup is + some number of sessions in transitory state (VPP has seen the FINs), + and some number of sessions in established state (meaning + some FINs were lost in the last trial). + While the two states may need slightly different number of cycles + to process next packet, the current implementation considers + both of them the "fast path", so they are both counted as expected. + As the tests should fail if a session is timed-out, - the logic substracts timed out sessions for the resturned value. + the logic substracts timed out sessions for the returned value + (only available for post-2202 format). - The 2202 output reports most of TCP sessions as in "transitory" state, - as opposed to "established", but the previous CSIT logic tolerated that. - Ideally, whis keyword would add establised and transitory sessions - (but without CLOSED and WAIT_CLOSED sessions) and return that. - The current implementation simply returns "total tcp sessions" value, - to preserve the previous CSIT behavior for 2202 output. + TODO: Investigate if it is worth to insert additional rampup trials + in TPUT tests to ensure all sessions are transitory before next + measurement. :param node: DUT node. :param proto: Required protocol - TCP/UDP/ICMP. @@ -328,9 +332,7 @@ class NATUtil: found = True continue # Proto is found, find the line we are interested in. - if proto_l == u"tcp" and u"established" not in line: - continue - if u"total" not in line and u"established" not in line: + if u"total" not in line: raise RuntimeError(f"show nat summary: no {proto} total.") # We have the line with relevant numbers. total_part, timed_out_part = line.split(u"(", 1) |