From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0043.outbound.protection.outlook.com [104.47.0.43]) by dpdk.org (Postfix) with ESMTP id 3E6E81B03D for ; Tue, 10 Apr 2018 12:37:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=2oh6BFkXzU/MM2toac8H63MsfT6W25AvqLXdDsXPO28=; b=ASxpjM82Jdu+9FR0wIU9fL3WF6M8nz4KDEL3KO8fFA/S3P/SyiponQXxDF22tog/50qJvuUXFiS+ZjvgUtgWie5cs7I+1qNVVQbTTOlOHQijYa1Xs72nxOdSO15buA4h98zOfL6dF3QuZG1Y9DwzZtGhkDDVyMhheZCHz7VGtHw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=akhil.goyal@nxp.com; Received: from [10.214.80.46] (192.88.168.1) by VI1PR04MB1391.eurprd04.prod.outlook.com (2a01:111:e400:5348::22) 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 10:37:48 +0000 To: Abhinandan Gujjar , jerin.jacob@caviumnetworks.com, hemant.agrawal@nxp.com, dev@dpdk.org Cc: pablo.de.lara.guarch@intel.com, declan.doherty@intel.com, narender.vangati@intel.com, nikhil.rao@intel.com References: <1522824978-61568-1-git-send-email-abhinandan.gujjar@intel.com> From: Akhil Goyal Message-ID: <85da6811-fce9-37ea-3043-becc47de54bd@nxp.com> Date: Tue, 10 Apr 2018 16:07:24 +0530 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <1522824978-61568-1-git-send-email-abhinandan.gujjar@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [192.88.168.1] X-ClientProxiedBy: MWHPR20CA0031.namprd20.prod.outlook.com (2603:10b6:300:ed::17) To VI1PR04MB1391.eurprd04.prod.outlook.com (2a01:111:e400:5348::22) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c644d346-6314-4462-5987-08d59ecf1d8d X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(2017052603328)(7153060)(7193020); SRVR:VI1PR04MB1391; X-Microsoft-Exchange-Diagnostics: 1; VI1PR04MB1391; 3:56jVmnq1MT0huEOCVzSI++ZCmca0EY8f6GyoUaUYnAzwLY0R2moDrqcaMpdEemANn7XWSbro3LowCqBKInicg5wlLQs4rEzXwLn2bUwSwBVqnBeQ7sXZk5KdLzWq2XW/te/CZskUKEJhRR/+o51Ox9LkN3gSJ+VaVOvyiDybJEIOoMnqD9cH+kh84zUEIy5uPcNN9BJ75Ilvp3mbgxL/JM+Zvl3yDi64W/d2+E2xqgho571V3UtBamINFat2p6Kq; 25:kwWFH18R0QM7KoA5WaQug45FdU0mh6M96F1PMe1eomVwTKfMX7murpB9vnY4mxTgDwcZP+7FVVLrE8LP9RJu6oaCgdBbaaa5tfEP94McugMCpsV1ZqDi+MET6AlSJBkVJoL2J44hcq9mq7EG4dRBR7VzCjQKFNEa8l6n4Uobt2wlyU/uVVMqyLKV1lJ1kRfpwvoxNQnMAFFAZqP2w2CRz5l431eammnqCMcm80oriHzG5NtdRkX17TUPrNWJ0tqYkTISg+FO9/6zvFE5mFRMn/htWuPsml/661vm6vOzRR94FkhhOK7JIkFouFrkfcMHDGd3hUcIPNUwjXlAIsmTog==; 31:I15gs0A9XGuJF99Bw9daqC8Rp5abm7xRDcfvkErUiNthhXnHxkCLY30kalFdhagPulUCdny/ZtGbetVXKb1h/MJ9fpMrX8b11MloH6s8dkOu9MeCVxLCmhpKazyA0JvSB4xQXvQfjiMbnFJJnwTEY3csOaC5TyxqnoY93eDCiir8pyBJ/R8ZKFij/mfqAcehZymkFsgOZfo/P/uxMjlEHUXWgHY+cM+qu8sJj8ry/Mc= X-MS-TrafficTypeDiagnostic: VI1PR04MB1391: X-Microsoft-Exchange-Diagnostics: 1; VI1PR04MB1391; 20:PA476BzZoG2UQG1MPwLWJ6H55srHOZ1BcntQ0NdjHhNmceoyyZ3qpFWyEBlx3if5IbFONikcPtMEXbFzU76F3x+njj021H0AmmkW/OWmc4rIzR6sE97nKRZK5RoZdkeBpzc/g9Mrz/PKh3X0f6+/kC65lIdlBbCSG8GNrahb0IEvFkjRwVhkOyoL5EOU5o+9/lcm0Aj9juMTVWac0HQp2zjRQt4MYXxAOul8fmMD7tWU93O/bLPAFQ7cmOePCNrU2ZINH+lUAZ112R/Xp5U0jHMqUR0GLxy6IsR0MW+kr8Y8JoA3UyWGvFDcQYrbob7NfHyINc3v8MxMZQR92E+asQEGLkjqKjirq9nQ7ZjosdgJEIJFxYgpdaG9Gx2bFpxmMhAAdp30ZD+YpPHJu3B12I1X/IPdJnqYYgMCLfHu3E7szNcWUQT1ZBDNArKupYNs4UrnHteE3O/KwvNr+oVXmB9wXPRG08MPdwEROM3WRQb2dsiWhsAjIYAVuCru+NaD; 4:r3hYRiD1ZePDmn9A36/uyYPxaz7pces9pF6S8Vb7JxYxy9+hXTIXSIlenix2O5MyvbIPTV314tEPxQ7v14jBfsiXOGSEnhBO+kQmdVqLcPlBrMu/bMd+PiBduecON0d0jpHavGI023RFSP+ENwHSs8MMM5Py8asKUcqNGrKIPAYimqBi63XDuADhWphQLQYz8XGQfrm8PJWBgSDees7O50DxbBav2EixhLObxXE1iEZxvRpQuYQvHrNcsq/TKq0793GdvmqYKhmQa26oRrSFnFwELRlhFNFWcmfsrAiLJf2BY37on9Kdpy8O1jDLpRlo X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231221)(944501327)(52105095)(93006095)(93001095)(10201501046)(3002001)(6055026)(6041310)(20161123558120)(20161123564045)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:VI1PR04MB1391; BCL:0; PCL:0; RULEID:; SRVR:VI1PR04MB1391; X-Forefront-PRVS: 0638FD5066 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6049001)(39860400002)(366004)(376002)(396003)(346002)(39380400002)(189003)(199004)(36756003)(81166006)(8676002)(8936002)(52116002)(478600001)(16576012)(52146003)(316002)(25786009)(23676004)(6486002)(81156014)(2486003)(486006)(59450400001)(386003)(53546011)(6666003)(105586002)(4326008)(58126008)(2906002)(76176011)(31686004)(229853002)(97736004)(956004)(446003)(476003)(2616005)(11346002)(305945005)(186003)(16526019)(7736002)(50466002)(5660300001)(64126003)(68736007)(106356001)(65956001)(66066001)(47776003)(6116002)(31696002)(230700001)(67846002)(53936002)(65806001)(6246003)(26005)(77096007)(86362001)(3846002)(65826007); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB1391; H:[10.214.80.46]; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtWSTFQUjA0TUIxMzkxOzIzOmp5TVlFN2Z6Yi84TWwxaTVoQTdKa054ZjV1?= =?utf-8?B?bWtaaDFkOTVsaU14VXNpazZSbDkzbWJDSFBuTGVGYjlJbTZxUHdva1Mrcm50?= =?utf-8?B?YlR6Qm1GSGloNHFpeVM3Q3NXUHdFMDArbDJueDByR0w0aVlETFRCdDRSdWRV?= =?utf-8?B?YndMZ2VPVmtUY2M2cFpoSkM0SnUrdkp2T001ZGhxY2RUdElQcWo2cVJNVUVD?= =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3ZdLVnhHOfdRZuMBUdhp5FBdzaBD5bl167rqGBLzxTH0BfREpFhvFgW+2UDLk/UrCXvrL90yIX+5MZN4UnMjIUZufA+eDicK9KivXik6kfquL7ncx3j2KKe/r8589wR3ycql3dhEHd+GmMROxth/Avj3P1k2VIunNyRIcw X-Microsoft-Exchange-Diagnostics: 1; VI1PR04MB1391; 6:3eWHZSurioie5JwxbDe7VFZ/OSNg9FuqPlQdkf2MjlusVW6tfsbLs5M6T2FZZsLiqJn/2A1raajXLfcjO+8THWzPSn2Ld+Si01hheOZDfC9D0MpUGhteQbUHbspM4LgJfTtjYJCuWILX35/SGLb/WXY9Ozhqih/RyElgSWxNBmooLkKpvUKrsAdoNuKdtufDICfid4j4EX8pToWPXemj+/WNHC1RXgsDmDtWVwDxR5bK+r75eZDxMYeEReBEXNK6BKVjtuaoL7hjyTH5En7yb90dt5uL9KRqmzmvkcol2LJsaJH66V6OOPopmGy/peERZmQeWrzVg9RKQLmH/VZ8F+i74ar83VdeuHVmpfgoThuJDjqz5lhA6QkUcamdGK0MXzHWfeKBAX722kjbXEVq4M2pQovOeoTu1dfLCmhOevq0kNYX0gGSEtRRkbu4Ckr6XmMdRaA3ago8medEiycIIQ==; 5:CFYDQU7B7Kz+S+LXrhRMJs08ZS2QqaVDJPVBbO6B82mOlud7QGM1MT0v8hcBvbxvseDhcHooyZOcSQvNOOGDKVu5FhdfofBQl1CPaYgwoykeAWffYMb+hwcU1obEileQ28jrxCbo4e5RthAGFUNXY1jOvZqGK1JkgxdMBoagmYc=; 24:nZSSa9ODdj1rf8fdQyqHOY4/YamfpEqztSc6l+CJqy+B/AYAjADIAq8dxv18tbzlCqaEkQJ2K8vBmpT+gKRXIFsTYdYXlZ1aXUk8KDe2QTA= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR04MB1391; 7:i+lzJKkTUIf/feSKCtmIRdZ42quCmJGmZdbkBAR8cUCE6ZofOXtA/a5sfztuUBNTpq4QAsEDcC0ais/twvgncFB0j0x+QA9+1uMGvscEue4uzrkbffPH6HGSmgM6KRemQRZ0Wt+yb9j2vwS0X5L+iZvAAb7ySj6potqmV9c0W2pcLJ/mTLK57lzXpaYG5gZPPLL3PWtj3EF/EmrqLVk8jHMbiU+GBC/NUy87IHbGbm24vDzlg9TfZw0Sj+MCZnYI X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Apr 2018 10:37:48.0262 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c644d346-6314-4462-5987-08d59ecf1d8d X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB1391 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 10:37:55 -0000 It would be good if we have a cover letter and description in the commit message. The patchset does not apply on eventdev subtree. Could you please rebase. I think there is a need to add struct rte_crypto_op in the rte_event word 1 union as you are adding crypto event. All crypto drivers would process crypto op and not mbuf. Also, I guess the patchset is dependent on another patchset. Please mention that also in the cover letter. On 4/4/2018 12:26 PM, Abhinandan Gujjar wrote: > 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; It is expected that caps memory is initialized by the caller. This should be mentioned in the description of the API. > + *caps = 0; > + > + return dev->dev_ops->crypto_adapter_caps_get ? > + (*dev->dev_ops->crypto_adapter_caps_get) > + (dev, cdev, caps) : 0; It should be -ENOTSUP instead of 0. I think same needs to be corrected for eth rx adapter. > +} > + > 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. > + */ > + > +/** > + * @warning > + * @b EXPERIMENTAL: this API may change without prior notice > + * > + * Retrieve the event device's crypto adapter capabilities for the > + * specified cryptodev device > + * > + * @param dev_id > + * The identifier of the device. > + * > + * @param cdev_id > + * The identifier of the cryptodev device. > + * > + * @param[out] caps > + * A pointer to memory filled with event adapter capabilities. > + * > + * @return > + * - 0: Success, driver provides event adapter capabilities for the > + * cryptodev device. > + * - <0: Error code returned by the driver function. > + * > + */ > +int __rte_experimental > +rte_event_crypto_adapter_caps_get(uint8_t dev_id, uint8_t cdev_id, > + uint32_t *caps); > + > struct rte_eventdev_driver; > struct rte_eventdev_ops; > struct rte_eventdev; > diff --git a/lib/librte_eventdev/rte_eventdev_pmd.h b/lib/librte_eventdev/rte_eventdev_pmd.h > index 3a8ddd7..656d160 100644 > --- a/lib/librte_eventdev/rte_eventdev_pmd.h > +++ b/lib/librte_eventdev/rte_eventdev_pmd.h > @@ -585,6 +585,167 @@ typedef int (*eventdev_eth_rx_adapter_stats_reset) > */ > typedef int (*eventdev_selftest)(void); > > + > +struct rte_cryptodev; > +/** > + * This API may change without prior notice > + * > + * Retrieve the event device's crypto adapter capabilities for the > + * specified cryptodev > + * > + * @param dev > + * Event device pointer > + * > + * @param cdev > + * cryptodev pointer > + * > + * @param[out] caps > + * A pointer to memory filled with event adapter capabilities. > + * > + * @return > + * - 0: Success, driver provides event adapter capabilities for the > + * cryptodev. > + * - <0: Error code returned by the driver function. > + * > + */ > +typedef int (*eventdev_crypto_adapter_caps_get_t) > + (const struct rte_eventdev *dev, > + const struct rte_cryptodev *cdev, > + uint32_t *caps); > + > +/** > + * This API may change without prior notice > + * > + * Add crypto queue pair to event device. This callback is invoked if > + * the caps returned from rte_event_crypto_adapter_caps_get(, cdev_id) > + * has RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT set. > + * > + * @param dev > + * Event device pointer > + * > + * @param cdev > + * cryptodev pointer > + * > + * @param[out] queue_pair_id > + * cryptodev queue pair indentifier. spell check. > + * > + * @return > + * - 0: Success, cryptodev queue pair added successfully. > + * - <0: Error code returned by the driver function. > + * > + */ > +typedef int (*eventdev_crypto_adapter_queue_pair_add_t) > + (const struct rte_eventdev *dev, > + const struct rte_cryptodev *cdev, > + int32_t queue_pair_id); > + > + > +/** > + * This API may change without prior notice > + * > + * Delete crypto queue pair to event device. This callback is invoked if > + * the caps returned from rte_event_crypto_adapter_caps_get(, cdev_id) > + * has RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT set. > + * > + * @param dev > + * Event device pointer > + * > + * @param cdev > + * cryptodev pointer > + * > + * @param[out] queue_pair_id > + * cryptodev queue pair indentifier. spell check > + * > + * @return > + * - 0: Success, cryptodev queue pair deleted successfully. > + * - <0: Error code returned by the driver function. > + * > + */ > +typedef int (*eventdev_crypto_adapter_queue_pair_del_t) > + (const struct rte_eventdev *dev, > + const struct rte_cryptodev *cdev, > + int32_t queue_pair_id); > + > +/** > + * Start crypto adapter. This callback is invoked if > + * the caps returned from rte_event_crypto_adapter_caps_get(.., cdev_id) > + * has RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT set and queue pairs > + * from cdev_id have been added to the event device. > + * > + * @param dev > + * Event device pointer > + * > + * @param cdev > + * Crypto device pointer > + * > + * @return > + * - 0: Success, crypto adapter started successfully. > + * - <0: Error code returned by the driver function. > + */ > +typedef int (*eventdev_crypto_adapter_start_t) > + (const struct rte_eventdev *dev, > + const struct rte_cryptodev *cdev); > + > +/** > + * Stop crypto adapter. This callback is invoked if > + * the caps returned from rte_event_crypto_adapter_caps_get(.., cdev_id) > + * has RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT set and queue pairs > + * from cdev_id have been added to the event device. > + * > + * @param dev > + * Event device pointer > + * > + * @param cdev > + * Crypto device pointer > + * > + * @return > + * - 0: Success, crypto adapter stopped successfully. > + * - <0: Error code returned by the driver function. > + */ > +typedef int (*eventdev_crypto_adapter_stop_t) > + (const struct rte_eventdev *dev, > + const struct rte_cryptodev *cdev); > + > +struct rte_event_crypto_adapter_stats; > + > +/** > + * Retrieve crypto adapter statistics. > + * > + * @param dev > + * Event device pointer > + * > + * @param cdev > + * Crypto device pointer > + * > + * @param[out] stats > + * Pointer to stats structure > + * > + * @return > + * Return 0 on success. > + */ > + > +typedef int (*eventdev_crypto_adapter_stats_get) > + (const struct rte_eventdev *dev, > + const struct rte_cryptodev *cdev, > + struct rte_event_crypto_adapter_stats *stats); > + > +/** > + * Reset crypto adapter statistics. > + * > + * @param dev > + * Event device pointer > + * > + * @param cdev > + * Crypto device pointer > + * > + * @return > + * Return 0 on success. > + */ > + > +typedef int (*eventdev_crypto_adapter_stats_reset) > + (const struct rte_eventdev *dev, > + const struct rte_cryptodev *cdev); > + > /** Event device operations function pointer table */ > struct rte_eventdev_ops { > eventdev_info_get_t dev_infos_get; /**< Get device info. */ > @@ -640,6 +801,21 @@ struct rte_eventdev_ops { > eventdev_eth_rx_adapter_stats_reset eth_rx_adapter_stats_reset; > /**< Reset ethernet Rx stats */ > > + eventdev_crypto_adapter_caps_get_t crypto_adapter_caps_get; > + /**< Get crypto adapter capabilities */ > + eventdev_crypto_adapter_queue_pair_add_t crypto_adapter_queue_pair_add; > + /**< Add queue pair to crypto adapter */ > + eventdev_crypto_adapter_queue_pair_del_t crypto_adapter_queue_pair_del; > + /**< Delete queue pair from crypto adapter */ > + eventdev_crypto_adapter_start_t crypto_adapter_start; > + /**< Start crypto adapter */ > + eventdev_crypto_adapter_stop_t crypto_adapter_stop; > + /**< Stop crypto adapter */ > + eventdev_crypto_adapter_stats_get crypto_adapter_stats_get; > + /**< Get crypto stats */ > + eventdev_crypto_adapter_stats_reset crypto_adapter_stats_reset; > + /**< Reset crypto stats */ > + > eventdev_selftest dev_selftest; > /**< Start eventdev Selftest */ > >