From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0066.outbound.protection.outlook.com [104.47.32.66]) by dpdk.org (Postfix) with ESMTP id AA2771B1A8 for ; Tue, 19 Sep 2017 16:06:24 +0200 (CEST) Received: from BN6PR03CA0094.namprd03.prod.outlook.com (10.164.122.160) by CY1PR03MB2361.namprd03.prod.outlook.com (10.166.207.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.11; Tue, 19 Sep 2017 14:06:23 +0000 Received: from BL2FFO11FD050.protection.gbl (2a01:111:f400:7c09::109) by BN6PR03CA0094.outlook.office365.com (2603:10b6:405:6f::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.56.11 via Frontend Transport; Tue, 19 Sep 2017 14:06:23 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; intel.com; dkim=none (message not signed) header.d=none;intel.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 BL2FFO11FD050.mail.protection.outlook.com (10.173.161.212) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.35.14 via Frontend Transport; Tue, 19 Sep 2017 14:06:22 +0000 Received: from [10.232.14.39] ([10.232.14.39]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v8JE6K4m007922; Tue, 19 Sep 2017 07:06:21 -0700 To: Ferruh Yigit CC: , References: <20170823141213.25476-1-shreyansh.jain@nxp.com> <20170909112132.13936-1-shreyansh.jain@nxp.com> <20170909112132.13936-8-shreyansh.jain@nxp.com> <144b891a-5457-5a3e-5c0d-33ef02cccc07@intel.com> From: Shreyansh Jain Message-ID: <34825c0c-3d08-624e-d6a6-97846d4db4db@nxp.com> Date: Tue, 19 Sep 2017 19:47:18 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <144b891a-5457-5a3e-5c0d-33ef02cccc07@intel.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131503035828915302; (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)(39860400002)(39380400002)(346002)(376002)(2980300002)(1110001)(1109001)(339900001)(3190300001)(377454003)(24454002)(199003)(189002)(50986999)(2950100002)(50466002)(4326008)(65826007)(305945005)(104016004)(106466001)(356003)(53936002)(8936002)(97736004)(77096006)(53546010)(68736007)(76176999)(54906002)(6246003)(229853002)(105606002)(6306002)(54356999)(6666003)(64126003)(5660300001)(8676002)(81156014)(81166006)(6916009)(31686004)(83506001)(8656003)(23676002)(189998001)(316002)(85426001)(47776003)(65806001)(65956001)(498600001)(2906002)(58126008)(93886005)(33646002)(31696002)(230700001)(86362001)(36756003)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR03MB2361; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD050; 1:G8XlTzIHtDwPvNM8pkAv0Sgfa/InHlcnvVJfEfM3lRZ8zhMfcLcgjk/8Brl4GPSbTmNKBGpCoSFzth1A6xcP/TJft9397nhDoW7/lMO0V67kw6AnA5G/A4N/KfaCGCNp X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 492f4a2f-9d38-4ca8-6b08-08d4ff679bec X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(2017052603199)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:CY1PR03MB2361; X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB2361; 3:/MhNNxSE3zLEGfmX7eBSuhnKIkwQSJHGm9xEbQzY0HBqN1ZjxTirgsiAv1n54bhzta5ingCls2XTS+ngkIKPifPrvJ6pgdHBN/uEYBH6JPchq3KQLlvXSIHLvQVtPjmHn9XM2vFjlLFurKE5qLADPFKgrziLjuI+3IPVkZgxEsTTgLCih57AMIxJ3bRVFtuJ+ETZje3ED0GEQU3r3QoULcqXE+efpHXmMCEL441nBCJTH3LIycrEjDmDd0c/PPGR1JVOfn1BIqtCqkU/gg7P+91JeTI3PB96jkpKTD4Hg+EcknmmD76s0+eZMKFBgcPwotAnyO1gfokCnIXNjKzasL2E7EKbAd0mXDcIQzWovzc=; 25:rqLbiapJUxd9djUjsCuQsJQHYi39vU5PApTR/3Lq+O6FkiyecTPr87LjrRcywvDRZQbU+/GOF4i0bu7JhC1UBdfl1Y8ZLAsrcTssDMnPEr6jHif4fkdAiwXc8uNukZwfckNFWpypltG5/YpJrWWFBeR7ogcOollS+NHT42ZQCLWUveZEL/b64Fv3a0ts8mYnARv5E2FCE0JUx2iBihmpKTPASolKAX6ezyqooe8+OfdklYo17UxAbbZ/xo2spmBNVEKJpVa8bqoOTcpX7yJO0OlH3Rrt6pNnGqPlno5ZB3B5NxVnYKiGDIqdA4oA+zrPPgRmXahRw2tR9yZjn9upXA== X-MS-TrafficTypeDiagnostic: CY1PR03MB2361: X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB2361; 31:DRhlLm2QCQl3uciLSIVCl4kluMr+cGW1GiGOrxxBp8PTL+RBErdNWLeqoTuZm3ei14rzCIWGx4WqBuYGz+KL71quElfimQ0MYquA+9bwzazUHfjLb6jA3QQ14Z0AWiHz1/LlVUfwawOpzFmWJFnwfeX2ApmgcUk7FcV41O7c1Hx3wKmARrbZih1xz3JKl5FwiRW8NUjxGxbXmNXfXZJCbXbiMJU/yD5xLpQZaccyfno=; 4:FrjLeb3qt2hmpVKHE19MUwnYioC1Ojkheh4oUYFj41et88s0NhKd1JOUrXxuPWw14SP7tiKthJAb345xE85jLQ4olhevUWp8NrFJFLa02+BITd1xHLnnee9+YzjZ036HJfraysErVETOuXFvCAbn2R4Bgw5G1MTym1NMr163NmPLCOtcUGDxcLxbYvgDWQD2xgETzYYTkkfXZVFIqYzT2CFzwTplDkgjW9Wx/B81Jb9dcrBbkqHDwRZxpqZSmQPqbl9H2G2InOoXbyD0quvADmHEfQzzir89sWLKKDfIvYppke2UIT7LrC3f68Fu8/w7bzpdUDfEBB/8hymdXqNY/4gK4a1Ead45SG2FBo+nY8eO9G5TJcYLjapjR4MJMCzw4r0sL9PpQt0g/nY3NcGQeHP7ZyvoJBF4EX3HfS+2ieHr3l+MWnXChuQUhtBTDOVRu871dvyUJZvkZm/X6tqeig== X-Exchange-Antispam-Report-Test: UriScan:(278428928389397)(166708455590820)(35073007944872)(185117386973197)(227817650892897)(275809806118684); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(2401047)(5005006)(8121501046)(10201501046)(3002001)(100000703101)(100105400095)(93006095)(93001095)(6055026)(6096035)(20161123565025)(20161123563025)(20161123561025)(20161123556025)(201703131430075)(201703131448075)(201703131433075)(201703161259150)(201703151042153)(20161123559100)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY1PR03MB2361; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(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ug6DynCmDWcHu/MQAcC4cqdAOLVfjNtOYCTEHbIi9dVscWa+FCxX5jYOfIXHF+5l91n3rp7ANHUiJKedIjrfzShPbUCYKrh2VLPzev1grlukirqjMhsQPhaZEQpSCuGL4PGgSZkHKI++5WhayLXRNpvg5OgAuRyKmTGXb5zvvYUwiinY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Sep 2017 14:06:22.7199 (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: CY1PR03MB2361 Subject: Re: [dpdk-dev] [PATCH v4 07/41] bus/dpaa: enable DPAA IOCTL portal driver 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: Tue, 19 Sep 2017 14:06:25 -0000 On Monday 18 September 2017 08:21 PM, Ferruh Yigit wrote: > On 9/9/2017 12:20 PM, Shreyansh Jain wrote: >> Userspace applications interact with DPAA blocks using this IOCTL driver. >> >> Signed-off-by: Geoff Thorpe >> Signed-off-by: Hemant Agrawal >> Signed-off-by: Shreyansh Jain > > <...> > >> +static int fd = -1; >> +static pthread_mutex_t fd_init_lock = PTHREAD_MUTEX_INITIALIZER; >> + >> +static int check_fd(void) >> +{ >> + int ret; >> + >> + if (fd >= 0) >> + return 0; >> + ret = pthread_mutex_lock(&fd_init_lock); > > Do you need to link against pthred library for this": > LDLIBS += -lpthread We are already doing that in driver/bus/dpaa/Makefile. Only issue is that I have introduced that two patches from this. I will fix this. > > <...> > >> +/* The process device underlies process-wide user/kernel interactions, such as >> + * mapping dma_mem memory and providing accompanying ioctl()s. (This isn't used >> + * for portals, which use one UIO device each.). >> + */ >> +#define PROCESS_PATH "/dev/fsl-usdpaa" > > Who is creating this file, who is responsible to responding ioctl() > calls, there must a kernel module, right? This is provided by Userspace DPAA (usdpaa) drivers in the QorIQ kernel. This is currently part of the NXP SDK (https://lsdk.github.io/components.html) for DPAA boards. (https://github.com/qoriq-open-source/linux). We are still in process of pushing it to upstream. So, assumption is that DPAA DPDK driver will only work with this SDK until the Linux Kernel upstreaming completes. I guess I had documented this in dpaa.rst but if not, I will explicitly add this. > > <...> >