Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PATCH v1] LSO: improve validation tests and the implementation #2139

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

JannePeltonen
Copy link
Collaborator

No description provided.

…_map()

Write seg_len in packet_map() also in the failure path to avoid bogus
compilation warnings about possibly uninitialized variables in code that
is using odp_packet_l2_ptr() and similar.

Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Reduce current and future code duplication by combining the IPv4 and
custom ethernet LSO test functions.

Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Check that the payload in LSO segments contains at least 1 byte so
that an implementation that would generate a segment with a header
only would fail the test. At the same time, make the test code
robust against segments shorter than the header length.

Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
The LSO profile parameter struct passed to odp_lso_profile_create() is
not supposed to be accessed by ODP after the profile creation. Clear the
struct immediately after profile creation to hopefully notice if the
ODP under test tries to read the struct later.

Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Move LSO test packet creation out of the sending function to accommodate
future changes that must record what exactly was sent.

Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Check that the headers of the segmented output packets match exactly
what is expected, including bytes only copied but not modified by LSO.
This also adds checking of IPv4 headers that was previously missing.

Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
LSO for IPv4 packets does not now preserve the DF flag of the original
packet, which can break path MTU discovery.

LSO for IPv4 packets also ignores the fragment offset of the original
packet and generates new fragment offsets starting from zero, breaking
IPv4 LSO for packets that are alerady IPv4 fragments but need to be
fragmented further.

Fix both problems by just updating instead of overwriting the original
flags and fragment offset IP header fields.

The current implementation does not process IPv4 packets with options
properly. If a packet with options would need to be fragmented, give
up instead of sending broken packets. This does not fix the problem
but makes it hopefully easier to debug if bumped into. Implemeantation
of the missing option support in fragmentation would be needed for
a real fix.

Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Add testing of IPv4 LSO with packets that have the DF flag set.

Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Add testing of IPv4 LSO with packets that are already fragments.

Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
Make the test faster by sending a marker packet after the LSO test
packets and by stopping further packet reception when the marker
packet is received.

Signed-off-by: Janne Peltonen <janne.peltonen@nokia.com>
@odpbuild odpbuild changed the title LSO: improve validation tests and the implementation [PATCH v1] LSO: improve validation tests and the implementation Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant