From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0053.outbound.protection.outlook.com [104.47.38.53]) by dpdk.org (Postfix) with ESMTP id 386702C24 for ; Wed, 21 Feb 2018 06:38:36 +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=d/0ZfoOrreogBgUvhNXwimI/7vsOYQOWuCVw0/FW+/g=; b=G0+I5KYPCBq9vow65qzkj+oHCfyq5ynGr6z4X5d2OSudLjCMWgoCf8710qcL1U1cL25X4QSEwx7DjogFOHESvxdYHcaJ9lHmUuYoHIHUhdeaTLBiTBNOdPIhgxor9hk4Lehw+2Alz3dDJAdJLrPktGF0K49nfNFGgW/rI7nSZDk= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Anoob.Joseph@cavium.com; Received: from ajoseph83.caveonetworks.com.caveonetworks.com (115.113.156.2) by DM2PR0701MB1066.namprd07.prod.outlook.com (2a01:111:e400:2472::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.506.18; Wed, 21 Feb 2018 05:38:32 +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 Feb 2018 11:07:06 +0530 Message-Id: <1519191430-19201-2-git-send-email-anoob.joseph@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1519191430-19201-1-git-send-email-anoob.joseph@caviumnetworks.com> References: <1516626668-9031-0-git-send-email-anoob.joseph@caviumnetworks.com> <1519191430-19201-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: CY4PR22CA0059.namprd22.prod.outlook.com (2603:10b6:903:ae::21) To DM2PR0701MB1066.namprd07.prod.outlook.com (2a01:111:e400:2472::19) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e91c0238-a8d7-4fff-f4f4-08d578ed597d X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:DM2PR0701MB1066; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0701MB1066; 3:IRsw6UKXog+BowBKvS76H+YBEeXLFfvmYCUbhqqul5MvYbhpfwMc4W3tmX20KzuiQQg6pWtO3w6RDkVBNV4OetE0d1nGyhScTQR2Qx7qYQ8fX1KpJRED1Mq+c5wZgT6SR3OKKBKp7Fb25EpedWIrncGilUXxAP7u11iCPNTE5/F8DzNGmWKydj4PPjip7oj9FbllbXNybaJ6pIHUJ/y5cWkDJS9l6kvJyTtLb3NjLGRojjzm2D89OnC8ChigXLsJ; 25:JAozVdYGQro8BzPni8V8RtIVA1Ivnt5iN7jHFaIVyWO3s7fpTdHHEBxJIqCCZmevHZ0Dh0MB0YLjlDLU6dxEbcvRd7Du/l25GtL4BG6WrDJW03Ahhx+/FqkvZteRZs8TXsT83cjtl2vJttqulwAht8ps5NO7NQEM3/jxAgVdcBmEsfajMhx59bmmsIfi/S9BRZM33rI8zC4AUoOCYy1PkMiXbRXfJX9egALNI2y2Ip+0WSzdxkUFyVTKXYZBdCmGvmRVhLjxKpdgFnlgHh2J1f9namZIJhf0xxsybVOGyZR6mtRBaQMqKwKyIGjsZPhCg26fypTnQwA/0go+J3EYUQ==; 31:OMetabxUgTHFe0T05rnvHllNaa+37mydIwFL+a6YgQC2ssUnEIJeknLaHOuMr4rBmIXFnvMIE52XCxuFrU1X1/PI54YXLqIAR53oskQm8Hz5aQ9OmfhysLOSVdT3KIiYsUjNkoOU8Ca9qNTlE0wdbk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1cS1LZuA0MH+GD1pHqXh1iLeI2iXdWfZ5 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192374486261705); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001063)(6040501)(2401047)(5005006)(8121501046)(3002001)(93006095)(10201501046)(3231101)(944501161)(6041288)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123560045)(6072148)(201708071742011); SRVR:DM2PR0701MB1066; BCL:0; PCL:0; RULEID:; SRVR:DM2PR0701MB1066; X-Forefront-PRVS: 0590BBCCBC X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(396003)(39380400002)(346002)(376002)(39860400002)(189003)(199004)(106356001)(386003)(76176011)(59450400001)(66066001)(47776003)(6512007)(478600001)(186003)(26005)(16526019)(2950100002)(72206003)(6666003)(42882006)(5660300001)(7736002)(105586002)(68736007)(36756003)(6506007)(305945005)(50466002)(81156014)(16586007)(6486002)(48376002)(4326008)(110136005)(8676002)(55236004)(53936002)(316002)(81166006)(2906002)(6116002)(51416003)(3846002)(52116002)(50226002)(25786009)(97736004)(8656006)(54906003)(8936002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR0701MB1066; H:ajoseph83.caveonetworks.com.caveonetworks.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A: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; DM2PR0701MB1066; 23:PPzrbiUEprjjsOr4jt3yPmdwircMXSBzW5AhNLn?= =?us-ascii?Q?KfhoQmBeEmctA49ahLHQSqAwgt+QrkMaVIcE5VM9vuM1A5rF81Zcq4ZBTRH2?= =?us-ascii?Q?Bu1iRqujICjfBdMyBB1CyyZCACNsO99i2BcQoxJXLc1sDs/LWp5k1r5NdMBp?= =?us-ascii?Q?9tVRHbcI/WQ2p2tcup733eSqELs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qGAG7j6L7Jxt1MPPYGor+UUGlrNNUCCkfcZfhtWq48s6o6y1tu2XX4LQPWN1qmI9YDNHs SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Feb 2018 05:38:32.0709 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e91c0238-a8d7-4fff-f4f4-08d578ed597d X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0701MB1066 Subject: [dpdk-dev] [PATCH 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 Feb 2018 05:38:36 -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 --- lib/librte_ether/rte_ethdev.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h index 0361533..4e4e18d 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -2438,6 +2438,27 @@ 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_ESN_OVERFLOW, + /** Sequence number overflow in security offload */ + 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 +2469,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