intrte_ipsec_session_prepare(structrte_ipsec_session*ss)
Checks that inside given rte_ipsec_session crypto/security fields are filled correctly and setups
function pointers based on these values. Expects that all fields except IPsec processing function
pointers (pkt_func) will be filled correctly by caller.
Parametersss Pointer to the rte_ipsec_sessionobjectReturns
• Zero if operation completed successfully.
• -EINVAL if the parameters are invalid.
staticuint16_trte_ipsec_pkt_crypto_prepare(conststructrte_ipsec_session*ss,structrte_mbuf*mb[],structrte_crypto_op*cop[],uint16_tnum)[inline],[static]
For input mbufs and given IPsec session prepare crypto ops that can be enqueued into the cryptodev
associated with given session. expects that for each input packet:
• l2_len, l3_len are setup correctly Note that erroneous mbufs are not freed by the function, but are
placed beyond last valid mbuf in the mb array. It is a user responsibility to handle them further.
Parametersss Pointer to the rte_ipsec_sessionobjectthepacketsbelongto.mbTheaddressofanarrayofnumpointerstorte_mbufstructureswhichcontaintheinputpackets.copTheaddressofanarrayofnumpointerstotheoutputrte_crypto_opstructures.numThemaximumnumberofpacketstoprocess.Returns
Number of successfully processed packets, with error code set in rte_errno.
Definition at line 138 of file rte_ipsec.h.
static__rte_experimentaluint16_trte_ipsec_pkt_crypto_prepare_stateless(conststructrte_ipsec_session*ss,structrte_mbuf*mb[],structrte_crypto_op*cop[],uint16_tnum,structrte_ipsec_state*state)[inline],[static]
Same as rte_ipsec_pkt_crypto_prepare, but processing is done based on IPsec state provided by the 'state'
parameter. Internal IPsec state won't be updated when this API is called.
For input mbufs and given IPsec session prepare crypto ops that can be enqueued into the cryptodev
associated with given session. expects that for each input packet:
• l2_len, l3_len are setup correctly Note that erroneous mbufs are not freed by the function, but are
placed beyond last valid mbuf in the mb array. It is a user responsibility to handle them further.
Parametersss Pointer to the rte_ipsec_sessionobjectthepacketsbelongto.mbTheaddressofanarrayofnumpointerstorte_mbufstructureswhichcontaintheinputpackets.copTheaddressofanarrayofnumpointerstotheoutputrte_crypto_opstructures.numThemaximumnumberofpacketstoprocess.stateTheIPsecstatetobeusedforprocessingcurrentbatchofpackets.Returns
Number of successfully processed packets, with error code set in rte_errno.
Definition at line 180 of file rte_ipsec.h.
static__rte_experimentaluint16_trte_ipsec_pkt_cpu_prepare_stateless(conststructrte_ipsec_session*ss,structrte_mbuf*mb[],uint16_tnum,structrte_ipsec_state*state)[inline],[static]
Same as rte_ipsec_pkt_crypto_prepare_stateless, but processing is done in synchronous mode.
Parametersss Pointer to the rte_ipsec_sessionobjectthepacketsbelongto.mbTheaddressofanarrayofnumpointerstorte_mbufstructureswhichcontaintheinputpackets.numThemaximumnumberofpacketstoprocess.stateTheIPsecstatetobeusedforprocessingcurrentbatchofpackets.Returns
Number of successfully processed packets, with error code set in rte_errno.
Definition at line 205 of file rte_ipsec.h.
staticuint16_trte_ipsec_pkt_process(conststructrte_ipsec_session*ss,structrte_mbuf*mb[],uint16_tnum)[inline],[static]
Finalise processing of packets after crypto-dev finished with them or process packets that are subjects
to inline IPsec offload. Expects that for each input packet:
• l2_len, l3_len are setup correctly Output mbufs will be: inbound - decrypted & authenticated, ESP(AH)
related headers removed, l2_len and l3_len fields are updated. outbound - appropriate mbuf fields
(ol_flags, tx_offloads, etc.) properly setup, if necessary - IP headers updated, ESP(AH) fields added,
Note that erroneous mbufs are not freed by the function, but are placed beyond last valid mbuf in the
mb array. It is a user responsibility to handle them further.
Parametersss Pointer to the rte_ipsec_sessionobjectthepacketsbelongto.mbTheaddressofanarrayofnumpointerstorte_mbufstructureswhichcontaintheinputpackets.numThemaximumnumberofpacketstoprocess.Returns
Number of successfully processed packets, with error code set in rte_errno.
Definition at line 235 of file rte_ipsec.h.
intrte_ipsec_telemetry_sa_add(conststructrte_ipsec_sa*sa)
Enable per SA telemetry for a specific SA. Note that this function is not thread safe
Parameterssa Pointer to the rte_ipsec_sa object that will have telemetry enabled.
Returns
0 on success, negative value otherwise.
voidrte_ipsec_telemetry_sa_del(conststructrte_ipsec_sa*sa)
Disable per SA telemetry for a specific SA. Note that this function is not thread safe
Parameterssa Pointer to the rte_ipsec_sa object that will have telemetry disabled.