From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0075.outbound.protection.outlook.com [104.47.38.75]) by dpdk.org (Postfix) with ESMTP id 0D15A1B015 for ; Wed, 21 Feb 2018 06:38:45 +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=XVAQqoURknj/c6K3BB0YhWrZIFgCYvYDvM4kM+fjB34=; b=EvX4Qn82CuzPIz00yzf0Bc3ja+XO4P12Cy+vCZrLcS/FLq+AX2yccbHa6eHVX/kZjmV75h4MzmBMQeLCtSlzD53sLaTGZKZ0n6j5tJop02AGkPinejLFfEmqsW5p7IKaGEctBfl5ejjJGVxUGcJR6s4vj5efEi+nFT7XHgoRRJU= 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:40 +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:08 +0530 Message-Id: <1519191430-19201-4-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: 80f4dc36-14f4-45c5-3db8-08d578ed5e9d 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:sFEe9/2m065ktIonOnkjHoT77URqP7asGpM/+VNnvFcLzhm7gEYbRyCKlGN4EjKzjk9Pe+qdxB+JdhwA5yOSr9AtmvhG/wWttqnPThFWlG4f58afWP4IS1DwMsei5B2SUZZaHRESP/Ovv0URaqIH88fL0YQ9d/25RjMb7smS4I3LXYnmwJVji+cu2WusxeFZ5Ep7k6T3EqmTQSH4UxeeqKCXuPQHHxTFf79xxV+FoU9ogPY0HdMLTr9gTidAzsd3; 25:iRNbFioMpmeRary4B+uouIl/g8+gn1TXUdJ/1MisamRHuXCsvMysywGzUJy93RtApAH+BqlgErJ49/EYHLixCRngN77bTkGc27pyXsDID7S9Xh6PJ7BtwPjX2K3GQmxiICfCqZ4txjKM9Vn6rugfJYCTZsJBXpeITlxqHzCkdjoSr2jLNl8HoSOLdkAnLKCMNt89NPXImSjzh+UsL6ytEj7/2A3M/bixWgCFq5dCvpO8G0rt6NnKCb2mstyynAy7no/FyzJhp5TRSut/movaG+V7/cF56qG9CrFsIxo2QOH2e0hVi6MBJGpQPaeP5Ry3U3DG2h9CBIwuy61rd+hUpA==; 31:UP148yFWik7qeq+W6Am8HxiSuQWxGQabYxEXusei3lmiF1PDhWH4gTCdJptbp3eDdmPQBTInn35qgCrsOpOZ7uQTH94kBDCPqa/Qe+k4Jg8Bl4FYg4CEwGeHU2ZIlrae1zvfyPI0Op39m8q91ZhdUfjRY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t6Nq7LGTL 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)(15650500001)(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:FJaxpLXw6wGLq1ya5wcYTw1VEKiWIoi/E1wSw5m?= =?us-ascii?Q?kU4OaCeW31qNwQiarNAZBl6OP+6DvE0hJzW83WiwGloyupnZZqw41ZgEGYga?= =?us-ascii?Q?hyGmYo1ZCS3TaB5vVLFw9BiewQCWp4APHo5t9pqs2qR6g69F+fnQxJnXfSSN?= =?us-ascii?Q?q+DXcMG7xJV42sitjDF0tug1F7wL0kjmm1vHPzABluhvuNv1f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r5lIhbSsrLtbckzmEj7ZwzL1diCb6KQRmw4zAYmRfGXacCtiZ9YnWhFZk1pdvINGdOqLWcpEic7m5JS/++a SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Feb 2018 05:38:40.6332 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 80f4dc36-14f4-45c5-3db8-08d578ed5e9d 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 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: Wed, 21 Feb 2018 05:38:45 -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 --- 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