[dpdk-dev,RFC,3/5] mbuff: added inline IPSec flags and metadata

Message ID 1494341879-18718-4-git-send-email-radu.nicolau@intel.com (mailing list archive)
State RFC, archived
Delegated to: Pablo de Lara Guarch
Headers

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/Intel-compilation success Compilation OK

Commit Message

Radu Nicolau May 9, 2017, 2:57 p.m. UTC
  Added inline IPSec status flags to ol_flags and added new member for IPSec metadata.

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
---
 lib/librte_mbuf/rte_mbuf.h | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
  

Patch

diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index 9097f18..e4eba43 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -189,11 +189,27 @@  extern "C" {
  */
 #define PKT_RX_TIMESTAMP     (1ULL << 17)
 
+/**
+ * Inline IPSec Rx processed packet
+ */
+#define PKT_RX_IPSEC_INLINE_CRYPTO  (1ULL << 18)
+
+/**
+ * Inline IPSec Rx packet authentication failed
+ */
+#define  PKT_RX_IPSEC_INLINE_CRYPTO_AUTH_FAILED (1ULL << 19)
+
+
 /* add new RX flags here */
 
 /* add new TX flags here */
 
 /**
+ * Inline IPSec Tx process packet
+ */
+#define PKT_TX_IPSEC_INLINE_CRYPTO  (1ULL << 43)
+
+/**
  * Offload the MACsec. This flag must be set by the application to enable
  * this offload feature for a packet to be transmitted.
  */
@@ -542,6 +558,12 @@  struct rte_mbuf {
 	/** Sequence number. See also rte_reorder_insert(). */
 	uint32_t seqn;
 
+	/** Inline IPSec metadata*/
+	struct {
+	        uint16_t sa_idx;        /**< SA index */
+	        uint8_t  pad_len;       /**< Padding length */
+	        uint8_t  enc;
+	} inline_ipsec;
 } __rte_cache_aligned;
 
 /**