From mboxrd@z Thu Jan 1 00:00:00 1970 From: Radu Nicolau Subject: [RFC][PATCH 3/5] mbuff: added inline IPSec flags and metadata Date: Tue, 9 May 2017 15:57:57 +0100 Message-ID: <1494341879-18718-4-git-send-email-radu.nicolau@intel.com> References: <1494341879-18718-1-git-send-email-radu.nicolau@intel.com> Cc: Radu Nicolau To: dev@dpdk.org Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id F2A21692F for ; Tue, 9 May 2017 17:01:04 +0200 (CEST) In-Reply-To: <1494341879-18718-1-git-send-email-radu.nicolau@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Added inline IPSec status flags to ol_flags and added new member for IPSec metadata. Signed-off-by: Radu Nicolau --- lib/librte_mbuf/rte_mbuf.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) 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; /** -- 2.7.4