sizeof(struct rte_ipv6_hdr) << 16;
if (ipsec_xform->options.esn)
decap_pdb.options |= PDBOPTS_ESP_ESN;
+
+ if (ipsec_xform->replay_win_sz) {
+ uint32_t win_sz;
+ win_sz = rte_align32pow2(ipsec_xform->replay_win_sz);
+
+ switch (win_sz) {
+ case 1:
+ case 2:
+ case 4:
+ case 8:
+ case 16:
+ case 32:
+ decap_pdb.options |= PDBOPTS_ESP_ARS32;
+ break;
+ case 64:
+ decap_pdb.options |= PDBOPTS_ESP_ARS64;
+ break;
+ default:
+ decap_pdb.options |= PDBOPTS_ESP_ARS128;
+ }
+ }
session->dir = DIR_DEC;
bufsize = cnstr_shdsc_ipsec_new_decap(priv->flc_desc[0].desc,
1, 0, SHR_SERIAL,
.proto = RTE_SECURITY_IPSEC_SA_PROTO_ESP,
.mode = RTE_SECURITY_IPSEC_SA_MODE_TUNNEL,
.direction = RTE_SECURITY_IPSEC_SA_DIR_EGRESS,
- .options = { 0 }
+ .options = { 0 },
+ .replay_win_sz_max = 128
},
.crypto_capabilities = dpaa2_sec_capabilities
},
.proto = RTE_SECURITY_IPSEC_SA_PROTO_ESP,
.mode = RTE_SECURITY_IPSEC_SA_MODE_TUNNEL,
.direction = RTE_SECURITY_IPSEC_SA_DIR_INGRESS,
- .options = { 0 }
+ .options = { 0 },
+ .replay_win_sz_max = 128
},
.crypto_capabilities = dpaa2_sec_capabilities
},
sizeof(struct rte_ipv6_hdr) << 16;
if (ipsec_xform->options.esn)
session->decap_pdb.options |= PDBOPTS_ESP_ESN;
+ if (ipsec_xform->replay_win_sz) {
+ uint32_t win_sz;
+ win_sz = rte_align32pow2(ipsec_xform->replay_win_sz);
+
+ switch (win_sz) {
+ case 1:
+ case 2:
+ case 4:
+ case 8:
+ case 16:
+ case 32:
+ session->decap_pdb.options |= PDBOPTS_ESP_ARS32;
+ break;
+ case 64:
+ session->decap_pdb.options |= PDBOPTS_ESP_ARS64;
+ break;
+ default:
+ session->decap_pdb.options |=
+ PDBOPTS_ESP_ARS128;
+ }
+ }
} else
goto out;
rte_spinlock_lock(&internals->lock);
.proto = RTE_SECURITY_IPSEC_SA_PROTO_ESP,
.mode = RTE_SECURITY_IPSEC_SA_MODE_TUNNEL,
.direction = RTE_SECURITY_IPSEC_SA_DIR_EGRESS,
- .options = { 0 }
+ .options = { 0 },
+ .replay_win_sz_max = 128
},
.crypto_capabilities = dpaa_sec_capabilities
},
.proto = RTE_SECURITY_IPSEC_SA_PROTO_ESP,
.mode = RTE_SECURITY_IPSEC_SA_MODE_TUNNEL,
.direction = RTE_SECURITY_IPSEC_SA_DIR_INGRESS,
- .options = { 0 }
+ .options = { 0 },
+ .replay_win_sz_max = 128
},
.crypto_capabilities = dpaa_sec_capabilities
},