From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0057.outbound.protection.outlook.com [104.47.40.57]) by dpdk.org (Postfix) with ESMTP id A0F9E1B6F7 for ; Wed, 11 Apr 2018 08:41:49 +0200 (CEST) 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=RWOnIrtWCUx8IkGmT2FSyiIsnLSVAoqBu+0ykbsxjJk=; b=VJT1U5CQQ46coSVwn/nsLT6mk3qqc+rYwd+G8gxOaSghELBereU29meMCU3s+k8NQCb1VZC6F0Q5o/BvJQFeJkSoA7oTaKEOJULKcvaWWCzmwLBiv+hSpFk5AR+ql9a/Orbp4csg/X4nFNzMz4ayyvwSA0eAHJyn07c7uLKUBtw= 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 SN2PR0701MB1071.namprd07.prod.outlook.com (2a01:111:e400:341f::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.675.10; Wed, 11 Apr 2018 06:41:44 +0000 From: Anoob Joseph To: Akhil Goyal , Declan Doherty , Jingjing Wu , Radu Nicolau , Thomas Monjalon , Wenzhuo Lu Cc: Anoob Joseph , Jerin Jacob , Narayana Prasad , Nelio Laranjeiro , dev@dpdk.org Date: Wed, 11 Apr 2018 12:10:42 +0530 Message-Id: <1523428846-9774-2-git-send-email-anoob.joseph@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523428846-9774-1-git-send-email-anoob.joseph@caviumnetworks.com> References: <1521630685-5179-1-git-send-email-anoob.joseph@caviumnetworks.com> <1523428846-9774-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: BMXPR01CA0029.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:c::15) To SN2PR0701MB1071.namprd07.prod.outlook.com (2a01:111:e400:341f::17) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(5600026)(2017052603328)(7153060)(7193020); SRVR:SN2PR0701MB1071; X-Microsoft-Exchange-Diagnostics: 1; SN2PR0701MB1071; 3:57/tsDcnMnbkS/7DbI5iPoUGNaQ/uNDRgml0u6p0UXl2dH2d568KOEXZPizaTmN+B+Z9iq7rtTpU9TGWcTaXBPOZPcRnh30lfpi7c+crTG9U1DWKGvrFLFhb4iiERyWLKPGvBPGo8/9uukNnYuYNkf/5kt/ddrHhZsyXb5zBx9DL8KYxhqLe+IRrBI3LJVr/2S9Ie/3QjpGRXUyrNTGzpWbHpByB2xeluRISPGV9p0TAPjULTdvxdFyF5JvdXAZO; 25:+F0l860My78Q2KOGoKKlE+G3qXLh+xN9q7/joKXxVhPiZAOvK3GuN1JhCYd5mf6qFmcdEdqZjaqS1sBYgisYOdnE8Lg7Sr8fofDcXG/1DUVpibBzSd5asy0zsBdVMzS5c65+Nz7SzYScFb1g4cAnnW0QsLyz3XL+LGK/RY7p1ip2EfXOyID60fl4FtZtjZysWxZ2pCYX98GQ/VHds7Lurx3eY4WANnmx0R7VA52kD2EWpVtGWaOHFQh+5co3U6EoDvqBhqAqQVc++o7YjJAa0NCyOHSwchP/vUyZaM1P58454GOho29GzJlH98/EpXY9GxVAwg3ctZnAaAGZw/3vGA==; 31:Rk33TR24FozTyhGQaFlK8MUnTyC0GP2k5acIk2T/ljLb2wWWJGkGjLgNqzaI197iKygSTvrljewRrGmc3uZlpe+57URMRn+XruncAeDGxF7YtAiRLlUPAfrhDv6tYH/lSi4AAAFHBG73G/48gwX8cidklAQ+YsoS7NBqXg1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8NN1jVq X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(3002001)(3231221)(944501327)(52105095)(10201501046)(6041310)(20161123558120)(20161123564045)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:SN2PR0701MB1071; BCL:0; PCL:0; RULEID:; SRVR:SN2PR0701MB1071; X-Forefront-PRVS: 0639027A9E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(396003)(39380400002)(346002)(366004)(376002)(189003)(199004)(316002)(53936002)(5660300001)(6116002)(478600001)(3846002)(59450400001)(8936002)(66066001)(6486002)(97736004)(4326008)(81166006)(50226002)(81156014)(8676002)(26005)(42882007)(6512007)(47776003)(50466002)(48376002)(25786009)(16526019)(186003)(7736002)(72206003)(68736007)(52116002)(51416003)(8656006)(36756003)(6506007)(305945005)(2906002)(55236004)(386003)(16586007)(486006)(446003)(105586002)(106356001)(76176011)(476003)(110136005)(2616005)(11346002)(956004)(54906003); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR0701MB1071; H:ajoseph83.caveonetworks.com.caveonetworks.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN2PR0701MB1071; 23:9Uceeww9yVhEZ46YIEXCaEqkQl2mypn8GdOUDdv?= =?us-ascii?Q?5iZ0KvBlxpyJpJ0J9enGGIu/LOY10a+ayGxvMOmy/vTOXFWdzffTrsAqxsGh?= =?us-ascii?Q?aJ4NAMvdm+9QlO8UT4gY15yW/gSN8Y01H4MdOUm+EgLBQo26yvG/76rlDB8D?= =?us-ascii?Q?U4fu1oBWtT9JXNfijY3PTu4fs2q4t1Pbw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=?us-ascii?Q?feXaX5/gEW9KObhF0OhL4/k69qFxRWpKbpjFuml6qTM9XLWv9lJIbBgQP5cR?= =?us-ascii?Q?MecjR3aiU8ZpBi8JKgNIFIsSH3eguH8YnMDhbbC/vl3AvmhKPFQk+3yFMjgU?= =?us-ascii?Q?zWp3tq5GauPdueSK/Qg/TUB/v69O1g+rNHZ67ho0kVqOquk2J7plqjJnD4Dl?= =?us-ascii?Q?4p6uiwrn6b1zvGI0WxuMOYKnFE9xZgDuLS5oFoiNS?= X-Microsoft-Antispam-Message-Info: vdQr59zFRGanyR170xKS/eeO/Xis5GucY26RkI98KYGKikeXxGouddGvLzC2dH0yx/Z50RRJoMN8gyzC+0X+DvJtkHBsJ+03DBYexN/RNyPyM9QFI2KH6Gk91uBwyI54c356Cya/u+QKi+3g86+6DhT9wZTe9o0iRamccR8sHwfaHod93INBy+1e5aVPvoVf X-Microsoft-Exchange-Diagnostics: 1; SN2PR0701MB1071; 6:dugKnpV/42wW5DFBCqbH9GmeR3Wt1TOl09KXhjkZoaybNv2kkP3dNRLBKKmY4XLOe/Sj9nwVXdGi7o7CdO28SAbu/CfWfA0A/QAw1BT3mFyWs95qlW4kk2g4t4xkPdJVvU1kPzaj0b7iSxu7tPOfkKds+Kk3MggDTNW/mtBDNK8bky1ZKAnRW7QJFogiBkEw19Tld4Ikt/Evm8gYNC2sy98s7C8ve1QjD0snepAT+vbFqkOXoPpayvjda2ZxdqWzOVmaogABzNN4ttXOlBvgInjAo107BNav247D8fq/YsobXJ0f4PlYfC+xvyn5GSrECw3Mrgoz4CGlmBaHyj+Q95nvhvFcy6zGXoD8P/HomFEKmudJUZIbgF1g8GJ0CA13vLkDjgz/aexoeBkfI/Zc0jNP9EooT2OKE+cy9f8rcMtEl5p/U9tu66AIoUkKUDILsaOMhPWUJFx35NSTw1iH8g==; 5:eJyj1GtDUf5uNKV01LJoLBycDDfivTh5acY5NgdzAQ1rfqc9dK4o1sjOmyCfBuuEEJR0W0rRET05VbnIEKHPLLUe41D9tmHEe1oR2Q+4aiDnPSJdP0EUFQ3sgE8hhkM32HKlC1+wgoJPtpZ862xXcU9ZGOPJUqxrNwvc/w7JIVM=; 24:lpGdb+5+TEFWqCTwHR0fcnEl3Gmpt8DioQtlkjGtNm6RqswYAFmIUaF5V+Enu54r3KFGqJKjbg4NNdrVY71aar/7Q52rw8gF6Wg4lX86mKw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN2PR0701MB1071; 7:6aYnXZ/zFoiO4QBItKikfltaBSGXCndt791flbAd4nK40uu/dwPlmwvjvWj1wOGOEztTuZUT+4glqIdiPyYcUSwdWbxW6T807f4PJx+pETNa9zL5//sHcoNgR+r1aMRjF9i9yfMzfC6CZ0vnwavMk9NyjK8kNuk6mzSc3/kVS/uuhrgqjglPVrxHzCNHh58aNAhgmF2YURFTdmM8cH/vNRdpj1Cu9jOnocjXuXerp9gCdBS+9giMAx/086dEN/fV X-MS-Office365-Filtering-Correlation-Id: 34a63c7f-7929-466d-a239-08d59f774c77 X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Apr 2018 06:41:44.0157 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 34a63c7f-7929-466d-a239-08d59f774c77 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR0701MB1071 Subject: [dpdk-dev] [PATCH v4 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, 11 Apr 2018 06:41:50 -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 Acked-by: Akhil Goyal --- v4: * Added more details in documentation * Renamed members of struct rte_eth_event_ipsec_desc for better readablity v3: * No change v2: * Added time expiry & byte expiry IPsec events in the enum lib/librte_ether/rte_ethdev.h | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h index 5e13dca..2b36883 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -2436,6 +2436,46 @@ int rte_eth_tx_done_cleanup(uint16_t port_id, uint16_t queue_id, uint32_t free_cnt); /** + * Subtypes for IPsec offload event(@ref RTE_ETH_EVENT_IPSEC) 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 */ + 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 @ref RTE_ETH_EVENT_IPSEC event. Used by eth dev to send extra + * information of the IPsec offload event. + */ +struct rte_eth_event_ipsec_desc { + enum rte_eth_event_ipsec_subtype subtype; + /**< Type of RTE_ETH_EVENT_IPSEC_* event */ + uint64_t metadata; + /**< Event specific metadata + * + * For the following events, *userdata* registered + * with the *rte_security_session* would be returned + * as metadata, + * + * - @ref RTE_ETH_EVENT_IPSEC_ESN_OVERFLOW + * - @ref RTE_ETH_EVENT_IPSEC_SA_TIME_EXPIRY + * - @ref RTE_ETH_EVENT_IPSEC_SA_BYTE_EXPIRY + * + * @see struct rte_security_session_conf + * + */ +}; + +/** * The eth device event type for interrupt, and maybe others in the future. */ enum rte_eth_event_type { @@ -2446,6 +2486,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