From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id D12542C6D for ; Fri, 13 Jan 2017 12:30:34 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP; 13 Jan 2017 03:27:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,221,1477983600"; d="scan'208";a="922103379" Received: from dpdk19.sh.intel.com ([10.239.129.113]) by orsmga003.jf.intel.com with ESMTP; 13 Jan 2017 03:27:23 -0800 From: Tiwei Bie To: dev@dpdk.org Cc: adrien.mazarguil@6wind.com, wenzhuo.lu@intel.com, john.mcnamara@intel.com, olivier.matz@6wind.com, thomas.monjalon@6wind.com, konstantin.ananyev@intel.com, helin.zhang@intel.com, wei.dai@intel.com, xiao.w.wang@intel.com Date: Fri, 13 Jan 2017 19:21:36 +0800 Message-Id: <1484306501-164565-2-git-send-email-tiwei.bie@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1484306501-164565-1-git-send-email-tiwei.bie@intel.com> References: <1484109098-8936-1-git-send-email-tiwei.bie@intel.com> <1484306501-164565-1-git-send-email-tiwei.bie@intel.com> Subject: [dpdk-dev] [PATCH v7 1/6] mbuf: add flag for MACsec 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: , X-List-Received-Date: Fri, 13 Jan 2017 11:30:35 -0000 Add a new Tx flag in mbuf, that can be set by applications to enable the MACsec offload for a packet to be transmitted. Signed-off-by: Tiwei Bie Acked-by: Olivier Matz --- doc/guides/rel_notes/release_17_02.rst | 5 +++++ lib/librte_mbuf/rte_mbuf.c | 2 ++ lib/librte_mbuf/rte_mbuf.h | 6 ++++++ 3 files changed, 13 insertions(+) diff --git a/doc/guides/rel_notes/release_17_02.rst b/doc/guides/rel_notes/release_17_02.rst index 180af82..3958714 100644 --- a/doc/guides/rel_notes/release_17_02.rst +++ b/doc/guides/rel_notes/release_17_02.rst @@ -52,6 +52,11 @@ New Features See the :ref:`Generic flow API ` documentation for more information. +* **Improved offload support in mbuf.** + + Added a new Tx mbuf flag for MACsec, which can be set by applications + to enable the MACsec offload for the packets to be transmitted. + Resolved Issues --------------- diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c index 63f43c8..72ad91e 100644 --- a/lib/librte_mbuf/rte_mbuf.c +++ b/lib/librte_mbuf/rte_mbuf.c @@ -404,6 +404,7 @@ const char *rte_get_tx_ol_flag_name(uint64_t mask) case PKT_TX_TUNNEL_GRE: return "PKT_TX_TUNNEL_GRE"; case PKT_TX_TUNNEL_IPIP: return "PKT_TX_TUNNEL_IPIP"; case PKT_TX_TUNNEL_GENEVE: return "PKT_TX_TUNNEL_GENEVE"; + case PKT_TX_MACSEC: return "PKT_TX_MACSEC"; default: return NULL; } } @@ -434,6 +435,7 @@ rte_get_tx_ol_flag_list(uint64_t mask, char *buf, size_t buflen) "PKT_TX_TUNNEL_NONE" }, { PKT_TX_TUNNEL_GENEVE, PKT_TX_TUNNEL_MASK, "PKT_TX_TUNNEL_NONE" }, + { PKT_TX_MACSEC, PKT_TX_MACSEC, NULL }, }; const char *name; unsigned int i; diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index 4476d75..ffbb4b3 100644 --- a/lib/librte_mbuf/rte_mbuf.h +++ b/lib/librte_mbuf/rte_mbuf.h @@ -182,6 +182,12 @@ extern "C" { /* add new TX flags here */ /** + * Offload the MACsec. This flag must be set by the application to enable + * this offload feature for a packet to be transmitted. + */ +#define PKT_TX_MACSEC (1ULL << 44) + +/** * Bits 45:48 used for the tunnel type. * When doing Tx offload like TSO or checksum, the HW needs to configure the * tunnel type into the HW descriptors. -- 2.7.4