From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0043.outbound.protection.outlook.com [104.47.34.43]) by dpdk.org (Postfix) with ESMTP id DB6B15F28 for ; Thu, 1 Mar 2018 10:22:27 +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=YQRG/e0X8h2KlNuzw+szbR+keBwlgIza2PPROiezr5g=; b=GOhsL09tjd6QQk9/eZEx3qLkDB2Ue3jRJtOS15BAuBuNELusPSEofUE8zhW/5gRmnpWFG57FJ4JLi9G/eeXjVHOmoD93hWtvsKkY7DIuF6FFqXHOb8C3c+b/cX6HFhqPFLlttzoMHcE39X0OyoJfLP5k4PxK4/37LY6NoKuitqM= 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:24 +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:41 +0530 Message-Id: <1519896103-32479-4-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: 1c149268-d838-468a-e744-08d57f55f307 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:EIFEbRBiAvxO44Hg3fNa4pBXqo6eJd2aaPr50HgIOOsfn7LptR1BtV938pel/tbhcwnz250x9nczk27/cigXKHnHCAZj+SA6dpqqtT8b+pbFhFJie8lnPuTH+jG/ciRr8bqbuRZ9RyaONP99TgYvdhH8ou2n3LtbaN+3gackF7zgoccC+NhrWVe6S0+Ee12rK8PST8bmnHtO+hXHQ3i3St4kRNRmMiPrV77WqasXlUgpfj93Y+gtBJEyEPd72yKb; 25:2LV+CTmwfAwhXg1jyZW6k22f1NozfvY47khRg7dboIvFCTESX8LkXsuEBsN67WhhusVvUiSZTUTxnli+PmLuTM156FND6gH6RTltffpbzKhTh2PC88G3rPY6Uen7Noy2kteUS9hVEaIh+1THW880iItChJ1fMG8q2oqmj3iVCNrtuUNfEy0V1iwV5sg/VUQeQhl7zIo4wHQ/zmxkdcowLGMCXhYRvLXzCOfrADMQiYYiuFjTVBT5JemR192gfzwlsJUf6oBmnF2RCBwcilnotJG1PRhC/VzaP8X+juKn2J6XMZ7qSW9ycuIJNVxQ10B1vXmD6wZLj+iv5cXKevOBeA==; 31:yMpRclqCu/mrTpsnLrHD9+zhHN9QOyMVrMLGNCUaI9V8F0qiwmTLQkztVzUOBB3DhRiWZ2IBcd23rii0u+69Ymf6D2EehJkl7iuACDplwPE9raeX3nbJEvZCLOLCy1xHTEJaXHlPhPmYOpKsfJoX3rIAU006AHzl5CD1ICcV6sVuQ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soft-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)(15650500001)(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:et2OGHxZ49zuiGw2fgQ2tC8+y96qlQI5mRydK9W?= =?us-ascii?Q?FYLJE2ny+KJ51aSIS0GV2OeoJNkQk69rLDbVja+HX37RA37NSojoJZPZFiUU?= =?us-ascii?Q?SQq31LLCp/v9UIP30gM1qvp7iX3+IOiR8ZJTtkw4q5VYPOaQqcuwXfUt26Kz?= =?us-ascii?Q?VFbWCsbBhTiEz6LcdvHkgTSBqBS8ji9BVRg/AdnY2AjMNlGAyB0AYC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/acejv/Dp+RtzoWo308qF1mo6W0FyTB02qg24AH9O7IYMGA7uHijY1/Ub9Fgw76FehEfqyYS3OgHEy SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Mar 2018 09:22:24.1934 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1c149268-d838-468a-e744-08d57f55f307 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 3/5] lib/security: extend userdata for 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:28 -0000 Extending 'userdata' to be used for IPsec events too. IPsec events would have some metadata which would uniquely identify the security session for which the event is raised. But application would need some construct which it can understand. The 'userdata' solves a similar problem for inline processed inbound traffic. Updating the documentation to extend the usage of 'userdata'. Signed-off-by: Anoob Joseph --- v2: * No change lib/librte_security/rte_security.h | 14 ++++++++------ lib/librte_security/rte_security_driver.h | 6 +++--- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/lib/librte_security/rte_security.h b/lib/librte_security/rte_security.h index a71ff6f..e8b5888 100644 --- a/lib/librte_security/rte_security.h +++ b/lib/librte_security/rte_security.h @@ -364,15 +364,17 @@ rte_security_set_pkt_metadata(struct rte_security_ctx *instance, struct rte_mbuf *mb, void *params); /** - * Get userdata associated with the security session which processed the - * packet. This userdata would be registered while creating the session, and - * application can use this to identify the SA etc. Device-specific metadata - * in the mbuf would be used for this. + * Get userdata associated with the security session. Device specific metadata + * provided would be used to uniquely identify the security session being + * referred to. This userdata would be registered while creating the session, + * and application can use this to identify the SA etc. * - * This is valid only for inline processed ingress packets. + * Device specific metadata would be set in mbuf for inline processed inbound + * packets. In addition, the same metadata would be set for IPsec events + * reported by rte_eth_event framework. * * @param instance security instance - * @param md device-specific metadata set in mbuf + * @param md device-specific metadata * * @return * - On success, userdata diff --git a/lib/librte_security/rte_security_driver.h b/lib/librte_security/rte_security_driver.h index 4623904..0583f88 100644 --- a/lib/librte_security/rte_security_driver.h +++ b/lib/librte_security/rte_security_driver.h @@ -134,9 +134,9 @@ typedef int (*security_set_pkt_metadata_t)(void *device, void *params); /** - * Get application specific userdata associated with the security session which - * processed the packet. This would be retrieved using the metadata obtained - * from packet. + * Get application specific userdata associated with the security session. + * Device specific metadata provided would be used to uniquely identify + * the security session being referred to. * * @param device Crypto/eth device pointer * @param md Metadata -- 2.7.4