From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0066.outbound.protection.outlook.com [104.47.38.66]) by dpdk.org (Postfix) with ESMTP id A93FA200 for ; Mon, 18 Dec 2017 10:26:02 +0100 (CET) Received: from BLUPR0301CA0016.namprd03.prod.outlook.com (2a01:111:e400:5259::26) by SN2PR03MB2365.namprd03.prod.outlook.com (2603:10b6:804:e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.323.15; Mon, 18 Dec 2017 09:26:01 +0000 Received: from BN1BFFO11FD019.protection.gbl (2a01:111:f400:7c10::1:196) by BLUPR0301CA0016.outlook.office365.com (2a01:111:e400:5259::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.323.15 via Frontend Transport; Mon, 18 Dec 2017 09:26:01 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; caviumnetworks.com; dkim=none (message not signed) header.d=none; caviumnetworks.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 BN1BFFO11FD019.mail.protection.outlook.com (10.58.144.82) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.302.6 via Frontend Transport; Mon, 18 Dec 2017 09:25:49 +0000 Received: from [10.232.133.65] ([10.232.133.65]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id vBI9PvBv008954; Mon, 18 Dec 2017 02:25:58 -0700 To: Jerin Jacob References: <1499170968-23016-1-git-send-email-hemant.agrawal@nxp.com> <1513333483-4372-1-git-send-email-hemant.agrawal@nxp.com> <1513333483-4372-3-git-send-email-hemant.agrawal@nxp.com> <20171218085727.GB20578@jerin> CC: , , From: Hemant Agrawal Message-ID: Date: Mon, 18 Dec 2017 14:55:57 +0530 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20171218085727.GB20578@jerin> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131580627497993951; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(336005)(346002)(376002)(396003)(39860400002)(39380400002)(2980300002)(1110001)(1109001)(339900001)(24454002)(189003)(199004)(229853002)(6246003)(50466002)(561944003)(85426001)(23746002)(356003)(2950100002)(59450400001)(77096006)(64126003)(8676002)(316002)(53936002)(53546011)(97736004)(104016004)(81156014)(4326008)(8936002)(81166006)(31686004)(230700001)(47776003)(5660300001)(31696002)(2906002)(58126008)(83506002)(36756003)(67846002)(93886005)(106466001)(54906003)(105606002)(6916009)(76176011)(65806001)(65956001)(305945005)(68736007)(498600001)(65826007)(86362001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR03MB2365; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD019; 1:51n+TKW0NNrAQzH75YsCPvyoXc318mZQvsAxWJBxPpqbzIzs9LWYZ86pNVRugcIng/gmoYs5+8GMdtkWS9ucRtabQzR8V1J/fwW3FJzaD8nSdZKZ9yoqh50YHrXJf9GN X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5c19d107-0998-48ac-46df-08d545f953ce X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4628075)(201703131517081)(2017052603307); SRVR:SN2PR03MB2365; X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2365; 3:zAjYVswirinPqjjLdwpAb81tvbHwVLtvqWWNgslSF98SUFCfQPNmcSyb9kSUQi7HdsxGsp1O+Ur65pS4EBEKfq4/usRDwJaiH/yKGsar8Q1lcV9yMoaXsMQ2J8gs3yQk37W1/rFECzQXYiNTFytfCH35K5x/55hJpIXkYtoAUP1fNtVF/yW2bptgr78gsHpOwIHtvp6s30Crd1hdGncYWE7/4yjbw5edULjUdG07bK1XAYPUswB7LZIFLh/OK0+ad4NU4tXWOWXhg+ZwYfUWlqaKeqmvYu3pTK32Chqg8Umas/KWdLzQ7FUo9yVACYdO1OSLPEAupMJA6+SUT9qDpZ7lQjDY+z5n5/AYcLHSv7M=; 25:4dUwykJJ9uj0VdDh0Fpepp/ieVg9aAiUtqOS6MMGvNO2A7YmMD/Rw2fOcbjm9fXSEvWrnFMFrW0w2mGJTSCYK0i0v8SQFZLXEVRBM63EAQjtGiJh9rfUvb9PJuTtAvEWCWjTYxAoEYgDw3eDOpw+Pbctpryt41Dw3hDIGPrRtpxH8Eu2VY4XKlAPexhmIgGCKAN0jowfziO6LQ6lWVogz2UyE34U1cvxQD3g1ZRcqetqrTB6s39H6rRCQnT4HTY24Q1jIa+xU7GkwcFk0zHpknD2AFHLsyrsykcheFFQieJNbU+yhzCSqV6knD1JYfgaZ4Yrssv06lroAQ/uuaSPHA== X-MS-TrafficTypeDiagnostic: SN2PR03MB2365: X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2365; 31:1lk+9nzKHYZxBadqj4TqUWS1OkF2AAgunsUmUGnRNXi4/XlXN1wljFzKq2l1Cb6XGsw2S5AxdZO8oAf5/ZjxsV5201ImPzLzpuRnKkVTVwI8t4ArMd+ZDxr4GW9qvvdfremfTJRhMlfvsFqy+lCgf9w9mDL5MZv2NaxFt84q7Acn/dm4DU2XD+0bW1dyXWLJ3/cGSrNgfWoGz6CuaOqC2QhSk+v6WPyZD36pIfgJkdI=; 4:v241lv5EgChz9hALI9zYTFPiALmVov5i3ela3Q18o4Cgv9JoxVGTMJoFj40LV/h9TvdB0C74hO20qdBrIiJ+x4t/FYS3WOJ6rUjCzn0x7TOUQyJSc+IXP2XTrBaRgCtr+WNBesGWSkOo5pUkiYMucL0O22rba0165+p/2+yIObHB4JTgj1vW7LmMlppghKvrMKSAzc5r+jA/wIBsDY8U1EcQFNjMTcfWlJ3PTW26z0Hd/AR3DVX32hufDlAi2a82meMkMkHaMxZHqjNaXlC/IQOtghtw/871CiagOACmGcVi7m7KpStyuLEKx0sXNiHD X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(5005006)(8121501046)(3002001)(3231023)(93006095)(93001095)(10201501046)(6055026)(6096035)(20161123561025)(201703131430075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(20161123563025)(20161123565025)(20161123559100)(20161123556025)(201708071742011); SRVR:SN2PR03MB2365; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:SN2PR03MB2365; X-Forefront-PRVS: 0525BB0ADF X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; SN2PR03MB2365; 23:8YJs7Wz2PDs98EpOssbxWIRGqwMPAErvoxHZ3?= =?Windows-1252?Q?OTQCXouVKF7dTI4UKM3fgG2WjmmTb1Tw/ijo/bxNiKfchjNobnlsFAaN?= =?Windows-1252?Q?3twqEz2xNbrES53hUFXO2RDIqxyXq2LVe7IKqFw1uAFMDm8LSwjPVLgl?= =?Windows-1252?Q?r3x85cmfg1cyum4Hf5DQRPL579n0U0v1HxTFI2kQna355UDXyMPTcymB?= =?Windows-1252?Q?xN/rFpkRhwzN3U6EXWe0ULk2ulzCNObqNyHtpRKpMUnmakZYIoqScs+4?= =?Windows-1252?Q?qN6eWOxhV+cc6byuG3ytjHJV36UjDeMGRvuOBCxfFaKwmjH/jlASqjjH?= =?Windows-1252?Q?Ze883MxftcBxk9niDIgrMg7Zhv9rjH8NDP7CsApGi/WAjbAUAwsP+NkV?= =?Windows-1252?Q?losTf22y5BO+jbKaiQkqWofsxM8gwOysIUR1HjOfd35wQXDZP4+FEhru?= =?Windows-1252?Q?8ViQSzwHz1IpCE7xRRpflDSixBEj8OKnKKnLcWdrprIBMu5yxTd1lreD?= =?Windows-1252?Q?aUdzQZc0RvqpCrc4ssxPQvJMJBIYf9XYeguLVyBocr5SmHZZqx/TWQ9C?= =?Windows-1252?Q?6d+6YsWqGoB75yafZK4bUVK6LV6/DU9lS3hkEm7NOp2f2ErDqz70t416?= =?Windows-1252?Q?th8H0l8Ik6R6rn726186PeqoZOcHESSt3fJqj3gLMk6OE4KSEZ4IMa0b?= =?Windows-1252?Q?ccBANcvsbX7j2H+D2jH3s8MyJHm+1BGuaAArYx77lqVnF/LEYSIiUEwK?= =?Windows-1252?Q?Q4zaFlWIG+dfM0fcmmP68eRY6DI0SOyoCGD5Ndn6rTDb7L0Jf4DJfymD?= =?Windows-1252?Q?lgWfbeLr4RHFe/nJcaldeo7WJ1CTibfJiOZseQHfSDvNTDRTVmjPAHiU?= =?Windows-1252?Q?Q/M2abwvxP1A1tN+rA8j/Nbo2gm2rH4Tj2OuLyz7v/4KDG5xGxqX/hkL?= =?Windows-1252?Q?nO3MUwKOwrGrBbQSpyPdOigbmGblB2FxsH2svmrdJvEVzhhw1Npyet6W?= =?Windows-1252?Q?w3kwy5dEsGS5mGqSARxQVgYCmTYB71gQ9X/mQ+K5w1s9Be5UX7vFo+uD?= =?Windows-1252?Q?18riRSEKOJBXSBGPDuho28x8k/HCAhM0zdPoXbIsrmasuJ24qwz2vUL6?= =?Windows-1252?Q?vPz8C4ejNeENBfkBuLhYbPPUv/395MVdE5ff3acapd5Xh/r7AqpiMG4W?= =?Windows-1252?Q?CtgFMfPWRtFpYC/3Nyh9RySrkYQp+M1A24JtmvuKNp0ZhDwTBN/pkuiw?= =?Windows-1252?Q?3s+VDISIvVQnzt+tTAMJgN3PTmJ60RDRaWHKowqNzTYi1wUngqMZmzQ6?= =?Windows-1252?Q?M87dTIcm9rFN583XXxv5SiMc5byz1DmvIBY6QUS56MFjmcISQJ8LiWuz?= =?Windows-1252?Q?yFHaXQIK/WqUQPuQdgEjsczWoMY743hWSfgAaGNZbYOGnAtyk06EK+D3?= =?Windows-1252?Q?rBib6t7vEv7FMmAtKDA?= X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2365; 6:ZJEphQGJVVQc0b9SIhS6KWZ++AeUb+A8juUN5uIoo86U/QF+2oaAWXhInvA9wunKI2TRhnuBR9Hs9lZ1dxiX5flUE9Bwp0ttqJo1MCzt15NXS7YEghkLvwvvt1CI3zDWkjbk8KBL6DVUMm7TEssfqlrhIPMvGzyhzPemgoAwPbFsXqO+Dmz1ycUR2I64339dCGvtl/ZEDaoNkfcjf5J9k291aMddiPd6eg07f+8hn4hy74na+R3eLWcmEsLHoyltA8DlExBHRgRNXHHzqAKtPYztmD3iXxq7M7uRuJX+fMvEQaxjoSttSB2rJMbwyuHN+zUu1fN1lLd9cwQGlAARxmoEPuLE58olAZiFayi8uus=; 5:OzWPrMt4IJac2bsBPiTbBBKe178E7uDNAT0TjC5uuGNhmLJIBPRhgO2QMIi01zhRD3WGeOeuZNjBmIgxeKHW6mLJDD9gEgDEh2Nrvq6d9PKsMGe3lJH9A7lS7rBo/M6PFQ89fQjYdvKocKKGr4e1Mp0S94HpNIDbBH6QwZ8QIac=; 24:u9pEpL2OW8f71KytHWRDXltZwvmP6wXBexMReKTqI4ncJzfV67cYqwwG5kypRQRGleCErxCIoMiUflRy/TM1/c6e2nP1USyd/xAilvvgdX8=; 7:lpBwAlzq3IYX8Q2sF0hnbUw6B1Vl290Aq7yyKatfU4yGmFlwiSk1k90gCcJoeZVBQG68996vcts6YMspQaR9eUE+qNGsYGNerVB6c/X6eEXwN7b1jQx/WiRQRC01md+41CEJfC3ylA9n1DCynEiXBQTmHzoueoU8JH9Ex6YIgqK7ed4YdsTP2RFj5MAzat/xU9M3K7gYEqx+uDHT3WCqWLsZ+55UqmJB7hVnCvDL0quSC2Df+MgSb3WL0tAuJ1AC SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Dec 2017 09:25:49.6121 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5c19d107-0998-48ac-46df-08d545f953ce 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: SN2PR03MB2365 Subject: Re: [dpdk-dev] [PATCH 2/2] dpaa2: register dpaa2 mempool ops as active mempool 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: Mon, 18 Dec 2017 09:26:03 -0000 On 12/18/2017 2:27 PM, Jerin Jacob wrote: ... >> diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c >> index 334e1f5..5a6f292 100644 >> --- a/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c >> +++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c >> @@ -64,6 +64,7 @@ dpaa2_create_dpbp_device(int vdev_fd __rte_unused, >> { >> struct dpaa2_dpbp_dev *dpbp_node; >> int ret; >> + static int active_pool; >> >> /* Allocate DPAA2 dpbp handle */ >> dpbp_node = rte_malloc(NULL, sizeof(struct dpaa2_dpbp_dev), 0); >> @@ -100,6 +101,11 @@ dpaa2_create_dpbp_device(int vdev_fd __rte_unused, >> >> RTE_LOG(DEBUG, PMD, "DPAA2: Added [dpbp.%d]\n", dpbp_id); >> >> + if (!active_pool) { > > I think, this global variable can be avoided. Why it needs to be under > active_pool? > This code register the active pool when it physically detect a instance of hw mempool on bus. There can be more than one objects of dpaa2 mempool. Yes! we can do avoid it as the current registration code proposal will not allow re-registration.