From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0067.outbound.protection.outlook.com [104.47.37.67]) by dpdk.org (Postfix) with ESMTP id 24B471B8AD for ; Tue, 10 Apr 2018 08:08:19 +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=TIGXiwLGSgjv1mCQTz1zc/oCk/vkU8AQBZGYEaApgJg=; b=okD0jF1bPqemK7+Zw3/lNYWMGFr8q+bkaD6ovwQvudeW+aQR4xQ31UdGW1q00Y+qnAwh5ZnUvWqurGUeU8KlMWYXPszGRJu5xgOHfq+hgNw+dn53gSIZBzbgy3BD+rRQAa233+9D8K3ksuRn59vFF1JMRp5+eSCylA2/yAKJ7sg= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (115.113.156.3) by CY1PR07MB2523.namprd07.prod.outlook.com (2a01:111:e400:c636::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.653.12; Tue, 10 Apr 2018 06:08:12 +0000 Date: Tue, 10 Apr 2018 11:37:58 +0530 From: Jerin Jacob To: Abhinandan Gujjar Cc: hemant.agrawal@nxp.com, akhil.goyal@nxp.com, dev@dpdk.org, pablo.de.lara.guarch@intel.com, declan.doherty@intel.com, narender.vangati@intel.com, nikhil.rao@intel.com, Nidadavolu.Murthy@cavium.com, NarayanaPrasad.Athreya@cavium.com Message-ID: <20180410060756.GA23776@jerin> References: <1522824978-61568-1-git-send-email-abhinandan.gujjar@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1522824978-61568-1-git-send-email-abhinandan.gujjar@intel.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Originating-IP: [115.113.156.3] X-ClientProxiedBy: BM1PR01CA0089.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:1::29) To CY1PR07MB2523.namprd07.prod.outlook.com (2a01:111:e400:c636::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9a17cd37-9223-45e2-534f-08d59ea973bc X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603328)(7153060)(7193020); SRVR:CY1PR07MB2523; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2523; 3:/dA+2GZVqRn2TxPiZww6GWQ6j+lTlohlQg9h9YfVbfrc1W/0og6IawYHWG8g4+CrKwYjhj6E2qL5hKYr56J2Yxl623Hgj+KwcQ+jIEp6Grd6ueo+lxZ8rsB5Kwi6EiZ/l3lUG39HW9STqrXTOCFOTTYM+1k9+vDB97hbjjCtWECU6puo/S1vZItOfcq5Ye+jaYfpIcz+aTgLu7u5bPBt+ATFCEBjaLlkyN9X/AspRatx9ultRr2AysMlEZuFOD8a; 25:G1n7qQGjXifeNCU8pTjbAdFXdNYFTmzkTvxU0jDLxRYFkNgDLPB9RI+8nrdSsw8fb+SHp4jMImP0JHMaJkcazEMn2R/TLQ+s1IhcLVGHPPhzwZG69HUezXT81Lc9d9d9NEQiko+yPRhGMeG5zsiSyu0Yy8aWnN7oZKmHHAhDWbjL0NMmu0QyTWUJEITM/15O4lbz8kbWt7hrJn5B7bE6KQR+u3f2Yu/y2ob8F7RuTsG4f0O9oMZCLdHTvTzXlwbT2rqPs6/2IFdPxWALgnVKg9qtmRCelfAQ/7Ud0CE1nM/1jdDAdmU6m2wOYVdaeDrGFV04fO397JkJifjwQKzhOQ==; 31:looT1ka4d3a7J5wEsPdRtHEjy8r2kailB6GyepQX6DAGPbFWPWG6q7WQLnIVEQGkvMQVRC+6fIYoRYmjxbQmKC8f9FmtxgthuBLO6BpCNRNH9ZIy+GtuR5yiu5nC1muF0fTy3h8kJT1QpcGfcKSEchHMLXbhwBaHzpZes7luEP+cmM6bBLnqxHq4XEHCo4tpmZ8eY35ID8BiHMyhnZydH4+scn8Hy9gHjtaySkOBFmk= X-MS-TrafficTypeDiagnostic: CY1PR07MB2523: X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2523; 20:bm8KM2OnB55VmVqf2Xxb08LHoVNWT+rUU072XTbDKmP+rpKtz4gUQLH0Zc+KT4iPVCY6bsvabV3EuNNPELnStRqhqqdU0lRm+7BdLX88fgLFb9v0ChFtb9W3QLYhaqeYPp53AV3losdybhkpp+3bAA+9XQ2bXwZnNCPoS3s7HQ4MP0EOmI31agcIhngOzgXereiPF95fYov6LozlgE0iSYFeBrzt6tEowFejbOO5tWmSVl3TFJVQ1caLHCgaG0sg35ECacCuHf+9FCYDt5vEMtU2vIdRdCq7LVLuDNLXxIsdgJf5s2/5R1ZcVTpQHpd4t59gR0ZXhmsK32jECde1NvQ/ro8XiAdC80OxxNpr4f8EOfIiQRmcWTpHIZ8Y8AXSw3CWI5Xb0VqCDgdEFHHX+yex4U7/zk1jUrvIlxi2Eksuf/VeDOvMhFZ+a0ie6g1dm6pS5JkJBjA5g5rQfqqdTgMMohVWixM2a8bQv6zjOq/cEB5i4PJwKr/NGcOveWIOzTicKJueu5+ma3UHnVjQ+ZL60nu8e6/ov83b9thayn0XqP03Tgdo+dP57V4q0q85wsO1TZplxyXbumT4EvkSR3GV4Qwvx1Y2rq2rqGpnd50= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(228905959029699)(17755550239193); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(3231221)(944501327)(52105095)(6041310)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(6072148)(201708071742011); SRVR:CY1PR07MB2523; BCL:0; PCL:0; RULEID:; SRVR:CY1PR07MB2523; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2523; 4:KHOgfl2FoC6MYmPdVoeFGhZAZaQ/35Tfdbm8y4m5FS43tVMep5MWaoU1iVYsJ7WZL28fsQkViFV2qbNQpXUSogdl6Eq6WbE51Jby6Tes26pQP+iB8h698zYO8rOEa07xtGJa+YmVmqqnZ30V4ERkllQ6cP/MLy6ZB4PLiHzSp7L4+6mZs0dJ/M0WPHs154OHyUPGLXUbxG5dpA6l3t7LzuPovWlTOG27H4u86eKfMMJGlykM6g0bo+j5GuW3H/KqsOQJCejnscQ827xU8d3KqKxgjMxhJ7ksOI9KtCnSHMmAkDoKnrcCwv6/BHvRvxZ0jFac1WFb6QmsQW+iAipIk6G3nqL0wuTPI4R9ZxTfTfW78Vr/Zc4k77veDxOrWEKG X-Forefront-PRVS: 0638FD5066 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(366004)(346002)(39380400002)(39860400002)(376002)(13464003)(199004)(189003)(42882007)(4326008)(6116002)(16586007)(3846002)(58126008)(33716001)(107886003)(105586002)(6246003)(486006)(9686003)(53936002)(186003)(106356001)(316002)(55016002)(23726003)(8676002)(6666003)(2906002)(478600001)(97736004)(47776003)(81166006)(81156014)(386003)(72206003)(55236004)(446003)(26005)(8656006)(305945005)(476003)(66066001)(59450400001)(1076002)(11346002)(33896004)(50466002)(5660300001)(25786009)(6496006)(16526019)(33656002)(229853002)(76176011)(8936002)(6916009)(52116002)(956004)(68736007)(7736002)(18370500001)(142933001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR07MB2523; H:jerin; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR07MB2523; 23:FQWkQCdtijuwPhsa4GXTcNgUSdEPNBDxuzQ75/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WcoUqc6UkY4BPHITenN284y+qEFZ?= =?us-ascii?Q?T/ky8nb72X3Y9IUGOMB2CCEn0J4t+bH/dMdvEVRoKnsiXiClvQTLtrT4Z9ww?= =?us-ascii?Q?rP2bUub4xn5XU1rJUhYJEIf03u8ets/LJhSSBKmLmMly6K0V5tloXNv2tCjl?= =?us-ascii?Q?UbPB8PWlaeExR61Qh+mAahrGoC7+K9mZ6ckFNHzCNzxOpp1vb9A7yr5T7M95?= =?us-ascii?Q?5VfasU/4HHDVtAXcPElCDT160s+8mYAW2QmCUSlACuiDqoN0XLg0pEElwtx/?= =?us-ascii?Q?82k9XYGTZtXvAB2fbQsXFxq9dMNFZNhEkHJO/WJ6hSmfuv85rQRTgczJSdcl?= =?us-ascii?Q?W/bVKMxMKWHd3jv7oLzMPCOhYaJ3zU67pynCST7g/4SnmMwK+nnpVSh3GKwF?= =?us-ascii?Q?MvVV0uy0sBSGxvLw3rYopjJFsSOzjyVKZMiTAe3Crb/ZvllUWetWHKgkTU82?= =?us-ascii?Q?JZwBclPvQRMP7FO1CRF+ZNzftZg3BrKrylJaTglA2T+GLK2LW7DvjhN3TR5c?= =?us-ascii?Q?l18fV9gTA=3D=3D?= X-Microsoft-Antispam-Message-Info: MrGbQiyswy9BYdb/naYRnmM8sqCPEZ8IJ6ov8dM0UZtXLV2me/5roDghn3tUZmTxha4x9zn9/RuWrxMVfaI8SS8KRswU5MbMmcTYiAxH0xP3tnUXBzH7b3J9Fmo98g+UlP0x4DdTDtaj4OpGAgCUz8n95+ZGkUnCMbmjWystzbfdluOGEWZ9eEoaSEqGNQpT X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2523; 6:l7a0PZlYrgPotHp1xRvU3giqtvpuC/FWNMxXs/nGttPwkHIOedLKTb1XKRVQg6cu8Kew3njiaf5KK435eoFVUMtrgAKb9Jmbw5FewYc0x3SU0AeHAVSEgr6iJHCFtWMpqDQPlj4tYD3dmMeeR+VLdUGcZNl14bzGr46/RkVY4/s9ZOeOMCudEcWESuqEWFZC6WiiW86smDJeh6avDde/FpYz1Je2RlEzLdGdH258f6E2STn/9LOFJCTIygAZVXeFrp9W5bE8Lxgb83XeIDo2d/pZchqsocSK8vw7T9zRFreINQvy2VpbeF3LDFZ8XU8N5IDO9wuK7KQw3vzKOsXI+x+0oHU3/3hzGKLvPyLQYKkpKOD2fOvNZA/18v/+A9cgc692zZOv1TRXQeKQsR4Bj+B3NbHSmaC6lh9Z1rycVY/CiKkitjPc3CKsLsGxHRp6n+urdkDs4JB9tRS6x9S6lQ==; 5:BzoCMTfZEc4yhJFlJOweeY0Aseau821eG21GaciykBcWetWzLg6oLwa+ZL9E8EyDp4oSRxDpAhgOM5dNHATu2n0YHGhG7G70X0RDuhX9+ugiuo/QdBVbIXhYRd3T68KQSOsCIWKgS7MSoRt2sldiwaEznP+eDo2si0rg8sDEAvY=; 24:PHHBrH/ConY/2dpi3V3FBnKko1SKU7TEhHKZZmt2QSblQp4RC5zaXURMOKI9v+fL826ZKrIjFGJMOJR/YigxcGeH8LbsR15WVGS2cYZQvPI= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB2523; 7:8ibuc0Hd4HqHt0cuqAXO+Ttsa/AJ019y7YaI78uW3w2tHQFonV1YzGhiYJU7HT7bSfvk5dHMCwVT1y7VUhG9hFtmZpcV9wUfeBMYfhVu+J4BNRaNCHvSUIoWt124wrMWFGCJddQY4PCKhvGzes8kayr9dss8h/OhhYkvBTn9cqF2OurR0gaXvASYVtFIveWzUkEx/s1oDLp6NORvdiVu5+jG1c0RSue6bIQbJB/6Cx1MuMih2kfdBJ2fbuoYnyjA X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Apr 2018 06:08:12.8676 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9a17cd37-9223-45e2-534f-08d59ea973bc X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2523 Subject: Re: [dpdk-dev] [dpdk-dev, v1, 1/5] eventdev: add caps API and PMD callbacks for crypto adapter 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: Tue, 10 Apr 2018 06:08:19 -0000 -----Original Message----- > Date: Wed, 4 Apr 2018 12:26:18 +0530 > From: Abhinandan Gujjar > To: jerin.jacob@caviumnetworks.com, hemant.agrawal@nxp.com, > akhil.goyal@nxp.com, dev@dpdk.org > CC: pablo.de.lara.guarch@intel.com, declan.doherty@intel.com, > narender.vangati@intel.com, abhinandan.gujjar@intel.com, > nikhil.rao@intel.com > Subject: [dpdk-dev,v1,1/5] eventdev: add caps API and PMD callbacks for > crypto adapter > X-Mailer: git-send-email 1.9.1 > > Signed-off-by: Abhinandan Gujjar > --- > lib/librte_eventdev/rte_eventdev.c | 25 +++++ > lib/librte_eventdev/rte_eventdev.h | 35 +++++++ > lib/librte_eventdev/rte_eventdev_pmd.h | 176 +++++++++++++++++++++++++++++++++ > 3 files changed, 236 insertions(+) > > diff --git a/lib/librte_eventdev/rte_eventdev.c b/lib/librte_eventdev/rte_eventdev.c > index 2de8d9a..3d24e8f 100644 > --- a/lib/librte_eventdev/rte_eventdev.c > +++ b/lib/librte_eventdev/rte_eventdev.c > @@ -29,6 +29,8 @@ > #include > #include > #include > +#include > +#include > > #include "rte_eventdev.h" > #include "rte_eventdev_pmd.h" > @@ -123,6 +125,29 @@ > : 0; > } > > +int __rte_experimental > +rte_event_crypto_adapter_caps_get(uint8_t dev_id, uint8_t cdev_id, > + uint32_t *caps) > +{ > + struct rte_eventdev *dev; > + struct rte_cryptodev *cdev; > + > + RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL); > + if (!rte_cryptodev_pmd_is_valid_dev(cdev_id)) > + return -EINVAL; > + > + dev = &rte_eventdevs[dev_id]; > + cdev = rte_cryptodev_pmd_get_dev(cdev_id); > + > + if (caps == NULL) > + return -EINVAL; > + *caps = 0; > + > + return dev->dev_ops->crypto_adapter_caps_get ? > + (*dev->dev_ops->crypto_adapter_caps_get) > + (dev, cdev, caps) : 0; > +} > + > static inline int > rte_event_dev_queue_config(struct rte_eventdev *dev, uint8_t nb_queues) > { > diff --git a/lib/librte_eventdev/rte_eventdev.h b/lib/librte_eventdev/rte_eventdev.h > index a20077c..49a71d1 100644 > --- a/lib/librte_eventdev/rte_eventdev.h > +++ b/lib/librte_eventdev/rte_eventdev.h > @@ -35,6 +35,8 @@ > #ifndef _RTE_EVENTDEV_H_ > #define _RTE_EVENTDEV_H_ > > +#include > + > /** > * @file > * > @@ -1142,6 +1144,39 @@ struct rte_event { > rte_event_eth_rx_adapter_caps_get(uint8_t dev_id, uint8_t eth_port_id, > uint32_t *caps); > > + > +/* Crypto adapter capability bitmap flag */ > +#define RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT 0x1 > +/**< Flag indicates HW is capable of generating events. > + * Cryptodev can send packets to the event device using an internal event port. > + */ Some top level comments, 1) Since we are not planning to abstract RTE_EVENT_CRYPTO_ADAPTER_ENQ_DEQ mode inside the adapter, I think, it make sense to introduce new capability. ie. In some of the HW implementation, We could maintain the packet order even if source queue/scheded_type is ORDERED. ie. if the capability is set then application can use RTE_EVENT_CRYPTO_ADAPTER_DEQ_ONLY to maintain the ingress order even if it is been called from multiple CPU in ORDERED/ATOMIC context instead of using RTE_EVENT_CRYPTO_ADAPTER_ENQ_DEQ mode. 2) Please split the 2/5 to patch specification and implementation 3) I think, we need to give a example code snippet in the programmer guide on how to use RTE_EVENT_CRYPTO_ADAPTER_ENQ_DEQ mode in conjunction with rte_event_crypto_adapter_event_port_get(). Let me know your views?