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 v3] validation: ipsec: populate packet with layer info #1313

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

asasidharan
Copy link
Contributor

Populate the test packets with layer info

Signed-off-by: Vidya Sagar Velumuri vvelumuri@marvell.com
Signed-off-by: Aakash Sasidharan asasidharan@marvell.com
Change-Id: Ib1bfd36ddf03bb34a8661f1e02806e4dbfb19c69

@odpbuild odpbuild changed the title validation: ipsec: populate packet with layer info [PATCH v1] validation: ipsec: populate packet with layer info Jun 17, 2021
@asasidharan asasidharan force-pushed the validation_ipsec_populate_layer_info branch from 972acb8 to 8f9baf3 Compare June 17, 2021 06:54
@odpbuild odpbuild changed the title [PATCH v1] validation: ipsec: populate packet with layer info [PATCH v2] validation: ipsec: populate packet with layer info Jun 17, 2021
Populate the test packets with layer info

Signed-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>
Signed-off-by: Aakash Sasidharan <asasidharan@marvell.com>
@asasidharan asasidharan force-pushed the validation_ipsec_populate_layer_info branch from 8f9baf3 to 0acc5e4 Compare June 17, 2021 08:52
@odpbuild odpbuild changed the title [PATCH v2] validation: ipsec: populate packet with layer info [PATCH v3] validation: ipsec: populate packet with layer info Jun 17, 2021
@JannePeltonen
Copy link
Collaborator

What is the purpose of this change? Please provide some context and rationale in the commit message.

@asasidharan
Copy link
Contributor Author

What is the purpose of this change?

Inline outbound processing would require parsed IP packet to help with the result packet length calculations. Otherwise per-packet re-parsing needs to be done by implementation.

@JannePeltonen
Copy link
Collaborator

Inline outbound processing would require parsed IP packet to help with the result packet length calculations.

The current ODP API does not require parsed IP packet for outbound IPsec operations. Quote from the API spec:

 * Each input packet must have a valid value for these metadata (other metadata
 * is ignored):
 * - L3 offset: Offset to the first byte of the (outmost) IP header
 * - L4 offset: Offset to the L4 header if L4 checksum offload is requested
 *
 * Additionally, input IP packet length (odp_packet_len() minus
 * odp_packet_l3_offset()) must match values in protocol headers.

API validation tests are for testing that an ODP implementation complies with the API spec. Since the current test code seems to use the API correctly, a test failure must be fixed in the ODP implementation being tested or through an ODP API specification change, not by simply changing the validation test to be easier for the implementation.

IOW, even if the current API might cause additional packet parsing in your implementation, you cannot ignore the API spec and change the validation test to make your implementation look compliant when it is not. Applications have to be able to rely on the behaviour specified in the API.

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.

None yet

3 participants