From patchwork Tue May 9 14:57:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Radu Nicolau X-Patchwork-Id: 24170 X-Patchwork-Delegate: pablo.de.lara.guarch@intel.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id D43F57C9C; Tue, 9 May 2017 17:01:10 +0200 (CEST) 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) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 May 2017 08:01:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,315,1491289200"; d="scan'208";a="97610282" Received: from silpixa00383879.ir.intel.com (HELO silpixa00383879.ger.corp.intel.com) ([10.237.223.127]) by orsmga005.jf.intel.com with ESMTP; 09 May 2017 08:00:59 -0700 From: Radu Nicolau To: dev@dpdk.org Cc: Radu Nicolau Date: Tue, 9 May 2017 15:57:57 +0100 Message-Id: <1494341879-18718-4-git-send-email-radu.nicolau@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1494341879-18718-1-git-send-email-radu.nicolau@intel.com> References: <1494341879-18718-1-git-send-email-radu.nicolau@intel.com> Subject: [dpdk-dev] [RFC][PATCH 3/5] mbuff: added inline IPSec flags and metadata X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list 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; /**