From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30081.outbound.protection.outlook.com [40.107.3.81]) by dpdk.org (Postfix) with ESMTP id 476E537B7 for ; Thu, 3 May 2018 18:34:28 +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=nQc/pp8WaQjzlnG0MVWBSMRw8lChu/ezRG8/EvtbxOo=; b=TCrFEONrjgKN6xplc+511V1lsOpGSOY8uHHi23Q750YzN3M/gMpV19UrNav+yO9mfe+k3pDsKOcAQjR/PuPW/m8YPRaeYom2powIf/mDgrfN6/ycmCXA9qsotndPg0GV9NWjoCdvkWGi2Ct6b5pUEsQhS9hR/jN1vbc9Z9g3PGE= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=nipun.gupta@nxp.com; Received: from b27504-OptiPlex-790.ap.freescale.net (14.142.187.166) by HE1PR0401MB2425.eurprd04.prod.outlook.com (2603:10a6:3:25::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.715.18; Thu, 3 May 2018 16:34:25 +0000 From: Nipun Gupta To: thomas@monjalon.net, hemant.agrawal@nxp.com, shreyansh.jain@nxp.com Cc: dev@dpdk.org, Nipun Gupta Date: Thu, 3 May 2018 22:03:51 +0530 Message-Id: <1525365233-5956-6-git-send-email-nipun.gupta@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1525365233-5956-1-git-send-email-nipun.gupta@nxp.com> References: <1525281329-27984-1-git-send-email-nipun.gupta@nxp.com> <1525365233-5956-1-git-send-email-nipun.gupta@nxp.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: PN1PR0101CA0071.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:d::33) To HE1PR0401MB2425.eurprd04.prod.outlook.com (2603:10a6:3:25::22) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:HE1PR0401MB2425; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0401MB2425; 3:gPgeehf2wcGzUchyMJNgYvoAw4CAfgs7ZrGssmSu8gwZP3AMv2hfR25nYp1QsDtRRl5QH1winNCSd9wuHT20+b40uAQLJtoI74FRck5iyBPvSToOOvajtNjRqoidc20Qapj45u8xl4uTGvE/ZQaCFJCUgyPsqODvML5WuzaSNr2BYdxRnVFg/BOpMFYbJkKB9uZUojH7Vrccj64X+77CGkjR/EfCVasPw29MDoYHKAy5TncxWlKw9SM8MDM56YKQ; 25:m919C3hC2HRyDot2PHfLfLoao+kKRXL87PwqtcHrGmbirASMl5/H0xsCknWaTDJLa89HpnhLy/sqpiaxTDUYTGX6oEy7IKI5Je8JC0+gXScXahO4SYrdsEvqXY7h6a8v7YS0cOnauIn1720T4+tOGkkxhyEX9f5smM44UmSrs/ca3MjRO37ADh2LlcjiNe+SNl8oyk38zXDzuLAgsrsW03v301bE5KSVBEDTg1HaQePo6WKShgkDWfiqpdb6VTHLrbchwNlUds7A1QMfnCOZX+p9ioP6Wn8rhAs570Wf91v/2nZiWcDOLCsixbHxHslWk1T5TpdQFdyDV8tRThQp0g==; 31:SJgtKYYofyV1S1/a35F+fAQ+vNGYuyfIsh+PQlacS1kgBSXJqqQSfWuQ97L0PDCD1ULGU3lfeACd+u7F1KMdWB5FCkCdsUHCw1916oF28BpFGpqIGbEGHKEQpFXk6gPGppVVcHBI2TvILHOluTk3Gu1x+i+0KFuADTOJZZ8vkNJsgUTN2gFETJOkSqpdW9L/8GKQk5h8jqA5WTgXX8YWbVF0DN4f3INStyQqP2h6FUw= X-MS-TrafficTypeDiagnostic: HE1PR0401MB2425: X-Microsoft-Exchange-Diagnostics: 1; HE1PR0401MB2425; 20:hWkQpRHag984YzTGxL+gaXXgilL6NGmqGDJgvZEcLtNDiL0qAqgqzogVAVZUBdV+93hJyKOMWXOI7IbmzbEpkZjMeqpkPU0av0dromDLXecRFvGu8R9rUcLu2A9XimHJghzSbcsn1d+jWAPY/WjrHtBVdWJzr7sH2CEFou2WOdgrC/sICC1ZbU6q+179H4tIFx+OxojDTwT0wc0wvCMBOs8NTyVnMh/cXRXa4Pt136zzqVkVWSbe0mmz7bs8F6HtNs8parf6aDL6W3xIOTvJFmQ9PReaz+LJmhA6aOIEK0qoBrHGEtEspWmp6Y4jpamZ0J1Z8G6pjtSMBZ8WOqRdBWhTCmnpzrRlmfWxKESkmcwvhYeYVzCPGFzLTnYn2xsZSS8MpXmEZ0y/pHbqb3wIvGGPt/ytRCDyrFKXWOwnFx7kspU2MUjOHJkvRnxKZfBjeji6DiGr53auYlWppwa7gDTerurJnAoPPByf1bUTWXN5YVPiAwtirpkF606xHBZX; 4:6aNRZaWbygQCFRU0JH7bLobB7sEnCn7ddS4aC6hUhMHH7OcZ8z22gqcyMu0yv+Vt4FYzNGqlYeVMHT/5INGuTK9RRRBijTd89W7W/+QY8Ae0B1AU5/oq1WdOmGhEoQTNfclH+ezC4D7Bdfk5GkpYZLl2wtaCYjvyjdE/280EliakHM9RHc8I7WjfZxm+5ElMm2HlqCLas55UdAI8oAhQlD5rteivE05NdbnJEyMUbchJnIlzvp/lY3NDVPGpL/hjjMose6QmSht6+7ftqyZdzU9qGpuY3Spv+I8kWxav5PdMmskqr+KuoV11Sal3RDs2 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231254)(944501410)(52105095)(10201501046)(3002001)(6055026)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123560045)(20161123562045)(6072148)(201708071742011); SRVR:HE1PR0401MB2425; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0401MB2425; X-Forefront-PRVS: 066153096A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(39380400002)(396003)(39860400002)(346002)(376002)(189003)(199004)(86362001)(97736004)(6486002)(68736007)(478600001)(5009440100003)(316002)(16586007)(6512007)(5660300001)(4326008)(48376002)(106356001)(105586002)(53936002)(25786009)(8936002)(36756003)(81156014)(81166006)(47776003)(305945005)(8676002)(26005)(2906002)(66066001)(956004)(50226002)(7736002)(50466002)(6666003)(6636002)(11346002)(2616005)(386003)(6116002)(6506007)(186003)(55236004)(3846002)(76176011)(52116002)(486006)(16526019)(446003)(51416003)(44832011)(476003)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0401MB2425; H:b27504-OptiPlex-790.ap.freescale.net; 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: =?us-ascii?Q?1; HE1PR0401MB2425; 23:SmA62X6Aulutf0Ib3C/L+Vpqxfp0DGR+j8Gxb8m?= =?us-ascii?Q?qborRwAexW+SOq6zIv3/TQrIO+yfSG+rRRrSGYqyAg6pEwUkDMWVydt3Vjgi?= =?us-ascii?Q?K0goePRDg0xrwJhLgjmUDrT80CzbBVwOdIqUm4UYDn0nw+j00+Fz6vGFB13T?= =?us-ascii?Q?FETOOgMi9is1xsou3aQ/GrXTJDyu19CJjq/+6SHKUBzOsOHzzQQKBK/SWcGJ?= =?us-ascii?Q?3vnkcYZyj71hmO2w1qzyaYXV9atvL62O2kQCkiBlNkyw/IMNzk0NOI+DWxdM?= =?us-ascii?Q?cUs9vQ0Hw4UT/bDbjb00w1+g57lZGPCoxLZIC5lzJoI81Y1hOI+WBTjWFA9d?= =?us-ascii?Q?syzo8JF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e/v5nidK212g= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HE1PR0401MB2425; 7:y1mNmz8dWgOSkfvdj5KyLNaY7YEwNC+4l+tbEzTm+joEGgpLCbzb7h4jhahoNXaiBhkBFn2X5sUDoATnGdLWgCU+9+EQ8eC3oVCkfpto404unwDRGATjI8Bl7S3TEpXSH9/JLQHWX7CipZqa6IcQZ155wsYDBf6ANGTs2VcZLf6J4euQEEdD9OXRNaNLSMHLvFRE8hr68gKG7AYH16U6oi2llirr81g4dMb+l0yaPGIuSIlXc1X8tGvdbjOZBQkc X-MS-Office365-Filtering-Correlation-Id: 1be68f1f-8c17-45fe-6d55-08d5b113bc96 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 May 2018 16:34:25.7544 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1be68f1f-8c17-45fe-6d55-08d5b113bc96 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0401MB2425 Subject: [dpdk-dev] [PATCH v5 5/7] raw/dpaa2_cmdif: add attribute get functionality 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, 03 May 2018 16:34:28 -0000 Signed-off-by: Nipun Gupta --- drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c b/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c index e3e2b64..bdd7c16 100644 --- a/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c +++ b/drivers/raw/dpaa2_cmdif/dpaa2_cmdif.c @@ -29,7 +29,32 @@ /* CMDIF driver object */ static struct rte_vdev_driver dpaa2_cmdif_drv; +/* + * This API provides the DPCI device ID in 'attr_value'. + * The device ID shall be passed by GPP to the AIOP using CMDIF commands. + */ +static int +dpaa2_cmdif_get_attr(struct rte_rawdev *dev, + const char *attr_name, + uint64_t *attr_value) +{ + struct dpaa2_dpci_dev *cidev = dev->dev_private; + + DPAA2_CMDIF_FUNC_TRACE(); + + RTE_SET_USED(attr_name); + + if (!attr_value) { + DPAA2_CMDIF_ERR("Invalid arguments for getting attributes"); + return -EINVAL; + } + *attr_value = cidev->dpci_id; + + return 0; +} + static const struct rte_rawdev_ops dpaa2_cmdif_ops = { + .attr_get = dpaa2_cmdif_get_attr, }; static int -- 1.9.1