From patchwork Thu Dec 27 06:23:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 154559 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp6605660ljp; Wed, 26 Dec 2018 22:25:26 -0800 (PST) X-Google-Smtp-Source: ALg8bN6CvLq53Em28E5jTwewzurrUDvH5VrbJ3ikHZYpw3dUN8up9fXNyoPLtIKZ/OUqnZ7T3Ypt X-Received: by 2002:adf:f052:: with SMTP id t18mr22108774wro.112.1545891926800; Wed, 26 Dec 2018 22:25:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545891926; cv=none; d=google.com; s=arc-20160816; b=ZN3cR5AKdNJ1sYhMloHIbp/TQTQRdvxqp3GEX3eDnXDzY+2Bqx+A0U2tfytRoe76hV IUfDHsEI/StwIoLPWNSaxMGicb7uzKy53zF8JWjqNbvaxtv5Nh8p7V2HuRsc4GsUIyJW Y0ug4gC0b09vj0NRTN4RuCo49yavjzuBXbVjC/tk+13zsQ4pubfPP670fJntc/VIc6Dz R2aPIMVZLlASku764z2FOaV9yPYtQ35T5mDGETraazOp9g3TGBs+4iaCqGcnnLmjAii2 yLUMsRF65vPRda77Zk0zFoU/dfHdDlqQ6NdPcb3QxDKi9Mycr3KREMRWoniZHYtjOtou Q/hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:mime-version :content-transfer-encoding:spamdiagnosticmetadata :spamdiagnosticoutput:content-language:accept-language:in-reply-to :references:message-id:date:thread-index:thread-topic:cc:to:from :dkim-signature; bh=1QrjlbXLAHtsN6Op052Z6NJ6Je29dKuCGmwv9o5gUIc=; b=rtikCiuxw3I7kanZxsIjiJUjK6lNG/lYCMTKPLw9MnkKf/0Gbedqq5Nm0FoQZiv7g+ tpEeLm4+svtW9cE02Sh3ySm8wgM+4ERgkrfxKCtdvrgs9YwWMQyRMDqF/gCMj72feQGY 6abf3u9Tdjiuhdxlr/q6mp4Dbe1G8HdmHYD/BdwGp8wsRb9CGARKBupTbtBIDnDvg4Vb VJJFvcf4W5/FGy02JkTNka3AwxBxTjAVVLvLJ9ULeW+oPbLl2LUoegQjdh81/Zd4j9qX BvurYskz/j2DFbDSoDifw+A7aTe1FY3ryxupNxojGRQcycgINiFi3shr4azzJGqf1Z7O UU/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=ZCFX2WDE; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id v1si18194446wrq.443.2018.12.26.22.25.26; Wed, 26 Dec 2018 22:25:26 -0800 (PST) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=ZCFX2WDE; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DA4DF5F1C; Thu, 27 Dec 2018 07:23:25 +0100 (CET) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-eopbgr140045.outbound.protection.outlook.com [40.107.14.45]) by dpdk.org (Postfix) with ESMTP id 0C7D358FE for ; Thu, 27 Dec 2018 07:23:14 +0100 (CET) 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:X-MS-Exchange-SenderADCheck; bh=1QrjlbXLAHtsN6Op052Z6NJ6Je29dKuCGmwv9o5gUIc=; b=ZCFX2WDEETuPBGHbvDxWwFpnnoSv0Kb+08BXXff+qBKWGUVATjhjSxlfFcG9xdEALgHJe37vBmJrN8bnBm1jGOQ0ZSPIVbJu0enR0mJLU6o+A0EHSOfRmMXSRnpoO5cRamfhpYYMojuPDaciNf8lva3bEuxft5M6C9tBp7gCInA= Received: from VI1PR0401MB2541.eurprd04.prod.outlook.com (10.168.65.19) by VI1PR0401MB2382.eurprd04.prod.outlook.com (10.169.134.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1471.20; Thu, 27 Dec 2018 06:23:13 +0000 Received: from VI1PR0401MB2541.eurprd04.prod.outlook.com ([fe80::555e:164:f8f0:dbb4]) by VI1PR0401MB2541.eurprd04.prod.outlook.com ([fe80::555e:164:f8f0:dbb4%2]) with mapi id 15.20.1471.019; Thu, 27 Dec 2018 06:23:13 +0000 From: Hemant Agrawal To: "dev@dpdk.org" CC: "ferruh.yigit@intel.com" , Shreyansh Jain , Nipun Gupta Thread-Topic: [PATCH 14/20] bus/fslmc: add support for scanning DPDMUX object Thread-Index: AQHUnayl7/UX6DwZJEekykFm3YuFCA== Date: Thu, 27 Dec 2018 06:23:12 +0000 Message-ID: <20181227062233.30781-15-hemant.agrawal@nxp.com> References: <20181227062233.30781-1-hemant.agrawal@nxp.com> In-Reply-To: <20181227062233.30781-1-hemant.agrawal@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [14.143.30.134] x-mailer: git-send-email 2.17.1 x-clientproxiedby: BM1PR01CA0120.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:40::14) To VI1PR0401MB2541.eurprd04.prod.outlook.com (2603:10a6:800:56::19) authentication-results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR0401MB2382; 6:uQv/pl6TL8OPF//nTM7M6YiW1vyE2VlepoYv0d8alsk+wU/kVSs/2IcEtkmlY7bmqZBvASeTGQL6lKeB+08f5G7QC90vR6iM6X9bSCoTAKA7GZmOFpz+lg8uu2dLiXiz/86OQV2cWPt7ktRk1CJ/q/6gUL6F0igfB3ajrWiY7XzStg9cChM6Q7BLGqTSc7UhM0TLYYhpBYVg6+2VeNw7BzOVet68JJbgJjINZmfRr9OblwMJUR4L8Wn5ug2i82jTXNmAaJkOvtxzNvOP1Z2SYjI3VM9kXeD1VNag9BvnnH5DpX3gsgoKxQ/Ad3CnawY2CdJV+oxjTcQWhUk6OLWQ5J/2+Fv0wX5T5SXiVCGKYVbYBQ0fhDfBfL9DigX2Eeh/StQsuq9IgguJxGARjLp20fHSuNVVk/0LqNzciMlp1IDxCl3YplDBd3Jn8bI/Xpwpmzsm1Ew9YdQ23FfAGlxZCA==; 5:M77TgsopOx14OTHUO8UVCVdiLAwxq2qI95jTPaksTrca7/fTEAilO0Azu6x/yDQxiKvII089K4i2hLp+12gv7KF6xqbqVtMPi8aL7L6NPr+R/wM9SLBmOhEsO12+Ggib8Hcig+AMJoNDCy2BjE1ZvutVWVP3HhGqrVtU/2KC/1E=; 7:OHis98KlqFjD+4bLHLsb1IsRtAhE3cVFu8adcOOdEGo77NOAbnKLS8tqJoCNDTCiBZ8btrmoeU4NJdQ0fDSTvYmowlQ3es2vYMM+Xxv9KIndBFaCZiz8uo0StFLuW8hrpmbCzmgsA1OGF2lbzbANCw== x-ms-office365-filtering-correlation-id: eefcb9da-52eb-411a-a9ee-08d66bc3c740 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:VI1PR0401MB2382; x-ms-traffictypediagnostic: VI1PR0401MB2382: x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(3230021)(908002)(999002)(5005026)(6040522)(2401047)(8121501046)(10201501046)(3002001)(93006095)(93001095)(3231475)(944501520)(52105112)(6055026)(6041310)(20161123560045)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(201708071742011)(7699051)(76991095); SRVR:VI1PR0401MB2382; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0401MB2382; x-forefront-prvs: 0899B47777 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(396003)(366004)(376002)(39860400002)(346002)(199004)(189003)(5660300001)(1076003)(26005)(76176011)(186003)(71200400001)(256004)(25786009)(105586002)(4326008)(6436002)(305945005)(11346002)(106356001)(14444005)(446003)(44832011)(476003)(7736002)(55236004)(102836004)(78486014)(486006)(386003)(68736007)(52116002)(86362001)(6506007)(2616005)(71190400001)(66066001)(316002)(54906003)(6116002)(3846002)(2906002)(14454004)(36756003)(99286004)(50226002)(8936002)(1730700003)(81156014)(81166006)(8676002)(6512007)(53936002)(478600001)(97736004)(6486002)(6916009)(5640700003)(2351001)(2501003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0401MB2382; H:VI1PR0401MB2541.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: GVA8QpJi1ogTBHAy7zTsVgieV9cNOHs28MXh3APQ0Eh8+7N7jS4Fe+m+bMLhHvBCTp9xd4jnRjNQY4Jg/5haRE6Aj2uufRJugtljrtLdhbNDqTrskO3v2edeeV2QJcUwu+5/V0li54uc6GU94tJZooc7G9PR40xk/G7iA4RUxtznptX/3jC0YbF8JkJGjvtuzfTrPSzCC0Q5nbAiT6KTIau5imAoVe5aei5n9+dDWf377yU1pfmdTTtLNQv+AQm1ESD8bJSKdCAfxiXxczgcCOrXTDKxO5ZUyHNm3uF9V+6IhGHn4We/7KvXtZfvLlGv spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: eefcb9da-52eb-411a-a9ee-08d66bc3c740 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Dec 2018 06:23:12.9421 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2382 Subject: [dpdk-dev] [PATCH 14/20] bus/fslmc: add support for scanning DPDMUX object 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Nipun Gupta Add support in bus and vfio to scan dpdmux type of objects Signed-off-by: Nipun Gupta --- drivers/bus/fslmc/fslmc_bus.c | 5 ++++- drivers/bus/fslmc/fslmc_vfio.c | 2 ++ drivers/bus/fslmc/rte_fslmc.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c index 565e0148f..fa1505377 100644 --- a/drivers/bus/fslmc/fslmc_bus.c +++ b/drivers/bus/fslmc/fslmc_bus.c @@ -187,6 +187,8 @@ scan_one_fslmc_device(char *dev_name) dev->dev_type = DPAA2_MPORTAL; else if (!strncmp("dpdmai", t_ptr, 6)) dev->dev_type = DPAA2_QDMA; + else if (!strncmp("dpdmux", t_ptr, 6)) + dev->dev_type = DPAA2_MUX; else dev->dev_type = DPAA2_UNKNOWN; @@ -245,7 +247,8 @@ rte_fslmc_parse(const char *name, void *addr) strncmp("dpio", t_ptr, 4) && strncmp("dpci", t_ptr, 4) && strncmp("dpmcp", t_ptr, 5) && - strncmp("dpdmai", t_ptr, 6)) { + strncmp("dpdmai", t_ptr, 6) && + strncmp("dpdmux", t_ptr, 6)) { DPAA2_BUS_ERR("Unknown or unsupported device"); goto err_out; } diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c index ce82a99f6..98768a46c 100644 --- a/drivers/bus/fslmc/fslmc_vfio.c +++ b/drivers/bus/fslmc/fslmc_vfio.c @@ -560,6 +560,7 @@ fslmc_process_iodevices(struct rte_dpaa2_device *dev) case DPAA2_IO: case DPAA2_CI: case DPAA2_BPOOL: + case DPAA2_MUX: TAILQ_FOREACH(object, &dpaa2_obj_list, next) { if (dev->dev_type == object->dev_type) object->create(dev_fd, &device_info, @@ -691,6 +692,7 @@ fslmc_vfio_process_group(void) case DPAA2_IO: case DPAA2_CI: case DPAA2_BPOOL: + case DPAA2_MUX: /* Call the object creation routine and remove the * device entry from device list */ diff --git a/drivers/bus/fslmc/rte_fslmc.h b/drivers/bus/fslmc/rte_fslmc.h index cea5b78f9..5cfb24505 100644 --- a/drivers/bus/fslmc/rte_fslmc.h +++ b/drivers/bus/fslmc/rte_fslmc.h @@ -66,6 +66,7 @@ enum rte_dpaa2_dev_type { DPAA2_CI, /**< DPCI type device */ DPAA2_MPORTAL, /**< DPMCP type device */ DPAA2_QDMA, /**< DPDMAI type device */ + DPAA2_MUX, /**< DPDMUX type device */ /* Unknown device placeholder */ DPAA2_UNKNOWN, DPAA2_DEVTYPE_MAX,