From patchwork Fri Jan 11 12:24:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shreyansh Jain X-Patchwork-Id: 155347 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp517664jaa; Fri, 11 Jan 2019 04:26:51 -0800 (PST) X-Google-Smtp-Source: ALg8bN6LESVEdxwvf9HeAzyzZdQFvU2twhlCn6Am0XN2qTFhq29ELa8tlXnKuFMTKK69BTWqvVAD X-Received: by 2002:a5d:4ec1:: with SMTP id s1mr13228928wrv.225.1547209611237; Fri, 11 Jan 2019 04:26:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547209611; cv=none; d=google.com; s=arc-20160816; b=Oo5hw/tUwa/D1514dIX0QURGJSoqtkaMIVXaxWRSXkSiyUJ7WB9YBFCidfQS7CZM92 LAQhE8Syu22SCng+6sMPCangfnOp5NU0u57vPglLLgjqDT5dD+U9AyFwmcmEu+aHCHb/ yQn6uzWnhoEzbjH+Yeop1ifblFXgSNoF6pKC5frxYkhLfhPUkvJE+Ij5GrsvY1QcEMkI CJcBdazPE8TPqjJ9myhd3FIqFbT3apwGmPR/l5zla9UdVq9LU0kBdZDZvHvNePtJeJb+ +ubfPzASe7bVvy6WtNDWCv7H9d6/5NYs87ldrR6QoQ9i5I5qJ6WNS0Uxn3BkIXS2NdEL CnPw== 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=J19424cRiRK2FiOVS4ht3r/K9X4Z6HFiBTuZfOXTM4i0McTnkDY3UfVDl2Z/ZEkV6j oR+iMxzxW6fVjucz2gMZtpb9V5xKxklb5GSFkj1v5gfw/41HHJguJXQPrI+vS88E9DAI EdV6gIxwSYIsYLOZ5bftOeiy3oA5cbLWEtRY9uZEO9xM5aQCWJOdSaFjphZp2GqhdHQZ 4yV/rA5d/GLQdcPfPAY2ID6bO31ucDFxeCoCtj14Z0ZJtNCKi1uKO+kdZopZtDPL12b4 EyU69pXQga1AQbzQZBln/K1PrGr1+BMqEE29xszQPmE/ReEqlmkypG/D8oHOMYLAxKms KgGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=IMwWMEqa; 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 f23si12619241wml.194.2019.01.11.04.26.51; Fri, 11 Jan 2019 04:26:51 -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=IMwWMEqa; 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 D609E1BC25; Fri, 11 Jan 2019 13:24:55 +0100 (CET) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-eopbgr130045.outbound.protection.outlook.com [40.107.13.45]) by dpdk.org (Postfix) with ESMTP id E1B791BC17 for ; Fri, 11 Jan 2019 13:24:53 +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=IMwWMEqaQGy3YY9tqDfozMduYoE/HYs2bJr4Dfdpf7iRCGiOM2EleiEsG5pWhXC8HGBOBg5FGqLgfMzIhxL4oUKrmh68TQgvDOzERhylZr6EXYvHBKCWnngsQ/uTAGxGq1hS3PrO0HRT4Hxs/Ee2GtPA2I1WtvqabnTH4m+kLxk= Received: from VI1PR04MB4688.eurprd04.prod.outlook.com (20.177.56.80) by VI1PR04MB5455.eurprd04.prod.outlook.com (20.178.121.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1516.14; Fri, 11 Jan 2019 12:24:52 +0000 Received: from VI1PR04MB4688.eurprd04.prod.outlook.com ([fe80::b1eb:7e7e:7b90:7b4]) by VI1PR04MB4688.eurprd04.prod.outlook.com ([fe80::b1eb:7e7e:7b90:7b4%4]) with mapi id 15.20.1516.016; Fri, 11 Jan 2019 12:24:52 +0000 From: Shreyansh Jain To: "dev@dpdk.org" CC: "ferruh.yigit@intel.com" , Nipun Gupta Thread-Topic: [PATCH v3 14/19] bus/fslmc: add support for scanning DPDMUX object Thread-Index: AQHUqainnxsZ324Gi0ypqQpK6+JJbw== Date: Fri, 11 Jan 2019 12:24:52 +0000 Message-ID: <20190111122305.7133-15-shreyansh.jain@nxp.com> References: <20190111115712.6482-1-shreyansh.jain@nxp.com> <20190111122305.7133-1-shreyansh.jain@nxp.com> In-Reply-To: <20190111122305.7133-1-shreyansh.jain@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [14.143.254.130] x-mailer: git-send-email 2.17.1 x-clientproxiedby: TY2PR01CA0017.jpnprd01.prod.outlook.com (2603:1096:404:a::29) To VI1PR04MB4688.eurprd04.prod.outlook.com (2603:10a6:803:71::16) authentication-results: spf=none (sender IP is ) smtp.mailfrom=shreyansh.jain@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR04MB5455; 6:AzsHr1lIqZSuAPITLX+VZeShaLgtNSNvEbPOW/tz/WTugOCIe0wnSvgEBwuzfS/uglla645H50zfAM/k8AgOm4tiOs69gllMh05bGGEu4b6+UZw5iCIvcJQc1ODutjBwp6Xny0XoN29vpIDcyfo/+qVKVTkXMt238wqdB/gF3UzbgS1WVF8KY+Ev1KtOl6W9OTetHy5/om2ZWCidi1cSWAUXcdvG8IktWW//kp2E9rHGEwEnuVD7ef1BBdZmYCHVnFWtlMaUV6AZFIjZXlOQ+dA9PuJq/8ohuOZ1zCllDZwplof/Mjsed9hJrkjchLzXvyb5gCdMOEi2WcRU4DpRljpoNIsddyPWxnx4WqPm49vOdfiRQKDowdTrEFjSnzglSkRpZK9FsCzRfZDoUUrah9CZF9xlwwHoNz50vC2XpHiKsijjIxJvu+JXLmfmE+F8szlapQYyk+JksFeo+86ipA==; 5:2/2SYs8m9cjaAGhfK/Zys9dW/JpwZzwOEYeen8Zocn7kYR8HxN6WDQCpF4ndyhw+yiiLILyJPF5Ce80DjSH6Lct8jSubHG5NvvCrGGZDQ6wp/U9Mt1ipMb7m4Zi+nQ/hldALXZLH2xmklO9TrKXpLT83HmIAfj5LViut2rIZobS+ooQyOuZGFXaX1XpCnfS+hZB71ohYj95kEsE/npWm6g==; 7:Is5Bf3FMwmd6kx/8XoMgT1eWF23J3XjYmqY3gwKo2LkV5jKAK98sNJ0hhrBltgVNjcVeYOCJDIszgwQH+6iL4SgqE0jyaRopzjmF8xllpNhc0iQc4r4OXnlFLOAVlfr+Gt72VTv36XqMI7Q9X61YSA== x-ms-office365-filtering-correlation-id: 01d3e2a9-5d98-4dc6-ca89-08d677bfc967 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600109)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:VI1PR04MB5455; x-ms-traffictypediagnostic: VI1PR04MB5455: x-microsoft-antispam-prvs: x-forefront-prvs: 09144DB0F7 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(366004)(376002)(39860400002)(396003)(346002)(189003)(199004)(66066001)(186003)(86362001)(71200400001)(2351001)(71190400001)(55236004)(386003)(36756003)(6506007)(26005)(99286004)(105586002)(6116002)(14444005)(106356001)(102836004)(2906002)(54906003)(5660300001)(3846002)(256004)(8936002)(97736004)(78486014)(50226002)(2501003)(6486002)(305945005)(6436002)(14454004)(7736002)(8676002)(316002)(1730700003)(81166006)(81156014)(5640700003)(4326008)(2616005)(446003)(6916009)(478600001)(1076003)(52116002)(6512007)(44832011)(486006)(76176011)(53936002)(11346002)(68736007)(476003)(25786009); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB5455; H:VI1PR04MB4688.eurprd04.prod.outlook.com; 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-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 9Y86FKb9DJ8dhB59jGKo+RFygzKDgwsnt40Erja5ifDD/ISrtPdApMNpNY8dWJawVLO6tyOhbRDxyogpVDg94cAUWPDPxJ3fK58v84KGir2G+OI5q+U+P9GpwSUysoW5A5ux3FVfW8yW3K4TWktuB+u515O55dsdKBcqU2VMhzXrWFXuGQrTgijtqx6/jocpqGMGL0tevWXLRgw3DrhkaxZzYksrJtpaLsMIshUa9OuWPooLRkHaXFmLGF5FEXb56QVlVytbwB65hL+Qj8Ayq3OkDaEdDWM0wNJSPu46UO7XPmbONRBvKjKlia+f1HbTnKHdmm2zdK9NLA99e6wWHat0Vrkizp3fFcA0ZpNIOyG4kc5IjNecyDLUBLbJ3j29TxJtbgzi7AoQAxry8rz1KKvNkKN/R6LpT9kEt2fVPHo= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 01d3e2a9-5d98-4dc6-ca89-08d677bfc967 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Jan 2019 12:24:49.7439 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB5455 Subject: [dpdk-dev] [PATCH v3 14/19] 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,