From mboxrd@z Thu Jan 1 00:00:00 1970 From: Akhil Goyal Subject: [PATCH 07/11] ethdev: add rte flow action for crypto Date: Thu, 14 Sep 2017 13:56:47 +0530 Message-ID: <20170914082651.26232-8-akhil.goyal@nxp.com> References: <20170914082651.26232-1-akhil.goyal@nxp.com> Mime-Version: 1.0 Content-Type: text/plain Cc: , , , , , , , , To: Return-path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0043.outbound.protection.outlook.com [104.47.42.43]) by dpdk.org (Postfix) with ESMTP id BC5DE1B1BF for ; Thu, 14 Sep 2017 10:29:38 +0200 (CEST) In-Reply-To: <20170914082651.26232-1-akhil.goyal@nxp.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" From: Boris Pismenny The crypto action is specified by an application to request crypto offload for a flow. Signed-off-by: Boris Pismenny Signed-off-by: Aviad Yehezkel --- lib/librte_ether/rte_flow.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/lib/librte_ether/rte_flow.h b/lib/librte_ether/rte_flow.h index ea08af6..dce92ca 100644 --- a/lib/librte_ether/rte_flow.h +++ b/lib/librte_ether/rte_flow.h @@ -941,6 +941,13 @@ enum rte_flow_action_type { * See struct rte_flow_action_vf. */ RTE_FLOW_ACTION_TYPE_VF, + /** + * Redirects packets to security engine of current device for security + * processing as specified by security session. + * + * See struct rte_flow_action_security. + */ + RTE_FLOW_ACTION_TYPE_SECURITY }; /** @@ -1034,6 +1041,29 @@ struct rte_flow_action_vf { }; /** + * RTE_FLOW_ACTION_TYPE_SECURITY + * + * Perform security action on define flow as specified by security session. + * The security session specified in the action must be created on the same port + * as the flow action that is being specified. + * + * The ingress/egress flow attribute should match that specified in the + * security session if the security session supports the definition of the + * direction. + * + * Multiple flows can be configured to use the same security session. For + * example if the security session specifies an egress IPsec SA, then multiple + * flows can be specified to that SA. In the case of an ingress IPsec SA then + * it is only valid to have a single flow to map to that security session. + * + * + * Non-terminating by default. + */ +struct rte_flow_action_security { + void *security_session; /**< Pointer to security session structure. */ +}; + +/** * Definition of a single action. * * A list of actions is terminated by a END action. -- 2.9.3