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 v2] api: ipsec: improve inline IPsec config through inline SA scope #1408

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

Conversation

JannePeltonen
Copy link
Collaborator

This is WIP for discussion and an alternative to an approach where
the concept of "ipsec instance" is added.

Add a concept of inline SA scope that defines one or more pktios where an
inline SA can be used. The scope can also include look-a-side processing
for cases where an SA state can be shared between inline processing and
async look-a-side processing.

Inline SA scope is added to SA creation parameters. Inline SA scopes
of different SAs can overlap.

Add new capability functions that take inline SA scope as a parameter.

Add new pktio specific inline IPsec config function.

Signed-off-by: Janne Peltonen [email protected]

@odpbuild odpbuild changed the title api: ipsec: improve inline IPsec config through inline SA scope [PATCH v1] api: ipsec: improve inline IPsec config through inline SA scope Nov 2, 2021
This is WIP for discussion and an alternative to an approach where
the concept of "ipsec instance" is added.

Add a concept of inline SA scope that defines one or more pktios where an
inline SA can be used. The scope can also include look-a-side processing
for cases where an SA state can be shared between inline processing and
async look-a-side processing.

Inline SA scope is added to SA creation parameters. Inline SA scopes
of different SAs can overlap.

Add new capability functions that take inline SA scope as a parameter.

Add new pktio specific inline IPsec config function.

Signed-off-by: Janne Peltonen <[email protected]>
@odpbuild odpbuild changed the title [PATCH v1] api: ipsec: improve inline IPsec config through inline SA scope [PATCH v2] api: ipsec: improve inline IPsec config through inline SA scope Nov 2, 2021
@JannePeltonen
Copy link
Collaborator Author

v2: fixed a couple of typos.

* @see odp_ipsec_inline_capability(), odp_ipsec_config_init()
*/
int odp_ipsec_inline_config(odp_pktio_t pktio,
const odp_ipsec_config_t *config);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of the contents in odp_ipsec_config_t such as mode is not probably needed.
Can the required inline related config be part of odp_pktio_config_t instead of this new API ?

* @retval 0 on success
* @retval <0 on failure
*/
int odp_ipsec_inline_capability(const odp_ipsec_inline_sa_scope_t *scope,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This capability can be part of odp_pktio_capability_t ?

Copy link
Collaborator Author

@JannePeltonen JannePeltonen Dec 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This capability is associated with the SA scope, which consists of one or more pktios and possibly look-a-side too. The same pktio could be used within different scopes. For instance pktio A could support HMAC-MD5 but pktio B not, then the capabilities for the scope that includes both pktio A and B cannot include HMAC-MD5.

Tying inline capabilities directly to pktios would not allow one to express what is supported when an SA state can be shared between multiple pktios (or a pktio and look-a-side).

/** Scope where this SA can be used. Ignored if inline
* processing is not enabled. */
odp_ipsec_inline_sa_scope_t inline_scope;
} inline_param;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method of a associating PKTIO with Inline SA looks fine to me.

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.

2 participants