diff options
| author | Ankur Dwivedi <[email protected]> | 2023-07-31 09:14:45 +0530 |
|---|---|---|
| committer | Akhil Goyal <[email protected]> | 2023-10-09 21:01:00 +0200 |
| commit | a35f828db8a0f436f857bce7f80f29983b735ea3 (patch) | |
| tree | db50020d25f9fab5edc7ea8c5f14159a166cc753 /lib/security | |
| parent | 17de6b044d9426eede867436770c6306f5e506cf (diff) | |
security: add MACsec algo in capability index
This patch adds the MACsec algorithm field in security capability index
structure. This field is compared against the MACsec alg to return the
correct capability.
Signed-off-by: Ankur Dwivedi <[email protected]>
Acked-by: Akhil Goyal <[email protected]>
Diffstat (limited to 'lib/security')
| -rw-r--r-- | lib/security/rte_security.c | 4 | ||||
| -rw-r--r-- | lib/security/rte_security.h | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/lib/security/rte_security.c b/lib/security/rte_security.c index c4d64bb8e9..2d729b735b 100644 --- a/lib/security/rte_security.c +++ b/lib/security/rte_security.c @@ -282,6 +282,10 @@ rte_security_capability_get(struct rte_security_ctx *instance, if (capability->docsis.direction == idx->docsis.direction) return capability; + } else if (idx->protocol == + RTE_SECURITY_PROTOCOL_MACSEC) { + if (idx->macsec.alg == capability->macsec.alg) + return capability; } } } diff --git a/lib/security/rte_security.h b/lib/security/rte_security.h index c6550f4d8d..439bbb957f 100644 --- a/lib/security/rte_security.h +++ b/lib/security/rte_security.h @@ -1252,6 +1252,9 @@ struct rte_security_capability_idx { struct { enum rte_security_docsis_direction direction; } docsis; + struct { + enum rte_security_macsec_alg alg; + } macsec; }; }; |
