From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0076.outbound.protection.outlook.com [104.47.40.76]) by dpdk.org (Postfix) with ESMTP id 0D4261BAA9 for ; Wed, 11 Apr 2018 08:41:59 +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=4YdPGbkUmDWD9HdU3coBLrz4jzV8dqp9q/guLqW9pwg=; b=LkwJCOHudYp5sNBqnYnEouIL84WcUbjMAIVPcG3OIFZPz+efD3qeZGEUN+EYzWEwW3bMrSTXvc2r6XJxOzQcEeeAUAnGledx8wwLuqLNMV4rOkkv0YF3uvCbZqXHRKLFHeiqgDLX+B8uoQZnyjJhQeDVZ7O6dHEqyy44gq2YZPA= 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:54 +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:44 +0530 Message-Id: <1523428846-9774-4-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:QNezVA4iQIjy7TnQUAYCVnIGiN7ghfzGgVgMk/EnLJl3/YKe+E9ShXaUqZmupZBkpfWhJlpwPEJ/eA6ojCUSOjsK56S3I8wY25Adm5Nqih7uAayzNHaAC1EwECdhieJ/SWSWgxMORkOnSfZ2dEEY7A9M+N6JF2Webdzxcq67nzAMsSVOGr5uwgiVYa5MpMkfdlg3koqnafWyPmjYybe2FYZm9ERmuLHfWvIa4JqOCPQiuoOCwd/pnJnVM8ezf+xV; 25:vNwjXtsnY0Oj5pKdJ2SWngia+PjLs+vMCcuYEt1EH1CJl5pg5VUS1edW2m+MbNIlW0U7uYkao2r+7jiApBDs1gHulA7iBDnbMrKBJtokFDmOAQa6ZAp454nu84M39UstoLsQVxE+57tfLXazvPNev+Np0Jvexdw3CQuLwKPXJqkyAmn2KtyaPYZRgYxQ3KtuPo7zojIsNC28Qnz6vH1HS26PZsUWl9bqrgqwi2VpWpRbywcK7GNcF7rQX1TdMCuTew+7LG70o3C/Cmg7mNLinh0TuxmzKkCq97u/Iy3jRahw3rDFxcBlbiWkBXBEU1Wx38QEIvLCQsrrfKET5cJxbw==; 31:ikD6CFeK6EfT+RacUDHBkOXQ6cCHHZOrS2qe25qreAoncFlwqym94DF0ck8qwJYI4IKBF76kmDkNapRjlAZGhdZJP6A3Ow5dukV2J3heYru2Wu9IufcnbfPc2Np9AM+ShuQ65CsZPXmcLl7FWRSScUsqmWAt+eCZMmfAQ1wQGtFnKVQCO3qDRvDCwgtpLJgMSHKSwVEIgEmAdshaIQHEouewGR7Oh3P1D7nrXViriQ4= X-MS-TrafficTypeDiagnostic: SN2PR0701MB1071: X-Microsoft-Exchange-Diagnostics: 1; SN2PR0701MB1071; 20:Qp5spjblOVdgRLlXImlvLJtmgl0snjO8ZT2EoC92mgMC8bQyXGG4bKIKjBoHtu5jKnABJbKAZF1s/olAjH/jOFedIIuIEXkBVkVUCI4KXA4UiZzJOnoYAmViH2Kg5uvY1u4t5DfK+J3Bm05l0N8ZZka9dFGa3s1V46uOntscB1F0SCty8rf0pnSbdOG3Bgbyna1XQP2vH+8QH1c1dCjiTqeg+jC+B+dLO31Hj2f6G9B9i9PJsrDv1Duv+aNYz6C62rsb7tOwvkYi8EDk2a1Tfn+5SPD+5rUXEBdTAHid1HYyPG6DWMuBWasfS/SK9AmU4pyi/ijdOyit82kgY5R3AIEcat3QciTTbDb1i+roSBH52RclMlRCN6vRUQEQqJfkd5I68lns+4sfWKhHYH+hmMmtUJ+Cn/wBMu6uT6KONC8Is5cDbroDsreLRSjxAgGu8CpPPgO22FqgFO/aOu9Z/UELTvtrVLWK1uYuXvolCp+Jw3xBXuocTb/Ncz1Q6XiuMWZUf59ZPqugRO4af0177usIGQhiHvEzIt6Xcfp8EC1L5krKtMFHAWtOMm/dTF3DbgakzZTLLEmj+QkZSEU96tnKxU3hSDa9sMqwYmbyAFg= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192374486261705)(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-Microsoft-Exchange-Diagnostics: 1; SN2PR0701MB1071; 4:95AapMSQtYHsLT7UHIdO6Y7TPrGoG6NvGZw0QgYqB+d+zeAnwLG2B0bMrJGPR7u4drM7ChMI9hIDO+fM/qZcJu/uURVOu1fn5uWWWyg7F2NJgJOBy3nFwMwkf/+7vsvz7eYd7PHElnRW5rbL4MxOCRHSmT7vraUnsufpOz8SQjnd9iqW66px2hqC09ZEhD0IjxSPyfzo6HjkfEVewVAJxtnkAu1jjaPheXnuviasaU1x8J/AC9ozOEWoAZmsqfN5tslYaWUTusZzFNchBCvVRLOMMmkMn3iRa97lBMr+UoU5+cdak3hhASm9a9fv2HungQcP0CZOIuMVCFOsZt6xpwF3K+5zXFSNSEWQEgC5h3U= 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)(15650500001)(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)(6666003); 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:+hTb7TAt00aXi5rn8hIPVJMA1/CIW/ZFjbGOq3x?= =?us-ascii?Q?rfg+jC97K4uMKuJoqmP4YNRYxk7vV3/XhtYM1qZx/amXNNbkl6oh/+C8Rac9?= =?us-ascii?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8Vev7QUE/ZXkOqbbU4xgnG4lAMxg7FgcucMkMi6dXMoLqVdLmi0JBu/oTYjpYbuwowROlvJ/uNZjiA==; 5:MC+w7HcX5stYHRKDCCjvFnVKg9r6BuyKBFSQMBe4jH2UVJu7F9hLidiM2WHi7SD9YpaUszw72s0TF7NpL81IazB+zMv0xhzCWsPBwuW4NcRMuPSE0aV4tXx/T1kEQ6T/t0oYFs67KA+oDnjqsGD5Lbdw8b9XWcf47kxz/r2wfxw=; 24:OWf6BYQVqJ8mM8BMLDzjG/FTfnLQxFDx9alXEynF7t3Of7gx2N3KhWkxI70kPw/+F4VXfyTjrOiLIn4l61Bk4Q+C0B9zvSEsKpAZjoW00Ow= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN2PR0701MB1071; 7:mlyK8Ul716JeSllCQC/GkIESznmkwisjn4QFdtuW9z+521AiFbjZSRySSWGeQSwRgKsqk7S0FrNqDDAr/8LquDATIy79DfIS/aOUixC5eKrsINyG8P6EzUanyKgumUek5P7kA9PPvgcnRV2k3qVZHKBJ4TF5YpgQFvo336RbOpXVGF17bFSQH+Qr87qQm5GdEoTLgISzRVtcuxrXiN77TX6o5CKs7L+fkVP4KI4aNJM497zEYZkWxbbH4rguFjid X-MS-Office365-Filtering-Correlation-Id: 4ba2e740-4bc7-4eac-823b-08d59f7752ca X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Apr 2018 06:41:54.6564 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4ba2e740-4bc7-4eac-823b-08d59f7752ca 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 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, 11 Apr 2018 06:42:00 -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 Acked-by: Akhil Goyal --- v4: * No change v3: * No change 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 ca1e912..afa2861 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