From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0070.outbound.protection.outlook.com [104.47.40.70]) by dpdk.org (Postfix) with ESMTP id 982542BA1 for ; Fri, 9 Jun 2017 11:28:14 +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=xqXIFwYX9Chqes9bVRGoSSDqgV0Sz3MJ8vRSCkyQkSA=; b=PiAT+DUpkF/mSv6p3y5Cj2q/igEmmMAINrDQRd/ygWFwuvwp6SqHrkl+xFCqn6CDhhI9IQBSmVpn9MOR6PawDoXIjFAQhMIcbtxTaCaX2NVkqOQyV9M/nRaKJqCO4PpXE0/7GAZoFkKEqiqfYiHuvxIieD1ehmu0t3dsMTiU6XY= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=caviumnetworks.com; Received: from jerin (111.93.218.67) by BLUPR0701MB1714.namprd07.prod.outlook.com (10.163.85.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1143.10; Fri, 9 Jun 2017 09:28:09 +0000 Date: Fri, 9 Jun 2017 14:57:07 +0530 From: Jerin Jacob To: Ferruh Yigit Cc: dev@dpdk.org, thomas@monjalon.net Message-ID: <20170609092707.GA3956@jerin> References: <20170601130530.11443-1-jerin.jacob@caviumnetworks.com> <20170608114414.8787-1-jerin.jacob@caviumnetworks.com> <20170608171557.GB15360@jerin> <979ff41d-8866-6bab-d102-74c605fb7e03@intel.com> <20170609043541.GA1708@jerin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.3 (2017-05-23) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BMXPR01CA0005.INDPRD01.PROD.OUTLOOK.COM (10.174.214.143) To BLUPR0701MB1714.namprd07.prod.outlook.com (10.163.85.140) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BLUPR0701MB1714: X-MS-Office365-Filtering-Correlation-Id: 8edc2c71-11e8-4b60-ce0b-08d4af19d881 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BLUPR0701MB1714; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 3:0GU3PZZkjrTsrp1rBa5A9FyX+jhudCqPdQ3cFB/8UU0ADEKQwxbsB7g4BV1aukxVbmsXaEux+fKQdNOt2fXJa1kztDbMbuvhYa9qRs7NVyJyRVNzFupQ5GgqdBNWBPiijwAL66XsWyR/nBUp3UgR10gRfeHhR2YFWxkllTOGAea6N7H1XY7ww+Z5a5N8v/LPTkbMvZYxTq4DRjM0m/uyfd+Mcq2j3jTCtiemiQCyb1/x2uaMg1m8gQRvmG6G1EiwcEoftEH+L1Iw34KBeH0wKmtlHGn6DjfEo0xj6pWagRgWZAYeladNzto8R11S7uCx1mfxa1zR7ASLZoaZvG6JhQ==; 25:BO4XpNUXS2rOl9492zf9F4Z9JWALKjqBeMiJyBQQMPXB9BLwdnsp/anEz+jblXYmbEyUj8C5/HFAKSQmvGCNaS6ZsgQ0ET9TkUL2FTA+2LM6WXGuoBaVVYzWN4BKmBhNNtVx8aWSEK1b0VEG/2/KGt+8fzWJWvgUpwOLID89Jq4grdac2YuTKjOyI9W1jU3TOVcSLRfbHE8pFkLY7MKTRdfZ192ggYQum0YzNNXEI0JB7pZ0hNT1QzdlHcl1Mpfuf7Rw5NL/aAzEXb4zVC7lKVLcPBh5cec0zHg9lZat9wN8PE/Y1Gtr7GcwPdWVyqPqupTk+B56+9p2ymM5TIat95pnE63lyCPCI/kGC9Jmg246mloJn/yW4c4364NjECvhXt2DoOO6hIZByYCSx0GXOneqhel+JNhtQXS4mxDD0IfECDsB6ckdGTrYfel+BrkutXDssvP3f6wLUtKpwCSH3ln0IO1M8Gh5Q0vpF0bRUBU= X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 31:Cwk85r8Nd3y70Y4oKhTCP0k6mIwNZdHMWipruXZvlz/3wGwaeC1Qta/IPqINGGQ0PtHAMHFqFsg9FYnAj9bPdxK+2z2b1sboXhbm43/9dTRBU5S0ZAkEeRrW1i1MBoWfAOQUoqPSMkVUWL3gooSXUAdDpkXSzsqvCUV/66sWrIhdyCoazkWsnEQJCIVe99lbv/OdkhSiNpQQRCJMS9F6/o0/A8gKaFul/UhuktCu4u4uaZd+g4DbYC/Ix/hVSUBplE1KVBEGGV5xnH717YjVtg==; 20:sQdfc+elLa5eYrOpUwFmvNyCt8MFGXEmxA5wMJgT6I7Bl2EHNLLtVulVd2+ke5u/eMtA7AqKLQqHpXBM+UDXWC1CIpef7D7h7osvx/uvoFIoSeSKkdfFqqLFKIf6iAmJEQ2tyt1uedxipKTZeWVYlLgCXhwvvZrOr/3m+3HkcnesbW3wKC1xFo53kRCYWckj8u9LWAt2f7CtEDp54ZEMSavSQgExxiF8O2KxXi9ESobZOQdtRJs1Rpkn89R4yN7CX1TAiGQmPFAgenLHJFqUuqdKUFNOi8FPhILdonKkaoiIc7VPT0j3x37G+iCcjIV8WDKyAGsBfLhYpTTvz3WgJUn7YpiGbxiKWay67bOFU1cKajP+znvFRohjqoGpw6P9+678G1R07eZ0rKJLB69HkQyXO9wH4wH7wJTqz4XU7oZIU0KNzPiRfi8aMxOPVjMCA7KWvsKypgpx/cSXF57t4IXBk4CabZJZGjpeCy1O4luxwK4J9bpi17pkHnhIigeIvSv216wfDK5YmS8vT1zsEAIq+4p9UjNJ5te1q9WMH0n/JnmQgk/xO+RSNtcYRz+aGs5ORTcJX2avxiuJJI6xLOGwzSUki4jJgN5xeRzga1Q= 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)(3002001)(100000703101)(100105400095)(10201501046)(6041248)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123564025)(20161123560025)(20161123562025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BLUPR0701MB1714; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BLUPR0701MB1714; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1714; 4:E61S2XLaWvG13qsXxqkLzBlaab0bCnl6EALPuT42?= =?us-ascii?Q?Anjjz9Q6bUygogkCXfilmdc4YwatF+Ox4aPA++9jUFqdW0xnygsaLBaYLfxQ?= =?us-ascii?Q?MOkHigxx4Tdmoezg+tUx6Y9as1XTLqvLZpevRaXAvpO3Bxc9eXCfF4Oi/VK5?= =?us-ascii?Q?1I6mzeN0RKKuCT421Eqttg/LtfxZYLqJrYcF/jmkBX7ozl2UZHpltCA/CIVm?= =?us-ascii?Q?2vUHnOa4Z4T4GfBl+6gSFsvDbpiR62479nYxP4XvPRc/60NTOO7IdqhkZhSj?= =?us-ascii?Q?dN1oQbyFKjwk4UPGbrr8Z0jHDZdkajPkZgXtzhZ7rMkB37JsmkEHRuxH+6qA?= =?us-ascii?Q?gqRNLTbJNSRnUYVyhhbw0Mx/LIT+UktXvDAUiP7BXudeTxwXqXn1S3m24/wj?= =?us-ascii?Q?ZlJowUYg1W/YHieTn4jFd/3f8S/PaKGdmtEBntHs+5D+wP4pLDPWd08izoSM?= =?us-ascii?Q?LH3l7vPh2UxSWyA+YNVxQ6uwPCklb+gjjXMxMR9MhcfgVwsGCnLEfDUZd5Hv?= =?us-ascii?Q?lzt4uU+EI2FwQ8Q7rYLw1N+aOeln2WjgFYdnegOtJP0sUYZO3UCRe+gyrTlm?= =?us-ascii?Q?+SCeBsunghY4yD31nRJS5i7sHTmWo3xRFvnLl1aAabXpneItPX+Rjk7cuc/N?= =?us-ascii?Q?fXvZdDDCTiiFBtLV5ioYUnRtkaeH1624WmUy4PEHDARgfIYPKc/p52Q8yw3r?= =?us-ascii?Q?AvqPvUBQmRX2FGg9iSso1R6Wmzf4ro15xPYCwmg/xpXCXiDzRVeLyrW0XgWO?= =?us-ascii?Q?w2wFtzGIcXq67Kl/g5conwblBvaY3RWekaRRk1NVhpspLsJQ/eBIytRqfLgo?= =?us-ascii?Q?veUyrx5PduYjlpHxtUL8tdmv8hwnolPsqupfC0sulSgVa6kul3Wo9DsCm/+b?= =?us-ascii?Q?hiU9LF0QHrgHLUJEsCEUL8OQC7xR5RTlRetasjnIa/3+EJPh0HBmQHBge1rs?= =?us-ascii?Q?IEzZm4TbyvyEnhRVpCTBR4tutwACEPw0lGx1RziM+y8IlpaGDOejKin4zcvM?= =?us-ascii?Q?yDdu868bXpJzmaYQK5jDGuKfGdCh6U0V+UEIkoIFa/3CJplcu8Jkcf9xQsBY?= =?us-ascii?Q?RZjE7445nyWtDYZNymrHX1ip0BSw3OrK+p2t5ZOKzsi94jmfagzM+/aAVBZG?= =?us-ascii?Q?cMY5jBIeAFVbpbG67YRJzW8lf0oV6kW1Tl78779MLE2xHCjBvkSgvA=3D=3D?= X-Forefront-PRVS: 03333C607F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39400400002)(39410400002)(39850400002)(39840400002)(39450400003)(377454003)(24454002)(13464003)(23726003)(38730400002)(42186005)(6246003)(3846002)(8676002)(93886004)(33716001)(1076002)(229853002)(6496005)(81166006)(110136004)(47776003)(66066001)(6916009)(5660300001)(53936002)(42882006)(9686003)(2906002)(53546009)(72206003)(76176999)(54356999)(50986999)(2950100002)(7736002)(55016002)(25786009)(5009440100003)(33656002)(189998001)(4326008)(478600001)(305945005)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1714; H:jerin; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1714; 23:yVgfc7Q+9bYsmfk5h3BNhgSYtpi1EpD9mM7y5TC?= =?us-ascii?Q?GCGX7rECnoIavO/vOmsJiuiyyKBpSiBLbSCaTDCOrAhtCwaHq5OlTmkDhN6+?= =?us-ascii?Q?GSFAAN8NJbEuiRokrNPUL4NMu8rphXY08dVuxkL41Ef6OBUHRv4hx8ayKcJC?= =?us-ascii?Q?5qFPiun/ojnhq1TUu+l860gzDCMNawU8lLTHMaHSG0MvhEdFUV/JlA5cAboB?= =?us-ascii?Q?ublWWEbj1xuh7wBnC8bYAxY6ss4WVAIJOlCMEnTAp8UdeyNTccJY/ONSu512?= =?us-ascii?Q?rmjnsWT4jyKJtRrcbsey+onZzORU5PSmgFsep4/1QoJBxa1SHRweYXAPp57d?= =?us-ascii?Q?KHV9JN9Kkmfc064VupwHAPKQViztPfz0a02p8DqO4NV/wajqmTRQNP/Ui5sY?= =?us-ascii?Q?pN1XgvL1zlLuYid3+EkAz9xcqvmiN/269Utezaewj/UIeWlJBCz0aliaV5vL?= =?us-ascii?Q?mmiQgPVOpr1XVsootKd17yg/tz7Fy3aVI7dY0XotxTXe4sxdKpcYYUcT7+9q?= =?us-ascii?Q?S/SYQeReqldBTD0xzQD4tiDylLs80whaPcMj0koyiRdAqv59r0D+JhA1Gq6m?= =?us-ascii?Q?Ofpi8EXoS8X51UxPp+zxTgXAm3grkAVboadRWxwJAJwvlnF5A2jF+fZ/0T+x?= =?us-ascii?Q?X+g/nk7GXAZf1dQa8Zu6q6CnwtC3qw/Z4b4S1pdR+GcD/W6P2X6OGGnjftTo?= =?us-ascii?Q?q73jGGo4rN5lm80HxicSl6P5Ybw3B9LmmnG+/f8IkBOaMiSCnGMvf1vrncSe?= =?us-ascii?Q?mdeLPyOhhsQ9nqR8hPA6jMfR7pPTWSUT2wtiIbYw1iK0gtfHnDaL7gDdCAPq?= =?us-ascii?Q?n269/n1MKtJbeoK+3lttMVOvtm0uPW1MAGO2UIsXhFoMjZ7kYxHQ1N5ZGVZo?= =?us-ascii?Q?sCmuf1bZqGSsfi3R8eShno0Ss9SXD8ud7YaxXjcwMkQAv21VAUwGV5/gBsav?= =?us-ascii?Q?5NFRxmOVOOGzvivCvk6Cm72Yl6HdnwlEgJfgZYtCZ+ix1f3byz38iwgY0P1U?= =?us-ascii?Q?PiAlBJr6q0DyAMjXt0y4fNI5OOo2QAuEHe7MGs82Aqd0Z4EEIbedFPwOKlQU?= =?us-ascii?Q?e733iGagK0VPA92jUczLEKCiPXTxC6mIM8fBvBHlGU3r0hqkTfFynRrFYiuw?= =?us-ascii?Q?jjdMZ8lctbS9YdUocpVUYFcfEpGLtEfQitre39rP5QMZVquCUpcxEF+gDfEt?= =?us-ascii?Q?c9OM6yhb7ZmbuOv0=3D?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 6:MEcBmqE74zxN3MNJ0o6ppzf0xraVF5UgBoNN2L51DxAy8EP8zH8GnbKhBW1pnM2147HSivMw3msqFmpyUZrhAxxIAqj6nIibsfeHPM+5hbeVOJoqALttyu2i1CV7G4nFov3XYhMNQtd7nXAfqL/EKKwHs2+kfZF8A/mSsDGu+SgdvaKg/r/J9vMVo9V8Cs46luq7uvxhk3l878FjKaeGz8+fqLRA5BK4br4WsgYelLjG7s3mFfv6eQJ3c+Y6JyPI4yqAY/p6fLRbDdlmKXtdmx4er1U+tPrSg87kEpLc4GW/T2WJcxGQn+3tD3NBS+0VcNYI4uhaHoAvUFhVifoC9h8pw9SpnKVY81ORDQovZ1fTxWQ24dorZ8x9UohtwMAn/v8OrEN+fVsA49rw6IqRidtKP3veXtEcvfGzfj0JjtN0cb98TgMcnUQVUYH1/wnitV369yyJUXz8wrBg1VqvJu+F/mcRdibGeDZ9arRzJxdsqVrhtOPlLNit1lERo/7fZkvLvNroShkOHBsX8xqIhQ== X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 5:PB3XxMm3NsDWNStwwQRCswVlMpNizFdOPOcYqc4hOH65GMShNqZmbTohI7flmVwpK40ysryXfeVypoVlIuWbhI9kfAHTnQsOWjAIH3Nfu1ZeFcCd65XfJXSs2ZuVJcbdhZ3khiCXjhDIJH8zoxthhPpx6T23UsJlXe7xszL/D4zqlTAXjm2c+D3MtO56AjXwXNelzEUcETLBVa4w14Hg4Y0XIDz1iatoXTwuTzgJKip7bwsbl3NwcOlYw7060nHl9idfD0Kl8/najiwaV6YOL0oegxH8VInq+GKS70EyqSgFf6SiJOevElxbdB88CvbEuSHNwz75kYHrQ68oKmZ8Y2topvW9xQ0NnlDIIOYYk7l/k4RQzk4ikzzRQpqCKUUw90aE2ZRRRLwXpI6h3WVgD/R4RovXElvCijW8l/NV5+uwd919VPEUbenyQEb2ruZUVxB+dJ5NURGIom6xx529O6hW+jtxWjxqGmO9NVXXRxqd2O0PNn/0N+nf/PZZ8dk3; 24:8/GRB0hXk4TRTw5etFs0Oc3CfsQb9UxwZfkYmQ+HfQihe4u09lgHQLvbN5oKt1vr6mWDZciSUylO3IYQiHO4AhC+e86/s20MyrGmDhvxwKo= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1714; 7:41brLkX83oZrj8cjW/IPrK9AHodlMuMbeNO686kET+XPYrgcAo7Sv/S9fZzek+ahwcPDm8XacpQdcoCjGifKd6jvNlOW4EG6gMk0px+lH3uvxVxCetNPP6n8jIUyL9yJoSHw6W1/o3mVbktvar4Y7AMi/xTXxVAGB7rmzraFBNReJZ65U0zaF78HeCNcz/qijUG8E7niY691fq/+Lfz0ASM6UQAJHuC+ziWf+2PEg53QfsI3tScrVKTpNoT5vaZPerYk22SaSGBDR9Iwi53FAI8hO+dtMd7o/RlQsWlNJevy7W9pKFa8fPl4b9OAnjwl5ys5nSsq+Lh60NWmyd1brQ== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jun 2017 09:28:09.3604 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1714 Subject: Re: [dpdk-dev] [PATCH v2 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: Fri, 09 Jun 2017 09:28:15 -0000 -----Original Message----- > Date: Fri, 9 Jun 2017 10:13:56 +0100 > From: Ferruh Yigit > To: Jerin Jacob > CC: dev@dpdk.org, thomas@monjalon.net > Subject: Re: [dpdk-dev] [PATCH v2 1/2] eal/pci: introduce a PCI driver flag > User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 > Thunderbird/52.1.1 > > On 6/9/2017 5:35 AM, Jerin Jacob wrote: > > -----Original Message----- > >> Date: Thu, 8 Jun 2017 20:44:17 +0100 > >> From: Ferruh Yigit > >> To: Jerin Jacob > >> CC: dev@dpdk.org, thomas@monjalon.net > >> Subject: Re: [dpdk-dev] [PATCH v2 1/2] eal/pci: introduce a PCI driver flag > >> User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 > >> Thunderbird/52.1.1 > >> > >> On 6/8/2017 6:15 PM, Jerin Jacob wrote: > >>> -----Original Message----- > >>>> Date: Thu, 8 Jun 2017 15:40:33 +0100 > >>>> From: Ferruh Yigit > >>>> To: Jerin Jacob , dev@dpdk.org > >>>> CC: thomas@monjalon.net > >>>> Subject: Re: [dpdk-dev] [PATCH v2 1/2] eal/pci: introduce a PCI driver flag > >>>> User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 > >>>> Thunderbird/52.1.1 > >>>> > >>>> On 6/8/2017 12:44 PM, Jerin Jacob wrote: > >>>>> 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. > >>>>> > >>>>> Signed-off-by: Jerin Jacob > >>>> > >>>> <...> > >>>> > >>>>> @@ -235,6 +240,7 @@ rte_pci_probe_one_driver(struct rte_pci_driver *dr, > >>>>> static int > >>>>> rte_pci_detach_dev(struct rte_pci_device *dev) > >>>>> { > >>>>> + int ret = 0; > >>>>> struct rte_pci_addr *loc; > >>>>> struct rte_pci_driver *dr; > >>>>> > >>>>> @@ -251,13 +257,18 @@ rte_pci_detach_dev(struct rte_pci_device *dev) > >>>>> RTE_LOG(DEBUG, EAL, " remove driver: %x:%x %s\n", dev->id.vendor_id, > >>>>> dev->id.device_id, dr->driver.name); > >>>>> > >>>>> - if (dr->remove && (dr->remove(dev) < 0)) > >>>>> - return -1; /* negative value is an error */ > >>>>> + if (dr->remove) { > >>>>> + ret = dr->remove(dev); > >>>>> + if (ret < 0) > >>>>> + return -1; /* negative value is an error */ > >>>>> + } > >>>>> > >>>>> /* clear driver structure */ > >>>>> 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 dev is unsupported and it needs mapped resources */ > >>>>> + !(ret > 0 && (dr->drv_flags & RTE_PCI_DRV_KEEP_MAPPED_RES))) > >>>> > >>>> Why it is required to keep mapping during detach? > >>> > >>> To keep symmetrical with other(on probe) unmap change. This will > >>> activated only when PMD returns the positive number on remove() so PMD > >>> has control over it. The existing use case, We cannot just detach a single > >>> VF(one SQS VF is _not_ one ethdev port i.e one ethdev port consists of > >>> multiple VFs) so we need control on when to unmap those BARs. > >> > >> For generic eal, there is an explicit request to detach the device, I am > >> not sure about returning success but not releasing the resources based > >> on PMD flag. How this will work with hotplug? > > > > Again it is in the control of PMD. If PMD remove() returns 0 or <0 or > > !RTE_PCI_DRV_KEEP_MAPPED_RES flag it will release the memory. If PMD is > > keeping the resources it can free on primary(!SQS VF) VF detach. > > > >> > >> > >> And specific to your case, -thanks for clarification, since no eth_dev > >> created for SQS VF, rte_eth_dev_pci_generic_remove() won't be useful but > >> assuming you have implemented your remove(), can it be possible to > >> detect SQS VF and act accordingly, or just return error perhaps if you > >> cannot detach that VF? > > > > nicvf PMD is not advertising RTE_ETH_DEV_DETACHABLE capable and it is in > > integrated internal bus so PCI hot-plug may not be a use case for this > > PMD. > > > > if you still think, RTE_PCI_DRV_KEEP_MAPPED_RES check needs to removed from > > rte_pci_detach_dev(), I can do that send a new version. > > I see it is control of PMD but I think it shouldn't. If it is required > to unplug a device it should or return an error, not releasing them but > returning success doesn't sound right. > > For your case it doesn't matter to have this. And the flag is there, > this can be added later if a special use case emerges. Right now I am > for removing check from detach. OK. Yes, As far the current use case concerned, We don't use that flag in detach as detach is not supported. We will revisit this later. I will send the next version with the flag removal in detach().