From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0068.outbound.protection.outlook.com [104.47.38.68]) by dpdk.org (Postfix) with ESMTP id 0ECAE99BA for ; Thu, 25 May 2017 20:08:40 +0200 (CEST) Received: from BN6PR03CA0004.namprd03.prod.outlook.com (10.168.230.142) by CY1PR0301MB0907.namprd03.prod.outlook.com (10.160.165.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1101.14; Thu, 25 May 2017 18:08:38 +0000 Received: from BY2FFO11FD034.protection.gbl (2a01:111:f400:7c0c::146) by BN6PR03CA0004.outlook.office365.com (2603:10b6:404:23::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9 via Frontend Transport; Thu, 25 May 2017 18:08:38 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BY2FFO11FD034.mail.protection.outlook.com (10.1.14.219) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1075.5 via Frontend Transport; Thu, 25 May 2017 18:08:37 +0000 Received: from b27504-OptiPlex-790.ap.freescale.net (b27504-OptiPlex-790.ap.freescale.net [10.232.132.60]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v4PI84WE022340; Thu, 25 May 2017 11:08:34 -0700 From: Nipun Gupta To: CC: , , , , , , Nipun Gupta Date: Thu, 25 May 2017 23:37:34 +0530 Message-ID: <1495735671-4917-4-git-send-email-nipun.gupta@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1495735671-4917-1-git-send-email-nipun.gupta@nxp.com> References: <1495735671-4917-1-git-send-email-nipun.gupta@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131402093180569859; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(39410400002)(39450400003)(39400400002)(39840400002)(39850400002)(39380400002)(39860400002)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(9170700003)(47776003)(5003940100001)(50466002)(4326008)(106466001)(48376002)(36756003)(104016004)(2351001)(50986999)(76176999)(8936002)(33646002)(86362001)(105606002)(498600001)(8656002)(6916009)(2950100002)(53936002)(305945005)(356003)(5660300001)(54906002)(8676002)(38730400002)(50226002)(110136004)(77096006)(2906002)(189998001)(81166006)(85426001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0301MB0907; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:ovrnspm; MX:1; A:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD034; 1:Rd18R/TdKJZpv5xB27TbwYoZGZCaQHEqzLRvDS3V/tzOYYiXjWR7Bdhmfg0gl5+gSVeyskQPn5D9kwp6rKLXBz8NwWLVT4bKbHgOEZiwrmnE3T0Enn1S/SWDR1WMERSmT3FZg6HOqabl/w6sTIB8sJiGq3ocxPs+OqAeuS/x55MefUyIk/62x7ghg9NWJzMAMz1qezHZ5hZ19tBl1ad742qu0dphMMmc9wJsRNbLVCS8JKtk7b2LtgGvaO2+iSABZM0RrPuaO7VpYv5bfM39vxDqPOrEvp6C8xW42msdJJislJvf2hMCwXif80FWBQJGCQ3p07sD34gyo5xAGqyRkfgy98nYgqjGa1HLWq15RPceXzhGVbqDKHmlFSzZw5el+NJCKetb31N5E7q9T6m1jYJKtd/Ya1F3mrrjsNeEtrL0k0VFaOF1Rd6u5YHHHyJpd7xqGsu5AGSD27aKwmXtkW5qM+QwT78C6/OOaIYBq+MT58jUZ9jXz9Kyeqd9AUqyX3WJy+IhCh9Y1OTWeeo/1A8YN65dQ0bgr0erF333infpEfm2Cnyk0xz2j96uR5DcEg7dSPCAwutNh3kkqRTbRpajwFJinkWVgNyeLHc+RFmGYa5b8lSb3QB4IZNF2/YU89U077sJwbKiNWMGM1/a7ryN6skP5Clyb/kMuvQ1geY3UY+IirPkzTQXSfUEbtfTWnX+Sv4g2aEc1gpSi+Z7meniktYiVg4Z6PTcfqprXiI7UZP76Nxbku7enj8Qi3sjdYtHuDhKgxFUwdIpGUj0UQ== MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY1PR0301MB0907: X-MS-Office365-Filtering-Correlation-Id: cfe6db89-f9ac-4345-4903-08d4a399113c X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131430075)(201703131517081); SRVR:CY1PR0301MB0907; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB0907; 3:xpe0oFYURdv9yKUWHWLWUJypcv8H5b229ifbpN0WY9UmbdT1T0+7aG8wh3PxMQYnGbR3CPL+mxltsqeZcWneeqpsbEIXyUuVLUGUSjDI3VWK31YCKnt+/IKoGfMb0XazKBWit+Suy3auJZAvetvy3vaLQVzAMo0JFZtdN+P06TIpLIk47w9aKvW/GD9a1rfwyhGPbzfb4Xvz1dUdQTULtMILAORioWCMch8Vw0cFXVIqsy/PmoC1vL8RK5z7lnL9mFFjZGFZOHPdEAS5ZsPA2q/swfTRdK7kD3RjqkOaxy6AO7MeJE6bLeNi9uqS8CU7CaWEUUR9aFsUirpoQ6oJu026J9j3HTeY7aUDVv7bjbT9ZNV7H31cMziH+bUiOa9QC6Mng++Y4Mu34x7cqGbCDG9rOJaNWVH3f7SXtPw/xlET50CgNa4bE1bu6cZZt/jj; 25:x+vLn4voasmNoHrU5PuVfLTZZ6gRiUiw2m1BhoC/tZENB5nFn6qGzuL9VZfVqoE6oofaLfXu6KOlj5kKa9otrNWLh/5c8qK5SF3dyfQUoxzKd7DsQZ/ZWTc3+6Mqy2zkpH6ddZRQOPU1FYqROfJdDk6zxgLOjXg6YvxX2T++X61UEMrCgEU83WxbbSnh97exNDE51Zp7yaGWISBoAKTINapExnN1Pl+jBM7xDCFPIKKqMgJlK03g7Olqc1xSBuTG9P6HPsmAHU/RbRgudQYEfH3UoxS+j7vya99mdU4I/nhXSwgb4Mjy6G/IjCYHTzdFeTSPBSIXQ9OFvEl6EYVqzSihNWOJIzeLSmnIrlpQEcRejGB7+5+Ytr2FZtrVqkUQ5Ih0/R19D71p8yScy4svKKGiZOuOWAmhAoxIzCFP7Y+KmUVqX7Z9j3yM6WetOl8f25WD4YKWbX9z0aJq2RftrLVJoIiO1v4gF0ChcGSunWA= X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB0907; 31:7YWmOgU29J0pXuBqAhyFCUe/nQmggl63gCHxFNHsNQ32w/sREvPJroxWve22dCkk6nqk5xqJk/Yi3/6chUIhi8RA+Vhj+IMr95d/4Lz7XXu6bamkdLTB9OeZEA6HHFRRORVEOWacGJpHC54Fk36NldHE9RLyhtrlQeat3zcffMenDoJ2UbwMtpjMbwczN0qiMrUNP+m+puierpm8RiuxoVDyCrIRTvLg6hZmkdgTNGjFmURymL0m15WW/FsnADdwiaythhBjOZYp+TCu6SqlRQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700054)(100105000095)(100000701054)(100105300095)(100000702054)(100105100095)(6095135)(601004)(2401047)(5005006)(13015025)(13017025)(8121501046)(13023025)(13018025)(13024025)(3002001)(10201501046)(100000703054)(100105400095)(93006095)(93001095)(6055026)(6096035)(20161123563025)(20161123561025)(20161123556025)(20161123565025)(201703131430075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(20161123559100)(100000704054)(100105200095)(100000705054)(100105500095); SRVR:CY1PR0301MB0907; BCL:0; PCL:0; RULEID:(100000800054)(100110000095)(100000801054)(100110300095)(100000802054)(100110100095)(100000803054)(100110400095)(400006)(100000804054)(100110200095); SRVR:CY1PR0301MB0907; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0301MB0907; 4:N4kHGf6ypAx5q7qZ5+zaMuge5jzXHCrywwUi/G2q?= =?us-ascii?Q?VID8GHKvVV1t3KoofRUgZA0OLtiqyDcf0IybAFiSM6GdQWKsr20UB9Ezwrun?= =?us-ascii?Q?Ud9j/wYsWUXqNcyPzAGGTF5+au0MkbfR62zkR3dAMv0q6TkJ0WO0CGwXzqyG?= =?us-ascii?Q?45a196UieKcAIa/4gdth3N+EVVr0wGsQ8Q2JIGUV5o/mGhomcYe+k0AHbR9b?= =?us-ascii?Q?nnWA+5bbRIsj/gbvFPoP8PDZmLY+Ll8mnpZush/E2Eacq9zyMyZCgMKcL44f?= =?us-ascii?Q?ACHLIP7gA2RnpF7/ZeBJGVdqvp44EE5cMNhlm0Hi3KvVEBuEFX7ph8SwiCXi?= =?us-ascii?Q?50XuurIRH1kTiK1zkmhH+smV3hX2tSs8QRubHxF9kjCX3lJixGED52KNRIQP?= =?us-ascii?Q?akQEoGdV6HL+8EcPe2jkq2DhXxZb3/weGyUJjnfxGk55FJKrOrNToGdairkX?= =?us-ascii?Q?R37Nyp1EivnW6LzD8tfdaoa936aiEEeoVlF7t3alPxfVwb/CHm86Kkz8l9Iq?= =?us-ascii?Q?u81/TCg06M/yp0XGBwk7yKRK7so+efj8GulTq3a6M8VO95H59+OAosKHpv1L?= =?us-ascii?Q?Ta4sSIXm0iGSzhAfOWyH5wsQK3YYkPFjsrtbpQ2YJ01JVMW7vm+8S+usdYUk?= =?us-ascii?Q?Gy4LGcBmsGQmZyeTsR13xvVV1Jg6k4czd9IRG3k1nwNoSfbGJ8Ue/I27G70x?= =?us-ascii?Q?TgKDg8SmknxSDeddVKAAEhFEN2eE/Byh/UF+vREHr6/uDIWq/cqGIFwHk7MC?= =?us-ascii?Q?QPT51uvSSLM+5bPSEN2Pfsje+yOpapkJteq6YWBF6+rVSuxkiAx+V+6sGILb?= =?us-ascii?Q?PBd4G9T566liC1bEUVe+XRU5Y2bsBKWQfLX+cETvczFCN06wv3mWETitIOXI?= =?us-ascii?Q?sHSh19YTHyedMszFbtJNaFUS8NjHoVQKIxMyJ6MNBQKg3NJEPvAhkLKVDAoH?= =?us-ascii?Q?3sP2CHgrHMt0Pfzc/zbuQNg5vTpicQ06kPSIWmz5NEatIhpxsXgmBytXmeVp?= =?us-ascii?Q?elt2Kxoqdoxb4uLDF2KSxMH2wkOi996WuzcSC4qyyML9hPhsUO2X7e5+WjiS?= =?us-ascii?Q?JcZ3CVdONa3j9bMFvFQF+CWUtPnhm6rp1cgd8mmAZqPEZtQriQgCm7C2FjzE?= =?us-ascii?Q?V1x1c3vWQHLx+yjvPV+Zzuh/jspOeFK53cIxnvGHmpuQjNWg7iXVOO0ekyU7?= =?us-ascii?Q?4mpjII519ZB5ja15R1qJjR2bNcILYY+xnBvmjWAxuprwzqjBtBHDAvBN0UuC?= =?us-ascii?Q?op29kDXD0H9I2e5OMZ3JfiHxy+cBbIhzyAuXmjzOnGvwNbDv9NuQw45MwVf/?= =?us-ascii?Q?CTMALYGIVRmJkPlN17tHxT9trg2yAPICs9RGSrV30yV5dBJioDfYwJnoHn8U?= =?us-ascii?Q?OgdS9Q=3D=3D?= X-Forefront-PRVS: 0318501FAE X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0301MB0907; 23:H/Db62yrbvo2EkU5IlLGLP/b8N4AKTD8mIyDoQ8?= =?us-ascii?Q?Xm3FI1XE0+s5ugJhvhezMp/T8qu82bWZvLaW8JLZTl/LAD1Olz7/612W9gvi?= =?us-ascii?Q?jLGWetbVFcDNVZFZU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PomKphfH1g2g1YSYawW8fGth+uQZxAATQKurUzngVvUrYYGJyDvTKna5BQCmwo/gHCrYdcnH7kyrKahcpOU+GeBnBwYO5yjwl2Zd8rbkyXEN54box19cDsAAE4ouYf9E2GswrUBGb4IcNt1FlMJhOyu8pAab5fyxNEYH+PUzCsErp9cPjZzr9shsoofT1uv16Piys2lxHzlD5VqhNGn71ZZ2gGP1qj5ENpoNLCiQOX4JGO10p7HFdyu8VzPUBHJVEI1tyooYDqHwvgG9otqqsRfeja55CvvOw7gAnhvMdRJ9NezKg==; 24:b1DrLMEfHKQPGsIHxzh0EhRQ+V/tjeWxrtZs4DQAxVceCtTUR50vrDTZWYgIOkDG0zjhLiCOEKKuqa3YVl6s6GqyVLTmtgyHmhTGtB9sExU=; 7:vTYWRAW+1HtHjxqrMi6eZMP83YJ4xSaZAuh3w0zdH/HMv+K61kSTnhTefhXw4rHZwSN+5Do0BTrPMCl5WBS67b8BGOQ6dl8u9MwDV9pTEeY+kdBT5BLHB6mNc56+pR378gKWe5m7RJtig2jOzK+E5du0pD5QblJWtTVjnyD4gAzPC7W/Za2FP8/iWctkrXjPM+acKImuSoJuI84GAQp+XKwKKha1Aw9gQjrkWz8RQtmoKgowi1o3Wk5OVHxy4uPoOYZko3zefwtKEG/aDUiRrJKTUlBwf2mjTrY5zjLGBcp2JRsPtr6+N5X0ahU5/dY7GT9JQc7H1I/iKNKiWmBZiw== SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2017 18:08:37.8697 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0301MB0907 Subject: [dpdk-dev] [PATCH 03/20] bus/fslmc: integrating dpio and dpbp to object framework 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, 25 May 2017 18:08:40 -0000 This patch removes the existing static call for dpio and dpbp create and add them to object registration framework. This patch also changes the vfio mc object processing to use the framework. Signed-off-by: Hemant Agrawal Signed-off-by: Nipun Gupta --- drivers/bus/fslmc/fslmc_vfio.c | 24 ++++++++++-------------- drivers/bus/fslmc/fslmc_vfio.h | 9 ++------- drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c | 14 +++++++++++--- drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 11 +++++++++-- 4 files changed, 32 insertions(+), 26 deletions(-) diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c index b9ea358..07a9278 100644 --- a/drivers/bus/fslmc/fslmc_vfio.c +++ b/drivers/bus/fslmc/fslmc_vfio.c @@ -377,7 +377,6 @@ int fslmc_vfio_process_group(void) char path[PATH_MAX]; int64_t v_addr; int ndev_count; - int dpio_count = 0, dpbp_count = 0; struct fslmc_vfio_group *group = &vfio_groups[0]; static int process_once; @@ -520,18 +519,17 @@ int fslmc_vfio_process_group(void) object_type, object_id); fslmc_bus_add_device(dev); - } - if (!strcmp(object_type, "dpio")) { - ret = dpaa2_create_dpio_device(vdev, - &device_info, + } else { + /* Parse all other objects */ + struct rte_dpaa2_object *object; + + TAILQ_FOREACH(object, &fslmc_obj_list, next) { + if (!strcmp(object_type, object->name)) + object->create(vdev, &device_info, object_id); - if (!ret) - dpio_count++; - } - if (!strcmp(object_type, "dpbp")) { - ret = dpaa2_create_dpbp_device(object_id); - if (!ret) - dpbp_count++; + else + continue; + } } } closedir(d); @@ -540,8 +538,6 @@ int fslmc_vfio_process_group(void) if (ret) FSLMC_VFIO_LOG(DEBUG, "Error in affining qbman swp %d", ret); - FSLMC_VFIO_LOG(DEBUG, "DPAA2: Added dpbp_count = %d dpio_count=%d\n", - dpbp_count, dpio_count); return 0; FAILURE: diff --git a/drivers/bus/fslmc/fslmc_vfio.h b/drivers/bus/fslmc/fslmc_vfio.h index 58b3acd..ffed62e 100644 --- a/drivers/bus/fslmc/fslmc_vfio.h +++ b/drivers/bus/fslmc/fslmc_vfio.h @@ -39,6 +39,8 @@ #define DPAA2_VENDOR_ID 0x1957 #define DPAA2_MC_DPNI_DEVID 7 #define DPAA2_MC_DPSECI_DEVID 3 +#define DPAA2_MC_DPIO_DEVID 9 +#define DPAA2_MC_DPBP_DEVID 10 #define VFIO_MAX_GRP 1 @@ -90,13 +92,6 @@ int vfio_dmamap_mem_region( int fslmc_vfio_process_group(void); int rte_fslmc_vfio_dmamap(void); -/* create dpio device */ -int dpaa2_create_dpio_device(struct fslmc_vfio_device *vdev, - struct vfio_device_info *obj_info, - int object_id); - -int dpaa2_create_dpbp_device(int dpbp_id); - /** * Register a DPAA2 MC Object driver. * diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c index 2fb285c..7575bf9 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c @@ -56,9 +56,10 @@ TAILQ_HEAD(dpbp_device_list, dpaa2_dpbp_dev); static struct dpbp_device_list *dpbp_dev_list; /*!< DPBP device list */ -int -dpaa2_create_dpbp_device( - int dpbp_id) +static int +dpaa2_create_dpbp_device(struct fslmc_vfio_device *vdev __rte_unused, + struct vfio_device_info *obj_info __rte_unused, + int dpbp_id) { struct dpaa2_dpbp_dev *dpbp_node; int ret; @@ -137,3 +138,10 @@ void dpaa2_free_dpbp_dev(struct dpaa2_dpbp_dev *dpbp) } } } + +static struct rte_dpaa2_object rte_dpaa2_dpbp_obj = { + .object_id = DPAA2_MC_DPBP_DEVID, + .create = dpaa2_create_dpbp_device, +}; + +RTE_PMD_REGISTER_DPAA2_OBJECT(dpbp, rte_dpaa2_dpbp_obj); diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c index a1a58b9..1dcc91f 100644 --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c @@ -320,10 +320,10 @@ static inline struct dpaa2_dpio_dev *dpaa2_get_qbman_swp(void) } } -int +static int dpaa2_create_dpio_device(struct fslmc_vfio_device *vdev, struct vfio_device_info *obj_info, - int object_id) + int object_id) { struct dpaa2_dpio_dev *dpio_dev; struct vfio_region_info reg_info = { .argsz = sizeof(reg_info)}; @@ -443,3 +443,10 @@ static inline struct dpaa2_dpio_dev *dpaa2_get_qbman_swp(void) return -1; } + +static struct rte_dpaa2_object rte_dpaa2_dpio_obj = { + .object_id = DPAA2_MC_DPIO_DEVID, + .create = dpaa2_create_dpio_device, +}; + +RTE_PMD_REGISTER_DPAA2_OBJECT(dpio, rte_dpaa2_dpio_obj); -- 1.9.1