From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0070.outbound.protection.outlook.com [104.47.42.70]) by dpdk.org (Postfix) with ESMTP id 355DB5A6A for ; Thu, 19 Apr 2018 11:15:25 +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=Czy1XzhYiE3gZHQssBZPb8QEhzM/9k8kwDh50ST5JH0=; b=HlQOczkaqRHUEUeuwg8dv0EACk1TQ/i2aKmy+bv3jccG431x5AKMDWlNby/D9vF5O75iNucLEHFXdZPU+y7g4U0pSy0tRmqPdH2XhwcYhuAy33FET/ZjUrQghS1p5qxyH0eP7Gzrkg+U7YKLE6UOlGXC4U0n0jtjX9pnG9lp/ss= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=caviumnetworks.com; Received: from hyd1ajoseph-dt.caveonetworks.com (115.113.156.2) by CO2PR0701MB1063.namprd07.prod.outlook.com (2a01:111:e400:1439::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.675.14; Thu, 19 Apr 2018 09:15:18 +0000 To: Thomas Monjalon Cc: Akhil Goyal , Declan Doherty , Jingjing Wu , Radu Nicolau , Wenzhuo Lu , Jerin Jacob , Narayana Prasad , Nelio Laranjeiro , dev@dpdk.org References: <1521630685-5179-1-git-send-email-anoob.joseph@caviumnetworks.com> <1523428846-9774-1-git-send-email-anoob.joseph@caviumnetworks.com> <1523428846-9774-2-git-send-email-anoob.joseph@caviumnetworks.com> From: Anoob Joseph Message-ID: <74e5016e-78ab-2515-0a50-b6f0520c6998@caviumnetworks.com> Date: Thu, 19 Apr 2018 14:45:01 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <1523428846-9774-2-git-send-email-anoob.joseph@caviumnetworks.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [115.113.156.2] X-ClientProxiedBy: MAXPR0101CA0041.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:d::27) To CO2PR0701MB1063.namprd07.prod.outlook.com (2a01:111:e400:1439::14) 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:CO2PR0701MB1063; X-Microsoft-Exchange-Diagnostics: 1; CO2PR0701MB1063; 3:iXp3jp5lxuO1H9cDrwksZ9CvXVQcsaGMceUWVO8wo5A+4yvTEQnzjFwOm0S/ZP5GEhnFN3N7pYJT2pVMvOg/AbLEUv7ddBWZG4zUeIsmVA7lr1U+MVXYkAcKvtsvH3l4WM3KXGGaH1AGW7vrleXSlVLtTI0LxulTtE3EevcVhLPjBq1s6ajLsmQmPHebnqiLLXJDvZKsSKr9gwPbZYr09FmhXJ9pJ8i6eIl/mKJebHll5Snquv9GwnnRD2TVnr3f; 25:Jo2hZyLgB+p6K+1Kyzw8MaYTgyp5gNz9iYjizQ6aX5lb6mABKn3lrpoW+9zKz0Z8VWdO3uqPdVnKs6nTbIv2EwVGo5vrZv86OBMuflm8MqxXrZBEE59pTtia5EwjKtCe4cWiu5cUhZqQ/T2rehqyoXKufYnQ88SfL+K+CFrkTPx9af7nypojPlekslOh1Vjd8/fkqDUqAH91F/nNJzqTSfxMjSapnRdAK9OhBZhjHalQGnZxRb1q2t9p4wFJfjaSSzignamLZx6i+M1DhG73ewZVaiTPq5lfR7Hd3x6eyVbNoiZfekJJ32kyRTjvGdOA+iwD/6xEsHMMFMvFjRExIg==; 31:uIgb94QD54MuhBogteGUxGFEw+HzUb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X/ZBbNFPYehbAcGBA3IH9kEo04y0+nA1+AHT2ywtIt6WSc4fAREIjDouGM7rJngon/uyPltL9SL7ZzJoUxSHO8//r9RW0WhiGVpdh36M/A1WN0HMD7ZUibMCM/wKXg98mOCZF7kIR8O2gJ 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)(3002001)(3231232)(944501382)(52105095)(10201501046)(93006095)(6041310)(20161123562045)(20161123560045)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:CO2PR0701MB1063; BCL:0; PCL:0; RULEID:; SRVR:CO2PR0701MB1063; X-Forefront-PRVS: 0647963F84 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(979002)(376002)(39850400004)(366004)(39380400002)(396003)(346002)(65826007)(5660300001)(50466002)(2906002)(64126003)(229853002)(53936002)(6246003)(58126008)(2486003)(59450400001)(55236004)(53546011)(386003)(6506007)(52116002)(23676004)(54906003)(76176011)(31696002)(52146003)(72206003)(8656006)(6512007)(478600001)(25786009)(4326008)(67846002)(316002)(6916009)(36756003)(26005)(186003)(16526019)(3846002)(6116002)(8936002)(53416004)(31686004)(42882007)(2616005)(11346002)(476003)(446003)(956004)(6666003)(65806001)(47776003)(305945005)(7736002)(66066001)(65956001)(69596002)(8676002)(230700001)(81166006)(6486002)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR0701MB1063; H:hyd1ajoseph-dt.caveonetworks.com; FPR:; SPF:None; LANG:en; MLV:ovrnspm; PTR:InfoNoRecords; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDTzJQUjA3MDFNQjEwNjM7MjM6NXpmMWYxNjE0ZnZjaGJZekhucmhXUjYz?= =?utf-8?B?K0lMUEgrTGZKdXRlR292azUxR0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QfUK7MtrsMnf4ms6fb4KyEWjJDA2KFGw28xdTdMKX3eJf9Y5VLu9NdNgNcPTQo=; 24:BrtejGJO/02QF+iFRX2VG76vojxC0QMoUtECb+fYzQ7IDZCsxG8z1XyhoJPfUTg8eyPlXmGse6MKw0IjoBmoreFn3ALzpzfPPPvutrJLcMo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CO2PR0701MB1063; 7:fXcWyn/eFWSQIjlfUKQZH75ttFv4egwSrSRqobYYblHZaU3v26x+uJ45icwdeakruzRnNqv7JU1vWowhsUXVz8LGCiTjkO9HKr0S4MsIt/WyelZW643J6UmUokurzEQD+9xJY5p9ihMhmLK/Dlg5ebpBWqLs67ahH6gsS7gE2ekBCCy7RJ1F2ru8ppy1n30X96bMf1yWv0wWa4oo24AKvBvFneWQZMWCz6itaIF8oAdwWiFXcfmE/n2MeS9GFf0p X-MS-Office365-Filtering-Correlation-Id: f8a9cb4e-bb47-4a14-08d0-08d5a5d61360 X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Apr 2018 09:15:18.0376 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f8a9cb4e-bb47-4a14-08d0-08d5a5d61360 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR0701MB1063 Subject: Re: [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: Thu, 19 Apr 2018 09:15:26 -0000 Hi Thomas, Are these changes fine? Can you review the changes and let me know if you have more comments. Thanks, Anoob On 11/04/18 12:10, Anoob Joseph wrote: > 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 */