From: Akhil Goyal Date: Mon, 12 Oct 2020 14:10:00 +0000 (+0530) Subject: security: modify PDCP xform to support SDAP X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=486f067a419ec1ebba3864da9850b2fb36fb91f2;p=dpdk.git security: modify PDCP xform to support SDAP The SDAP is a protocol in the LTE stack on top of PDCP for QOS. A particular PDCP session may or may not have SDAP enabled. But if it is enabled, SDAP header should be authenticated but not encrypted if both confidentiality and integrity is enabled. Hence, the driver should be intimated from the xform so that it skip the SDAP header while encryption. A new field is added in the PDCP xform to specify SDAP is enabled. The overall size of the xform is not changed, as hfn_ovrd is just a flag and does not need uint32. Hence, it is converted to uint8_t and a 16 bit reserved field is added for future. Signed-off-by: Akhil Goyal Acked-by: Thomas Monjalon --- diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst index 4477d25e89..708ebb01c8 100644 --- a/doc/guides/rel_notes/release_20_11.rst +++ b/doc/guides/rel_notes/release_20_11.rst @@ -203,6 +203,11 @@ New Features also known as Mount Bryce. See the :doc:`../bbdevs/acc100` BBDEV guide for more details on this new driver. +* **Updated rte_security library to support SDAP.** + + ``rte_security_pdcp_xform`` in ``rte_security`` lib is updated to enable + 5G NR processing of SDAP header in PMDs. + * **Added Marvell OCTEON TX2 regex PMD.** Added a new PMD driver for hardware regex offload block for OCTEON TX2 SoC. @@ -375,6 +380,10 @@ API Changes ``RTE_CRYPTODEV_SCHEDULER_MAX_NB_SLAVES`` to ``RTE_CRYPTODEV_SCHEDULER_MAX_NB_WORKERS``. +* security: ``hfn_ovrd`` field in ``rte_security_pdcp_xform`` is changed from + ``uint32_t`` to ``uint8_t`` so that a new field ``sdap_enabled`` can be added + to support SDAP. + * ipsec: ``RTE_SATP_LOG2_NUM`` has been dropped from ``enum`` and subsequently moved ``rte_ipsec`` lib from experimental to stable. diff --git a/lib/librte_security/rte_security.h b/lib/librte_security/rte_security.h index 16839e5399..c259b35e00 100644 --- a/lib/librte_security/rte_security.h +++ b/lib/librte_security/rte_security.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause - * Copyright 2017,2019 NXP + * Copyright 2017,2019-2020 NXP * Copyright(c) 2017-2020 Intel Corporation. */ @@ -290,7 +290,15 @@ struct rte_security_pdcp_xform { * per packet HFN in place of IV. PMDs will extract the HFN * and perform operations accordingly. */ - uint32_t hfn_ovrd; + uint8_t hfn_ovrd; + /** In case of 5G NR, a new protocol (SDAP) header may be set + * inside PDCP payload which should be authenticated but not + * encrypted. Hence, driver should be notified if SDAP is + * enabled or not, so that SDAP header is not encrypted. + */ + uint8_t sdap_enabled; + /** Reserved for future */ + uint16_t reserved; }; /** DOCSIS direction */