From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0052.outbound.protection.outlook.com [104.47.33.52]) by dpdk.org (Postfix) with ESMTP id 8EBAC1B2B8 for ; Thu, 15 Feb 2018 14:10:04 +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=ELbzEnTK1+KGtnv5fkG3/L0VYPuDfSxG8LmT9+WHWSE=; b=RyfuwogbvnVwoprNn/TT9VbrM72wYmMIV4wYS/NCvwri4xQovbvfvrlMx38791O+oqsp3gKbj7eTE0cXKezqneOxIBWlRMN5GsMDOcGhj7ch1IQyksIV2xzcRQdH0qcrq4Q9fJhdAOTjSFTMIT9GlvJvc0dYWbqpJtKNw3CWQPo= Received: from jerin (115.113.156.3) by SN2PR07MB2525.namprd07.prod.outlook.com (2603:10b6:804:6::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.506.18; Thu, 15 Feb 2018 13:10:00 +0000 Date: Thu, 15 Feb 2018 18:39:46 +0530 From: Jerin Jacob To: Abhinandan Gujjar Cc: dev@dpdk.org, Nikhil Rao Message-ID: <20180215130944.GA808@jerin> References: <1516013570-146070-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: <1516013570-146070-1-git-send-email-abhinandan.gujjar@intel.com> User-Agent: Mutt/1.9.3 (2018-01-21) X-Originating-IP: [115.113.156.3] X-ClientProxiedBy: PN1PR0101CA0021.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:e::31) To SN2PR07MB2525.namprd07.prod.outlook.com (2603:10b6:804:6::25) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d74d4dfd-afa0-47a3-d9fe-08d574756c9e X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:SN2PR07MB2525; X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2525; 3:5B3tLn2aTIkNcNAdx8k7P5PQYsQejor50FFSsk4WBUlgU08jcrMkPorDSgOYO+pv1J/Lsn0w5Xfn9M26h60MWobi7mJgBeeacHbuOWo3X9SISbykf9F6rKrUognwBIhbwKtfGsO61IE4WwuYFkL7DGj8TM5tsH7DnPC+LPTJMYbR9BwP8h9bYcDY6vjmoyopgqX5+vkF5P3wfu+r+nJImbaILscoGlsVhJrSs1WbKXYBKpXNRCFXmVPUgDFSQBMC; 25:HkucDtgvqilzK9ZIc7y9sBD9/VKoCDw4mgb7MjZc+Q1aT3sQ6IEI7EVmH5LZj79C3kKO+jBcwOF3hREP5P5GVIf5QXvL/NY/RYg/Z0QbKZLmRgfHZpy/3b17Lvtp/PWMjlXvr4dbI88eS4oxcT2t5SJB7OOWSfx5VqRtwHDF6PKTgqYIM78xwxeYdOvCxpkScGaTIS5VBQ6/cXhGLc2sfNLSkfhZws0ImScENwrNtpgznXduB240luUDLHOWDG/eWQNwabRaHRphif9HgNR2R82yIzBtmdAkWhgwxeowG8llWXrq65toqwzbR8CDm7Dz6IFRRqczPKbQBooyF25Jbg==; 31:CjiM7HPgFrcLKlxEt8HsnAl6Wrdflf62D/+o9+n2sSmWrYFoUaHo+bLg33nt+zk8S7i+KVg5m9HcGXw5xOHJBehIMm7ba84M1aG8rbDC2Sghf/eZTbuZUeXefTAxQEXX3XieEEIF7i5dxM4Q7H7AUBDo7LEJ2huiS6d6gbP816PxP5+fIGaqmGJx+L8CTPaSQJzjHeGzcyrBuVKR/MaUGbpCtdLKYGHwjOMKq6c3yUg= X-MS-TrafficTypeDiagnostic: SN2PR07MB2525: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2525; 20:UwkRxFCx+rHkR0xULdmdRqtKw79TGuSd8ZIxOX2fNqFyI32WS1DKgSPK3LlAzohK25OGv9xhlEWoEAryELDlCiCLkLj/XAKwE3HEv9h3zjz/z03w0guFwXC1n6TBM7gYZz14QyWMH48sXYg/LWnpD24ala3xOfA2Dc+sg6fR5zaGae6rKkSLZTDxs7X3v4Txndl0UY5Vu6+Q0JuKTlL2/3BqWfq2Nhcr2/PhEgU9mjklM2g32a9sk0YCsy4GZv5722JW5+qA+SPn7wpKv8dsZhJLFxMBvrU3JF/HaDN//cWQJxkQYkqR+qS4Zz4rEBcLMWxDHLU1aeEZ4B+7e6zxXSu0dT6qIUxubzAeRnZaKEVh4pDFaIy6ghASsQMyDuqvxnV2yK4mvv//SL3c0ghy1Pr/txzCUjjNj/wBgkrYjDynARxMC9QYE1fWs2KevoJeO6nO1L12FYszlafXrNdNHGfgK84N+3CT/SycDoYBF3vpFdx7OhTDrYhz5hVAHYVguVBc1ryduSTyc8+AbMthN3+hvZRsDPi3r69aD/LiHQPz6pmD0BP+LTKdHnSURr3KEYZtgR8crAt2GffuGkefYlNzBN83ugZmlqSvclEydHE=; 4:PTPhaZXTjxzmYVGJCi1PRrsymecPsXQ/FIRt4itao5qM4rmc3dWmCan+HbO8y29lGB8XxZnRixFJUiAHYW7Wt7pmS6vnDxBdmz4MmkkUN9Fef7TgCnrNXr7nKDSXROdut+87d71NxsLQGDZ35MpmApZ8DU6QIDJ1WuimmdI2NBWFA567XByH6UvWdwUh3kF6926pBhZi7luafRGKkOCM5NkVCVS5NJyan70LfilVzjsmamlQQJvyf2YFg8rOUhZZuo7PEBIGXZTf/CeUTuKdzbgC5HtXzCXHUxgN0w+4Aq4b4VCbljbTNN03e98edzwr X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001026)(6040501)(2401047)(5005006)(8121501046)(3231101)(944501161)(93006095)(3002001)(10201501046)(6041288)(20161123560045)(20161123562045)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:SN2PR07MB2525; BCL:0; PCL:0; RULEID:; SRVR:SN2PR07MB2525; X-Forefront-PRVS: 058441C12A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(396003)(39380400002)(346002)(39860400002)(376002)(13464003)(199004)(189003)(50466002)(1076002)(6116002)(97736004)(9686003)(55016002)(59450400001)(52116002)(33716001)(6496006)(386003)(55236004)(81166006)(6666003)(42882006)(26005)(81156014)(186003)(33896004)(47776003)(8676002)(2950100002)(229853002)(16526019)(6916009)(66066001)(72206003)(2906002)(5660300001)(8936002)(6246003)(105586002)(478600001)(4326008)(25786009)(3846002)(76176011)(58126008)(33656002)(305945005)(83506002)(106356001)(7736002)(16586007)(23726003)(68736007)(53936002)(316002)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR07MB2525; H:jerin; 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; SN2PR07MB2525; 23:Z5LGBKpRdp1IZ2d8nMKtiLVFJqx+1n7/EeJ7kp8WH?= =?us-ascii?Q?mpKxSBC1WOn86TcNfiI7z0GWEvQqo1V8c36+ja9+nX2mGuolW83wEMX7bgVz?= =?us-ascii?Q?Z8sGlXW0ezoW/mdcU0dBiuYmqpakLKLAe3RJmdk6Ioi7GW74QSqGCNMZCS2p?= =?us-ascii?Q?oaHOUGTXYZp07dEtJTDTfBenPySoAU0Bo9baufCQaI2qTfTsYiG4N7eW/VJ8?= =?us-ascii?Q?6ULTywklCCpz5S/NVFXjEEsBKU2+6ZzNe9OJHC9nJ/qf0YPjHoopMV20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nb0Fp2K9xroi+R4X218mufaafGWdw9GXKKhxdLRFs9ljNBbsKOwdOdBQZXusKNFPeyCQOPDXInyHyFWljmk7NOlq8zYAtTKRGqeyzc6ttKogiS7y11aY4/Q SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Feb 2018 13:10:00.9513 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d74d4dfd-afa0-47a3-d9fe-08d574756c9e X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR07MB2525 Subject: Re: [dpdk-dev] [PATCH V2, 1/2] eventdev: add caps API and PMD callback 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: Thu, 15 Feb 2018 13:10:05 -0000 -----Original Message----- > Date: Mon, 15 Jan 2018 16:22:50 +0530 > From: Abhinandan Gujjar > To: jerin.jacob@caviumnetworks.com > CC: dev@dpdk.org, Abhinandan Gujjar , Nikhil > Rao > Subject: [PATCH V2, 1/2] eventdev: add caps API and PMD callback for crypto > adapter > X-Mailer: git-send-email 1.9.1 > > Application gets required information to configure crypto > adapter for cryptodev and eventdev using caps API. > > Signed-off-by: Abhinandan Gujjar > Signed-off-by: Nikhil Rao > --- > > Notes: > V2: > 1. Removed _MULTI_EVENTQ & _MULTI_EVENTQ capabilities Please fix the shared build issue target: x86_64-native-linuxapp-gcc+shared rte_eventdev.o: In function `rte_event_crypto_adapter_caps_get': rte_eventdev.c:(.text+0x4e4): undefined reference to `rte_cryptodev_pmd_is_valid_dev' rte_eventdev.c:(.text+0x4f7): undefined reference to `rte_cryptodev_pmd_get_dev' collect2: error: ld returned 1 exit status > > lib/librte_eventdev/rte_eventdev.c | 25 +++++++++++++++++++++++++ > lib/librte_eventdev/rte_eventdev.h | 33 +++++++++++++++++++++++++++++++++ > lib/librte_eventdev/rte_eventdev_pmd.h | 32 ++++++++++++++++++++++++++++++++ > 3 files changed, 90 insertions(+) > > diff --git a/lib/librte_eventdev/rte_eventdev.c b/lib/librte_eventdev/rte_eventdev.c > index f32c53f..e453667 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_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; Could move the caps check to beginning. > + *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 f1949ff..b442fa2 100644 > --- a/lib/librte_eventdev/rte_eventdev.h > +++ b/lib/librte_eventdev/rte_eventdev.h > @@ -1048,6 +1048,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_CYRPTO_ADAPTER_CAP_INTERNAL_PORT 0x1 s/CYRPTO/CRYPTO > +/**< Flag indicates HW is capable of generating events. How about, generating "crypto completion" events or something similar, > + * Cryptodev can send packets to the event device using internal event port. > + */ > + > +/** > + * @warning > + * @b EXPERIMENTAL: this API may change without prior notice Use the new __experimental tag > + * > + * 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_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 c2fd09c..0c10d99 100644 > --- a/lib/librte_eventdev/rte_eventdev_pmd.h > +++ b/lib/librte_eventdev/rte_eventdev_pmd.h > @@ -569,6 +569,35 @@ typedef int (*eventdev_eth_rx_adapter_stats_reset) > (const struct rte_eventdev *dev, > const struct rte_eth_dev *eth_dev); > > + > +struct rte_cryptodev; > +/** > + * @warning > + * @b EXPERIMENTAL: this API may change without prior notice This is a internal PMD API. So, I think, it does not come in EXPERIMENTAL tag > + * > + * 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); > + > /** Event device operations function pointer table */ > struct rte_eventdev_ops { > eventdev_info_get_t dev_infos_get; /**< Get device info. */ > @@ -623,6 +652,9 @@ struct rte_eventdev_ops { > /**< Get ethernet Rx stats */ > 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 */ Please rebase to latest dpdk-event-next tree. > }; > > /** > -- > 1.9.1 >