From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0063.outbound.protection.outlook.com [104.47.37.63]) by dpdk.org (Postfix) with ESMTP id DC8073DC for ; Tue, 13 Jun 2017 06:43:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=ZUSdOyXhd+jPyyQJJSknUkOvpDtVHevz1W38yUbSG1I=; b=c0kzkr4Y+g0RFJXIJgKhxrRkDa7pSPYbfxM8iYsaz0PyTcFh4sL3S0v9HYXPDrulF8kRbqv8JmeXJXNh2dHIwiswLJZdGW/rVAY0EjTOKxXXEP9tvFwtj6RgGOQPsaQ7N3Qp0T3J+A4Mx4FV/6SiUSwQ5IOQQGpw8i1a3u4QpAw= Authentication-Results: monjalon.net; dkim=none (message not signed) header.d=none;monjalon.net; dmarc=none action=none header.from=caviumnetworks.com; Received: from jerin (111.93.218.67) by BY1PR0701MB1724.namprd07.prod.outlook.com (10.162.111.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1157.12; Tue, 13 Jun 2017 04:43:50 +0000 Date: Tue, 13 Jun 2017 10:13:35 +0530 From: Jerin Jacob To: Thomas Monjalon Cc: dev@dpdk.org, ferruh.yigit@intel.com Message-ID: <20170613044333.GA5794@jerin> References: <20170608114414.8787-1-jerin.jacob@caviumnetworks.com> <20170609102746.13828-1-jerin.jacob@caviumnetworks.com> <11032075.7h2FW7WDNx@xps> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <11032075.7h2FW7WDNx@xps> User-Agent: Mutt/1.8.3 (2017-05-23) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: MA1PR01CA0107.INDPRD01.PROD.OUTLOOK.COM (10.174.56.151) To BY1PR0701MB1724.namprd07.prod.outlook.com (10.162.111.143) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY1PR0701MB1724: X-MS-Office365-Filtering-Correlation-Id: a6adb9f0-03d8-478e-a53f-08d4b216ca64 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BY1PR0701MB1724; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1724; 3:etUua9gG8xqB0I1Yjm2jdPWfhUmvc9VUuYJIfcix5PJGkv0kfKeD94JZRV05avwGQME/xRQ+Bx6XDw1RcfAGhwr9YJ98mavToWRVz+pJZiTHN+eozGb75pK08F58B8odmluVsHqCrRIIj81hL0XRacUdrcIdxEEKUBx30kwTikrkaNvPlD2KG3KhE4hgRxwIZ/G33LXCcTRcTxbZsP05Xb7EJMyx/jPh/tKMF+jc6GxlyIKcOS4/G2bQk7u+K/IWFrqh7onTgOrs4E/I3LgV9vMgmp1Cy6Gj5Vze0+jVLLwQjiSNCf2z3sgbJaes1zQWHQKb6MBEETIRRRqQJFiSFw==; 25:HYMd7Jpsg8je6uS2mBIRv478rP3T1hQTieff7LKHGdLTDFrUHRwi5PqMPHe/Da9/zGoUBHkZnq6aQ7kOqacQIO3ytQK+K6p1Y9qhn6KMIzP6oTjUWm5yhjWKgDxhUPsXTUV0ZI19JXpg3VavEljK9xtyxsn6bkPFFZw+eih11TphtO/RuVQfWOYdjRJcwYFXd8rjnOJDivsMAfEhhjm9Fyu1rB/mz1Cjh0O3VNEuQa9f6PdIVLhPwqB/n1hMnbqx3R5K6QPy2XOES8huKnOD0GoRXKIB58kMqmj6ZI/+j2EAMrNgrYYReK/4UuTiz+YoQ+iSXmcao+XBoJXCJtXBqLzIo4ygyGzUt3tcEWYgLZX2fzyUvsyIKjh4hU4OgLex98xH6AsI32823R13V5pn26KKhp6G5u4XyQHQL+2AGveyrw8EuT7lHgulhRGA3m2iN1KhTbVeBEQCT/1/NNCF7C6ZLG19PwF5jwBlZ3vQThU= X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1724; 31:mh40qI3NX7wn7QYqQDGhERPR1FSHsfvm/pCFbGzSoBdKzDg8/63uDDWeokzXfirYpBl+u/masbWixKbeZsOWahtaJ6m0Y9Mw6KHg/p6XNXpjAGXsnzWqAxsSyFRIv4QZSRjo7J7YeHAiO9mybGtSR6FslR0b5sLF6J1f3PqJIWftlB+3Ywy8jNHagCEg8JHSo+mt0I6IwoqqkqLncj6hdMBUFrpKyMH4QuJaCIwwITZSkvb9HL7jD/nFLWslIFsWj9CG8GEasv1CRo+MZmc6jA==; 20:wv/rjvkwlzxrj0nDWM2HJ9Nj+rbjTGhJzsXf1vEydv5G8gMk9cc/lm7V066zSaqOzJSNFhr4EOvXN4YqGZlUItaij7Kbcx23Whdxe4bmzSzZWD7bd7NKvoNZM2Pe9xzOFYofOYQ8t+dMB6ch+4Dj++GIMep7OIXBrKLAR66a0L7MC2qILMckqQa2JDdzra0N4+75vFvUQvVT0vxwXkj942PPkS78qoiETYu5HQGBObhNRdTHSE4HG+I1XuMPJglzimIKYOJVhbGxefjOhRAjiWFR4DAfiDtwclvnmz9zpvLDLjRL9U7hHtNL7Ob93WRCmfz2rIvOJ7UzJINC8Z0mgEPqCqstoecogpAybkYi+0kZUdaSFkd/DDrBCc8ifQ8IUbKMOuaGZVl7YYrqxiG08fP+oFCVn5ppRU5NxTcelBKnmGY5WcXuktR8DXaKlWY/xvTFYq74UqFf0sLVx3PmpcSkAbpj3v08R1Ov4EW1z90iAbbJGpj4nkCjyDqE1bmwExZHjnK9+FO+1LE6Ur/8bF54DzYOjh7QgMYXpHmTjUxk0yCgsc6q9w9fWTRm3UoIzDcf4JG0IrFfHi3h1hUR4c4s9GKx02i4I6zpNUkjcUA= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(93006095)(100000703101)(100105400095)(10201501046)(3002001)(6041248)(20161123558100)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123562025)(20161123555025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BY1PR0701MB1724; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BY1PR0701MB1724; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY1PR0701MB1724; 4:asaFBx+hlzRBYTB3jLXqK8+Gp8kca0NsxMjjjV/y?= =?us-ascii?Q?J/ve/H6r7Ptw8CDmIydosBCew9/HJP1Agd7Hr5wyMdFmlfOZED0wP9izR9JS?= =?us-ascii?Q?gsItHbtORJgo66q4zz6xixzaMTcQpVYlMRmWZXZzC7o87YJ0yGwFyrBREV1x?= =?us-ascii?Q?/ewAVVLKRqEKWBc3aJ0PJ7BiAudSgQ+Pl4P6csxIl3PfdNHSHwvkwTSzhQ/S?= =?us-ascii?Q?ScYA4wjz1wGuFVqSKTeU5JvqDuNmb7UfaTzUaH+6z2br2svAyfShdTaai7ey?= =?us-ascii?Q?YDb6+BFPqLitJ2SZYc1nFMVXW7BxGGt0K4GpjNDCpt7LnLqm0CKMLL6fiLrd?= =?us-ascii?Q?lApEt+4rYp5imo/MErKG/orjyPKIf9IDhczscGCLHlsn6oTdOS4Xtw8cmabP?= =?us-ascii?Q?mId0D+CPQC3nXvScFJGSccbZCWwcqBKYu9KCAI25FdrfCSQs/lQP0CRQ3JbQ?= =?us-ascii?Q?OEhOLwG14uzAya5E1cyUmZsGLs9x+fGFnuQs67UVc9xnf5yG9SRY50YbW7tP?= =?us-ascii?Q?W3PJBicjcL/WJj4A3jkTmGphYwkViUEzimuK/2T5rzDeq/e3UDGLBCKULN94?= =?us-ascii?Q?cnn/kr0bRtUY9Ewkn4nzDirPVaCtt97BoGK5cUikyu2Jhq7jEP/oOxivTXAZ?= =?us-ascii?Q?kUjPr1m7yMrklCT+J4JCwXLYAL1EMN2Z5BESPlkSs9++Tx59ZditrFMfmnQY?= =?us-ascii?Q?/tXmw669EwIc0CfItTkRTCMnFDyPpTjaO/bQdU1DmePeySz6l2FNt85FSPOp?= =?us-ascii?Q?9qYTdMngBqaI9Qx98UHMYQgMm8TyTTABqyX6/742CaocNKVGJg0S1Izl+jII?= =?us-ascii?Q?I4GLngTg6biVSlflCDXsgBf8bUm3KDpUm1tqjhN+nMKg1nNrldVISwZtvzgM?= =?us-ascii?Q?ZswwNqI/vAYCo5gmmeexCDCo4/91C6Q363v0JjnnYVFYPqG9e+UMcDB3j8Az?= =?us-ascii?Q?ikNe9K+0E7VIrtVQ0yfWp53lNPAG/lt7B5F7z9G0xpRp5GNuu/Z/uDFEdasS?= =?us-ascii?Q?3pYQZDykiaZO8SiuaVzXnUSffNp1WW3NyjnHB+lxjcObE4Kt2XA0LPTLyXw3?= =?us-ascii?Q?N8WjZdru1Rgw4QA5inDs75w6oyxzADRebhD9kKla8q86IVVJACHKkbgzzml0?= =?us-ascii?Q?eP+kqQ0mfQEuXn/elpiW4I1FSaYdpDYq6y4xE/4tOpw+ZrQ8FNMlGA=3D=3D?= X-Forefront-PRVS: 0337AFFE9A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39450400003)(39850400002)(39410400002)(39840400002)(39400400002)(13464003)(42186005)(2906002)(7736002)(305945005)(72206003)(966005)(5009440100003)(23726003)(81166006)(8676002)(1076002)(6496005)(25786009)(6916009)(5660300001)(2950100002)(33656002)(42882006)(53936002)(76176999)(33716001)(6246003)(229853002)(66066001)(47776003)(38730400002)(53376002)(55016002)(4326008)(478600001)(9686003)(3846002)(6306002)(54356999)(110136004)(189998001)(6666003)(50986999)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR0701MB1724; H:jerin; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY1PR0701MB1724; 23:EN9ap8lONzyQavfKfyMb9vkmx5NjuOJT4+uD6hl?= =?us-ascii?Q?yXWT+LKOzaSvT2bQm6+PyLI1Ay1lusmSQCMncK0KdpyxA5UV/VefmzldH42H?= =?us-ascii?Q?JYE/Ae+9pQWuDogWjONYcYINdWqYKrNC4ICfMbFqEb9tcgVi2+gymuhtWOp3?= =?us-ascii?Q?r79mUWrkgxPa1pCyjvoQsltH+PWreFChokjmSyqvmu5/O4FPumH99orMOU+A?= =?us-ascii?Q?yW3JgCs1TNqvBfln6BrWMe8RDkG9r4y7yas17+QVHtb6rSZnE1TVEjS5SECn?= =?us-ascii?Q?rmNAqn0m4Um1+maKSJA/MiXf5moc9wDXLNYBlH0U1/lHzuGVCTU5Wc+IGDlj?= =?us-ascii?Q?i/bCaLk9xrn4PWGKhQYHNEJSaMnNylXSDa9JUdNj/I0lwLRt07wsKWZ/I6YA?= =?us-ascii?Q?pSHKit+FI2132qmNEAFbxvW+4IR2HUgBT4OSW2gZK7PzIJYjBs1DjpdgOL1N?= =?us-ascii?Q?IBFdCEGK8MF804S7wOJpdv8xNUiFPeCxi0fy8Enkk0RK4anI5KMujIQIVwzV?= =?us-ascii?Q?MtYU24XV1zi3HJsfBENN0xsDShJE/Ij60ESxzNpIjfetDMGRs9YIeh8LFLWS?= =?us-ascii?Q?kX4sTGwOSo7PoVJA5clA8EUbYcM3eH7rAGdWv0fx0qorL5N72tfbnkSgBQHj?= =?us-ascii?Q?M+dYkRnFlpzedEE6a/fuVzqAzioQRC1q6+/huwQ4ANooEQflAlUdxZsWZU0p?= =?us-ascii?Q?AK1lKzfEsv0rQECHki8FEOL4BjKMyHbNfYFmQWeCkp9UN4G59OZTYGf0wSm4?= =?us-ascii?Q?Tk7C5BCWK0YlNqyQHl/n3PZbbNRZAYemRSeb8O4ey1taYncJXSjYHeQrb+Wb?= =?us-ascii?Q?IvkT3qhEl9ZZT+BIo7ICZjco8+bAdIQMqZk9C9PTtpDjLsDPAkolDip973Or?= =?us-ascii?Q?7Vv66nUoTKWbsP1Y1gPMUqXlzCd4yO8a0ps57tE6oNg55blQVjM0dlvcfP6k?= =?us-ascii?Q?Aw8BnZH4t8UiWAaaxJrDfgXs1y6R97CIieF4gKH0lJNTi2okNZ2XnePd5CrE?= =?us-ascii?Q?ZpPssEaB2NEPjqEAheu61ZYb1j+yOGgBCRnidrDM4/1pDU20r9OmYdEyo9SY?= =?us-ascii?Q?PYdOdWelcLE2qhdf1xC4kKo/lA5c2LRUjFR4ovUXHRqDRS7B19VLIRKc8nVb?= =?us-ascii?Q?4wfCORckHPdOAkkVGzK5FQT25bIcJ+Kkdri2V3lLFyKXr2vt9gdtz1g=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1724; 6:aOKzW/BWgxrLy9l2JRqcGWnVNHD0GY0h+pvTdiNVVNexlUorc2Cn0y2Wa/rINQderfUGeZ4uH9SegrioeanJxkCco9Lbz0RQMlX8cJ3Y1OwAuf5UVal3oMP5PVHHghn3prK5w9M49WuFSpaYO43oM1T6YS43kIEtczyaAWbivveVL3QmbOv8DAGg7Qi7tCxoJyXIt6LILlsa9FoUThaxpTeb0YPoCajkjuXMjJfoJkWnEXfz/Xd1w35kxqSKuBBfzl93U8LBM6zHuKsvpXWG1gtueL7wR9Ta+pKUFjXaoQwNAiwW4C10xXugWCgmyPN6/UgfwAFM1UxI8EkWjLDKkIO5NQxMLJq2m7tf5zGrd7GA29gANmS+npQp0BHzKuSCgXCWd3DxW5o8F1obKLkCvMPNeXHB4MlsyRQYfHsNUF7EXCC8jS7MgkF4jKkgWrUBwvqygRCz06nPggCykOBSaA6iulxhLsE9MHGFV0sjUBk6a8coGZltZquPE59GxJV2MHiuhQVssKY02CG0fTof+g== X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1724; 5:Y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change-CrossTenant-OriginalArrivalTime: 13 Jun 2017 04:43:50.7106 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1724 Subject: Re: [dpdk-dev] [PATCH v3 1/2] eal/pci: introduce a PCI driver flag 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, 13 Jun 2017 04:43:55 -0000 -----Original Message----- > Date: Mon, 12 Jun 2017 18:21:33 +0200 > From: Thomas Monjalon > To: Jerin Jacob > Cc: dev@dpdk.org, ferruh.yigit@intel.com > Subject: Re: [dpdk-dev] [PATCH v3 1/2] eal/pci: introduce a PCI driver flag > > 09/06/2017 12:27, Jerin Jacob: > > Some ethdev devices like nicvf thunderx PMD need special treatment for > > Secondary queue set(SQS) PCIe VF devices, where, it expects to not unmap > > or free the memory without registering the ethdev subsystem. > > > > Introducing a new RTE_PCI_DRV_KEEP_MAPPED_RES > > PCI driver flag to request PCI subsystem to not unmap the mapped PCI > > resources(PCI BAR address) if unsupported device detected. > > > > Suggested-by: Ferruh Yigit > > Signed-off-by: Jerin Jacob > [...] > > --- a/lib/librte_eal/common/eal_common_pci.c > > +++ b/lib/librte_eal/common/eal_common_pci.c > > @@ -221,7 +221,12 @@ rte_pci_probe_one_driver(struct rte_pci_driver *dr, > > ret = dr->probe(dr, dev); > > if (ret) { > > dev->driver = NULL; > > - if (dr->drv_flags & RTE_PCI_DRV_NEED_MAPPING) > > + if ((dr->drv_flags & RTE_PCI_DRV_NEED_MAPPING) && > > + /* Don't unmap if device is unsupported and > > + * driver needs mapped resources. > > + */ > > + !(ret > 0 && > > + (dr->drv_flags & RTE_PCI_DRV_KEEP_MAPPED_RES))) > > rte_pci_unmap_device(dev); > > } > > > > --- a/lib/librte_eal/common/include/rte_pci.h > > +++ b/lib/librte_eal/common/include/rte_pci.h > > +/** Device driver needs to keep mapped resources if unsupported dev detected */ > > +#define RTE_PCI_DRV_KEEP_MAPPED_RES 0x0020 > > If I understand well, you want to map resources but not probe it? Yes. > Shouldn't it be less hacky to probe it as a (new) null class? The Vendor and Class ID is same for those device too so we need to map the PCI bar and have access to know the class of device. If you are concerned about if it an common code change, My first version was without common code change. http://dpdk.org/dev/patchwork/patch/24983/ Ferruh would like to have flag scheme, I think it make sense for PMD maintenance perspective.