Update IPsec statistics struct definition, add per SA statistics collection enable flag.
Signed-off-by: Radu Nicolau <radu.nico...@intel.com> --- lib/librte_security/rte_security.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/lib/librte_security/rte_security.h b/lib/librte_security/rte_security.h index 96806e3..8a2ff34 100644 --- a/lib/librte_security/rte_security.h +++ b/lib/librte_security/rte_security.h @@ -172,6 +172,14 @@ struct rte_security_ipsec_sa_options { * * 0: Inner/outer header are not modified. */ uint32_t ecn : 1; + + /**< Security statistics + * + * * 1: Enable per session security statistics collection for + * this SA, if supported by the driver. + * * 0: Disable per session security statistics collection for this SA. + */ + uint32_t stats : 1; }; /** IPSec security association direction */ @@ -482,6 +490,12 @@ struct rte_security_macsec_stats { }; struct rte_security_ipsec_stats { + uint64_t ipackets; /**< Successfully received IPsec packets. */ + uint64_t opackets; /**< Successfully transmitted IPsec packets.*/ + uint64_t ibytes; /**< Successfully received IPsec bytes. */ + uint64_t obytes; /**< Successfully transmitted IPsec bytes. */ + uint64_t ierrors; /**< IPsec packets receive/decrypt errors. */ + uint64_t oerrors; /**< IPsec packets transmit/encrypt errors. */ uint64_t reserved; }; @@ -507,10 +521,12 @@ struct rte_security_stats { * * @param instance security instance * @param sess security session + * If security session is NULL then global (per security instance) statistics + * will be retrieved, if supported * @param stats statistics * @return - * - On success return 0 - * - On failure errno + * - On success, return 0 + * - On failure, a negative value */ __rte_experimental int -- 2.7.4