From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0088.outbound.protection.outlook.com [104.47.36.88]) by dpdk.org (Postfix) with ESMTP id 90F2CF964 for ; Mon, 27 Mar 2017 07:58:40 +0200 (CEST) Received: from BN3PR03CA0102.namprd03.prod.outlook.com (10.174.66.20) by BY2PR0301MB1957.namprd03.prod.outlook.com (10.163.196.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.991.14; Mon, 27 Mar 2017 05:58:38 +0000 Received: from BY2FFO11FD010.protection.gbl (2a01:111:f400:7c0c::163) by BN3PR03CA0102.outlook.office365.com (2603:10b6:400:4::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.991.14 via Frontend Transport; Mon, 27 Mar 2017 05:58:38 +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 BY2FFO11FD010.mail.protection.outlook.com (10.1.14.74) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.977.7 via Frontend Transport; Mon, 27 Mar 2017 05:58:37 +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 v2R5wZsk009955; Sun, 26 Mar 2017 22:58:36 -0700 To: Ben Walker References: <20170321183215.8357-1-benjamin.walker@intel.com> CC: From: Shreyansh Jain Message-ID: <0ff897d0-0541-652b-c77b-6369c3e41a67@nxp.com> Date: Mon, 27 Mar 2017 11:34:33 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170321183215.8357-1-benjamin.walker@intel.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131350679179644058; (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)(39850400002)(39450400003)(39410400002)(39840400002)(39380400002)(39860400002)(39400400002)(2980300002)(1110001)(1109001)(339900001)(3190300001)(189002)(377454003)(24454002)(199003)(9170700003)(4326008)(33646002)(31696002)(77096006)(305945005)(65826007)(83506001)(36756003)(85426001)(104016004)(6916009)(4001350100001)(2950100002)(86362001)(110136004)(65956001)(189998001)(47776003)(38730400002)(229853002)(6666003)(6246003)(65806001)(53936002)(8936002)(105606002)(54356999)(76176999)(2906002)(5660300001)(356003)(106466001)(31686004)(50986999)(230700001)(81166006)(8676002)(50466002)(64126003)(23746002); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0301MB1957; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:ovrnspm; MX:1; A:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD010; 1:QeRlPu14d+PoopiTMgtsSc0NE6AD5s/SGWSSRArMsuYXavMzKAyW87R/pJVZ74r/N1ZkUoe/LS4AtD8FKMDDif+n8zQK8EmpjoSO0xG3STX3RjEoF3C7LKwNkNMvk5l3b5WLMV7kuvmTGNEvwqFx4DK9ZjhVMthUSGqavaNzBSng5Z++o9GP6FJUcapCjyJVBG/9TPzL3Di+ipsLn0deCPydCyKsp7+K3YZWpJ0CF0jCJm9hlaPr0PJ6e62Bz8uzv81pMjNRhpfeSCx5sNUnlDQlCwkZl9TqkNWEBIs3Qn6PJWqF/jnUdfYuYWFGAZ7LqkI/vtKQ+Bo9D14eiyC7ayT+MpFou2xMnAe8xzmbW+m6QgFHAo0WUKvqYwpIE84PcaP4aJ3wZ2Nh/PYNBfe4XdaQwguRLAIJ6Gb3ybzGZoDcsJwN1mhXAtJOPq88J7K69x2f5qpVXa+MxaGVNxBNQ83KlTXaesISpzsnfciF7VOtLCLCt7VbGjnhimiDgcfiJN4xxBz0gik5ukQ7tpq8Ut090xoCiQvJ0wju3Ev9wWlSd90fEoanviw4DZqIRknPENZ4WBJwGANIpSSB75cF00wDxyj3NICu/4qsjlc2sxCqW3b+Ngqz86hEeEfV9n4c X-MS-Office365-Filtering-Correlation-Id: a6df3550-bebf-4c3c-eb3b-08d474d64ff6 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BY2PR0301MB1957; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB1957; 3:WM+AqvCkh4CFidTRJX29amH4WiBI8pL0kH/MFbyspgJLqDeuhFHpEUmJ7iXJp76vRzsruXpWWvCxB8FHjMcA/cq842c0mZm0V22TF+0HNde4cWECiyXVEJnX+JZ+JcELcXxV4Bopu/vYXdHoyUMqrfFCxI7jsgISuzMOqT53jPBUBsV+4zyrhrciqRHsfRV3IVxsyMc0u40YJKuz5RQdpI0UTak0fCKGjwRiLLP/JeH2z8TY7wTG7JpI2Ya5HcZxSarj3SnlvoF6oacHRgXjHh30ANbTms4TQMi4Taq6G0FLZxD6lQsB4YD2zjCzqkr3f3bTw9KEfj1Bsk3TNiYxVg09RloB7AzNKZz3ADWxMx3Q1E5OU/CrXgoLHrptX9Dt; 25:PoETf306JlnYoMM2ehfVr3BXSr1APljzNcRNM+PkTPTlBiuxt1ngjUADWjLBORxYmFPqakYTNErgF1qVjDt8RzU1p0JwaQyIU4xNuATO+UDhgrb3mfHEUxUl4u/cDmWJiXklVQFJYDnwhbbxZxZ93cnAJY5PVIFR9gWNC8VwqE8N3gQBkwzSLU90fRqmw1YvGsWAcvZhqDV/XvZavBxlCNVwClmxVdPbAwf8f8SxvsE2wNzyJ5USeAeXq1eMZ/F1W3Q+g5PBTSSx98t3/rgstjRU8fjDCWB5qX6lgbTbZH5mJyEAgwqy+Qb5GSIsIsrUSMdGtCvF2fZhmU2aQj8y396UG4PsIjBJTItUg2oRPVJPhIxkTJ9cVW3vS4ukVKK7lHR9ldUivpmcALvMFblrf8K/Heq7xr0/OKQzFfnj3pTVgp8kp8CQ9wXOcofsNmW5qTVwepZEJuq9P4qn3nH9HQ== X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB1957; 31:R7wgleax5q8JvVBmqMu7TpjVaq6I1HhvU8tRn1JQ0YvhJgjZiUqQMH7Gr6ELDucBCU/bFaENGVVA9IbDC8iP6YViwTDXLR5vcL2pew3jLMXyLSA7xtgL8vsoMbjcLGwL54wM0enUHyXQw6JXosY8EdJ3wsDp+SLjD1HaqxJJj6NHHUmnE0c28YIC4+5FAN21IFyd7TCUvMZ7sr+tFFx1h5/7ia3vGuEt50Moj/HPUG7pXid6Eudimz5rB4t7sy8cEMQTMyzXaAoAFVt+fEpLF88An+PYABsB3Vkws/GVjwU= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095060)(601004)(2401047)(13018025)(13023025)(13015025)(8121501046)(13024025)(13017025)(5005006)(3002001)(10201501046)(6055026)(6096035)(20161123563025)(20161123561025)(20161123565025)(20161123556025)(20161123559025); SRVR:BY2PR0301MB1957; BCL:0; PCL:0; RULEID:(400006); SRVR:BY2PR0301MB1957; X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB1957; 4:zM3gSpwUj5hzvt5Q3hIXz3KgshTqrLyaAnifWln/unl4GwDonUaWg6rHFZe6P2uvBVfh7Sp1qnzmWWd1JD5QMDdMzsavPeqI9F1zSvqLbGo2hM2XGSxFh3Fqpp8MXMuY1AK+u/xwUr33ih3Imxgd5nE94yn4HEH+TJVUhvOZ+PcnvUMHhXXK/Oe/SIn3aG8JBUMYhwfmEC1TjwV13vmd5rFAMSpT+eqQy3TDFfYnQD9UlsxQ4OkpAZU0g0jN29KQ54DOHBbzHOvFNIPLseT8vwnTRp6nQwJ7TAD769jH5QGfqqtwPGuWs6J0v5j61bf0mHMQ+yr/11Jfc3RjmNL7md0pauhIQh3RpK9sDfVZigBlEJ9wqy18eGHXv5bl3CIb6OBf332Znj3XinwHYOuH+nc1O6eEiKpx3wPwHKB4Sv8WNdlK7NmrKQDcxvBdxgR5i/ySz3u4Dyeaotm6cTD0S3uNlr1HodfU14D143STyKCkNJJk25trpkxbZBDN8OpQARxZz9rLWW9jNJ1mN6+++45wi0dQfYOHn9/Tcc7+Lh2SOkxl8q4KJNBAu5OU+zYrZSq3NyX+AAqmwR+sFns4jspRw07gcbiuzIdLmRjPaRMTnZSk8Bt1TrUa9kWmiwCCBvuTHe510SISJxYK0q/uZRCuPlAmxTUusCI5MJejqRf/BFJzgIujehJS7cFsq2aWAzsU/KZiN6FZMGNRbJlRMghBXOb7HBFd9ymKwmf+TnoL1Qhz+4lPiwMHUbcHVS10qayF+0BMOnDMiswT3ETc8w== X-Forefront-PRVS: 02596AB7DA X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; BY2PR0301MB1957; 23:H9fz03jcnjF5zIpP7WCLZvZMaTPRGgZk8bW?= =?Windows-1252?Q?V0buDCSFnn1m50pUfm9uBS/SryUDa8HwoQ0BxasGJPZ+3FfKjIaQWUal?= =?Windows-1252?Q?31n6Ett2N15uOs2WmFSwMmhOEr+ULb8/PKoRuWsSEkocmitrA3M4trVn?= =?Windows-1252?Q?RqoqhAQGGqyvDB7qNYit1KnmGOk/W5AbWvirLYrmOqyXynBficTm9wF1?= =?Windows-1252?Q?rU7cfhXAdBSc1Eifu0Wh3To6x5s5p7p+KrHkdh6p9LSriM+Y4KVpc8ro?= =?Windows-1252?Q?yCDNjhZIfhh0YPgoxRNlf3FTwlrztH97//4r/TLj87lfg6GqjCy4aCS7?= =?Windows-1252?Q?AKU3f6g5JdHDEUkSLzuo6MvhX2rJNIFurM/dVXrH8Su42LXJFutbTG4z?= =?Windows-1252?Q?GVqfzZYelUu80ukIeq9ZSw4PtZNaUF8wn4lFC89trGqHG71gTQdSlmNf?= =?Windows-1252?Q?qcMapul5fxP0+SzdodBdx9iutqOC0b1XrSJfxH5gOLTHzfjllD78avOf?= =?Windows-1252?Q?+Kw+Dwi7aau7Uhz0geauk4IEfzSsR5uu9W/bOoUEv6thIiRCQ2DAzkVT?= =?Windows-1252?Q?VMJ9s4Eu6ouUOEF8EQ38tWqh9wkbokc26JuMk295Cgvmp3t1fM6sKhsx?= =?Windows-1252?Q?3HtwUHjoxMNAZJmA4SA6PxT+Xi6psncJBNwzwyOwCutqlYi0YX2W/k6B?= =?Windows-1252?Q?EV6i+W+m0hrpsPdmI38jT/sYEJC1bB9cld99XqhyPGBZH1dHrcFBQLiX?= =?Windows-1252?Q?yeYYEgsa5K5mNM+u2NthsvAPDdDcP8KhPHYU/rKyk4FDueekKLPaCA+/?= =?Windows-1252?Q?A+H50cUV/SlPqnl2jIO2WjUZ+oqInAP6ouBVm/qiVpOuDcWDJcGlFRko?= =?Windows-1252?Q?Z1Oko+GjNzjO18eZzDnKCdzH6R+fco4X6sux+QBtsGlxJrf37lGvhgYt?= =?Windows-1252?Q?hatdrGV0vRj+6EYBxoMX9Pb8EiJmydw7jj0ZnjLDHaMHY17nkphQVNH2?= =?Windows-1252?Q?T0ZfvQ3Tn6Y8f0OYr0YZVvWaRWozXh4Fd7oyEppmWF1iZzItvxnfyZe2?= =?Windows-1252?Q?FH+PmzZSQUpzPw/rgCXgL9vcCmmuPS92qr8IamZqSscz4hx2zekl+3BP?= =?Windows-1252?Q?RelpwUVDkqQBMXSJDqgMD2ClVlvr7JOZo5mIS3ZIzUTKfw+MCU4K3Q5w?= =?Windows-1252?Q?8J/J3yXzrjmAkDG6wwV8L2PzJfcV2qcxJjXjoBq8HGK6DTx34Dw2AGTH?= =?Windows-1252?Q?rJc9WjmuLNXC66Pxqe7g9j5RpbZdaNZeafv6VPf76oOA1csz2ij8LHSA?= =?Windows-1252?Q?wO+kWs6fH9siBA7JkPjPexLlpHmRV6gIdu+0mYz0+hsLnhlYMLYivGdF?= =?Windows-1252?Q?kstwhH1nOLjyKrMEoctZoDPAv89Dm2sBsoq+rv7AuPY9Cb0b1AbFH92f?= =?Windows-1252?Q?TML5oX2/+GCJEMXxxyV8MopUWIkMm6Hvs1SogN7rX+A7gpKatlDe2SNC?= =?Windows-1252?Q?O6oOGN77Kiat1EgG4ic48tS8VphXE6ICntZh+JwywLSR/qY2NWvJLEF3?= =?Windows-1252?Q?Hb3KafgtbdVcqYhE=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB1957; 6:dfdRBc1+aiY7ZACDxGWkzqtPbjAbxmS+rd5xOANLaNCuStAle/12JxODMqFb+X2vCSb7y6Vn/XSUDmUAmS2LX7uaMFKmYRzeuaQHZEor2KmdAuYZighlNUYD/VLTUcYRvfx7rTWw9qrhAvrn0vTWNEOkoLdlS3tK804tmIDId3873aFzL6E4V2WkT2vJL/qjKqCv8RdUvF+WhcunUDRmQgbbPAepLrbf5KgnCJH7v0z2riba70mpM3Aj72F+dCKPi8VPGORItoE7lZxSr2ircOqql8y1hhFCoX3g70xdAUmbyA+xyzGuxowrxH48QH7ZIuKDqYWWghqGYClMmPrvH4rDFsFNw9uRnPQ+cyuWB7wjI6kvY/1etOdOD/kaK7YZP+SZqzsgWqsSPZIkgq7k3I+F8kqtml5UAtsypgDbf+k=; 5:bapPh0ljBOPBBWgL9Txrg6ZuIaUi6oYhostJNXrXdz+vHm/iIJsz+aEuD0M/yG970ebDTz0DOAAd48zdxNjp0t9IMix7XsKdQiq9wPtHE2zfic39Y/QLrV0iY5+kiDTqgy9SAIFGowqU3YOBF2DnWFu5W4/xMjj8G7NHA23sYlN08kpmHzI3Keip4R6jDSbC; 24:xgAgDyByGq7rMhSBy8OLcJA89fYTgt53Ar81fFljZN6mUNTRdulMNFLA7jsg2bC5gFXT4X0AG+Cy6idIyhhlhKp8cm1ocdNvi4zeCq8CjYY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR0301MB1957; 7:TXkBX9zZT8IMLWIgmUE3HFj+xz8PvnNpfkz3KkKr1fMaYsI5drnm6yiqxFo0+d3baQQ7TmMgB6cSyMftKiTQytA0khkau0A2JYrEf0C1swuVXOec25u41iLx68CZ42FdP6k3XlFXcekrH3YHMprDNncWVRn8Epe+Kb9S/zDiibMmhMcpxpxzrt5Z0P+bR3STOo4pj0ObOP7rn8PKKXrE3sZA+IAge5rBM7tcH+Y/3fssqHOGp54DiD+lU7SDQD2jrLSGQI3JIG2XCzLR3VYYmnpT0l7sPHlFEzu/m9kB9SrErCfWHR4LwxHo6TYD/rZlysmtR1oqW8wB19hSvBpasQ== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Mar 2017 05:58:37.7616 (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: BY2PR0301MB1957 Subject: Re: [dpdk-dev] [PATCH] eal: Fix device registration on FreeBSD 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, 27 Mar 2017 05:58:41 -0000 On Wednesday 22 March 2017 12:02 AM, Ben Walker wrote: > The FreeBSD implementation wasn't registering new devices > with the device framework on start up. However, common > code attempts to unregister them on shutdown which causes > a SEGFAULT. This fix makes the FreeBSD code do the same > thing as the Linux code for registration. > > Signed-off-by: Ben Walker > --- > lib/librte_eal/bsdapp/eal/eal_pci.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/lib/librte_eal/bsdapp/eal/eal_pci.c b/lib/librte_eal/bsdapp/eal/eal_pci.c > index 3a5c315..16a1743 100644 > --- a/lib/librte_eal/bsdapp/eal/eal_pci.c > +++ b/lib/librte_eal/bsdapp/eal/eal_pci.c > @@ -314,6 +314,7 @@ pci_scan_one(int dev_pci_fd, struct pci_conf *conf) > > /* device is valid, add in list (sorted) */ > if (TAILQ_EMPTY(&pci_device_list)) { > + rte_eal_device_insert(&dev->device); > TAILQ_INSERT_TAIL(&pci_device_list, dev, next); > } > else { > @@ -326,7 +327,7 @@ pci_scan_one(int dev_pci_fd, struct pci_conf *conf) > continue; > else if (ret < 0) { > TAILQ_INSERT_BEFORE(dev2, dev, next); > - return 0; > + rte_eal_device_insert(&dev->device); > } else { /* already registered */ > dev2->kdrv = dev->kdrv; > dev2->max_vfs = dev->max_vfs; > @@ -334,9 +335,10 @@ pci_scan_one(int dev_pci_fd, struct pci_conf *conf) > dev->mem_resource, > sizeof(dev->mem_resource)); > free(dev); > - return 0; > } > + return 0; > } > + rte_eal_device_insert(&dev->device); > TAILQ_INSERT_TAIL(&pci_device_list, dev, next); > } > > I can't vouch for BSD as I don't have that environment to verify. But, the patch looks fine to me as compared to Linux changes. so, if my Ack makes sense: Acked-by: Shreyansh Jain