#include <desc/algo.h>
#include <desc/ipsec.h>
#include <desc/pdcp.h>
+#include <desc/sdap.h>
#include <rte_dpaa_bus.h>
#include <dpaa_sec.h>
&cipherdata, &authdata,
0);
} else {
- if (ses->dir == DIR_ENC)
- shared_desc_len = cnstr_shdsc_pdcp_u_plane_encap(
- cdb->sh_desc, 1, swap,
- ses->pdcp.sn_size,
- ses->pdcp.hfn,
- ses->pdcp.bearer,
- ses->pdcp.pkt_dir,
- ses->pdcp.hfn_threshold,
- &cipherdata, p_authdata, 0);
- else if (ses->dir == DIR_DEC)
- shared_desc_len = cnstr_shdsc_pdcp_u_plane_decap(
- cdb->sh_desc, 1, swap,
- ses->pdcp.sn_size,
- ses->pdcp.hfn,
- ses->pdcp.bearer,
- ses->pdcp.pkt_dir,
- ses->pdcp.hfn_threshold,
- &cipherdata, p_authdata, 0);
+ if (ses->dir == DIR_ENC) {
+ if (ses->pdcp.sdap_enabled)
+ shared_desc_len =
+ cnstr_shdsc_pdcp_sdap_u_plane_encap(
+ cdb->sh_desc, 1, swap,
+ ses->pdcp.sn_size,
+ ses->pdcp.hfn,
+ ses->pdcp.bearer,
+ ses->pdcp.pkt_dir,
+ ses->pdcp.hfn_threshold,
+ &cipherdata, p_authdata, 0);
+ else
+ shared_desc_len =
+ cnstr_shdsc_pdcp_u_plane_encap(
+ cdb->sh_desc, 1, swap,
+ ses->pdcp.sn_size,
+ ses->pdcp.hfn,
+ ses->pdcp.bearer,
+ ses->pdcp.pkt_dir,
+ ses->pdcp.hfn_threshold,
+ &cipherdata, p_authdata, 0);
+ } else if (ses->dir == DIR_DEC) {
+ if (ses->pdcp.sdap_enabled)
+ shared_desc_len =
+ cnstr_shdsc_pdcp_sdap_u_plane_decap(
+ cdb->sh_desc, 1, swap,
+ ses->pdcp.sn_size,
+ ses->pdcp.hfn,
+ ses->pdcp.bearer,
+ ses->pdcp.pkt_dir,
+ ses->pdcp.hfn_threshold,
+ &cipherdata, p_authdata, 0);
+ else
+ shared_desc_len =
+ cnstr_shdsc_pdcp_u_plane_decap(
+ cdb->sh_desc, 1, swap,
+ ses->pdcp.sn_size,
+ ses->pdcp.hfn,
+ ses->pdcp.bearer,
+ ses->pdcp.pkt_dir,
+ ses->pdcp.hfn_threshold,
+ &cipherdata, p_authdata, 0);
+ }
}
return shared_desc_len;
}
session->pdcp.hfn = pdcp_xform->hfn;
session->pdcp.hfn_threshold = pdcp_xform->hfn_threshold;
session->pdcp.hfn_ovd = pdcp_xform->hfn_ovrd;
+ session->pdcp.sdap_enabled = pdcp_xform->sdap_enabled;
if (cipher_xform)
session->pdcp.hfn_ovd_offset = cipher_xform->iv.offset;
int8_t pkt_dir;/*!< PDCP Frame Direction 0:UL 1:DL*/
int8_t hfn_ovd;/*!< Overwrite HFN per packet*/
uint8_t sn_size; /*!< Sequence number size, 5/7/12/15/18 */
- uint32_t hfn_ovd_offset;/*!< offset from rte_crypto_op at which
+ uint8_t sdap_enabled; /*!< SDAP header is enabled */
+ uint16_t hfn_ovd_offset;/*!< offset from rte_crypto_op at which
* per packet hfn is stored
*/
uint32_t hfn; /*!< Hyper Frame Number */