From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0057.outbound.protection.outlook.com [104.47.42.57]) by dpdk.org (Postfix) with ESMTP id 44E016904 for ; Wed, 21 Mar 2018 12:12:29 +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=nU3DfNQv/fYk4Xbr3JDZLvKjnb6DKYvdNnwbxjfyDsg=; b=IW37jj7NwJBzpVY+GRfLsIBCpElv4M2IEq4Nlo26o4SEVH+ZuZCGRWfHODyrxnuRx++X94NQ02Ksh5cdIKGfuZE5NV0TuhG2fx4obzh2tvdqeLZkIdjNYQoD3KJHbI1LxbJMdsmknmNKG2RW2W+iGW43rNNrcKotC1rV0QoRELc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Anoob.Joseph@cavium.com; Received: from ajoseph83.caveonetworks.com.com (115.113.156.2) by BLUPR0701MB1058.namprd07.prod.outlook.com (2a01:111:e400:8b0::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.609.10; Wed, 21 Mar 2018 11:12: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: Wed, 21 Mar 2018 16:41:23 +0530 Message-Id: <1521630685-5179-4-git-send-email-anoob.joseph@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1521630685-5179-1-git-send-email-anoob.joseph@caviumnetworks.com> References: <1519896103-32479-1-git-send-email-anoob.joseph@caviumnetworks.com> <1521630685-5179-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: MA1PR0101CA0061.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:20::23) To BLUPR0701MB1058.namprd07.prod.outlook.com (2a01:111:e400:8b0::27) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 99e1cb9b-7abd-4e76-90fb-08d58f1ca12e X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:BLUPR0701MB1058; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1058; 3:1iJIqFvaZ8l6VTcHlLsPTV1Ljwyx1Ox6KDo5ZGZ2WEvMabJ8EKcCd0dQQXmYrndcicMG5ykHRYZXbq0wg6uq3TnhcyhMgJyKorFFtwq+j20RyR2EB3ONcp99RlUzazOcKAd5mZmZSvMofjNwOIbWd0ozIECwYQEnn+ZD9Hhw/AFwtTTPHahy3/V324jZUR2RTSnGwoCngxzRY94irybsbEJXrmx6gYdyyszKI4WAYZ7kUBaLz2o0FI1640rjuQLs; 25:4JAVm++qFin8EGS+Qv+roRVFxGiY6PQb+Nwre94AO7dujGrgZyexxl0Op5FwPr+FwwdM8CrncOzVLRZOxJyc14rCftINUeaFZSOQaRlHFYtTkG6T8iLICFwUcxNpnW60iwJAxFqFe8d//23bAbqcLzujve+Z5bBTHKKJMUAxzG4l8FKpL8tAo/lyh8sOaF4Vd0uUlAg0ygDDX5YewixOArC2sqb11kwIkUkh+Dype8EeSo7ognaSW3zX/NObvhtmY9XKzP95VNOFFuuISL0D0YPoS9rcTT2FWS1S9E98vqSLxh0pGYQBYZWPsCHUnb7E5OprCmlESn31YvOMklKZCR9TsGznOpmBEfzd//f6aOg=; 31:UNPUGN2PpdRl30noDWgYQmg/d6i3XMrhwG6LNf+Kkw7BhhzAp0xImwqz6rMEjx7R9rAcFrXTjQpkTsBHNV2dJB8PpdFTsv3lMoNXVYfby2qECEHawfftWbvsgvoi9Sjd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vEJMVfjufJCvM5Jq1zs7SY5is+Qvd1N/CBvD4CtBnHBdmHV0OUKIT9IjLg4 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(192374486261705); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(3231221)(944501244)(52105095)(10201501046)(3002001)(6041310)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(20161123562045)(6072148)(201708071742011); SRVR:BLUPR0701MB1058; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0701MB1058; X-Forefront-PRVS: 0618E4E7E1 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(396003)(39380400002)(346002)(39860400002)(376002)(199004)(189003)(72206003)(52116002)(59450400001)(51416003)(6506007)(305945005)(25786009)(7736002)(386003)(478600001)(81156014)(50466002)(81166006)(110136005)(8936002)(6116002)(3846002)(54906003)(6486002)(316002)(2950100002)(5660300001)(16586007)(76176011)(8676002)(8656006)(50226002)(105586002)(36756003)(15650500001)(68736007)(66066001)(42882007)(4326008)(55236004)(26005)(53936002)(97736004)(16526019)(6512007)(106356001)(47776003)(2906002)(48376002)(186003); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1058; H:ajoseph83.caveonetworks.com.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; BLUPR0701MB1058; 23:/Y02qqdRwLX2X/xeVhXpJ8vXO/71IQeakQsgqxO?= =?us-ascii?Q?kvWocqFTDNtmikdt+VSUxPtyb/ms0654T2HcmGArPtYcLu+qrV/xFOwjN8uo?= =?us-ascii?Q?DxQqNXL2jvd37y85xZOBmGlpdJhQjUkdQ/7Cg2ppyujmxxKwXpBi7NY2QqwQ?= =?us-ascii?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XYO4BlrpcvMiT3MOEbpQHoLxXi0dLyUhdRO0m6zDq7h7cHIFwRRy5pfWKKVWaag0=; 24:ScFCCxrsFpWWAO8ZBGGYam5IAHd8vDihsEi4l/0dUT5yYd8q9X9S+PXcxHm6Gi/mrsY7Z70QJmzpWnPIIrquB8PFgZ3nlDu2Fd8k9aSiiFI= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1058; 7:/CoOXHoK0FsARxStrIBxvDc71BqX5x5Eyv7bvjyr9fyIUec5f2v0STkXL+zmeTaRb82J7mMNoI4k8hwZSxcdcucTSqd7HJiV+Gyps0h47l0vxQ0MqoOByY+B9r2/ZMHmV0to4DPebMN4tTyT8jfXrb6Dc/motmBLuJEgiS8OCoNkme5IuYL10sH09dkTffL1UW26k3FC1nGHkTz83rh7+8XDdx5ww8spsQbZ/H3imD0xXGVm/KDHVkGDG2WLoQz6 X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Mar 2018 11:12:24.2452 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 99e1cb9b-7abd-4e76-90fb-08d58f1ca12e X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1058 Subject: [dpdk-dev] [PATCH v3 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 Mar 2018 11:12:29 -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 --- 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