From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0074.outbound.protection.outlook.com [104.47.42.74]) by dpdk.org (Postfix) with ESMTP id F06F15F14 for ; Wed, 21 Mar 2018 12:12:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=UnFXt7nqcSGSoI1jNWkklBA5iBt1m+GXlKnJRA16ZOE=; b=fYf7YK4ertPdjAO0QRmqEd1w1YCaS+Y0PIHnKO6V88OVHNKJmAwu+A6BHXWWCf1Cti1kQZWF+yiBYaNzx3Hfd6sABUPZamEvM73MmYv3i7S0RRi3l9ZH2jnZQw2+8Ls+glRCTtjXkZUrtcU9x0DdDiVcoyaOmc0X5zyFkMlp5fk= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Anoob.Joseph@cavium.com; Received: from ajoseph83.caveonetworks.com.com (115.113.156.2) by BLUPR0701MB1058.namprd07.prod.outlook.com (2a01:111:e400:8b0::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.609.10; Wed, 21 Mar 2018 11:12:07 +0000 From: Anoob Joseph To: Akhil Goyal , Declan Doherty , Radu Nicolau Cc: Anoob Joseph , Jerin Jacob , Narayana Prasad , Nelio Laranjeiro , dev@dpdk.org Date: Wed, 21 Mar 2018 16:41:21 +0530 Message-Id: <1521630685-5179-2-git-send-email-anoob.joseph@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1521630685-5179-1-git-send-email-anoob.joseph@caviumnetworks.com> References: <1519896103-32479-1-git-send-email-anoob.joseph@caviumnetworks.com> <1521630685-5179-1-git-send-email-anoob.joseph@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [115.113.156.2] X-ClientProxiedBy: MA1PR0101CA0061.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:20::23) To BLUPR0701MB1058.namprd07.prod.outlook.com (2a01:111:e400:8b0::27) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5284c506-6f32-48e0-76f2-08d58f1c9728 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:BLUPR0701MB1058; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1058; 3:KNP6ka78zQovH3/oQL869zERZGmwwPB3A2DPNwfOXApR3mCQ2QqmUWnF5A4Q4cLyexB3kENMNRt8knFD7mFLdRvOqw2TLCiWn2PHRyWQeN0VSo8V0k6TaKva5T94tEXl/a7hyheWGghgqn37k8ENdvH60Dhsr+uP+Zm76GrCOQPhNYKIC6+/LJ+pfc0tKaVNm8sHKJ2F3vKpMYi9CY7f8lwcCjc54gOLTUNo3p+AAjVPEHQNHF9Sw3pB9bjjvSop; 25:gRrw4iSKESNF6b10HZdICeuHEIXsjmJEJXmAhmAszm61LSUB+D26ZlN/EpVJG7Pv+VXpP7ge5Tfu6L7uwhkkk/z2z3pxG5xyhlBmsnvJIIRxUD1N1KvIVB/8L8GbM8osf2ZBfC6TqNuaFB33kZErO69xzPiq1XBV/1p3Uma2+UYQ85dLxm9s7VyOXb4IthblrHg09JLiRBQtPxn+b2FZabweIyBrYTBouC7jzm/8mhxlKHR9Vv6Dbf9Jo/oCoDQsB49hxAp0E6xTSw71wSR97sGd+ULESEEXtmZddDNTZUwORa53xxTO45/6BDaArtZLmYNsQDTRHjLj5aaScwFCuA==; 31:ZXX0wocIKLaoB9XgAIeefmhuUDjOSiQeaKGIY1Yiflkh8HUSMSg1tkjURvTUUuPdXrqyEQQSYq0c7JfAKWPwW3qAZhjkwO7ILyiKKvtMwA8ZqdRWYI35zcWUOMU5ySQ2QisdEX2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PUD7Ry67djQ0Es1UuZ4BLWlOTgtGxv X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192374486261705); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(3231221)(944501244)(52105095)(10201501046)(3002001)(6041310)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(20161123562045)(6072148)(201708071742011); SRVR:BLUPR0701MB1058; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0701MB1058; X-Forefront-PRVS: 0618E4E7E1 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(396003)(39380400002)(346002)(39860400002)(376002)(199004)(189003)(72206003)(52116002)(59450400001)(51416003)(6506007)(305945005)(25786009)(7736002)(386003)(6666003)(478600001)(81156014)(50466002)(81166006)(110136005)(8936002)(6116002)(3846002)(54906003)(6486002)(316002)(2950100002)(5660300001)(16586007)(76176011)(8676002)(8656006)(50226002)(105586002)(36756003)(68736007)(66066001)(42882007)(4326008)(55236004)(26005)(53936002)(97736004)(16526019)(6512007)(106356001)(47776003)(2906002)(48376002)(186003); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1058; H:ajoseph83.caveonetworks.com.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1058; 23:IlBWTGc+JkYwUq8eIoi5wioOlrSzcHRXfIa/nr8?= =?us-ascii?Q?5VYHSGv/ogVYvMwo1WcEHs8sfU+Y2iyZV8Iu1sBkFmKtumEUc6cNmrPFVOHu?= =?us-ascii?Q?qclxSj/ObCagFEeUqK+fa4E2LCcvbmdzbu69RUJUYizhsyrRIiEGXl4ezX93?= =?us-ascii?Q?W2lJbvJFyGNEM2YZd1tAr09fTypfY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a4FpNuAmnzuYH6O14tzrft8CyDMK+hA=; 24:c7vTnmXQYc4sJ1zxgVzIMoWKIPcq6P8AbAJfPKqJ9t2JP/KpCRmhioo0+hb9tjPRONYOH07wFjiCiH2Apb6SrB2Rb5d6ahfRR8AI+tx6S7w= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1058; 7:f7MWtTcX7n4W1kcmjaQLbF6OA9JLmTSc8DQ+0uhuhDgeR26wjBPRKtgfy14fygyrIrxcF6fVZ2Us6cZiJI8SSPS5OmhEIp+X40p07TxD7KeT8iahWxQgbqwuEiqlcbP3gRow23nqEDcAaUUlIVkx5j0mBZjc0alCC3UsWeWg5FUmwWPvoRWJmJIyzvzoF+Q4hntOowF0w7iyAtQk9mR+LcODiu/TDqoyWLL3UmbVkla3HXfSWYAwhB3fPaPH2ZCl X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Mar 2018 11:12:07.3649 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5284c506-6f32-48e0-76f2-08d58f1c9728 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1058 Subject: [dpdk-dev] [PATCH v3 1/5] lib/ethdev: support for inline IPsec events 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: Wed, 21 Mar 2018 11:12:12 -0000 Adding support for IPsec events in rte_eth_event framework. In inline IPsec offload, the per packet protocol defined variables, like ESN, would be managed by PMD. In such cases, PMD would need IPsec events to notify application about various conditions like, ESN overflow. Signed-off-by: Anoob Joseph --- v3: * No change v2: * Added time expiry & byte expiry IPsec events in the enum lib/librte_ether/rte_ethdev.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h index 0361533..96b2aa0 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -2438,6 +2438,33 @@ int rte_eth_tx_done_cleanup(uint16_t port_id, uint16_t queue_id, uint32_t free_cnt); /** + * Subtypes for IPsec offload events raised by eth device. + */ +enum rte_eth_event_ipsec_subtype { + RTE_ETH_EVENT_IPSEC_UNKNOWN = 0, + /** Unknown event type */ + RTE_ETH_EVENT_IPSEC_ESN_OVERFLOW, + /** Sequence number overflow in security offload */ + RTE_ETH_EVENT_IPSEC_SA_TIME_EXPIRY, + /** Soft time expiry of SA */ + RTE_ETH_EVENT_IPSEC_SA_BYTE_EXPIRY, + /** Soft byte expiry of SA */ + RTE_ETH_EVENT_IPSEC_MAX + /** Max value of this enum */ +}; + +/** + * Descriptor for IPsec event. Used by eth dev to send extra information of the + * event. + */ +struct rte_eth_event_ipsec_desc { + enum rte_eth_event_ipsec_subtype stype; + /** Type of IPsec event */ + uint64_t md; + /** Event specific metadata */ +}; + +/** * The eth device event type for interrupt, and maybe others in the future. */ enum rte_eth_event_type { @@ -2448,6 +2475,7 @@ enum rte_eth_event_type { RTE_ETH_EVENT_INTR_RESET, /**< reset interrupt event, sent to VF on PF reset */ RTE_ETH_EVENT_VF_MBOX, /**< message from the VF received by PF */ + RTE_ETH_EVENT_IPSEC, /**< IPsec offload related event */ RTE_ETH_EVENT_MACSEC, /**< MACsec offload related event */ RTE_ETH_EVENT_INTR_RMV, /**< device removal event */ RTE_ETH_EVENT_NEW, /**< port is probed */ -- 2.7.4