From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0086.outbound.protection.outlook.com [104.47.34.86]) by dpdk.org (Postfix) with ESMTP id 647625F1B for ; Thu, 1 Mar 2018 10:22:18 +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=zmg3HuA8JmWtrn5VH60lQhwCAruNxIyvU1ptUsRahKc=; b=DaJHjpTtRRni7zIXq7GBzkhMZs3WQsQJMV4YiioPGda4okUJ1qMjD8X3PZIQSxHeECuViZNEnl0/Uzkaqw8Mo4dHt2za/JP5IwRw/e+sXxRp6xOZ9EvkoMacROhNNjJryw3Dqmh8yrHlPsKVAnWpLBFsNBxhdWNtoFYZj0n58Ng= 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 DM2PR0701MB1068.namprd07.prod.outlook.com (2a01:111:e400:2472::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.527.15; Thu, 1 Mar 2018 09:22:14 +0000 From: Anoob Joseph To: Akhil Goyal , Declan Doherty , Radu Nicolau Cc: Anoob Joseph , Jerin Jacob , Narayana Prasad , Nelio Laranjeiro , dev@dpdk.org Date: Thu, 1 Mar 2018 14:51:39 +0530 Message-Id: <1519896103-32479-2-git-send-email-anoob.joseph@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1519896103-32479-1-git-send-email-anoob.joseph@caviumnetworks.com> References: <1519191430-19201-1-git-send-email-anoob.joseph@caviumnetworks.com> <1519896103-32479-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: MWHPR06CA0006.namprd06.prod.outlook.com (2603:10b6:301:39::19) To DM2PR0701MB1068.namprd07.prod.outlook.com (2a01:111:e400:2472::21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 03f39525-8f15-40d7-a20c-08d57f55ed2e X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:DM2PR0701MB1068; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0701MB1068; 3:d2B2s3aCiSqEmHP1iTHGwxhtwW6iEacMzBVoAjTNbe3kErovfAq30bnYCij1gmc4sd7Mt07ow9dLKt8KRgCp0TtZhuG+mVcIxx35EuEhvNBEkSrBZzCX+voak/KzVLTVPT38jq6fmO6+5h9BZ7j5/7tTlZcBmVEWartpGa5Ke490U086bpJPcDlP4AvqC0bwueaQXQe1E5zAd5SegDeeLZdppsSLnDUAlyMJRDuCMnvmm1OhEVLXhG5qUUrcvu73; 25:bgbkhsNvoLBIO2V9OH2wx9fOxnGE83YhEQ07cBfKIFnuW7ijBMSZV8+F3HypMWzKefVHLZiTJtyuQ2VrnJVPho2bZnMhjs/GUwO05KCSoe5qvqj/WGnTt783XZ9mGHhs2SvQitlJ+aezD/IL60HQjWBi0qRO/6yhDeiqGMEAlCcuVTiT9xiGr8gqaYLymJ37f86SgP/6U6oJXoqj/04KWLm/BUR01gVAK3RTDiyZ9tr0KxntoWoSUD3q5yxXwcGudi72VD0QxW7m+jMYm1zCy1PgOZQuo3qacCYsnPPxQRAwNwDwdJwmcMoY2+pbd3xQzsV8WasZPgQ7CQ1i1oRhJQ==; 31:b9CZk8ahnMoyPB881FF43Lu5J1nq/BiQF3YmRsLSHpBTx6kysFxMvXasrcciy0TW0DJ2GTNJ6iso93dVy7ycOkuD1kuR5CJgjxA4Vibhgb2w7ydBROoGn0vYIJzzQw21XbSSxjSz+FZ4tAW1n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GAn5nAWy7j3sRjlp+MVI7fsWdrQdv1yiRQ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192374486261705); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040501)(2401047)(8121501046)(5005006)(3002001)(3231220)(944501224)(52105095)(93006095)(10201501046)(6041288)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123560045)(6072148)(201708071742011); SRVR:DM2PR0701MB1068; BCL:0; PCL:0; RULEID:; SRVR:DM2PR0701MB1068; X-Forefront-PRVS: 05986C03E0 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(366004)(396003)(376002)(39380400002)(346002)(199004)(189003)(76176011)(186003)(8676002)(386003)(6116002)(50226002)(2950100002)(106356001)(6666003)(2906002)(81166006)(52116002)(478600001)(81156014)(3846002)(72206003)(36756003)(97736004)(8656006)(8936002)(54906003)(110136005)(6512007)(25786009)(50466002)(316002)(105586002)(51416003)(5660300001)(42882007)(6486002)(47776003)(16586007)(55236004)(48376002)(26005)(6506007)(66066001)(59450400001)(53936002)(305945005)(68736007)(4326008)(16526019)(7736002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR0701MB1068; H:ajoseph83.caveonetworks.com.caveonetworks.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; DM2PR0701MB1068; 23:t17RydTlmm3D0mkE5pcd/2mMZkh1ziPzT+OFJ3P?= =?us-ascii?Q?H+Qo59IgGFxoTKKanCgk7f7zjDoOg284gmflzfhgt2PSKAVqp9QgfEm/1xNn?= =?us-ascii?Q?UI16fLlHuP2LI/w6QxZcPgA5+BvxzbhvP4CYSlQRFWBQyx0rxWgPAABATnTY?= =?us-ascii?Q?0fy0Xr7AjPrYBiggg9Rz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AzqqjLMLN1qGjn5GOfXOGTwyNxZNY+8hNfigGLEID6WQQhkIfGl0qupy3LLGE5Vfll9LNDYpPZhaVjZsiRdPqLB SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Mar 2018 09:22:14.3653 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 03f39525-8f15-40d7-a20c-08d57f55ed2e X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0701MB1068 Subject: [dpdk-dev] [PATCH v2 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: Thu, 01 Mar 2018 09:22:19 -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 --- 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