common/cnxk: set in-place bit of lookaside IPsec
Set inplace bit of lookaside IPsec and remove rptr population in datapath. Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
This commit is contained in:
parent
0b976b987f
commit
48c551761b
@ -30,6 +30,7 @@ enum roc_ie_on_ucc_ipsec {
|
||||
#define ROC_IE_ON_INB_RPTR_HDR 16
|
||||
#define ROC_IE_ON_MAX_IV_LEN 16
|
||||
#define ROC_IE_ON_PER_PKT_IV BIT(43)
|
||||
#define ROC_IE_ON_INPLACE_BIT BIT(6)
|
||||
|
||||
enum {
|
||||
ROC_IE_ON_SA_ENC_NULL = 0,
|
||||
|
@ -18,6 +18,8 @@
|
||||
#define ROC_IE_OT_CPT_TS_PKIND 54
|
||||
#define ROC_IE_OT_SA_CTX_HDR_SIZE 1
|
||||
|
||||
#define ROC_IE_OT_INPLACE_BIT BIT(6)
|
||||
|
||||
enum roc_ie_ot_ucc_ipsec {
|
||||
ROC_IE_OT_UCC_SUCCESS = 0x00,
|
||||
ROC_IE_OT_UCC_ERR_SA_INVAL = 0xb0,
|
||||
|
@ -99,7 +99,7 @@ cn10k_ipsec_outb_sa_create(struct roc_cpt *roc_cpt, struct roc_cpt_lf *lf,
|
||||
|
||||
/* pre-populate CPT INST word 4 */
|
||||
inst_w4.u64 = 0;
|
||||
inst_w4.s.opcode_major = ROC_IE_OT_MAJOR_OP_PROCESS_OUTBOUND_IPSEC;
|
||||
inst_w4.s.opcode_major = ROC_IE_OT_MAJOR_OP_PROCESS_OUTBOUND_IPSEC | ROC_IE_OT_INPLACE_BIT;
|
||||
|
||||
param1.u16 = 0;
|
||||
|
||||
@ -193,7 +193,7 @@ cn10k_ipsec_inb_sa_create(struct roc_cpt *roc_cpt, struct roc_cpt_lf *lf,
|
||||
|
||||
/* pre-populate CPT INST word 4 */
|
||||
inst_w4.u64 = 0;
|
||||
inst_w4.s.opcode_major = ROC_IE_OT_MAJOR_OP_PROCESS_INBOUND_IPSEC;
|
||||
inst_w4.s.opcode_major = ROC_IE_OT_MAJOR_OP_PROCESS_INBOUND_IPSEC | ROC_IE_OT_INPLACE_BIT;
|
||||
|
||||
param1.u16 = 0;
|
||||
|
||||
|
@ -83,7 +83,6 @@ process_outb_sa(struct roc_cpt_lf *lf, struct rte_crypto_op *cop, struct cn10k_s
|
||||
inst->w4.u64 = inst_w4_u64 | rte_pktmbuf_pkt_len(m_src);
|
||||
dptr = rte_pktmbuf_mtod(m_src, uint64_t);
|
||||
inst->dptr = dptr;
|
||||
inst->rptr = dptr;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -99,7 +98,6 @@ process_inb_sa(struct rte_crypto_op *cop, struct cn10k_sec_session *sess, struct
|
||||
inst->w4.u64 = sess->inst.w4 | rte_pktmbuf_pkt_len(m_src);
|
||||
dptr = rte_pktmbuf_mtod(m_src, uint64_t);
|
||||
inst->dptr = dptr;
|
||||
inst->rptr = dptr;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ cn9k_ipsec_outb_sa_create(struct cnxk_cpt_qp *qp,
|
||||
return ret;
|
||||
|
||||
w4.u64 = 0;
|
||||
w4.s.opcode_major = ROC_IE_ON_MAJOR_OP_PROCESS_OUTBOUND_IPSEC;
|
||||
w4.s.opcode_major = ROC_IE_ON_MAJOR_OP_PROCESS_OUTBOUND_IPSEC | ROC_IE_ON_INPLACE_BIT;
|
||||
w4.s.opcode_minor = ctx_len >> 3;
|
||||
|
||||
param1.u16 = 0;
|
||||
@ -174,7 +174,7 @@ cn9k_ipsec_inb_sa_create(struct cnxk_cpt_qp *qp,
|
||||
return ret;
|
||||
|
||||
w4.u64 = 0;
|
||||
w4.s.opcode_major = ROC_IE_ON_MAJOR_OP_PROCESS_INBOUND_IPSEC;
|
||||
w4.s.opcode_major = ROC_IE_ON_MAJOR_OP_PROCESS_INBOUND_IPSEC | ROC_IE_ON_INPLACE_BIT;
|
||||
w4.s.opcode_minor = ctx_len >> 3;
|
||||
|
||||
param2.u16 = 0;
|
||||
|
@ -82,7 +82,6 @@ process_outb_sa(struct rte_crypto_op *cop, struct cn9k_sec_session *sess, struct
|
||||
/* Prepare CPT instruction */
|
||||
inst->w4.u64 = sess->inst.w4 | dlen;
|
||||
inst->dptr = PLT_U64_CAST(hdr);
|
||||
inst->rptr = PLT_U64_CAST(hdr);
|
||||
inst->w7.u64 = sess->inst.w7;
|
||||
|
||||
return 0;
|
||||
@ -96,7 +95,7 @@ process_inb_sa(struct rte_crypto_op *cop, struct cn9k_sec_session *sess, struct
|
||||
|
||||
/* Prepare CPT instruction */
|
||||
inst->w4.u64 = sess->inst.w4 | rte_pktmbuf_pkt_len(m_src);
|
||||
inst->dptr = inst->rptr = rte_pktmbuf_mtod(m_src, uint64_t);
|
||||
inst->dptr = rte_pktmbuf_mtod(m_src, uint64_t);
|
||||
inst->w7.u64 = sess->inst.w7;
|
||||
}
|
||||
#endif /* __CN9K_IPSEC_LA_OPS_H__ */
|
||||
|
Loading…
Reference in New Issue
Block a user