odp
odp copied to clipboard
[PATCH v2] improve pktio_main test code
This PR is for improving the pktio_main test code so that adding a new mode into test_txrx becomes easier.
Previously, an additional boolean argument was added to the test_txrx function for enabling vector mode. If we follow that approach, each addition of a new mode will call for changing the function prototype. This PR encapsulates the modes into a single flag argument so that new modes can be added without changing the function prototype.
This PR also adds a patch for enabling creation of variable sized UDP packets.
This PR is primarily a precursor to adding the tests for validating the buffer sort capability proposed in https://github.com/OpenDataPlane/odp/pull/1084.
validation: pktio: use bits for identifying txrx mode
Use bit based flags to identify the txrx mode instead of enumerations. This will simplify addition of new modes into txrx.
Signed-off-by: Ashwin Sekhar T K [email protected]
validation: pktio: add a function to configure pktio
Move additional configurations of pktio to a function.
Signed-off-by: Ashwin Sekhar T K [email protected]
validation: pktio: allow creation of UDP packets of different lengths
Add an optional parameter to create_packets_udp function to specify the lengths of the udp packets to be created.
Also modify pktio_pkt_seq_hdr function to allow udp packets of any length provided that it has enough space to store the magic values.
Signed-off-by: Ashwin Sekhar T K [email protected]
This PR is primarily a precursor to adding the tests for validating the buffer sort capability proposed in #1084.
New test cases using different packet lengths will be added once that PR is merged. I will hold the modifications to this PR until that #1084 is merged.